generated-configure.sh revision 1663:6e5ccf55ed76
138494Sobrien#!/bin/bash
2174313Sobrien#
338494Sobrien# ##########################################################
438494Sobrien# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
538494Sobrien# ##########################################################
638494Sobrien#
738494Sobrien#! /bin/sh
838494Sobrien# Guess values for system-dependent variables and create Makefiles.
938494Sobrien# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
1038494Sobrien#
1138494Sobrien# Report bugs to <build-dev@openjdk.java.net>.
1238494Sobrien#
1338494Sobrien#
1438494Sobrien# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
1538494Sobrien#
1638494Sobrien#
1738494Sobrien# This configure script is free software; the Free Software Foundation
1838494Sobrien# gives unlimited permission to copy, distribute and modify it.
1938494Sobrien## -------------------- ##
2042633Sobrien## M4sh Initialization. ##
2138494Sobrien## -------------------- ##
2238494Sobrien
2338494Sobrien# Be more Bourne compatible
2438494SobrienDUALCASE=1; export DUALCASE # for MKS sh
2538494Sobrienif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
2638494Sobrien  emulate sh
2738494Sobrien  NULLCMD=:
2838494Sobrien  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2938494Sobrien  # is contrary to our usage.  Disable this feature.
3038494Sobrien  alias -g '${1+"$@"}'='"$@"'
3138494Sobrien  setopt NO_GLOB_SUBST
3238494Sobrienelse
3338494Sobrien  case `(set -o) 2>/dev/null` in #(
3438494Sobrien  *posix*) :
3538494Sobrien    set -o posix ;; #(
3638494Sobrien  *) :
3738494Sobrien     ;;
3838494Sobrienesac
3938494Sobrienfi
40174313Sobrien
4138494Sobrien
4238494Sobrienas_nl='
4338494Sobrien'
4438494Sobrienexport as_nl
4538494Sobrien# Printing a long string crashes Solaris 7 /usr/bin/printf.
4638494Sobrienas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4738494Sobrienas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4838494Sobrienas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4938494Sobrien# Prefer a ksh shell builtin over an external printf program on Solaris,
5038494Sobrien# but without wasting forks for bash or zsh.
5138494Sobrienif test -z "$BASH_VERSION$ZSH_VERSION" \
5238494Sobrien    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
5338494Sobrien  as_echo='print -r --'
5438494Sobrien  as_echo_n='print -rn --'
5538494Sobrienelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
5638494Sobrien  as_echo='printf %s\n'
5738494Sobrien  as_echo_n='printf %s'
5838494Sobrienelse
5938494Sobrien  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6038494Sobrien    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6138494Sobrien    as_echo_n='/usr/ucb/echo -n'
6238494Sobrien  else
6338494Sobrien    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6438494Sobrien    as_echo_n_body='eval
6538494Sobrien      arg=$1;
6638494Sobrien      case $arg in #(
6738494Sobrien      *"$as_nl"*)
6838494Sobrien	expr "X$arg" : "X\\(.*\\)$as_nl";
6938494Sobrien	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7038494Sobrien      esac;
7138494Sobrien      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7238494Sobrien    '
7338494Sobrien    export as_echo_n_body
7438494Sobrien    as_echo_n='sh -c $as_echo_n_body as_echo'
7538494Sobrien  fi
7638494Sobrien  export as_echo_body
7738494Sobrien  as_echo='sh -c $as_echo_body as_echo'
7838494Sobrienfi
7938494Sobrien
8038494Sobrien# The user is always right.
8138494Sobrienif test "${PATH_SEPARATOR+set}" != set; then
8238494Sobrien  PATH_SEPARATOR=:
8338494Sobrien  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8438494Sobrien    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8538494Sobrien      PATH_SEPARATOR=';'
8638494Sobrien  }
8738494Sobrienfi
88174313Sobrien
89174313Sobrien
9038494Sobrien# IFS
91174313Sobrien# We need space, tab and new line, in precisely that order.  Quoting is
92174313Sobrien# there to prevent editors from complaining about space-tab.
93174313Sobrien# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94174313Sobrien# splitting by setting IFS to empty value.)
95174313SobrienIFS=" ""	$as_nl"
96174313Sobrien
97174313Sobrien# Find who we are.  Look in the path if we contain no directory separator.
98174313Sobrienas_myself=
9938494Sobriencase $0 in #((
10082800Sobrien  *[\\/]* ) as_myself=$0 ;;
10182800Sobrien  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10282800Sobrienfor as_dir in $PATH
10382800Sobriendo
10482800Sobrien  IFS=$as_save_IFS
10582800Sobrien  test -z "$as_dir" && as_dir=.
106174313Sobrien    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107174313Sobrien  done
10882800SobrienIFS=$as_save_IFS
10938494Sobrien
11038494Sobrien     ;;
11138494Sobrienesac
11238494Sobrien# We did not find ourselves, most probably we were run as `sh COMMAND'
11338494Sobrien# in which case we are not to be found in the path.
11438494Sobrienif test "x$as_myself" = x; then
11538494Sobrien  as_myself=$0
11638494Sobrienfi
117174313Sobrienif test ! -f "$as_myself"; then
11838494Sobrien  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11938494Sobrien  exit 1
120174313Sobrienfi
12138494Sobrien
122174313Sobrien# Unset variables that we do not need and which cause bugs (e.g. in
12338494Sobrien# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124174313Sobrien# suppresses any "Segmentation fault" message there.  '((' could
125174313Sobrien# trigger a bug in pdksh 5.2.14.
126174313Sobrienfor as_var in BASH_ENV ENV MAIL MAILPATH
127174313Sobriendo eval test x\${$as_var+set} = xset \
128174313Sobrien  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129174313Sobriendone
130174313SobrienPS1='$ '
13138494SobrienPS2='> '
13238494SobrienPS4='+ '
13338494Sobrien
13438494Sobrien# NLS nuisances.
13538494SobrienLC_ALL=C
13638494Sobrienexport LC_ALL
13738494SobrienLANGUAGE=C
13838494Sobrienexport LANGUAGE
13938494Sobrien
140174313Sobrien# CDPATH.
14138494Sobrien(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14238494Sobrien
14338494Sobrien# Use a proper internal environment variable to ensure we don't fall
14438494Sobrien  # into an infinite loop, continuously re-executing ourselves.
14538494Sobrien  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
14638494Sobrien    _as_can_reexec=no; export _as_can_reexec;
14738494Sobrien    # We cannot yet assume a decent shell, so we have to provide a
14838494Sobrien# neutralization value for shells without unset; and this also
14938494Sobrien# works around shells that cannot unset nonexistent variables.
150174313Sobrien# Preserve -v and -x to the replacement shell.
151174313SobrienBASH_ENV=/dev/null
152174313SobrienENV=/dev/null
15338494Sobrien(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
15438494Sobriencase $- in # ((((
15538494Sobrien  *v*x* | *x*v* ) as_opts=-vx ;;
15638494Sobrien  *v* ) as_opts=-v ;;
15738494Sobrien  *x* ) as_opts=-x ;;
15838494Sobrien  * ) as_opts= ;;
159174313Sobrienesac
16038494Sobrienexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
16138494Sobrien# Admittedly, this is quite paranoid, since all the known shells bail
16238494Sobrien# out after a failed `exec'.
16338494Sobrien$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
16438494Sobrienas_fn_exit 255
16538494Sobrien  fi
16638494Sobrien  # We don't want this to propagate to other subprocesses.
16738494Sobrien          { _as_can_reexec=; unset _as_can_reexec;}
16838494Sobrienif test "x$CONFIG_SHELL" = x; then
16938494Sobrien  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
17038494Sobrien  emulate sh
171174313Sobrien  NULLCMD=:
17238494Sobrien  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
17338494Sobrien  # is contrary to our usage.  Disable this feature.
17438494Sobrien  alias -g '\${1+\"\$@\"}'='\"\$@\"'
17538494Sobrien  setopt NO_GLOB_SUBST
17638494Sobrienelse
17738494Sobrien  case \`(set -o) 2>/dev/null\` in #(
17838494Sobrien  *posix*) :
17938494Sobrien    set -o posix ;; #(
18038494Sobrien  *) :
18138494Sobrien     ;;
18238494Sobrienesac
18338494Sobrienfi
18482800Sobrien"
18538494Sobrien  as_required="as_fn_return () { (exit \$1); }
18638494Sobrienas_fn_success () { as_fn_return 0; }
18738494Sobrienas_fn_failure () { as_fn_return 1; }
18838494Sobrienas_fn_ret_success () { return 0; }
18938494Sobrienas_fn_ret_failure () { return 1; }
19038494Sobrien
19138494Sobrienexitcode=0
19238494Sobrienas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193174313Sobrienas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
19438494Sobrienas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
19538494Sobrienas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
19638494Sobrienif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
19738494Sobrien
19838494Sobrienelse
19938494Sobrien  exitcode=1; echo positional parameters were not saved.
20038494Sobrienfi
20138494Sobrientest x\$exitcode = x0 || exit 1
20251300Sobrientest -x / || exit 1"
20338494Sobrien  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
20438494Sobrien  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
20538494Sobrien  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
20638494Sobrien  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
20738494Sobrientest \$(( 1 + 1 )) = 2 || exit 1"
20838494Sobrien  if (eval "$as_required") 2>/dev/null; then :
20938494Sobrien  as_have_required=yes
21038494Sobrienelse
21138494Sobrien  as_have_required=no
21238494Sobrienfi
21338494Sobrien  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
21451300Sobrien
21538494Sobrienelse
21638494Sobrien  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21738494Sobrienas_found=false
21838494Sobrienfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21938494Sobriendo
22038494Sobrien  IFS=$as_save_IFS
22138494Sobrien  test -z "$as_dir" && as_dir=.
22238494Sobrien  as_found=:
22338494Sobrien  case $as_dir in #(
22438494Sobrien	 /*)
22538494Sobrien	   for as_base in sh bash ksh sh5; do
22638494Sobrien	     # Try only shells that exist, to save several forks.
22738494Sobrien	     as_shell=$as_dir/$as_base
22838494Sobrien	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
22938494Sobrien		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
23038494Sobrien  CONFIG_SHELL=$as_shell as_have_required=yes
23138494Sobrien		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
23238494Sobrien  break 2
23338494Sobrienfi
23438494Sobrienfi
23582800Sobrien	   done;;
23638494Sobrien       esac
23738494Sobrien  as_found=false
23838494Sobriendone
23938494Sobrien$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
24038494Sobrien	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
24138494Sobrien  CONFIG_SHELL=$SHELL as_have_required=yes
24238494Sobrienfi; }
24338494SobrienIFS=$as_save_IFS
24438494Sobrien
24538494Sobrien
24638494Sobrien      if test "x$CONFIG_SHELL" != x; then :
24738494Sobrien  export CONFIG_SHELL
24838494Sobrien             # We cannot yet assume a decent shell, so we have to provide a
24938494Sobrien# neutralization value for shells without unset; and this also
25038494Sobrien# works around shells that cannot unset nonexistent variables.
25138494Sobrien# Preserve -v and -x to the replacement shell.
25238494SobrienBASH_ENV=/dev/null
25338494SobrienENV=/dev/null
25438494Sobrien(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
25538494Sobriencase $- in # ((((
25638494Sobrien  *v*x* | *x*v* ) as_opts=-vx ;;
25738494Sobrien  *v* ) as_opts=-v ;;
25838494Sobrien  *x* ) as_opts=-x ;;
25938494Sobrien  * ) as_opts= ;;
260174313Sobrienesac
26138494Sobrienexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
26238494Sobrien# Admittedly, this is quite paranoid, since all the known shells bail
26338494Sobrien# out after a failed `exec'.
26438494Sobrien$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
26538494Sobrienexit 255
26638494Sobrienfi
26738494Sobrien
26838494Sobrien    if test x$as_have_required = xno; then :
26938494Sobrien  $as_echo "$0: This script requires a shell more modern than all"
27038494Sobrien  $as_echo "$0: the shells that I found on your system."
27138494Sobrien  if test x${ZSH_VERSION+set} = xset ; then
27238494Sobrien    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
27338494Sobrien    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
27438494Sobrien  else
27538494Sobrien    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276174313Sobrien$0: build-dev@openjdk.java.net about your system, including
277174313Sobrien$0: any error possibly output before this message. Then
278174313Sobrien$0: install a modern shell, or manually run the script
279174313Sobrien$0: under such a shell if you do have one."
280174313Sobrien  fi
281174313Sobrien  exit 1
28238494Sobrienfi
28338494Sobrienfi
28438494Sobrienfi
28538494SobrienSHELL=${CONFIG_SHELL-/bin/sh}
28638494Sobrienexport SHELL
28738494Sobrien# Unset more variables known to interfere with behavior of common tools.
28838494SobrienCLICOLOR_FORCE= GREP_OPTIONS=
28938494Sobrienunset CLICOLOR_FORCE GREP_OPTIONS
29038494Sobrien
29138494Sobrien## --------------------- ##
29238494Sobrien## M4sh Shell Functions. ##
29338494Sobrien## --------------------- ##
29438494Sobrien# as_fn_unset VAR
29538494Sobrien# ---------------
296174313Sobrien# Portably unset VAR.
297174313Sobrienas_fn_unset ()
29838494Sobrien{
29938494Sobrien  { eval $1=; unset $1;}
300174313Sobrien}
30138494Sobrienas_unset=as_fn_unset
30238494Sobrien
30338494Sobrien# as_fn_set_status STATUS
30438494Sobrien# -----------------------
30551300Sobrien# Set $? to STATUS, without forking.
30638494Sobrienas_fn_set_status ()
30738494Sobrien{
30838494Sobrien  return $1
30938494Sobrien} # as_fn_set_status
310174313Sobrien
311174313Sobrien# as_fn_exit STATUS
312174313Sobrien# -----------------
313174313Sobrien# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314174313Sobrienas_fn_exit ()
315174313Sobrien{
316174313Sobrien  set +e
317174313Sobrien  as_fn_set_status $1
318174313Sobrien  exit $1
319174313Sobrien} # as_fn_exit
320174313Sobrien
321174313Sobrien# as_fn_mkdir_p
322174313Sobrien# -------------
323174313Sobrien# Create "$as_dir" as a directory, including parents if necessary.
324174313Sobrienas_fn_mkdir_p ()
325174313Sobrien{
326174313Sobrien
327174313Sobrien  case $as_dir in #(
328174313Sobrien  -*) as_dir=./$as_dir;;
329174313Sobrien  esac
330174313Sobrien  test -d "$as_dir" || eval $as_mkdir_p || {
331174313Sobrien    as_dirs=
332174313Sobrien    while :; do
333174313Sobrien      case $as_dir in #(
334174313Sobrien      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335174313Sobrien      *) as_qdir=$as_dir;;
336174313Sobrien      esac
337174313Sobrien      as_dirs="'$as_qdir' $as_dirs"
338174313Sobrien      as_dir=`$as_dirname -- "$as_dir" ||
339174313Sobrien$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340174313Sobrien	 X"$as_dir" : 'X\(//\)[^/]' \| \
341174313Sobrien	 X"$as_dir" : 'X\(//\)$' \| \
342174313Sobrien	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343174313Sobrien$as_echo X"$as_dir" |
344174313Sobrien    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345174313Sobrien	    s//\1/
346174313Sobrien	    q
347174313Sobrien	  }
348174313Sobrien	  /^X\(\/\/\)[^/].*/{
349174313Sobrien	    s//\1/
350174313Sobrien	    q
351174313Sobrien	  }
352174313Sobrien	  /^X\(\/\/\)$/{
353174313Sobrien	    s//\1/
35438494Sobrien	    q
35538494Sobrien	  }
35638494Sobrien	  /^X\(\/\).*/{
35738494Sobrien	    s//\1/
35838494Sobrien	    q
35938494Sobrien	  }
360174313Sobrien	  s/.*/./; q'`
36138494Sobrien      test -d "$as_dir" && break
362174313Sobrien    done
36338494Sobrien    test -z "$as_dirs" || eval "mkdir $as_dirs"
36438494Sobrien  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36538494Sobrien
36638494Sobrien
36738494Sobrien} # as_fn_mkdir_p
36838494Sobrien
36938494Sobrien# as_fn_executable_p FILE
37038494Sobrien# -----------------------
37138494Sobrien# Test if FILE is an executable regular file.
37238494Sobrienas_fn_executable_p ()
37338494Sobrien{
37438494Sobrien  test -f "$1" && test -x "$1"
37538494Sobrien} # as_fn_executable_p
37638494Sobrien# as_fn_append VAR VALUE
37738494Sobrien# ----------------------
37838494Sobrien# Append the text in VALUE to the end of the definition contained in VAR. Take
37938494Sobrien# advantage of any shell optimizations that allow amortized linear growth over
38038494Sobrien# repeated appends, instead of the typical quadratic growth present in naive
38138494Sobrien# implementations.
38238494Sobrienif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
38338494Sobrien  eval 'as_fn_append ()
38438494Sobrien  {
38538494Sobrien    eval $1+=\$2
38638494Sobrien  }'
38738494Sobrienelse
38838494Sobrien  as_fn_append ()
38938494Sobrien  {
39038494Sobrien    eval $1=\$$1\$2
39138494Sobrien  }
39238494Sobrienfi # as_fn_append
39338494Sobrien
39438494Sobrien# as_fn_arith ARG...
39538494Sobrien# ------------------
39638494Sobrien# Perform arithmetic evaluation on the ARGs, and store the result in the
39738494Sobrien# global $as_val. Take advantage of shells that can avoid forks. The arguments
39838494Sobrien# must be portable across $(()) and expr.
39938494Sobrienif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
40038494Sobrien  eval 'as_fn_arith ()
40138494Sobrien  {
40238494Sobrien    as_val=$(( $* ))
40338494Sobrien  }'
40438494Sobrienelse
40538494Sobrien  as_fn_arith ()
40638494Sobrien  {
40738494Sobrien    as_val=`expr "$@" || test $? -eq 1`
40838494Sobrien  }
40938494Sobrienfi # as_fn_arith
41038494Sobrien
41138494Sobrien
412174313Sobrien# as_fn_error STATUS ERROR [LINENO LOG_FD]
41338494Sobrien# ----------------------------------------
41438494Sobrien# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
41538494Sobrien# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
41638494Sobrien# script with STATUS, using 1 if that was 0.
41738494Sobrienas_fn_error ()
418174313Sobrien{
41938494Sobrien  as_status=$1; test $as_status -eq 0 && as_status=1
42038494Sobrien  if test "$4"; then
42138494Sobrien    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
42238494Sobrien    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
42338494Sobrien  fi
42438494Sobrien  $as_echo "$as_me: error: $2" >&2
42538494Sobrien  as_fn_exit $as_status
42638494Sobrien} # as_fn_error
42738494Sobrien
42838494Sobrienif expr a : '\(a\)' >/dev/null 2>&1 &&
42938494Sobrien   test "X`expr 00001 : '.*\(...\)'`" = X001; then
43038494Sobrien  as_expr=expr
43138494Sobrienelse
43238494Sobrien  as_expr=false
43338494Sobrienfi
43438494Sobrien
43538494Sobrienif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
43638494Sobrien  as_basename=basename
43738494Sobrienelse
43838494Sobrien  as_basename=false
43938494Sobrienfi
44038494Sobrien
441174313Sobrienif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442174313Sobrien  as_dirname=dirname
443174313Sobrienelse
444174313Sobrien  as_dirname=false
445174313Sobrienfi
446174313Sobrien
447174313Sobrienas_me=`$as_basename -- "$0" ||
448174313Sobrien$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449174313Sobrien	 X"$0" : 'X\(//\)$' \| \
450174313Sobrien	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451174313Sobrien$as_echo X/"$0" |
452174313Sobrien    sed '/^.*\/\([^/][^/]*\)\/*$/{
453174313Sobrien	    s//\1/
454174313Sobrien	    q
455174313Sobrien	  }
456174313Sobrien	  /^X\/\(\/\/\)$/{
457174313Sobrien	    s//\1/
458174313Sobrien	    q
459174313Sobrien	  }
460174313Sobrien	  /^X\/\(\/\).*/{
461174313Sobrien	    s//\1/
462174313Sobrien	    q
463174313Sobrien	  }
464174313Sobrien	  s/.*/./; q'`
465174313Sobrien
466174313Sobrien# Avoid depending upon Character Ranges.
467174313Sobrienas_cr_letters='abcdefghijklmnopqrstuvwxyz'
468174313Sobrienas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469174313Sobrienas_cr_Letters=$as_cr_letters$as_cr_LETTERS
470174313Sobrienas_cr_digits='0123456789'
471174313Sobrienas_cr_alnum=$as_cr_Letters$as_cr_digits
472174313Sobrien
473174313Sobrien
474174313Sobrien  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475174313Sobrien  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476174313Sobrien  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477174313Sobrien  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478174313Sobrien  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479174313Sobrien  sed -n '
480174313Sobrien    p
48138494Sobrien    /[$]LINENO/=
48238494Sobrien  ' <$as_myself |
48338494Sobrien    sed '
48438494Sobrien      s/[$]LINENO.*/&-/
485174313Sobrien      t lineno
48638494Sobrien      b
48738494Sobrien      :lineno
48838494Sobrien      N
48938494Sobrien      :loop
49038494Sobrien      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
49138494Sobrien      t loop
49238494Sobrien      s/-\n.*//
49338494Sobrien    ' >$as_me.lineno &&
494119682Smbr  chmod +x "$as_me.lineno" ||
495119682Smbr    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
49638494Sobrien
49738494Sobrien  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
49838494Sobrien  # already done that, so ensure we don't try to do so again and fall
49938494Sobrien  # in an infinite loop.  This has already happened in practice.
500119682Smbr  _as_can_reexec=no; export _as_can_reexec
50138494Sobrien  # Don't try to exec as it changes $[0], causing all sort of problems
50238494Sobrien  # (the dirname of $[0] is not the place where we might find the
50338494Sobrien  # original and so on.  Autoconf is especially sensitive to this).
50438494Sobrien  . "./$as_me.lineno"
50538494Sobrien  # Exit status is that of the last command.
506174313Sobrien  exit
50738494Sobrien}
508119682Smbr
50938494SobrienECHO_C= ECHO_N= ECHO_T=
51038494Sobriencase `echo -n x` in #(((((
51138494Sobrien-n*)
51238494Sobrien  case `echo 'xy\c'` in
51338494Sobrien  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51438494Sobrien  xy)  ECHO_C='\c';;
51538494Sobrien  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51638494Sobrien       ECHO_T='	';;
51738494Sobrien  esac;;
51838494Sobrien*)
51938494Sobrien  ECHO_N='-n';;
52038494Sobrienesac
52138494Sobrien
522174313Sobrienrm -f conf$$ conf$$.exe conf$$.file
52338494Sobrienif test -d conf$$.dir; then
52438494Sobrien  rm -f conf$$.dir/conf$$.file
52538494Sobrienelse
52638494Sobrien  rm -f conf$$.dir
52738494Sobrien  mkdir conf$$.dir 2>/dev/null
52838494Sobrienfi
52938494Sobrienif (echo >conf$$.file) 2>/dev/null; then
53038494Sobrien  if ln -s conf$$.file conf$$ 2>/dev/null; then
53138494Sobrien    as_ln_s='ln -s'
53238494Sobrien    # ... but there are two gotchas:
533119682Smbr    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534119682Smbr    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535119682Smbr    # In both cases, we have to default to `cp -pR'.
536119682Smbr    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53738494Sobrien      as_ln_s='cp -pR'
53838494Sobrien  elif ln conf$$.file conf$$ 2>/dev/null; then
53938494Sobrien    as_ln_s=ln
54038494Sobrien  else
54138494Sobrien    as_ln_s='cp -pR'
54238494Sobrien  fi
543119682Smbrelse
544119682Smbr  as_ln_s='cp -pR'
545119682Smbrfi
546174313Sobrienrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547119682Smbrrmdir conf$$.dir 2>/dev/null
548119682Smbr
54938494Sobrienif mkdir -p . 2>/dev/null; then
55038494Sobrien  as_mkdir_p='mkdir -p "$as_dir"'
55138494Sobrienelse
55238494Sobrien  test -d ./-p && rmdir ./-p
55338494Sobrien  as_mkdir_p=false
55438494Sobrienfi
55538494Sobrien
55638494Sobrienas_test_x='test -x'
55738494Sobrienas_executable_p=as_fn_executable_p
55838494Sobrien
55938494Sobrien# Sed expression to map a string onto a valid CPP name.
56038494Sobrienas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
56138494Sobrien
56238494Sobrien# Sed expression to map a string onto a valid variable name.
56338494Sobrienas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
56438494Sobrien
56538494Sobrien
56638494Sobrientest -n "$DJDIR" || exec 7<&0 </dev/null
56738494Sobrienexec 6>&1
56838494Sobrien
56938494Sobrien# Name of the host.
570174313Sobrien# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571174313Sobrien# so uname gets run too.
57238494Sobrienac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
57338494Sobrien
57438494Sobrien#
57538494Sobrien# Initializations.
57638494Sobrien#
577174313Sobrienac_default_prefix=/usr/local
578174313Sobrienac_clean_files=
57938494Sobrienac_config_libobj_dir=.
58038494SobrienLIBOBJS=
581174313Sobriencross_compiling=no
582174313Sobriensubdirs=
58338494SobrienMFLAGS=
58438494SobrienMAKEFLAGS=
58542633Sobrien
58638494Sobrien# Identity of this package.
58738494SobrienPACKAGE_NAME='OpenJDK'
58838494SobrienPACKAGE_TARNAME='openjdk'
58938494SobrienPACKAGE_VERSION='jdk9'
59038494SobrienPACKAGE_STRING='OpenJDK jdk9'
59138494SobrienPACKAGE_BUGREPORT='build-dev@openjdk.java.net'
59238494SobrienPACKAGE_URL='http://openjdk.java.net'
59338494Sobrien
59438494Sobrien# Factoring default headers for most tests.
595174313Sobrienac_includes_default="\
59638494Sobrien#include <stdio.h>
59738494Sobrien#ifdef HAVE_SYS_TYPES_H
59838494Sobrien# include <sys/types.h>
59938494Sobrien#endif
60038494Sobrien#ifdef HAVE_SYS_STAT_H
60138494Sobrien# include <sys/stat.h>
60238494Sobrien#endif
60338494Sobrien#ifdef STDC_HEADERS
60438494Sobrien# include <stdlib.h>
60538494Sobrien# include <stddef.h>
60638494Sobrien#else
60738494Sobrien# ifdef HAVE_STDLIB_H
60838494Sobrien#  include <stdlib.h>
609174313Sobrien# endif
61038494Sobrien#endif
61138494Sobrien#ifdef HAVE_STRING_H
61238494Sobrien# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
61338494Sobrien#  include <memory.h>
61438494Sobrien# endif
61538494Sobrien# include <string.h>
61638494Sobrien#endif
61738494Sobrien#ifdef HAVE_STRINGS_H
61838494Sobrien# include <strings.h>
61938494Sobrien#endif
62038494Sobrien#ifdef HAVE_INTTYPES_H
62138494Sobrien# include <inttypes.h>
62238494Sobrien#endif
62338494Sobrien#ifdef HAVE_STDINT_H
62438494Sobrien# include <stdint.h>
62538494Sobrien#endif
62638494Sobrien#ifdef HAVE_UNISTD_H
62738494Sobrien# include <unistd.h>
628174313Sobrien#endif"
62938494Sobrien
63038494Sobrienac_subst_vars='LTLIBOBJS
63138494SobrienLIBOBJS
632174313SobrienCFLAGS_CCACHE
633174313SobrienCCACHE
63438494SobrienUSE_PRECOMPILED_HEADER
635174313SobrienENABLE_SJAVAC
636174313SobrienSJAVAC_SERVER_JAVA_FLAGS
637174313SobrienSJAVAC_SERVER_JAVA
638174313SobrienJAVA_TOOL_FLAGS_SMALL
639174313SobrienJAVA_FLAGS_SMALL
640174313SobrienJAVA_FLAGS_BIG
641174313SobrienJAVA_FLAGS
64238494SobrienJOBS
64338494SobrienMEMORY_SIZE
644174313SobrienNUM_CORES
645174313SobrienENABLE_INTREE_EC
646119682SmbrSALIB_NAME
64738494SobrienHOTSPOT_MAKE_ARGS
648119682SmbrMSVCP_DLL
649174313SobrienMSVCR_DLL
650174313SobrienLIBCXX
651174313SobrienLLVM_LIBS
652174313SobrienLLVM_LDFLAGS
653174313SobrienLLVM_CFLAGS
654174313SobrienLLVM_CONFIG
655174313SobrienLIBFFI_LIBS
656174313SobrienLIBFFI_CFLAGS
657119682SmbrSTATIC_CXX_SETTING
658119682SmbrLIBDL
659119682SmbrLIBM
660174313SobrienLIBZIP_CAN_USE_MMAP
661119682SmbrUSE_EXTERNAL_LIBZ
662119682SmbrUSE_EXTERNAL_LIBPNG
663119682SmbrPNG_LIBS
664119682SmbrPNG_CFLAGS
665119682SmbrUSE_EXTERNAL_LCMS
666119682SmbrLCMS_LIBS
66738494SobrienLCMS_CFLAGS
66838494SobrienUSE_EXTERNAL_LIBGIF
66938494SobrienUSE_EXTERNAL_LIBJPEG
67038494SobrienALSA_LIBS
67138494SobrienALSA_CFLAGS
67238494SobrienFREETYPE_BUNDLE_LIB_PATH
67338494SobrienFREETYPE_LIBS
67438494SobrienFREETYPE_CFLAGS
67538494SobrienCUPS_CFLAGS
67638494SobrienX_EXTRA_LIBS
67738494SobrienX_LIBS
67838494SobrienX_PRE_LIBS
67938494SobrienX_CFLAGS
68038494SobrienXMKMF
681174313SobrienFIXPATH
682174313SobrienGCOV_ENABLED
68338494SobrienZIP_DEBUGINFO_FILES
684174313SobrienENABLE_DEBUG_SYMBOLS
685174313SobrienCFLAGS_WARNINGS_ARE_ERRORS
686174313SobrienDISABLE_WARNING_PREFIX
687174313SobrienWARNINGS_AS_ERRORS
688174313SobrienCOMPILER_SUPPORTS_TARGET_BITS_FLAG
68938494SobrienZERO_ARCHFLAG
69038494SobrienLDFLAGS_TESTEXE_SUFFIX
69138494SobrienLDFLAGS_TESTLIB_SUFFIX
69238494SobrienLDFLAGS_TESTEXE
69338494SobrienLDFLAGS_TESTLIB
69438494SobrienLDFLAGS_CXX_JDK
69538494SobrienLDFLAGS_JDKEXE_SUFFIX
69638494SobrienLDFLAGS_JDKLIB_SUFFIX
69738494SobrienLDFLAGS_JDKEXE
698174313SobrienLDFLAGS_JDKLIB
699174313SobrienCXXFLAGS_TESTEXE
700174313SobrienCXXFLAGS_TESTLIB
701174313SobrienCFLAGS_TESTEXE
702174313SobrienCFLAGS_TESTLIB
703174313SobrienCXXFLAGS_JDKEXE
704174313SobrienCXXFLAGS_JDKLIB
705174313SobrienCFLAGS_JDKEXE
706174313SobrienCFLAGS_JDKLIB
707174313SobrienMACOSX_VERSION_MIN
708174313SobrienCXX_O_FLAG_NONE
709174313SobrienCXX_O_FLAG_DEBUG
710174313SobrienCXX_O_FLAG_NORM
711174313SobrienCXX_O_FLAG_HI
71238494SobrienCXX_O_FLAG_HIGHEST
713174313SobrienC_O_FLAG_NONE
71438494SobrienC_O_FLAG_DEBUG
71538494SobrienC_O_FLAG_NORM
71638494SobrienC_O_FLAG_HI
717174313SobrienC_O_FLAG_HIGHEST
718174313SobrienCXXFLAGS_DEBUG_SYMBOLS
719174313SobrienCFLAGS_DEBUG_SYMBOLS
720174313SobrienCXX_FLAG_DEPS
721174313SobrienC_FLAG_DEPS
722174313SobrienSET_SHARED_LIBRARY_MAPFILE
723174313SobrienSET_SHARED_LIBRARY_NAME
724174313SobrienSET_SHARED_LIBRARY_ORIGIN
725174313SobrienSET_EXECUTABLE_ORIGIN
726174313SobrienCXX_FLAG_REORDER
727174313SobrienC_FLAG_REORDER
728174313SobrienRC_FLAGS
729174313SobrienAR_OUT_OPTION
73038494SobrienLD_OUT_OPTION
73138494SobrienEXE_OUT_OPTION
73238494SobrienCC_OUT_OPTION
73342633SobrienPOST_STRIP_CMD
734174313SobrienARFLAGS
735174313SobrienCOMPILER_TARGET_BITS_FLAG
736174313SobrienJT_HOME
737174313SobrienJTREGEXE
738174313SobrienUSING_BROKEN_SUSE_LD
739174313SobrienPACKAGE_PATH
74042633SobrienUSE_CLANG
74139159SobrienHOTSPOT_LD
742174313SobrienHOTSPOT_CXX
743174313SobrienHOTSPOT_RC
744174313SobrienHOTSPOT_MT
745174313SobrienBUILD_SYSROOT_LDFLAGS
746174313SobrienBUILD_SYSROOT_CFLAGS
747174313SobrienBUILD_LD
748174313SobrienBUILD_CXX
749174313SobrienBUILD_CC
750174313Sobrienac_ct_OBJDUMP
751174313SobrienOBJDUMP
75282800Sobrienac_ct_OBJCOPY
75382800SobrienOBJCOPY
75438494Sobrienac_ct_NM
75538494Sobrienac_ct_STRIP
75638494SobrienGNM
75738494SobrienNM
75838494SobrienSTRIP
75938494SobrienMSBUILD
76038494SobrienDUMPBIN
76138494SobrienRC
76238494SobrienMT
76338494SobrienLIPO
76438494Sobrienac_ct_AR
76538494SobrienAR
76638494SobrienAS
76738494SobrienLDCXX
76838494SobrienLD
76938494SobrienCXXCPP
77038494SobrienCPP
77138494Sobrienac_ct_CXX
77238494SobrienCXXFLAGS
77338494SobrienCXX
774174313Sobrienac_ct_PROPER_COMPILER_CXX
77538494SobrienPROPER_COMPILER_CXX
77638494SobrienTOOLCHAIN_PATH_CXX
77738494SobrienPOTENTIAL_CXX
77838494SobrienOBJEXT
77938494SobrienEXEEXT
780174313Sobrienac_ct_CC
781174313SobrienCPPFLAGS
78238494SobrienLDFLAGS
78338494SobrienCFLAGS
78438494SobrienCC
785174313Sobrienac_ct_PROPER_COMPILER_CC
78638494SobrienPROPER_COMPILER_CC
78738494SobrienTOOLCHAIN_PATH_CC
78838494SobrienPOTENTIAL_CC
789174313SobrienVS_LIB
790174313SobrienVS_INCLUDE
791174313SobrienVS_PATH
79238494SobrienCYGWIN_LINK
793174313SobrienSYSROOT_LDFLAGS
794174313SobrienSYSROOT_CFLAGS
795174313SobrienLEGACY_EXTRA_LDFLAGS
796174313SobrienLEGACY_EXTRA_CXXFLAGS
797174313SobrienLEGACY_EXTRA_CFLAGS
798174313SobrienEXE_SUFFIX
799174313SobrienOBJ_SUFFIX
800174313SobrienSTATIC_LIBRARY
801174313SobrienSHARED_LIBRARY
802174313SobrienSTATIC_LIBRARY_SUFFIX
803174313SobrienSHARED_LIBRARY_SUFFIX
804174313SobrienLIBRARY_PREFIX
805174313SobrienTOOLCHAIN_TYPE
806174313SobrienBUILD_HOTSPOT
807174313SobrienHOTSPOT_DIST
808174313SobrienBUILD_OUTPUT
809174313SobrienOVERRIDE_SRC_ROOT
810174313SobrienADD_SRC_ROOT
811174313SobrienJDK_TOPDIR
812174313SobrienNASHORN_TOPDIR
813174313SobrienHOTSPOT_TOPDIR
814174313SobrienJAXWS_TOPDIR
815174313SobrienJAXP_TOPDIR
816174313SobrienCORBA_TOPDIR
817174313SobrienLANGTOOLS_TOPDIR
818174313SobrienJAVAC_FLAGS
819174313SobrienBOOT_JDK_SOURCETARGET
820174313SobrienJARSIGNER
821174313SobrienJAR
822174313SobrienJAVAH
823174313SobrienJAVAC
824174313SobrienJAVA
825174313SobrienBOOT_JDK
826174313SobrienJAVA_CHECK
82738494SobrienJAVAC_CHECK
828174313SobrienCOOKED_BUILD_NUMBER
829174313SobrienJDK_VERSION
830174313SobrienCOPYRIGHT_YEAR
831174313SobrienMACOSX_BUNDLE_ID_BASE
832174313SobrienMACOSX_BUNDLE_NAME_BASE
833174313SobrienCOMPANY_NAME
834174313SobrienJDK_RC_PLATFORM_NAME
835174313SobrienPRODUCT_SUFFIX
836174313SobrienPRODUCT_NAME
837174313SobrienLAUNCHER_NAME
838174313SobrienMILESTONE
839174313SobrienJDK_BUILD_NUMBER
840174313SobrienJDK_UPDATE_VERSION
841174313SobrienJDK_MICRO_VERSION
842174313SobrienJDK_MINOR_VERSION
843174313SobrienJDK_MAJOR_VERSION
844174313SobrienUSER_RELEASE_SUFFIX
84538494SobrienCOMPRESS_JARS
84638494SobrienUNLIMITED_CRYPTO
84738494SobrienCACERTS_FILE
84838494SobrienTEST_IN_BUILD
84938494SobrienBUILD_HEADLESS
850174313SobrienSUPPORT_HEADFUL
851174313SobrienSUPPORT_HEADLESS
852174313SobrienBDEPS_FTP
853174313SobrienBDEPS_UNZIP
854174313SobrienOS_VERSION_MICRO
855174313SobrienOS_VERSION_MINOR
856174313SobrienOS_VERSION_MAJOR
857174313SobrienPKG_CONFIG
858174313SobrienBASH_ARGS
85938494SobrienSETFILE
860174313SobrienCODESIGN
861174313SobrienXATTR
86238494SobrienDSYMUTIL
863174313SobrienIS_GNU_TIME
864174313SobrienPATCH
865174313SobrienTIME
866174313SobrienSTAT
867174313SobrienHG
86838494SobrienREADELF
86938494SobrienOTOOL
870174313SobrienLDD
871174313SobrienZIP
872174313SobrienUNZIP
87338494SobrienFIND_DELETE
87438494SobrienOUTPUT_SYNC
875174313SobrienOUTPUT_SYNC_SUPPORTED
876174313SobrienMAKE
87738494SobrienCHECK_TOOLSDIR_MAKE
87838494SobrienCHECK_TOOLSDIR_GMAKE
87938494SobrienCHECK_MAKE
880174313SobrienCHECK_GMAKE
881174313SobrienPKGHANDLER
88238494SobrienCONFIGURESUPPORT_OUTPUTDIR
88338494SobrienOUTPUT_ROOT
884174313SobrienCONF_NAME
885174313SobrienSPEC
886174313SobrienSDKROOT
887174313SobrienXCODEBUILD
888174313SobrienBUILD_VARIANT_RELEASE
889174313SobrienDEBUG_CLASSFILES
890174313SobrienFASTDEBUG
891174313SobrienVARIANT
892174313SobrienDEBUG_LEVEL
893174313SobrienMACOSX_UNIVERSAL
894174313SobrienINCLUDE_SA
89538494SobrienJVM_VARIANT_CORE
89638494SobrienJVM_VARIANT_ZEROSHARK
89738494SobrienJVM_VARIANT_ZERO
898174313SobrienJVM_VARIANT_KERNEL
899174313SobrienJVM_VARIANT_MINIMAL1
900174313SobrienJVM_VARIANT_CLIENT
901174313SobrienJVM_VARIANT_SERVER
902174313SobrienJVM_VARIANTS
903174313SobrienJVM_INTERPRETER
904174313SobrienJDK_VARIANT
905174313SobrienSET_OPENJDK
906174313SobrienCANONICAL_TOPDIR
907174313SobrienORIGINAL_TOPDIR
908174313SobrienTOPDIR
909174313SobrienPATH_SEP
91038494SobrienZERO_ARCHDEF
911174313SobrienDEFINE_CROSS_COMPILE_ARCH
912174313SobrienLP64
913174313SobrienOPENJDK_TARGET_OS_EXPORT_DIR
91438494SobrienOPENJDK_TARGET_CPU_JLI_CFLAGS
915174313SobrienOPENJDK_TARGET_CPU_OSARCH
91638494SobrienOPENJDK_TARGET_CPU_ISADIR
91742633SobrienOPENJDK_TARGET_CPU_LIBDIR
91838494SobrienOPENJDK_TARGET_CPU_LEGACY_LIB
91938494SobrienOPENJDK_TARGET_CPU_LEGACY
92038494SobrienREQUIRED_OS_VERSION
92138494SobrienREQUIRED_OS_NAME
92238494SobrienCOMPILE_TYPE
92338494SobrienOPENJDK_TARGET_CPU_ENDIAN
92438494SobrienOPENJDK_TARGET_CPU_BITS
92538494SobrienOPENJDK_TARGET_CPU_ARCH
92638494SobrienOPENJDK_TARGET_CPU
927174313SobrienOPENJDK_TARGET_OS_ENV
928174313SobrienOPENJDK_TARGET_OS_TYPE
929174313SobrienOPENJDK_TARGET_OS
930174313SobrienOPENJDK_BUILD_CPU_ENDIAN
93138494SobrienOPENJDK_BUILD_CPU_BITS
932174313SobrienOPENJDK_BUILD_CPU_ARCH
933174313SobrienOPENJDK_BUILD_CPU
934174313SobrienOPENJDK_BUILD_OS_ENV
935174313SobrienOPENJDK_BUILD_OS_TYPE
936174313SobrienOPENJDK_BUILD_OS
937174313SobrienOPENJDK_BUILD_AUTOCONF_NAME
938174313SobrienOPENJDK_TARGET_AUTOCONF_NAME
939174313Sobrientarget_os
940174313Sobrientarget_vendor
941174313Sobrientarget_cpu
942174313Sobrientarget
943174313Sobrienhost_os
944174313Sobrienhost_vendor
945174313Sobrienhost_cpu
946174313Sobrienhost
947174313Sobrienbuild_os
948174313Sobrienbuild_vendor
949174313Sobrienbuild_cpu
950174313Sobrienbuild
951174313SobrienCPIO
952174313SobrienDF
953174313SobrienREADLINK
954174313SobrienCYGPATH
955174313SobrienSED
956174313SobrienFGREP
957174313SobrienEGREP
958174313SobrienGREP
959174313SobrienAWK
960174313SobrienXARGS
961174313SobrienWHICH
962174313SobrienWC
96338494SobrienUNIQ
96438494SobrienUNAME
96538494SobrienTR
966174313SobrienTOUCH
96738494SobrienTEE
96838494SobrienTAR
96938494SobrienTAIL
97038494SobrienSORT
97138494SobrienSH
97238494SobrienRM
97338494SobrienPRINTF
974174313SobrienNAWK
975174313SobrienMV
976174313SobrienMKTEMP
977174313SobrienMKDIR
97838494SobrienLS
97938494SobrienLN
98038494SobrienHEAD
98138494SobrienFIND
98238494SobrienFILE
98338494SobrienEXPR
98438494SobrienECHO
98538494SobrienDIRNAME
98638494SobrienDIFF
98738494SobrienDATE
98838494SobrienCUT
98938494SobrienCP
99038494SobrienCOMM
99138494SobrienCMP
99238494SobrienCHMOD
99338494SobrienCAT
99438494SobrienBASH
99538494SobrienBASENAME
99638494SobrienDATE_WHEN_CONFIGURED
99738494SobrienORIGINAL_PATH
99838494SobrienCONFIGURE_COMMAND_LINE
99938494Sobrientarget_alias
100038494Sobrienhost_alias
100138494Sobrienbuild_alias
100238494SobrienLIBS
100338494SobrienECHO_T
100438494SobrienECHO_N
100538494SobrienECHO_C
100638494SobrienDEFS
100738494Sobrienmandir
1008174313Sobrienlocaledir
1009174313Sobrienlibdir
101038494Sobrienpsdir
101138494Sobrienpdfdir
101238494Sobriendvidir
101338494Sobrienhtmldir
1014174313Sobrieninfodir
101538494Sobriendocdir
101638494Sobrienoldincludedir
101738494Sobrienincludedir
1018174313Sobrienlocalstatedir
101938494Sobriensharedstatedir
102038494Sobriensysconfdir
102138494Sobriendatadir
102238494Sobriendatarootdir
102338494Sobrienlibexecdir
102438494Sobriensbindir
1025174313Sobrienbindir
102638494Sobrienprogram_transform_name
102738494Sobrienprefix
102838494Sobrienexec_prefix
1029174313SobrienPACKAGE_URL
1030174313SobrienPACKAGE_BUGREPORT
103138494SobrienPACKAGE_STRING
1032174313SobrienPACKAGE_VERSION
1033174313SobrienPACKAGE_TARNAME
103438494SobrienPACKAGE_NAME
103538494SobrienPATH_SEPARATOR
103638494SobrienSHELL'
103738494Sobrienac_subst_files=''
103838494Sobrienac_user_opts='
103938494Sobrienenable_option_checking
104038494Sobrienwith_target_bits
104138494Sobrienenable_openjdk_only
104238494Sobrienwith_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057with_builddeps_conf
1058with_builddeps_server
1059with_builddeps_dir
1060with_builddeps_group
1061enable_headful
1062enable_hotspot_test_in_build
1063with_cacerts_file
1064enable_unlimited_crypto
1065with_milestone
1066with_update_version
1067with_user_release_suffix
1068with_build_number
1069with_copyright_year
1070with_boot_jdk
1071with_add_source_root
1072with_override_source_root
1073with_adds_and_overrides
1074with_override_langtools
1075with_override_corba
1076with_override_jaxp
1077with_override_jaxws
1078with_override_hotspot
1079with_override_nashorn
1080with_override_jdk
1081with_import_hotspot
1082with_toolchain_type
1083with_extra_cflags
1084with_extra_cxxflags
1085with_extra_ldflags
1086with_toolchain_version
1087with_jtreg
1088enable_warnings_as_errors
1089enable_debug_symbols
1090enable_zip_debug_info
1091enable_native_coverage
1092with_x
1093with_cups
1094with_cups_include
1095with_freetype
1096with_freetype_include
1097with_freetype_lib
1098with_freetype_src
1099enable_freetype_bundling
1100with_alsa
1101with_alsa_include
1102with_alsa_lib
1103with_libjpeg
1104with_giflib
1105with_lcms
1106with_libpng
1107with_zlib
1108with_stdc__lib
1109with_msvcr_dll
1110with_msvcp_dll
1111with_dxsdk
1112with_dxsdk_lib
1113with_dxsdk_include
1114with_num_cores
1115with_memory_size
1116with_jobs
1117with_boot_jdk_jvmargs
1118with_sjavac_server_java
1119enable_sjavac
1120enable_precompiled_headers
1121enable_ccache
1122with_ccache_dir
1123'
1124      ac_precious_vars='build_alias
1125host_alias
1126target_alias
1127BASENAME
1128BASH
1129CAT
1130CHMOD
1131CMP
1132COMM
1133CP
1134CUT
1135DATE
1136DIFF
1137DIRNAME
1138ECHO
1139EXPR
1140FILE
1141FIND
1142HEAD
1143LN
1144LS
1145MKDIR
1146MKTEMP
1147MV
1148NAWK
1149PRINTF
1150RM
1151SH
1152SORT
1153TAIL
1154TAR
1155TEE
1156TOUCH
1157TR
1158UNAME
1159UNIQ
1160WC
1161WHICH
1162XARGS
1163AWK
1164GREP
1165EGREP
1166FGREP
1167SED
1168CYGPATH
1169READLINK
1170DF
1171CPIO
1172UNZIP
1173ZIP
1174LDD
1175OTOOL
1176READELF
1177HG
1178STAT
1179TIME
1180PATCH
1181DSYMUTIL
1182XATTR
1183CODESIGN
1184SETFILE
1185PKG_CONFIG
1186JAVA
1187JAVAC
1188JAVAH
1189JAR
1190JARSIGNER
1191CC
1192CFLAGS
1193LDFLAGS
1194LIBS
1195CPPFLAGS
1196CXX
1197CXXFLAGS
1198CCC
1199CPP
1200CXXCPP
1201AS
1202AR
1203LIPO
1204STRIP
1205NM
1206GNM
1207OBJCOPY
1208OBJDUMP
1209BUILD_CC
1210BUILD_CXX
1211BUILD_LD
1212JTREGEXE
1213XMKMF
1214FREETYPE_CFLAGS
1215FREETYPE_LIBS
1216ALSA_CFLAGS
1217ALSA_LIBS
1218LCMS_CFLAGS
1219LCMS_LIBS
1220PNG_CFLAGS
1221PNG_LIBS
1222LIBFFI_CFLAGS
1223LIBFFI_LIBS
1224CCACHE'
1225
1226
1227# Initialize some variables set by options.
1228ac_init_help=
1229ac_init_version=false
1230ac_unrecognized_opts=
1231ac_unrecognized_sep=
1232# The variables have the same names as the options, with
1233# dashes changed to underlines.
1234cache_file=/dev/null
1235exec_prefix=NONE
1236no_create=
1237no_recursion=
1238prefix=NONE
1239program_prefix=NONE
1240program_suffix=NONE
1241program_transform_name=s,x,x,
1242silent=
1243site=
1244srcdir=
1245verbose=
1246x_includes=NONE
1247x_libraries=NONE
1248
1249# Installation directory options.
1250# These are left unexpanded so users can "make install exec_prefix=/foo"
1251# and all the variables that are supposed to be based on exec_prefix
1252# by default will actually change.
1253# Use braces instead of parens because sh, perl, etc. also accept them.
1254# (The list follows the same order as the GNU Coding Standards.)
1255bindir='${exec_prefix}/bin'
1256sbindir='${exec_prefix}/sbin'
1257libexecdir='${exec_prefix}/libexec'
1258datarootdir='${prefix}/share'
1259datadir='${datarootdir}'
1260sysconfdir='${prefix}/etc'
1261sharedstatedir='${prefix}/com'
1262localstatedir='${prefix}/var'
1263includedir='${prefix}/include'
1264oldincludedir='/usr/include'
1265docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1266infodir='${datarootdir}/info'
1267htmldir='${docdir}'
1268dvidir='${docdir}'
1269pdfdir='${docdir}'
1270psdir='${docdir}'
1271libdir='${exec_prefix}/lib'
1272localedir='${datarootdir}/locale'
1273mandir='${datarootdir}/man'
1274
1275ac_prev=
1276ac_dashdash=
1277for ac_option
1278do
1279  # If the previous option needs an argument, assign it.
1280  if test -n "$ac_prev"; then
1281    eval $ac_prev=\$ac_option
1282    ac_prev=
1283    continue
1284  fi
1285
1286  case $ac_option in
1287  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1288  *=)   ac_optarg= ;;
1289  *)    ac_optarg=yes ;;
1290  esac
1291
1292  # Accept the important Cygnus configure options, so we can diagnose typos.
1293
1294  case $ac_dashdash$ac_option in
1295  --)
1296    ac_dashdash=yes ;;
1297
1298  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1299    ac_prev=bindir ;;
1300  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1301    bindir=$ac_optarg ;;
1302
1303  -build | --build | --buil | --bui | --bu)
1304    ac_prev=build_alias ;;
1305  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1306    build_alias=$ac_optarg ;;
1307
1308  -cache-file | --cache-file | --cache-fil | --cache-fi \
1309  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1310    ac_prev=cache_file ;;
1311  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1312  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1313    cache_file=$ac_optarg ;;
1314
1315  --config-cache | -C)
1316    cache_file=config.cache ;;
1317
1318  -datadir | --datadir | --datadi | --datad)
1319    ac_prev=datadir ;;
1320  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1321    datadir=$ac_optarg ;;
1322
1323  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1324  | --dataroo | --dataro | --datar)
1325    ac_prev=datarootdir ;;
1326  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1327  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1328    datarootdir=$ac_optarg ;;
1329
1330  -disable-* | --disable-*)
1331    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1332    # Reject names that are not valid shell variable names.
1333    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1334      as_fn_error $? "invalid feature name: $ac_useropt"
1335    ac_useropt_orig=$ac_useropt
1336    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1337    case $ac_user_opts in
1338      *"
1339"enable_$ac_useropt"
1340"*) ;;
1341      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1342	 ac_unrecognized_sep=', ';;
1343    esac
1344    eval enable_$ac_useropt=no ;;
1345
1346  -docdir | --docdir | --docdi | --doc | --do)
1347    ac_prev=docdir ;;
1348  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1349    docdir=$ac_optarg ;;
1350
1351  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1352    ac_prev=dvidir ;;
1353  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1354    dvidir=$ac_optarg ;;
1355
1356  -enable-* | --enable-*)
1357    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1358    # Reject names that are not valid shell variable names.
1359    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1360      as_fn_error $? "invalid feature name: $ac_useropt"
1361    ac_useropt_orig=$ac_useropt
1362    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1363    case $ac_user_opts in
1364      *"
1365"enable_$ac_useropt"
1366"*) ;;
1367      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1368	 ac_unrecognized_sep=', ';;
1369    esac
1370    eval enable_$ac_useropt=\$ac_optarg ;;
1371
1372  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1373  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1374  | --exec | --exe | --ex)
1375    ac_prev=exec_prefix ;;
1376  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1377  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1378  | --exec=* | --exe=* | --ex=*)
1379    exec_prefix=$ac_optarg ;;
1380
1381  -gas | --gas | --ga | --g)
1382    # Obsolete; use --with-gas.
1383    with_gas=yes ;;
1384
1385  -help | --help | --hel | --he | -h)
1386    ac_init_help=long ;;
1387  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1388    ac_init_help=recursive ;;
1389  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1390    ac_init_help=short ;;
1391
1392  -host | --host | --hos | --ho)
1393    ac_prev=host_alias ;;
1394  -host=* | --host=* | --hos=* | --ho=*)
1395    host_alias=$ac_optarg ;;
1396
1397  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1398    ac_prev=htmldir ;;
1399  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1400  | --ht=*)
1401    htmldir=$ac_optarg ;;
1402
1403  -includedir | --includedir | --includedi | --included | --include \
1404  | --includ | --inclu | --incl | --inc)
1405    ac_prev=includedir ;;
1406  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1407  | --includ=* | --inclu=* | --incl=* | --inc=*)
1408    includedir=$ac_optarg ;;
1409
1410  -infodir | --infodir | --infodi | --infod | --info | --inf)
1411    ac_prev=infodir ;;
1412  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1413    infodir=$ac_optarg ;;
1414
1415  -libdir | --libdir | --libdi | --libd)
1416    ac_prev=libdir ;;
1417  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1418    libdir=$ac_optarg ;;
1419
1420  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1421  | --libexe | --libex | --libe)
1422    ac_prev=libexecdir ;;
1423  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1424  | --libexe=* | --libex=* | --libe=*)
1425    libexecdir=$ac_optarg ;;
1426
1427  -localedir | --localedir | --localedi | --localed | --locale)
1428    ac_prev=localedir ;;
1429  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1430    localedir=$ac_optarg ;;
1431
1432  -localstatedir | --localstatedir | --localstatedi | --localstated \
1433  | --localstate | --localstat | --localsta | --localst | --locals)
1434    ac_prev=localstatedir ;;
1435  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1436  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1437    localstatedir=$ac_optarg ;;
1438
1439  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1440    ac_prev=mandir ;;
1441  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1442    mandir=$ac_optarg ;;
1443
1444  -nfp | --nfp | --nf)
1445    # Obsolete; use --without-fp.
1446    with_fp=no ;;
1447
1448  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1449  | --no-cr | --no-c | -n)
1450    no_create=yes ;;
1451
1452  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1453  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1454    no_recursion=yes ;;
1455
1456  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1457  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1458  | --oldin | --oldi | --old | --ol | --o)
1459    ac_prev=oldincludedir ;;
1460  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1461  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1462  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1463    oldincludedir=$ac_optarg ;;
1464
1465  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1466    ac_prev=prefix ;;
1467  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1468    prefix=$ac_optarg ;;
1469
1470  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1471  | --program-pre | --program-pr | --program-p)
1472    ac_prev=program_prefix ;;
1473  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1474  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1475    program_prefix=$ac_optarg ;;
1476
1477  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1478  | --program-suf | --program-su | --program-s)
1479    ac_prev=program_suffix ;;
1480  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1481  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1482    program_suffix=$ac_optarg ;;
1483
1484  -program-transform-name | --program-transform-name \
1485  | --program-transform-nam | --program-transform-na \
1486  | --program-transform-n | --program-transform- \
1487  | --program-transform | --program-transfor \
1488  | --program-transfo | --program-transf \
1489  | --program-trans | --program-tran \
1490  | --progr-tra | --program-tr | --program-t)
1491    ac_prev=program_transform_name ;;
1492  -program-transform-name=* | --program-transform-name=* \
1493  | --program-transform-nam=* | --program-transform-na=* \
1494  | --program-transform-n=* | --program-transform-=* \
1495  | --program-transform=* | --program-transfor=* \
1496  | --program-transfo=* | --program-transf=* \
1497  | --program-trans=* | --program-tran=* \
1498  | --progr-tra=* | --program-tr=* | --program-t=*)
1499    program_transform_name=$ac_optarg ;;
1500
1501  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1502    ac_prev=pdfdir ;;
1503  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1504    pdfdir=$ac_optarg ;;
1505
1506  -psdir | --psdir | --psdi | --psd | --ps)
1507    ac_prev=psdir ;;
1508  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1509    psdir=$ac_optarg ;;
1510
1511  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1512  | -silent | --silent | --silen | --sile | --sil)
1513    silent=yes ;;
1514
1515  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1516    ac_prev=sbindir ;;
1517  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1518  | --sbi=* | --sb=*)
1519    sbindir=$ac_optarg ;;
1520
1521  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1522  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1523  | --sharedst | --shareds | --shared | --share | --shar \
1524  | --sha | --sh)
1525    ac_prev=sharedstatedir ;;
1526  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1527  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1528  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1529  | --sha=* | --sh=*)
1530    sharedstatedir=$ac_optarg ;;
1531
1532  -site | --site | --sit)
1533    ac_prev=site ;;
1534  -site=* | --site=* | --sit=*)
1535    site=$ac_optarg ;;
1536
1537  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1538    ac_prev=srcdir ;;
1539  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1540    srcdir=$ac_optarg ;;
1541
1542  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1543  | --syscon | --sysco | --sysc | --sys | --sy)
1544    ac_prev=sysconfdir ;;
1545  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1546  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1547    sysconfdir=$ac_optarg ;;
1548
1549  -target | --target | --targe | --targ | --tar | --ta | --t)
1550    ac_prev=target_alias ;;
1551  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1552    target_alias=$ac_optarg ;;
1553
1554  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1555    verbose=yes ;;
1556
1557  -version | --version | --versio | --versi | --vers | -V)
1558    ac_init_version=: ;;
1559
1560  -with-* | --with-*)
1561    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1562    # Reject names that are not valid shell variable names.
1563    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1564      as_fn_error $? "invalid package name: $ac_useropt"
1565    ac_useropt_orig=$ac_useropt
1566    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1567    case $ac_user_opts in
1568      *"
1569"with_$ac_useropt"
1570"*) ;;
1571      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1572	 ac_unrecognized_sep=', ';;
1573    esac
1574    eval with_$ac_useropt=\$ac_optarg ;;
1575
1576  -without-* | --without-*)
1577    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1578    # Reject names that are not valid shell variable names.
1579    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1580      as_fn_error $? "invalid package name: $ac_useropt"
1581    ac_useropt_orig=$ac_useropt
1582    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1583    case $ac_user_opts in
1584      *"
1585"with_$ac_useropt"
1586"*) ;;
1587      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1588	 ac_unrecognized_sep=', ';;
1589    esac
1590    eval with_$ac_useropt=no ;;
1591
1592  --x)
1593    # Obsolete; use --with-x.
1594    with_x=yes ;;
1595
1596  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1597  | --x-incl | --x-inc | --x-in | --x-i)
1598    ac_prev=x_includes ;;
1599  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1600  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1601    x_includes=$ac_optarg ;;
1602
1603  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1604  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1605    ac_prev=x_libraries ;;
1606  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1607  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1608    x_libraries=$ac_optarg ;;
1609
1610  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1611Try \`$0 --help' for more information"
1612    ;;
1613
1614  *=*)
1615    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1616    # Reject names that are not valid shell variable names.
1617    case $ac_envvar in #(
1618      '' | [0-9]* | *[!_$as_cr_alnum]* )
1619      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1620    esac
1621    eval $ac_envvar=\$ac_optarg
1622    export $ac_envvar ;;
1623
1624  *)
1625    # FIXME: should be removed in autoconf 3.0.
1626    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1627    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1628      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1629    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1630    ;;
1631
1632  esac
1633done
1634
1635if test -n "$ac_prev"; then
1636  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1637  as_fn_error $? "missing argument to $ac_option"
1638fi
1639
1640if test -n "$ac_unrecognized_opts"; then
1641  case $enable_option_checking in
1642    no) ;;
1643    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1644    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1645  esac
1646fi
1647
1648# Check all directory arguments for consistency.
1649for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1650		datadir sysconfdir sharedstatedir localstatedir includedir \
1651		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1652		libdir localedir mandir
1653do
1654  eval ac_val=\$$ac_var
1655  # Remove trailing slashes.
1656  case $ac_val in
1657    */ )
1658      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1659      eval $ac_var=\$ac_val;;
1660  esac
1661  # Be sure to have absolute directory names.
1662  case $ac_val in
1663    [\\/$]* | ?:[\\/]* )  continue;;
1664    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1665  esac
1666  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1667done
1668
1669# There might be people who depend on the old broken behavior: `$host'
1670# used to hold the argument of --host etc.
1671# FIXME: To remove some day.
1672build=$build_alias
1673host=$host_alias
1674target=$target_alias
1675
1676# FIXME: To remove some day.
1677if test "x$host_alias" != x; then
1678  if test "x$build_alias" = x; then
1679    cross_compiling=maybe
1680  elif test "x$build_alias" != "x$host_alias"; then
1681    cross_compiling=yes
1682  fi
1683fi
1684
1685ac_tool_prefix=
1686test -n "$host_alias" && ac_tool_prefix=$host_alias-
1687
1688test "$silent" = yes && exec 6>/dev/null
1689
1690
1691ac_pwd=`pwd` && test -n "$ac_pwd" &&
1692ac_ls_di=`ls -di .` &&
1693ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1694  as_fn_error $? "working directory cannot be determined"
1695test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1696  as_fn_error $? "pwd does not report name of working directory"
1697
1698
1699# Find the source files, if location was not specified.
1700if test -z "$srcdir"; then
1701  ac_srcdir_defaulted=yes
1702  # Try the directory containing this script, then the parent directory.
1703  ac_confdir=`$as_dirname -- "$as_myself" ||
1704$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1705	 X"$as_myself" : 'X\(//\)[^/]' \| \
1706	 X"$as_myself" : 'X\(//\)$' \| \
1707	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1708$as_echo X"$as_myself" |
1709    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)[^/].*/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\/\)$/{
1718	    s//\1/
1719	    q
1720	  }
1721	  /^X\(\/\).*/{
1722	    s//\1/
1723	    q
1724	  }
1725	  s/.*/./; q'`
1726  srcdir=$ac_confdir
1727  if test ! -r "$srcdir/$ac_unique_file"; then
1728    srcdir=..
1729  fi
1730else
1731  ac_srcdir_defaulted=no
1732fi
1733if test ! -r "$srcdir/$ac_unique_file"; then
1734  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1735  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1736fi
1737ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1738ac_abs_confdir=`(
1739	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1740	pwd)`
1741# When building in place, set srcdir=.
1742if test "$ac_abs_confdir" = "$ac_pwd"; then
1743  srcdir=.
1744fi
1745# Remove unnecessary trailing slashes from srcdir.
1746# Double slashes in file names in object file debugging info
1747# mess up M-x gdb in Emacs.
1748case $srcdir in
1749*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1750esac
1751for ac_var in $ac_precious_vars; do
1752  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_env_${ac_var}_value=\$${ac_var}
1754  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1756done
1757
1758#
1759# Report the --help message.
1760#
1761if test "$ac_init_help" = "long"; then
1762  # Omit some internal or obsolete options to make the list less imposing.
1763  # This message is too long to be a string in the A/UX 3.1 sh.
1764  cat <<_ACEOF
1765\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1766
1767Usage: $0 [OPTION]... [VAR=VALUE]...
1768
1769To assign environment variables (e.g., CC, CFLAGS...), specify them as
1770VAR=VALUE.  See below for descriptions of some of the useful variables.
1771
1772Defaults for the options are specified in brackets.
1773
1774Configuration:
1775  -h, --help              display this help and exit
1776      --help=short        display options specific to this package
1777      --help=recursive    display the short help of all the included packages
1778  -V, --version           display version information and exit
1779  -q, --quiet, --silent   do not print \`checking ...' messages
1780      --cache-file=FILE   cache test results in FILE [disabled]
1781  -C, --config-cache      alias for \`--cache-file=config.cache'
1782  -n, --no-create         do not create output files
1783      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1784
1785Installation directories:
1786  --prefix=PREFIX         install architecture-independent files in PREFIX
1787                          [$ac_default_prefix]
1788  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1789                          [PREFIX]
1790
1791By default, \`make install' will install all the files in
1792\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1793an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1794for instance \`--prefix=\$HOME'.
1795
1796For better control, use the options below.
1797
1798Fine tuning of the installation directories:
1799  --bindir=DIR            user executables [EPREFIX/bin]
1800  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1801  --libexecdir=DIR        program executables [EPREFIX/libexec]
1802  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1803  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1804  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1805  --libdir=DIR            object code libraries [EPREFIX/lib]
1806  --includedir=DIR        C header files [PREFIX/include]
1807  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1808  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1809  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1810  --infodir=DIR           info documentation [DATAROOTDIR/info]
1811  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1812  --mandir=DIR            man documentation [DATAROOTDIR/man]
1813  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1814  --htmldir=DIR           html documentation [DOCDIR]
1815  --dvidir=DIR            dvi documentation [DOCDIR]
1816  --pdfdir=DIR            pdf documentation [DOCDIR]
1817  --psdir=DIR             ps documentation [DOCDIR]
1818_ACEOF
1819
1820  cat <<\_ACEOF
1821
1822X features:
1823  --x-includes=DIR    X include files are in DIR
1824  --x-libraries=DIR   X library files are in DIR
1825
1826System types:
1827  --build=BUILD     configure for building on BUILD [guessed]
1828  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1829  --target=TARGET   configure for building compilers for TARGET [HOST]
1830_ACEOF
1831fi
1832
1833if test -n "$ac_init_help"; then
1834  case $ac_init_help in
1835     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1836   esac
1837  cat <<\_ACEOF
1838
1839Optional Features:
1840  --disable-option-checking  ignore unrecognized --enable/--with options
1841  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1842  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1843  --enable-openjdk-only   suppress building custom source even if present
1844                          [disabled]
1845  --enable-debug          set the debug level to fastdebug (shorthand for
1846                          --with-debug-level=fastdebug) [disabled]
1847  --disable-headful       disable building headful support (graphical UI
1848                          support) [enabled]
1849  --enable-hotspot-test-in-build
1850                          run the Queens test after Hotspot build [disabled]
1851  --enable-unlimited-crypto
1852                          Enable unlimited crypto policy [disabled]
1853  --disable-warnings-as-errors
1854                          do not consider native warnings to be an error
1855                          [enabled]
1856  --disable-debug-symbols disable generation of debug symbols [enabled]
1857  --disable-zip-debug-info
1858                          disable zipping of debug-info files [enabled]
1859  --enable-native-coverage
1860                          enable native compilation with code coverage
1861                          data[disabled]
1862  --disable-freetype-bundling
1863                          disable bundling of the freetype library with the
1864                          build result [enabled on Windows or when using
1865                          --with-freetype, disabled otherwise]
1866  --enable-sjavac         use sjavac to do fast incremental compiles
1867                          [disabled]
1868  --disable-precompiled-headers
1869                          disable using precompiled headers when compiling C++
1870                          [enabled]
1871  --enable-ccache         enable using ccache to speed up recompilations
1872                          [disabled]
1873
1874Optional Packages:
1875  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1876  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1877  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1878                          support it), e.g. --with-target-bits=32 [guessed]
1879  --with-custom-make-dir  Deprecated. Option is kept for backwards
1880                          compatibility and is ignored
1881  --with-jdk-variant      JDK variant to build (normal) [normal]
1882  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1883  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1884                          client, minimal1, kernel, zero, zeroshark, core)
1885                          [server]
1886  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1887                          optimized (HotSpot build only)) [release]
1888  --with-devkit           use this devkit for compilers, tools and resources
1889  --with-sys-root         alias for --with-sysroot for backwards compatability
1890  --with-sysroot          use this directory as sysroot
1891  --with-tools-dir        alias for --with-toolchain-path for backwards
1892                          compatibility
1893  --with-toolchain-path   prepend these directories when searching for
1894                          toolchain binaries (compilers etc)
1895  --with-extra-path       prepend these directories to the default path
1896  --with-sdk-name         use the platform SDK of the given name. [macosx]
1897  --with-conf-name        use this as the name of the configuration [generated
1898                          from important configuration options]
1899  --with-output-sync      set make output sync type if supported by make.
1900                          [recurse]
1901  --with-builddeps-conf   use this configuration file for the builddeps
1902  --with-builddeps-server download and use build dependencies from this server
1903                          url
1904  --with-builddeps-dir    store downloaded build dependencies here
1905                          [/localhome/builddeps]
1906  --with-builddeps-group  chgrp the downloaded build dependencies to this
1907                          group
1908  --with-cacerts-file     specify alternative cacerts file
1909  --with-milestone        Set milestone value for build [internal]
1910  --with-update-version   Set update version value for build [b00]
1911  --with-user-release-suffix
1912                          Add a custom string to the version string if build
1913                          number is not set.[username_builddateb00]
1914  --with-build-number     Set build number value for build [b00]
1915  --with-copyright-year   Set copyright year value for build [current year]
1916  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1917  --with-add-source-root  for each and every source directory, look in this
1918                          additional source root for the same directory; if it
1919                          exists and have files in it, include it in the build
1920  --with-override-source-root
1921                          for each and every source directory, look in this
1922                          override source root for the same directory; if it
1923                          exists, use that directory instead and ignore the
1924                          directory in the original source root
1925  --with-adds-and-overrides
1926                          use the subdirs 'adds' and 'overrides' in the
1927                          specified directory as add-source-root and
1928                          override-source-root
1929  --with-override-langtools
1930                          use this langtools dir for the build
1931  --with-override-corba   use this corba dir for the build
1932  --with-override-jaxp    use this jaxp dir for the build
1933  --with-override-jaxws   use this jaxws dir for the build
1934  --with-override-hotspot use this hotspot dir for the build
1935  --with-override-nashorn use this nashorn dir for the build
1936  --with-override-jdk     use this jdk dir for the build
1937  --with-import-hotspot   import hotspot binaries from this jdk image or
1938                          hotspot build dist dir instead of building from
1939                          source
1940  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1941                          to show possible values [platform dependent]
1942  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1943  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1944  --with-extra-ldflags    extra flags to be used when linking jdk
1945  --with-toolchain-version
1946                          the version of the toolchain to look for, use
1947                          '--help' to show possible values [platform
1948                          dependent]
1949  --with-jtreg            Regression Test Harness [probed]
1950  --with-x                use the X Window System
1951  --with-cups             specify prefix directory for the cups package
1952                          (expecting the headers under PATH/include)
1953  --with-cups-include     specify directory for the cups include files
1954  --with-freetype         specify prefix directory for the freetype package
1955                          (expecting the libraries under PATH/lib and the
1956                          headers under PATH/include)
1957  --with-freetype-include specify directory for the freetype include files
1958  --with-freetype-lib     specify directory for the freetype library
1959  --with-freetype-src     specify directory with freetype sources to
1960                          automatically build the library (experimental,
1961                          Windows-only)
1962  --with-alsa             specify prefix directory for the alsa package
1963                          (expecting the libraries under PATH/lib and the
1964                          headers under PATH/include)
1965  --with-alsa-include     specify directory for the alsa include files
1966  --with-alsa-lib         specify directory for the alsa library
1967  --with-libjpeg          use libjpeg from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-giflib           use giflib from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-lcms             use lcms2 from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-libpng           use libpng from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-zlib             use zlib from build system or OpenJDK source
1976                          (system, bundled) [bundled]
1977  --with-stdc++lib=<static>,<dynamic>,<default>
1978                          force linking of the C++ runtime on Linux to either
1979                          static or dynamic, default is static with dynamic as
1980                          fallback
1981  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1982                          (Windows only) [probed]
1983  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1984                          (Windows only) [probed]
1985  --with-dxsdk            Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-dxsdk-include    Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-num-cores        number of cores in the build system, e.g.
1992                          --with-num-cores=8 [probed]
1993  --with-memory-size      memory (in MB) available in the build system, e.g.
1994                          --with-memory-size=1024 [probed]
1995  --with-jobs             number of parallel jobs to let make run [calculated
1996                          based on cores and memory]
1997  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1998                          invocations of boot JDK, overriding the default
1999                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2000                          -enableassertions"
2001  --with-sjavac-server-java
2002                          use this java binary for running the sjavac
2003                          background server [Boot JDK java]
2004  --with-ccache-dir       where to store ccache files [~/.ccache]
2005
2006Some influential environment variables:
2007  BASENAME    Override default value for BASENAME
2008  BASH        Override default value for BASH
2009  CAT         Override default value for CAT
2010  CHMOD       Override default value for CHMOD
2011  CMP         Override default value for CMP
2012  COMM        Override default value for COMM
2013  CP          Override default value for CP
2014  CUT         Override default value for CUT
2015  DATE        Override default value for DATE
2016  DIFF        Override default value for DIFF
2017  DIRNAME     Override default value for DIRNAME
2018  ECHO        Override default value for ECHO
2019  EXPR        Override default value for EXPR
2020  FILE        Override default value for FILE
2021  FIND        Override default value for FIND
2022  HEAD        Override default value for HEAD
2023  LN          Override default value for LN
2024  LS          Override default value for LS
2025  MKDIR       Override default value for MKDIR
2026  MKTEMP      Override default value for MKTEMP
2027  MV          Override default value for MV
2028  NAWK        Override default value for NAWK
2029  PRINTF      Override default value for PRINTF
2030  RM          Override default value for RM
2031  SH          Override default value for SH
2032  SORT        Override default value for SORT
2033  TAIL        Override default value for TAIL
2034  TAR         Override default value for TAR
2035  TEE         Override default value for TEE
2036  TOUCH       Override default value for TOUCH
2037  TR          Override default value for TR
2038  UNAME       Override default value for UNAME
2039  UNIQ        Override default value for UNIQ
2040  WC          Override default value for WC
2041  WHICH       Override default value for WHICH
2042  XARGS       Override default value for XARGS
2043  AWK         Override default value for AWK
2044  GREP        Override default value for GREP
2045  EGREP       Override default value for EGREP
2046  FGREP       Override default value for FGREP
2047  SED         Override default value for SED
2048  CYGPATH     Override default value for CYGPATH
2049  READLINK    Override default value for READLINK
2050  DF          Override default value for DF
2051  CPIO        Override default value for CPIO
2052  UNZIP       Override default value for UNZIP
2053  ZIP         Override default value for ZIP
2054  LDD         Override default value for LDD
2055  OTOOL       Override default value for OTOOL
2056  READELF     Override default value for READELF
2057  HG          Override default value for HG
2058  STAT        Override default value for STAT
2059  TIME        Override default value for TIME
2060  PATCH       Override default value for PATCH
2061  DSYMUTIL    Override default value for DSYMUTIL
2062  XATTR       Override default value for XATTR
2063  CODESIGN    Override default value for CODESIGN
2064  SETFILE     Override default value for SETFILE
2065  PKG_CONFIG  path to pkg-config utility
2066  JAVA        Override default value for JAVA
2067  JAVAC       Override default value for JAVAC
2068  JAVAH       Override default value for JAVAH
2069  JAR         Override default value for JAR
2070  JARSIGNER   Override default value for JARSIGNER
2071  CC          C compiler command
2072  CFLAGS      C compiler flags
2073  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2074              nonstandard directory <lib dir>
2075  LIBS        libraries to pass to the linker, e.g. -l<library>
2076  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2077              you have headers in a nonstandard directory <include dir>
2078  CXX         C++ compiler command
2079  CXXFLAGS    C++ compiler flags
2080  CPP         C preprocessor
2081  CXXCPP      C++ preprocessor
2082  AS          Override default value for AS
2083  AR          Override default value for AR
2084  LIPO        Override default value for LIPO
2085  STRIP       Override default value for STRIP
2086  NM          Override default value for NM
2087  GNM         Override default value for GNM
2088  OBJCOPY     Override default value for OBJCOPY
2089  OBJDUMP     Override default value for OBJDUMP
2090  BUILD_CC    Override default value for BUILD_CC
2091  BUILD_CXX   Override default value for BUILD_CXX
2092  BUILD_LD    Override default value for BUILD_LD
2093  JTREGEXE    Override default value for JTREGEXE
2094  XMKMF       Path to xmkmf, Makefile generator for X Window System
2095  FREETYPE_CFLAGS
2096              C compiler flags for FREETYPE, overriding pkg-config
2097  FREETYPE_LIBS
2098              linker flags for FREETYPE, overriding pkg-config
2099  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2100  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2101  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2102  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2103  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2104  PNG_LIBS    linker flags for PNG, overriding pkg-config
2105  LIBFFI_CFLAGS
2106              C compiler flags for LIBFFI, overriding pkg-config
2107  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2108  CCACHE      Override default value for CCACHE
2109
2110Use these variables to override the choices made by `configure' or to help
2111it to find libraries and programs with nonstandard names/locations.
2112
2113Report bugs to <build-dev@openjdk.java.net>.
2114OpenJDK home page: <http://openjdk.java.net>.
2115_ACEOF
2116ac_status=$?
2117fi
2118
2119if test "$ac_init_help" = "recursive"; then
2120  # If there are subdirs, report their specific --help.
2121  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2122    test -d "$ac_dir" ||
2123      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2124      continue
2125    ac_builddir=.
2126
2127case "$ac_dir" in
2128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2129*)
2130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2131  # A ".." for each directory in $ac_dir_suffix.
2132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2133  case $ac_top_builddir_sub in
2134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2136  esac ;;
2137esac
2138ac_abs_top_builddir=$ac_pwd
2139ac_abs_builddir=$ac_pwd$ac_dir_suffix
2140# for backward compatibility:
2141ac_top_builddir=$ac_top_build_prefix
2142
2143case $srcdir in
2144  .)  # We are building in place.
2145    ac_srcdir=.
2146    ac_top_srcdir=$ac_top_builddir_sub
2147    ac_abs_top_srcdir=$ac_pwd ;;
2148  [\\/]* | ?:[\\/]* )  # Absolute name.
2149    ac_srcdir=$srcdir$ac_dir_suffix;
2150    ac_top_srcdir=$srcdir
2151    ac_abs_top_srcdir=$srcdir ;;
2152  *) # Relative name.
2153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2154    ac_top_srcdir=$ac_top_build_prefix$srcdir
2155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2156esac
2157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2158
2159    cd "$ac_dir" || { ac_status=$?; continue; }
2160    # Check for guested configure.
2161    if test -f "$ac_srcdir/configure.gnu"; then
2162      echo &&
2163      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2164    elif test -f "$ac_srcdir/configure"; then
2165      echo &&
2166      $SHELL "$ac_srcdir/configure" --help=recursive
2167    else
2168      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2169    fi || ac_status=$?
2170    cd "$ac_pwd" || { ac_status=$?; break; }
2171  done
2172fi
2173
2174test -n "$ac_init_help" && exit $ac_status
2175if $ac_init_version; then
2176  cat <<\_ACEOF
2177OpenJDK configure jdk9
2178generated by GNU Autoconf 2.69
2179
2180Copyright (C) 2012 Free Software Foundation, Inc.
2181This configure script is free software; the Free Software Foundation
2182gives unlimited permission to copy, distribute and modify it.
2183_ACEOF
2184  exit
2185fi
2186
2187## ------------------------ ##
2188## Autoconf initialization. ##
2189## ------------------------ ##
2190
2191# ac_fn_c_try_compile LINENO
2192# --------------------------
2193# Try to compile conftest.$ac_ext, and return whether this succeeded.
2194ac_fn_c_try_compile ()
2195{
2196  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197  rm -f conftest.$ac_objext
2198  if { { ac_try="$ac_compile"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_compile") 2>conftest.err
2206  ac_status=$?
2207  if test -s conftest.err; then
2208    grep -v '^ *+' conftest.err >conftest.er1
2209    cat conftest.er1 >&5
2210    mv -f conftest.er1 conftest.err
2211  fi
2212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213  test $ac_status = 0; } && {
2214	 test -z "$ac_c_werror_flag" ||
2215	 test ! -s conftest.err
2216       } && test -s conftest.$ac_objext; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: failed program was:" >&5
2220sed 's/^/| /' conftest.$ac_ext >&5
2221
2222	ac_retval=1
2223fi
2224  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225  as_fn_set_status $ac_retval
2226
2227} # ac_fn_c_try_compile
2228
2229# ac_fn_cxx_try_compile LINENO
2230# ----------------------------
2231# Try to compile conftest.$ac_ext, and return whether this succeeded.
2232ac_fn_cxx_try_compile ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  rm -f conftest.$ac_objext
2236  if { { ac_try="$ac_compile"
2237case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_compile") 2>conftest.err
2244  ac_status=$?
2245  if test -s conftest.err; then
2246    grep -v '^ *+' conftest.err >conftest.er1
2247    cat conftest.er1 >&5
2248    mv -f conftest.er1 conftest.err
2249  fi
2250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2251  test $ac_status = 0; } && {
2252	 test -z "$ac_cxx_werror_flag" ||
2253	 test ! -s conftest.err
2254       } && test -s conftest.$ac_objext; then :
2255  ac_retval=0
2256else
2257  $as_echo "$as_me: failed program was:" >&5
2258sed 's/^/| /' conftest.$ac_ext >&5
2259
2260	ac_retval=1
2261fi
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_compile
2266
2267# ac_fn_c_try_cpp LINENO
2268# ----------------------
2269# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2270ac_fn_c_try_cpp ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if { { ac_try="$ac_cpp conftest.$ac_ext"
2274case "(($ac_try" in
2275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276  *) ac_try_echo=$ac_try;;
2277esac
2278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279$as_echo "$ac_try_echo"; } >&5
2280  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2281  ac_status=$?
2282  if test -s conftest.err; then
2283    grep -v '^ *+' conftest.err >conftest.er1
2284    cat conftest.er1 >&5
2285    mv -f conftest.er1 conftest.err
2286  fi
2287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2288  test $ac_status = 0; } > conftest.i && {
2289	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2290	 test ! -s conftest.err
2291       }; then :
2292  ac_retval=0
2293else
2294  $as_echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297    ac_retval=1
2298fi
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300  as_fn_set_status $ac_retval
2301
2302} # ac_fn_c_try_cpp
2303
2304# ac_fn_cxx_try_cpp LINENO
2305# ------------------------
2306# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2307ac_fn_cxx_try_cpp ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if { { ac_try="$ac_cpp conftest.$ac_ext"
2311case "(($ac_try" in
2312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313  *) ac_try_echo=$ac_try;;
2314esac
2315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316$as_echo "$ac_try_echo"; } >&5
2317  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2318  ac_status=$?
2319  if test -s conftest.err; then
2320    grep -v '^ *+' conftest.err >conftest.er1
2321    cat conftest.er1 >&5
2322    mv -f conftest.er1 conftest.err
2323  fi
2324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325  test $ac_status = 0; } > conftest.i && {
2326	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2327	 test ! -s conftest.err
2328       }; then :
2329  ac_retval=0
2330else
2331  $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334    ac_retval=1
2335fi
2336  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337  as_fn_set_status $ac_retval
2338
2339} # ac_fn_cxx_try_cpp
2340
2341# ac_fn_c_try_link LINENO
2342# -----------------------
2343# Try to link conftest.$ac_ext, and return whether this succeeded.
2344ac_fn_c_try_link ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  rm -f conftest.$ac_objext conftest$ac_exeext
2348  if { { ac_try="$ac_link"
2349case "(($ac_try" in
2350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351  *) ac_try_echo=$ac_try;;
2352esac
2353eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354$as_echo "$ac_try_echo"; } >&5
2355  (eval "$ac_link") 2>conftest.err
2356  ac_status=$?
2357  if test -s conftest.err; then
2358    grep -v '^ *+' conftest.err >conftest.er1
2359    cat conftest.er1 >&5
2360    mv -f conftest.er1 conftest.err
2361  fi
2362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2363  test $ac_status = 0; } && {
2364	 test -z "$ac_c_werror_flag" ||
2365	 test ! -s conftest.err
2366       } && test -s conftest$ac_exeext && {
2367	 test "$cross_compiling" = yes ||
2368	 test -x conftest$ac_exeext
2369       }; then :
2370  ac_retval=0
2371else
2372  $as_echo "$as_me: failed program was:" >&5
2373sed 's/^/| /' conftest.$ac_ext >&5
2374
2375	ac_retval=1
2376fi
2377  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2378  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2379  # interfere with the next link command; also delete a directory that is
2380  # left behind by Apple's compiler.  We do this before executing the actions.
2381  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2382  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2383  as_fn_set_status $ac_retval
2384
2385} # ac_fn_c_try_link
2386
2387# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2388# ---------------------------------------------------------
2389# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2390# the include files in INCLUDES and setting the cache variable VAR
2391# accordingly.
2392ac_fn_cxx_check_header_mongrel ()
2393{
2394  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395  if eval \${$3+:} false; then :
2396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2397$as_echo_n "checking for $2... " >&6; }
2398if eval \${$3+:} false; then :
2399  $as_echo_n "(cached) " >&6
2400fi
2401eval ac_res=\$$3
2402	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
2404else
2405  # Is the header compilable?
2406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2407$as_echo_n "checking $2 usability... " >&6; }
2408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411#include <$2>
2412_ACEOF
2413if ac_fn_cxx_try_compile "$LINENO"; then :
2414  ac_header_compiler=yes
2415else
2416  ac_header_compiler=no
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2420$as_echo "$ac_header_compiler" >&6; }
2421
2422# Is the header present?
2423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2424$as_echo_n "checking $2 presence... " >&6; }
2425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427#include <$2>
2428_ACEOF
2429if ac_fn_cxx_try_cpp "$LINENO"; then :
2430  ac_header_preproc=yes
2431else
2432  ac_header_preproc=no
2433fi
2434rm -f conftest.err conftest.i conftest.$ac_ext
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2436$as_echo "$ac_header_preproc" >&6; }
2437
2438# So?  What about this header?
2439case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2440  yes:no: )
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2442$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2444$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2445    ;;
2446  no:yes:* )
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2448$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2450$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2452$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2454$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2456$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2457( $as_echo "## ----------------------------------------- ##
2458## Report this to build-dev@openjdk.java.net ##
2459## ----------------------------------------- ##"
2460     ) | sed "s/^/$as_me: WARNING:     /" >&2
2461    ;;
2462esac
2463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2464$as_echo_n "checking for $2... " >&6; }
2465if eval \${$3+:} false; then :
2466  $as_echo_n "(cached) " >&6
2467else
2468  eval "$3=\$ac_header_compiler"
2469fi
2470eval ac_res=\$$3
2471	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2472$as_echo "$ac_res" >&6; }
2473fi
2474  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2475
2476} # ac_fn_cxx_check_header_mongrel
2477
2478# ac_fn_cxx_try_run LINENO
2479# ------------------------
2480# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2481# that executables *can* be run.
2482ac_fn_cxx_try_run ()
2483{
2484  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2485  if { { ac_try="$ac_link"
2486case "(($ac_try" in
2487  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2488  *) ac_try_echo=$ac_try;;
2489esac
2490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2491$as_echo "$ac_try_echo"; } >&5
2492  (eval "$ac_link") 2>&5
2493  ac_status=$?
2494  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2495  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2496  { { case "(($ac_try" in
2497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498  *) ac_try_echo=$ac_try;;
2499esac
2500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501$as_echo "$ac_try_echo"; } >&5
2502  (eval "$ac_try") 2>&5
2503  ac_status=$?
2504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2505  test $ac_status = 0; }; }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: program exited with status $ac_status" >&5
2509       $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512       ac_retval=$ac_status
2513fi
2514  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516  as_fn_set_status $ac_retval
2517
2518} # ac_fn_cxx_try_run
2519
2520# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2521# ---------------------------------------------------------
2522# Tests whether HEADER exists and can be compiled using the include files in
2523# INCLUDES, setting the cache variable VAR accordingly.
2524ac_fn_cxx_check_header_compile ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534$4
2535#include <$2>
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  eval "$3=yes"
2539else
2540  eval "$3=no"
2541fi
2542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2543fi
2544eval ac_res=\$$3
2545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2546$as_echo "$ac_res" >&6; }
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548
2549} # ac_fn_cxx_check_header_compile
2550
2551# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2552# ----------------------------------------------
2553# Tries to find the compile-time value of EXPR in a program that includes
2554# INCLUDES, setting VAR accordingly. Returns whether the value could be
2555# computed
2556ac_fn_cxx_compute_int ()
2557{
2558  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2559  if test "$cross_compiling" = yes; then
2560    # Depending upon the size, compute the lo and hi bounds.
2561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564int
2565main ()
2566{
2567static int test_array [1 - 2 * !(($2) >= 0)];
2568test_array [0] = 0;
2569return test_array [0];
2570
2571  ;
2572  return 0;
2573}
2574_ACEOF
2575if ac_fn_cxx_try_compile "$LINENO"; then :
2576  ac_lo=0 ac_mid=0
2577  while :; do
2578    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579/* end confdefs.h.  */
2580$4
2581int
2582main ()
2583{
2584static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2585test_array [0] = 0;
2586return test_array [0];
2587
2588  ;
2589  return 0;
2590}
2591_ACEOF
2592if ac_fn_cxx_try_compile "$LINENO"; then :
2593  ac_hi=$ac_mid; break
2594else
2595  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2596			if test $ac_lo -le $ac_mid; then
2597			  ac_lo= ac_hi=
2598			  break
2599			fi
2600			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2601fi
2602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2603  done
2604else
2605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608int
2609main ()
2610{
2611static int test_array [1 - 2 * !(($2) < 0)];
2612test_array [0] = 0;
2613return test_array [0];
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  ac_hi=-1 ac_mid=-1
2621  while :; do
2622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624$4
2625int
2626main ()
2627{
2628static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2629test_array [0] = 0;
2630return test_array [0];
2631
2632  ;
2633  return 0;
2634}
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_lo=$ac_mid; break
2638else
2639  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2640			if test $ac_mid -le $ac_hi; then
2641			  ac_lo= ac_hi=
2642			  break
2643			fi
2644			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2645fi
2646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2647  done
2648else
2649  ac_lo= ac_hi=
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654# Binary search between lo and hi bounds.
2655while test "x$ac_lo" != "x$ac_hi"; do
2656  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658/* end confdefs.h.  */
2659$4
2660int
2661main ()
2662{
2663static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2664test_array [0] = 0;
2665return test_array [0];
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_compile "$LINENO"; then :
2672  ac_hi=$ac_mid
2673else
2674  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677done
2678case $ac_lo in #((
2679?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2680'') ac_retval=1 ;;
2681esac
2682  else
2683    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h.  */
2685$4
2686static long int longval () { return $2; }
2687static unsigned long int ulongval () { return $2; }
2688#include <stdio.h>
2689#include <stdlib.h>
2690int
2691main ()
2692{
2693
2694  FILE *f = fopen ("conftest.val", "w");
2695  if (! f)
2696    return 1;
2697  if (($2) < 0)
2698    {
2699      long int i = longval ();
2700      if (i != ($2))
2701	return 1;
2702      fprintf (f, "%ld", i);
2703    }
2704  else
2705    {
2706      unsigned long int i = ulongval ();
2707      if (i != ($2))
2708	return 1;
2709      fprintf (f, "%lu", i);
2710    }
2711  /* Do not output a trailing newline, as this causes \r\n confusion
2712     on some platforms.  */
2713  return ferror (f) || fclose (f) != 0;
2714
2715  ;
2716  return 0;
2717}
2718_ACEOF
2719if ac_fn_cxx_try_run "$LINENO"; then :
2720  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2721else
2722  ac_retval=1
2723fi
2724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2725  conftest.$ac_objext conftest.beam conftest.$ac_ext
2726rm -f conftest.val
2727
2728  fi
2729  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730  as_fn_set_status $ac_retval
2731
2732} # ac_fn_cxx_compute_int
2733
2734# ac_fn_cxx_try_link LINENO
2735# -------------------------
2736# Try to link conftest.$ac_ext, and return whether this succeeded.
2737ac_fn_cxx_try_link ()
2738{
2739  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740  rm -f conftest.$ac_objext conftest$ac_exeext
2741  if { { ac_try="$ac_link"
2742case "(($ac_try" in
2743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2744  *) ac_try_echo=$ac_try;;
2745esac
2746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2747$as_echo "$ac_try_echo"; } >&5
2748  (eval "$ac_link") 2>conftest.err
2749  ac_status=$?
2750  if test -s conftest.err; then
2751    grep -v '^ *+' conftest.err >conftest.er1
2752    cat conftest.er1 >&5
2753    mv -f conftest.er1 conftest.err
2754  fi
2755  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2756  test $ac_status = 0; } && {
2757	 test -z "$ac_cxx_werror_flag" ||
2758	 test ! -s conftest.err
2759       } && test -s conftest$ac_exeext && {
2760	 test "$cross_compiling" = yes ||
2761	 test -x conftest$ac_exeext
2762       }; then :
2763  ac_retval=0
2764else
2765  $as_echo "$as_me: failed program was:" >&5
2766sed 's/^/| /' conftest.$ac_ext >&5
2767
2768	ac_retval=1
2769fi
2770  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2771  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2772  # interfere with the next link command; also delete a directory that is
2773  # left behind by Apple's compiler.  We do this before executing the actions.
2774  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2775  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2776  as_fn_set_status $ac_retval
2777
2778} # ac_fn_cxx_try_link
2779
2780# ac_fn_cxx_check_func LINENO FUNC VAR
2781# ------------------------------------
2782# Tests whether FUNC exists, setting the cache variable VAR accordingly
2783ac_fn_cxx_check_func ()
2784{
2785  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787$as_echo_n "checking for $2... " >&6; }
2788if eval \${$3+:} false; then :
2789  $as_echo_n "(cached) " >&6
2790else
2791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2792/* end confdefs.h.  */
2793/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2794   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2795#define $2 innocuous_$2
2796
2797/* System header to define __stub macros and hopefully few prototypes,
2798    which can conflict with char $2 (); below.
2799    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2800    <limits.h> exists even on freestanding compilers.  */
2801
2802#ifdef __STDC__
2803# include <limits.h>
2804#else
2805# include <assert.h>
2806#endif
2807
2808#undef $2
2809
2810/* Override any GCC internal prototype to avoid an error.
2811   Use char because int might match the return type of a GCC
2812   builtin and then its argument prototype would still apply.  */
2813#ifdef __cplusplus
2814extern "C"
2815#endif
2816char $2 ();
2817/* The GNU C library defines this for functions which it implements
2818    to always fail with ENOSYS.  Some functions are actually named
2819    something starting with __ and the normal name is an alias.  */
2820#if defined __stub_$2 || defined __stub___$2
2821choke me
2822#endif
2823
2824int
2825main ()
2826{
2827return $2 ();
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_link "$LINENO"; then :
2833  eval "$3=yes"
2834else
2835  eval "$3=no"
2836fi
2837rm -f core conftest.err conftest.$ac_objext \
2838    conftest$ac_exeext conftest.$ac_ext
2839fi
2840eval ac_res=\$$3
2841	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2842$as_echo "$ac_res" >&6; }
2843  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2844
2845} # ac_fn_cxx_check_func
2846
2847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2848# -------------------------------------------------------
2849# Tests whether HEADER exists and can be compiled using the include files in
2850# INCLUDES, setting the cache variable VAR accordingly.
2851ac_fn_c_check_header_compile ()
2852{
2853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855$as_echo_n "checking for $2... " >&6; }
2856if eval \${$3+:} false; then :
2857  $as_echo_n "(cached) " >&6
2858else
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862#include <$2>
2863_ACEOF
2864if ac_fn_c_try_compile "$LINENO"; then :
2865  eval "$3=yes"
2866else
2867  eval "$3=no"
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871eval ac_res=\$$3
2872	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2873$as_echo "$ac_res" >&6; }
2874  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2875
2876} # ac_fn_c_check_header_compile
2877cat >config.log <<_ACEOF
2878This file contains any messages produced by compilers while
2879running configure, to aid debugging if configure makes a mistake.
2880
2881It was created by OpenJDK $as_me jdk9, which was
2882generated by GNU Autoconf 2.69.  Invocation command line was
2883
2884  $ $0 $@
2885
2886_ACEOF
2887exec 5>>config.log
2888{
2889cat <<_ASUNAME
2890## --------- ##
2891## Platform. ##
2892## --------- ##
2893
2894hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2895uname -m = `(uname -m) 2>/dev/null || echo unknown`
2896uname -r = `(uname -r) 2>/dev/null || echo unknown`
2897uname -s = `(uname -s) 2>/dev/null || echo unknown`
2898uname -v = `(uname -v) 2>/dev/null || echo unknown`
2899
2900/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2901/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2902
2903/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2904/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2905/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2906/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2907/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2908/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2909/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2910
2911_ASUNAME
2912
2913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2914for as_dir in $PATH
2915do
2916  IFS=$as_save_IFS
2917  test -z "$as_dir" && as_dir=.
2918    $as_echo "PATH: $as_dir"
2919  done
2920IFS=$as_save_IFS
2921
2922} >&5
2923
2924cat >&5 <<_ACEOF
2925
2926
2927## ----------- ##
2928## Core tests. ##
2929## ----------- ##
2930
2931_ACEOF
2932
2933
2934# Keep a trace of the command line.
2935# Strip out --no-create and --no-recursion so they do not pile up.
2936# Strip out --silent because we don't want to record it for future runs.
2937# Also quote any args containing shell meta-characters.
2938# Make two passes to allow for proper duplicate-argument suppression.
2939ac_configure_args=
2940ac_configure_args0=
2941ac_configure_args1=
2942ac_must_keep_next=false
2943for ac_pass in 1 2
2944do
2945  for ac_arg
2946  do
2947    case $ac_arg in
2948    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2949    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2950    | -silent | --silent | --silen | --sile | --sil)
2951      continue ;;
2952    *\'*)
2953      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2954    esac
2955    case $ac_pass in
2956    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2957    2)
2958      as_fn_append ac_configure_args1 " '$ac_arg'"
2959      if test $ac_must_keep_next = true; then
2960	ac_must_keep_next=false # Got value, back to normal.
2961      else
2962	case $ac_arg in
2963	  *=* | --config-cache | -C | -disable-* | --disable-* \
2964	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2965	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2966	  | -with-* | --with-* | -without-* | --without-* | --x)
2967	    case "$ac_configure_args0 " in
2968	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2969	    esac
2970	    ;;
2971	  -* ) ac_must_keep_next=true ;;
2972	esac
2973      fi
2974      as_fn_append ac_configure_args " '$ac_arg'"
2975      ;;
2976    esac
2977  done
2978done
2979{ ac_configure_args0=; unset ac_configure_args0;}
2980{ ac_configure_args1=; unset ac_configure_args1;}
2981
2982# When interrupted or exit'd, cleanup temporary files, and complete
2983# config.log.  We remove comments because anyway the quotes in there
2984# would cause problems or look ugly.
2985# WARNING: Use '\'' to represent an apostrophe within the trap.
2986# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2987trap 'exit_status=$?
2988  # Save into config.log some information that might help in debugging.
2989  {
2990    echo
2991
2992    $as_echo "## ---------------- ##
2993## Cache variables. ##
2994## ---------------- ##"
2995    echo
2996    # The following way of writing the cache mishandles newlines in values,
2997(
2998  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2999    eval ac_val=\$$ac_var
3000    case $ac_val in #(
3001    *${as_nl}*)
3002      case $ac_var in #(
3003      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3004$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3005      esac
3006      case $ac_var in #(
3007      _ | IFS | as_nl) ;; #(
3008      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3009      *) { eval $ac_var=; unset $ac_var;} ;;
3010      esac ;;
3011    esac
3012  done
3013  (set) 2>&1 |
3014    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3015    *${as_nl}ac_space=\ *)
3016      sed -n \
3017	"s/'\''/'\''\\\\'\'''\''/g;
3018	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3019      ;; #(
3020    *)
3021      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3022      ;;
3023    esac |
3024    sort
3025)
3026    echo
3027
3028    $as_echo "## ----------------- ##
3029## Output variables. ##
3030## ----------------- ##"
3031    echo
3032    for ac_var in $ac_subst_vars
3033    do
3034      eval ac_val=\$$ac_var
3035      case $ac_val in
3036      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3037      esac
3038      $as_echo "$ac_var='\''$ac_val'\''"
3039    done | sort
3040    echo
3041
3042    if test -n "$ac_subst_files"; then
3043      $as_echo "## ------------------- ##
3044## File substitutions. ##
3045## ------------------- ##"
3046      echo
3047      for ac_var in $ac_subst_files
3048      do
3049	eval ac_val=\$$ac_var
3050	case $ac_val in
3051	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052	esac
3053	$as_echo "$ac_var='\''$ac_val'\''"
3054      done | sort
3055      echo
3056    fi
3057
3058    if test -s confdefs.h; then
3059      $as_echo "## ----------- ##
3060## confdefs.h. ##
3061## ----------- ##"
3062      echo
3063      cat confdefs.h
3064      echo
3065    fi
3066    test "$ac_signal" != 0 &&
3067      $as_echo "$as_me: caught signal $ac_signal"
3068    $as_echo "$as_me: exit $exit_status"
3069  } >&5
3070  rm -f core *.core core.conftest.* &&
3071    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3072    exit $exit_status
3073' 0
3074for ac_signal in 1 2 13 15; do
3075  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3076done
3077ac_signal=0
3078
3079# confdefs.h avoids OS command line length limits that DEFS can exceed.
3080rm -f -r conftest* confdefs.h
3081
3082$as_echo "/* confdefs.h */" > confdefs.h
3083
3084# Predefined preprocessor variables.
3085
3086cat >>confdefs.h <<_ACEOF
3087#define PACKAGE_NAME "$PACKAGE_NAME"
3088_ACEOF
3089
3090cat >>confdefs.h <<_ACEOF
3091#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3092_ACEOF
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_VERSION "$PACKAGE_VERSION"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_STRING "$PACKAGE_STRING"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_URL "$PACKAGE_URL"
3108_ACEOF
3109
3110
3111# Let the site file select an alternate cache file if it wants to.
3112# Prefer an explicitly selected file to automatically selected ones.
3113ac_site_file1=NONE
3114ac_site_file2=NONE
3115if test -n "$CONFIG_SITE"; then
3116  # We do not want a PATH search for config.site.
3117  case $CONFIG_SITE in #((
3118    -*)  ac_site_file1=./$CONFIG_SITE;;
3119    */*) ac_site_file1=$CONFIG_SITE;;
3120    *)   ac_site_file1=./$CONFIG_SITE;;
3121  esac
3122elif test "x$prefix" != xNONE; then
3123  ac_site_file1=$prefix/share/config.site
3124  ac_site_file2=$prefix/etc/config.site
3125else
3126  ac_site_file1=$ac_default_prefix/share/config.site
3127  ac_site_file2=$ac_default_prefix/etc/config.site
3128fi
3129for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3130do
3131  test "x$ac_site_file" = xNONE && continue
3132  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3133    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3134$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3135    sed 's/^/| /' "$ac_site_file" >&5
3136    . "$ac_site_file" \
3137      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3139as_fn_error $? "failed to load site script $ac_site_file
3140See \`config.log' for more details" "$LINENO" 5; }
3141  fi
3142done
3143
3144if test -r "$cache_file"; then
3145  # Some versions of bash will fail to source /dev/null (special files
3146  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3147  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3148    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3149$as_echo "$as_me: loading cache $cache_file" >&6;}
3150    case $cache_file in
3151      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3152      *)                      . "./$cache_file";;
3153    esac
3154  fi
3155else
3156  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3157$as_echo "$as_me: creating cache $cache_file" >&6;}
3158  >$cache_file
3159fi
3160
3161# Check that the precious variables saved in the cache have kept the same
3162# value.
3163ac_cache_corrupted=false
3164for ac_var in $ac_precious_vars; do
3165  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3166  eval ac_new_set=\$ac_env_${ac_var}_set
3167  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3168  eval ac_new_val=\$ac_env_${ac_var}_value
3169  case $ac_old_set,$ac_new_set in
3170    set,)
3171      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3172$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3173      ac_cache_corrupted=: ;;
3174    ,set)
3175      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3176$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3177      ac_cache_corrupted=: ;;
3178    ,);;
3179    *)
3180      if test "x$ac_old_val" != "x$ac_new_val"; then
3181	# differences in whitespace do not lead to failure.
3182	ac_old_val_w=`echo x $ac_old_val`
3183	ac_new_val_w=`echo x $ac_new_val`
3184	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3185	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3186$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3187	  ac_cache_corrupted=:
3188	else
3189	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3190$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3191	  eval $ac_var=\$ac_old_val
3192	fi
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3194$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3196$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3197      fi;;
3198  esac
3199  # Pass precious variables to config.status.
3200  if test "$ac_new_set" = set; then
3201    case $ac_new_val in
3202    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3203    *) ac_arg=$ac_var=$ac_new_val ;;
3204    esac
3205    case " $ac_configure_args " in
3206      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3207      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3208    esac
3209  fi
3210done
3211if $ac_cache_corrupted; then
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3215$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3216  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3217fi
3218## -------------------- ##
3219## Main body of script. ##
3220## -------------------- ##
3221
3222ac_ext=c
3223ac_cpp='$CPP $CPPFLAGS'
3224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226ac_compiler_gnu=$ac_cv_c_compiler_gnu
3227
3228
3229
3230ac_aux_dir=
3231for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3232  if test -f "$ac_dir/install-sh"; then
3233    ac_aux_dir=$ac_dir
3234    ac_install_sh="$ac_aux_dir/install-sh -c"
3235    break
3236  elif test -f "$ac_dir/install.sh"; then
3237    ac_aux_dir=$ac_dir
3238    ac_install_sh="$ac_aux_dir/install.sh -c"
3239    break
3240  elif test -f "$ac_dir/shtool"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/shtool install -c"
3243    break
3244  fi
3245done
3246if test -z "$ac_aux_dir"; then
3247  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
3248fi
3249
3250# These three variables are undocumented and unsupported,
3251# and are intended to be withdrawn in a future Autoconf release.
3252# They can cause serious problems if a builder's source tree is in a directory
3253# whose full name contains unusual characters.
3254ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3255ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3256ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3257
3258
3259# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3260
3261#
3262# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286#
3287# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3288#
3289# This program is free software; you can redistribute it and/or modify
3290# it under the terms of the GNU General Public License as published by
3291# the Free Software Foundation; either version 2 of the License, or
3292# (at your option) any later version.
3293#
3294# This program is distributed in the hope that it will be useful, but
3295# WITHOUT ANY WARRANTY; without even the implied warranty of
3296# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3297# General Public License for more details.
3298#
3299# You should have received a copy of the GNU General Public License
3300# along with this program; if not, write to the Free Software
3301# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3302#
3303# As a special exception to the GNU General Public License, if you
3304# distribute this file as part of a program that contains a
3305# configuration script generated by Autoconf, you may include it under
3306# the same distribution terms that you use for the rest of that program.
3307
3308# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3309# ----------------------------------
3310# PKG_PROG_PKG_CONFIG
3311
3312# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3313#
3314# Check to see whether a particular set of modules exists.  Similar
3315# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3316#
3317#
3318# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3319# this or PKG_CHECK_MODULES is called, or make sure to call
3320# PKG_CHECK_EXISTS manually
3321# --------------------------------------------------------------
3322
3323
3324
3325# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3326# ---------------------------------------------
3327# _PKG_CONFIG
3328
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330# -----------------------------
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332
3333
3334# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3335# [ACTION-IF-NOT-FOUND])
3336#
3337#
3338# Note that if there is a possibility the first call to
3339# PKG_CHECK_MODULES might not happen, you should be sure to include an
3340# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3341#
3342#
3343# --------------------------------------------------------------
3344# PKG_CHECK_MODULES
3345
3346
3347# Include these first...
3348#
3349# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3350# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3351#
3352# This code is free software; you can redistribute it and/or modify it
3353# under the terms of the GNU General Public License version 2 only, as
3354# published by the Free Software Foundation.  Oracle designates this
3355# particular file as subject to the "Classpath" exception as provided
3356# by Oracle in the LICENSE file that accompanied this code.
3357#
3358# This code is distributed in the hope that it will be useful, but WITHOUT
3359# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3360# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3361# version 2 for more details (a copy is included in the LICENSE file that
3362# accompanied this code).
3363#
3364# You should have received a copy of the GNU General Public License version
3365# 2 along with this work; if not, write to the Free Software Foundation,
3366# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3367#
3368# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3369# or visit www.oracle.com if you need additional information or have any
3370# questions.
3371#
3372
3373# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3374# If so, then append $1 to $2 \
3375# Also set JVM_ARG_OK to true/false depending on outcome.
3376
3377
3378# Appends a string to a path variable, only adding the : when needed.
3379
3380
3381# Prepends a string to a path variable, only adding the : when needed.
3382
3383
3384# This will make sure the given variable points to a full and proper
3385# path. This means:
3386# 1) There will be no spaces in the path. On unix platforms,
3387#    spaces in the path will result in an error. On Windows,
3388#    the path will be rewritten using short-style to be space-free.
3389# 2) The path will be absolute, and it will be in unix-style (on
3390#     cygwin).
3391# $1: The name of the variable to fix
3392
3393
3394# This will make sure the given variable points to a executable
3395# with a full and proper path. This means:
3396# 1) There will be no spaces in the path. On unix platforms,
3397#    spaces in the path will result in an error. On Windows,
3398#    the path will be rewritten using short-style to be space-free.
3399# 2) The path will be absolute, and it will be in unix-style (on
3400#     cygwin).
3401# Any arguments given to the executable is preserved.
3402# If the input variable does not have a directory specification, then
3403# it need to be in the PATH.
3404# $1: The name of the variable to fix
3405
3406
3407
3408
3409# Register a --with argument but mark it as deprecated
3410# $1: The name of the with argument to deprecate, not including --with-
3411
3412
3413# Register a --enable argument but mark it as deprecated
3414# $1: The name of the with argument to deprecate, not including --enable-
3415# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3416
3417
3418
3419
3420# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3421# $1: variable to check
3422
3423
3424# Check that there are no unprocessed overridden variables left.
3425# If so, they are an incorrect argument and we will exit with an error.
3426
3427
3428# Setup a tool for the given variable. If correctly specified by the user,
3429# use that value, otherwise search for the tool using the supplied code snippet.
3430# $1: variable to set
3431# $2: code snippet to call to look for the tool
3432
3433
3434# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3435# $1: variable to set
3436# $2: executable name (or list of names) to look for
3437
3438
3439# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3440# $1: variable to set
3441# $2: executable name (or list of names) to look for
3442
3443
3444# Like BASIC_PATH_PROGS but fails if no tool was found.
3445# $1: variable to set
3446# $2: executable name (or list of names) to look for
3447
3448
3449# Like BASIC_SETUP_TOOL but fails if no tool was found.
3450# $1: variable to set
3451# $2: autoconf macro to call to look for the special tool
3452
3453
3454# Setup the most fundamental tools that relies on not much else to set up,
3455# but is used by much of the early bootstrap code.
3456
3457
3458# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3459
3460
3461# Evaluates platform specific overrides for devkit variables.
3462# $1: Name of variable
3463
3464
3465
3466
3467
3468
3469#%%% Simple tools %%%
3470
3471# Check if we have found a usable version of make
3472# $1: the path to a potential make binary (or empty)
3473# $2: the description on how we found this
3474
3475
3476
3477
3478# Goes looking for a usable version of GNU make.
3479
3480
3481
3482
3483
3484
3485# Check if build directory is on local disk. If not possible to determine,
3486# we prefer to claim it's local.
3487# Argument 1: directory to test
3488# Argument 2: what to do if it is on local disk
3489# Argument 3: what to do otherwise (remote disk or failure)
3490
3491
3492# Check that source files have basic read permissions set. This might
3493# not be the case in cygwin in certain conditions.
3494
3495
3496
3497
3498# Check for support for specific options in bash
3499
3500
3501# Code to run after AC_OUTPUT
3502
3503
3504#
3505# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3507#
3508# This code is free software; you can redistribute it and/or modify it
3509# under the terms of the GNU General Public License version 2 only, as
3510# published by the Free Software Foundation.  Oracle designates this
3511# particular file as subject to the "Classpath" exception as provided
3512# by Oracle in the LICENSE file that accompanied this code.
3513#
3514# This code is distributed in the hope that it will be useful, but WITHOUT
3515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3517# version 2 for more details (a copy is included in the LICENSE file that
3518# accompanied this code).
3519#
3520# You should have received a copy of the GNU General Public License version
3521# 2 along with this work; if not, write to the Free Software Foundation,
3522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3523#
3524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3525# or visit www.oracle.com if you need additional information or have any
3526# questions.
3527#
3528
3529
3530
3531
3532
3533# Helper function which possibly converts a path using DOS-style short mode.
3534# If so, the updated path is stored in $new_path.
3535# $1: The path to check
3536
3537
3538# Helper function which possibly converts a path using DOS-style short mode.
3539# If so, the updated path is stored in $new_path.
3540# $1: The path to check
3541
3542
3543# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3544# and could probably be heavily simplified. However, all changes in this
3545# area tend to need lot of testing in different scenarios, and in lack of
3546# proper unit testing, cleaning this up has not been deemed worth the effort
3547# at the moment.
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3558
3559
3560
3561
3562#
3563# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565#
3566# This code is free software; you can redistribute it and/or modify it
3567# under the terms of the GNU General Public License version 2 only, as
3568# published by the Free Software Foundation.  Oracle designates this
3569# particular file as subject to the "Classpath" exception as provided
3570# by Oracle in the LICENSE file that accompanied this code.
3571#
3572# This code is distributed in the hope that it will be useful, but WITHOUT
3573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575# version 2 for more details (a copy is included in the LICENSE file that
3576# accompanied this code).
3577#
3578# You should have received a copy of the GNU General Public License version
3579# 2 along with this work; if not, write to the Free Software Foundation,
3580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581#
3582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583# or visit www.oracle.com if you need additional information or have any
3584# questions.
3585#
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597# ... then the rest
3598#
3599# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3600# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601#
3602# This code is free software; you can redistribute it and/or modify it
3603# under the terms of the GNU General Public License version 2 only, as
3604# published by the Free Software Foundation.  Oracle designates this
3605# particular file as subject to the "Classpath" exception as provided
3606# by Oracle in the LICENSE file that accompanied this code.
3607#
3608# This code is distributed in the hope that it will be useful, but WITHOUT
3609# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611# version 2 for more details (a copy is included in the LICENSE file that
3612# accompanied this code).
3613#
3614# You should have received a copy of the GNU General Public License version
3615# 2 along with this work; if not, write to the Free Software Foundation,
3616# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617#
3618# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619# or visit www.oracle.com if you need additional information or have any
3620# questions.
3621#
3622
3623########################################################################
3624# This file handles detection of the Boot JDK. The Boot JDK detection
3625# process has been developed as a response to solve a complex real-world
3626# problem. Initially, it was simple, but it has grown as platform after
3627# platform, idiosyncracy after idiosyncracy has been supported.
3628#
3629# The basic idea is this:
3630# 1) You need an acceptable *) JDK to use as a Boot JDK
3631# 2) There are several ways to locate a JDK, that are mostly platform
3632#    dependent **)
3633# 3) You can have multiple JDKs installed
3634# 4) If possible, configure should try to dig out an acceptable JDK
3635#    automatically, without having to resort to command-line options
3636#
3637# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3638#     javac) and not a JRE, etc.
3639#
3640# **) On Windows we typically use a well-known path.
3641#     On MacOSX we typically use the tool java_home.
3642#     On Linux we typically find javac in the $PATH, and then follow a
3643#     chain of symlinks that often ends up in a real JDK.
3644#
3645# This leads to the code where we check in different ways to locate a
3646# JDK, and if one is found, check if it is acceptable. If not, we print
3647# our reasons for rejecting it (useful when debugging non-working
3648# configure situations) and continue checking the next one.
3649########################################################################
3650
3651# Execute the check given as argument, and verify the result
3652# If the Boot JDK was previously found, do nothing
3653# $1 A command line (typically autoconf macro) to execute
3654
3655
3656# Test: Is bootjdk explicitely set by command line arguments?
3657
3658
3659# Test: Is bootjdk available from builddeps?
3660
3661
3662# Test: Is $JAVA_HOME set?
3663
3664
3665# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3666
3667
3668# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3669# $1: Argument to the java_home binary (optional)
3670
3671
3672# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3673
3674
3675# Look for a jdk in the given path. If there are multiple, try to select the newest.
3676# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3677# $1 = Path to directory containing jdk installations.
3678# $2 = String to append to the found JDK directory to get the proper JDK home
3679
3680
3681# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3682# environmental variable as base for where to look.
3683# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3684
3685
3686# Test: Is there a JDK installed in default, well-known locations?
3687
3688
3689# Check that a command-line tool in the Boot JDK is correct
3690# $1 = name of variable to assign
3691# $2 = name of binary
3692
3693
3694###############################################################################
3695#
3696# We need a Boot JDK to bootstrap the build.
3697#
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747#
3748# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3773# corresponding configure arguments instead
3774
3775
3776# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3777# that configure can use them while detecting compilers.
3778# TOOLCHAIN_TYPE is available here.
3779
3780
3781
3782
3783
3784
3785# Documentation on common flags used for solstudio in HIGHEST.
3786#
3787# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3788#          done with care, there are some assumptions below that need to
3789#          be understood about the use of pointers, and IEEE behavior.
3790#
3791# -fns: Use non-standard floating point mode (not IEEE 754)
3792# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3793# -fsingle: Use single precision floating point with 'float'
3794# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3795#   (Source with excessing pointer casting and data access with mixed
3796#    pointer types are not recommended)
3797# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3798#   (If you expect perfect errno behavior, do not use this)
3799# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3800# -xrestrict: Pointer parameters to functions do not overlap
3801#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3802#    If you pass in multiple pointers to the same data, do not use this)
3803# -xlibmil: Inline some library routines
3804#   (If you expect perfect errno behavior, do not use this)
3805# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3806#   (If you expect perfect errno behavior, do not use this)
3807#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3808
3809    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3810    # Bug?
3811    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3812    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3813    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3814    #fi
3815
3816
3817
3818
3819
3820# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3821#                                   [RUN-IF-FALSE])
3822# ------------------------------------------------------------
3823# Check that the c and c++ compilers support an argument
3824
3825
3826# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3827#                                    [RUN-IF-FALSE])
3828# ------------------------------------------------------------
3829# Check that the linker support an argument
3830
3831
3832
3833
3834#
3835# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3836# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3837#
3838# This code is free software; you can redistribute it and/or modify it
3839# under the terms of the GNU General Public License version 2 only, as
3840# published by the Free Software Foundation.  Oracle designates this
3841# particular file as subject to the "Classpath" exception as provided
3842# by Oracle in the LICENSE file that accompanied this code.
3843#
3844# This code is distributed in the hope that it will be useful, but WITHOUT
3845# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3846# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3847# version 2 for more details (a copy is included in the LICENSE file that
3848# accompanied this code).
3849#
3850# You should have received a copy of the GNU General Public License version
3851# 2 along with this work; if not, write to the Free Software Foundation,
3852# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3853#
3854# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3855# or visit www.oracle.com if you need additional information or have any
3856# questions.
3857#
3858
3859
3860
3861
3862
3863cygwin_help() {
3864  case $1 in
3865    unzip)
3866      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3867      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3868      ;;
3869    zip)
3870      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3871      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3872      ;;
3873    make)
3874      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3875      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3876      ;;
3877    freetype)
3878      HELP_MSG="
3879The freetype library can now be build during the configure process.
3880Download the freetype sources and unpack them into an arbitrary directory:
3881
3882wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3883tar -xzf freetype-2.5.3.tar.gz
3884
3885Then run configure with '--with-freetype-src=<freetype_src>'. This will
3886automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3887builds or into '<freetype_src>/lib32' for 32-bit builds.
3888Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3889and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3890      ;;
3891  esac
3892}
3893
3894msys_help() {
3895  PKGHANDLER_COMMAND=""
3896}
3897
3898apt_help() {
3899  case $1 in
3900    reduced)
3901      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3902    devkit)
3903      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3904    openjdk)
3905      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3906    alsa)
3907      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3908    cups)
3909      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3910    freetype)
3911      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3912    pulse)
3913      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3914    x11)
3915      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3916    ccache)
3917      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3918  esac
3919}
3920
3921yum_help() {
3922  case $1 in
3923    devkit)
3924      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3925    openjdk)
3926      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3927    alsa)
3928      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3929    cups)
3930      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3931    freetype)
3932      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3933    pulse)
3934      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3935    x11)
3936      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3937    ccache)
3938      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3939  esac
3940}
3941
3942port_help() {
3943  PKGHANDLER_COMMAND=""
3944}
3945
3946pkgutil_help() {
3947  PKGHANDLER_COMMAND=""
3948}
3949
3950pkgadd_help() {
3951  PKGHANDLER_COMMAND=""
3952}
3953
3954# This function will check if we're called from the "configure" wrapper while
3955# printing --help. If so, we will print out additional information that can
3956# only be extracted within the autoconf script, and then exit. This must be
3957# called at the very beginning in configure.ac.
3958
3959
3960
3961
3962
3963
3964#
3965# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3966# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3967#
3968# This code is free software; you can redistribute it and/or modify it
3969# under the terms of the GNU General Public License version 2 only, as
3970# published by the Free Software Foundation.  Oracle designates this
3971# particular file as subject to the "Classpath" exception as provided
3972# by Oracle in the LICENSE file that accompanied this code.
3973#
3974# This code is distributed in the hope that it will be useful, but WITHOUT
3975# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3976# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3977# version 2 for more details (a copy is included in the LICENSE file that
3978# accompanied this code).
3979#
3980# You should have received a copy of the GNU General Public License version
3981# 2 along with this work; if not, write to the Free Software Foundation,
3982# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3983#
3984# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3985# or visit www.oracle.com if you need additional information or have any
3986# questions.
3987#
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998###############################################################################
3999#
4000# Should we build only OpenJDK even if closed sources are present?
4001#
4002
4003
4004
4005
4006###############################################################################
4007#
4008# Setup version numbers
4009#
4010
4011
4012
4013
4014
4015
4016################################################################################
4017#
4018# Gcov coverage data for hotspot
4019#
4020
4021
4022#
4023# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4024# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4025#
4026# This code is free software; you can redistribute it and/or modify it
4027# under the terms of the GNU General Public License version 2 only, as
4028# published by the Free Software Foundation.  Oracle designates this
4029# particular file as subject to the "Classpath" exception as provided
4030# by Oracle in the LICENSE file that accompanied this code.
4031#
4032# This code is distributed in the hope that it will be useful, but WITHOUT
4033# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4034# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4035# version 2 for more details (a copy is included in the LICENSE file that
4036# accompanied this code).
4037#
4038# You should have received a copy of the GNU General Public License version
4039# 2 along with this work; if not, write to the Free Software Foundation,
4040# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4041#
4042# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4043# or visit www.oracle.com if you need additional information or have any
4044# questions.
4045#
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067#
4068# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4069# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4070#
4071# This code is free software; you can redistribute it and/or modify it
4072# under the terms of the GNU General Public License version 2 only, as
4073# published by the Free Software Foundation.  Oracle designates this
4074# particular file as subject to the "Classpath" exception as provided
4075# by Oracle in the LICENSE file that accompanied this code.
4076#
4077# This code is distributed in the hope that it will be useful, but WITHOUT
4078# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4079# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4080# version 2 for more details (a copy is included in the LICENSE file that
4081# accompanied this code).
4082#
4083# You should have received a copy of the GNU General Public License version
4084# 2 along with this work; if not, write to the Free Software Foundation,
4085# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4086#
4087# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4088# or visit www.oracle.com if you need additional information or have any
4089# questions.
4090#
4091
4092# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4093# Converts autoconf style CPU name to OpenJDK style, into
4094# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4095
4096
4097# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4098# Converts autoconf style OS name to OpenJDK style, into
4099# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4100
4101
4102# Expects $host_os $host_cpu $build_os and $build_cpu
4103# and $with_target_bits to have been setup!
4104#
4105# Translate the standard triplet(quadruplet) definition
4106# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4107# OPENJDK_BUILD_OS, etc.
4108
4109
4110# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4111# accordingly. Must be done after setting up build and target system, but before
4112# doing anything else with these values.
4113
4114
4115# Setup the legacy variables, for controlling the old makefiles.
4116#
4117
4118
4119
4120
4121#%%% Build and target systems %%%
4122
4123
4124
4125
4126# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4127# Add -mX to various FLAGS variables.
4128
4129
4130
4131
4132
4133
4134#
4135# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4136# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4137#
4138# This code is free software; you can redistribute it and/or modify it
4139# under the terms of the GNU General Public License version 2 only, as
4140# published by the Free Software Foundation.  Oracle designates this
4141# particular file as subject to the "Classpath" exception as provided
4142# by Oracle in the LICENSE file that accompanied this code.
4143#
4144# This code is distributed in the hope that it will be useful, but WITHOUT
4145# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4146# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4147# version 2 for more details (a copy is included in the LICENSE file that
4148# accompanied this code).
4149#
4150# You should have received a copy of the GNU General Public License version
4151# 2 along with this work; if not, write to the Free Software Foundation,
4152# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4153#
4154# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4155# or visit www.oracle.com if you need additional information or have any
4156# questions.
4157#
4158
4159
4160
4161
4162
4163
4164
4165
4166#
4167# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4168# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4169#
4170# This code is free software; you can redistribute it and/or modify it
4171# under the terms of the GNU General Public License version 2 only, as
4172# published by the Free Software Foundation.  Oracle designates this
4173# particular file as subject to the "Classpath" exception as provided
4174# by Oracle in the LICENSE file that accompanied this code.
4175#
4176# This code is distributed in the hope that it will be useful, but WITHOUT
4177# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4178# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4179# version 2 for more details (a copy is included in the LICENSE file that
4180# accompanied this code).
4181#
4182# You should have received a copy of the GNU General Public License version
4183# 2 along with this work; if not, write to the Free Software Foundation,
4184# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4185#
4186# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4187# or visit www.oracle.com if you need additional information or have any
4188# questions.
4189#
4190
4191########################################################################
4192# This file is responsible for detecting, verifying and setting up the
4193# toolchain, i.e. the compiler, linker and related utilities. It will setup
4194# proper paths to the binaries, but it will not setup any flags.
4195#
4196# The binaries used is determined by the toolchain type, which is the family of
4197# compilers and related tools that are used.
4198########################################################################
4199
4200
4201# All valid toolchains, regardless of platform (used by help.m4)
4202VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4203
4204# These toolchains are valid on different platforms
4205VALID_TOOLCHAINS_linux="gcc clang"
4206VALID_TOOLCHAINS_solaris="solstudio"
4207VALID_TOOLCHAINS_macosx="gcc clang"
4208VALID_TOOLCHAINS_aix="xlc"
4209VALID_TOOLCHAINS_windows="microsoft"
4210
4211# Toolchain descriptions
4212TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4213TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4214TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4215TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4216TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4217
4218# Setup a number of variables describing how native output files are
4219# named on this platform/toolchain.
4220
4221
4222# Determine which toolchain type to use, and make sure it is valid for this
4223# platform. Setup various information about the selected toolchain.
4224
4225
4226# Before we start detecting the toolchain executables, we might need some
4227# special setup, e.g. additional paths etc.
4228
4229
4230# Restore path, etc
4231
4232
4233# Check if a compiler is of the toolchain type we expect, and save the version
4234# information from it. If the compiler does not match the expected type,
4235# this function will abort using AC_MSG_ERROR. If it matches, the version will
4236# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4237# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4238#
4239# $1 = compiler to test (CC or CXX)
4240# $2 = human readable name of compiler (C or C++)
4241
4242
4243# Try to locate the given C or C++ compiler in the path, or otherwise.
4244#
4245# $1 = compiler to test (CC or CXX)
4246# $2 = human readable name of compiler (C or C++)
4247# $3 = list of compiler names to search for
4248
4249
4250# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4251# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4252# archiver (AR). Verify that the compilers are correct according to the
4253# toolchain type.
4254
4255
4256# Setup additional tools that is considered a part of the toolchain, but not the
4257# core part. Many of these are highly platform-specific and do not exist,
4258# and/or are not needed on all platforms.
4259
4260
4261# Setup the build tools (i.e, the compiler and linker used to build programs
4262# that should be run on the build platform, not the target platform, as a build
4263# helper). Since the non-cross-compile case uses the normal, target compilers
4264# for this, we can only do this after these have been setup.
4265
4266
4267# Setup legacy variables that are still needed as alternative ways to refer to
4268# parts of the toolchain.
4269
4270
4271# Do some additional checks on the detected tools.
4272
4273
4274# Setup the JTReg Regression Test Harness.
4275
4276
4277#
4278# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4279# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4280#
4281# This code is free software; you can redistribute it and/or modify it
4282# under the terms of the GNU General Public License version 2 only, as
4283# published by the Free Software Foundation.  Oracle designates this
4284# particular file as subject to the "Classpath" exception as provided
4285# by Oracle in the LICENSE file that accompanied this code.
4286#
4287# This code is distributed in the hope that it will be useful, but WITHOUT
4288# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4289# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4290# version 2 for more details (a copy is included in the LICENSE file that
4291# accompanied this code).
4292#
4293# You should have received a copy of the GNU General Public License version
4294# 2 along with this work; if not, write to the Free Software Foundation,
4295# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4296#
4297# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4298# or visit www.oracle.com if you need additional information or have any
4299# questions.
4300#
4301
4302################################################################################
4303# The order of these defines the priority by which we try to find them.
4304VALID_VS_VERSIONS="2013 2012 2010"
4305
4306VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4307VS_VERSION_INTERNAL_2010=100
4308VS_MSVCR_2010=msvcr100.dll
4309# We don't use msvcp on Visual Studio 2010
4310#VS_MSVCP_2010=msvcp100.dll
4311VS_ENVVAR_2010="VS100COMNTOOLS"
4312VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4313VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4314VS_VS_PLATFORM_NAME_2010="v100"
4315VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4316
4317VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4318VS_VERSION_INTERNAL_2012=110
4319VS_MSVCR_2012=msvcr110.dll
4320VS_MSVCP_2012=msvcp110.dll
4321VS_ENVVAR_2012="VS110COMNTOOLS"
4322VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4323VS_SDK_INSTALLDIR_2012=
4324VS_VS_PLATFORM_NAME_2012="v110"
4325VS_SDK_PLATFORM_NAME_2012=
4326
4327VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4328VS_VERSION_INTERNAL_2013=120
4329VS_MSVCR_2013=msvcr120.dll
4330VS_MSVCP_2013=msvcp120.dll
4331VS_ENVVAR_2013="VS120COMNTOOLS"
4332VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4333VS_SDK_INSTALLDIR_2013=
4334VS_VS_PLATFORM_NAME_2013="v120"
4335VS_SDK_PLATFORM_NAME_2013=
4336
4337################################################################################
4338
4339
4340
4341################################################################################
4342
4343
4344
4345################################################################################
4346# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4347# build environment and assigns it to VS_ENV_CMD
4348
4349
4350################################################################################
4351
4352
4353
4354################################################################################
4355# Check if the VS env variables were setup prior to running configure.
4356# If not, then find vcvarsall.bat and run it automatically, and integrate
4357# the set env variables into the spec file.
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372# This line needs to be here, verbatim, after all includes and the dummy hook
4373# definitions. It is replaced with custom functionality when building
4374# custom sources.
4375#CUSTOM_AUTOCONF_INCLUDE
4376
4377# Do not change or remove the following line, it is needed for consistency checks:
4378DATE_WHEN_GENERATED=1444045451
4379
4380###############################################################################
4381#
4382# Initialization / Boot-strapping
4383#
4384# The bootstrapping process needs to solve the "chicken or the egg" problem,
4385# thus it jumps back and forth, each time gaining something needed later on.
4386#
4387###############################################################################
4388
4389# If we are requested to print additional help, do that and then exit.
4390# This must be the very first call.
4391
4392  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4393    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4394    $PRINTF "Which are valid to use depends on the build platform.\n"
4395    for toolchain in $VALID_TOOLCHAINS_all; do
4396      # Use indirect variable referencing
4397      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4398      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4399      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4400    done
4401
4402    # And now exit directly
4403    exit 0
4404  fi
4405
4406
4407# Basic initialization that must happen first of all in the normal process.
4408
4409  # Save the original command line. This is passed to us by the wrapper configure script.
4410
4411  # Save the path variable before it gets changed
4412  ORIGINAL_PATH="$PATH"
4413
4414  DATE_WHEN_CONFIGURED=`LANG=C date`
4415
4416  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4417$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4419$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4420
4421
4422  # Start with tools that do not need have cross compilation support
4423  # and can be expected to be found in the default PATH. These tools are
4424  # used by configure. Nor are these tools expected to be found in the
4425  # devkit from the builddeps server either, since they are
4426  # needed to download the devkit.
4427
4428  # First are all the simple required tools.
4429
4430
4431
4432  # Publish this variable in the help.
4433
4434
4435  if test "x$BASENAME" = x; then
4436    # The variable is not set by user, try to locate tool using the code snippet
4437    for ac_prog in basename
4438do
4439  # Extract the first word of "$ac_prog", so it can be a program name with args.
4440set dummy $ac_prog; ac_word=$2
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4442$as_echo_n "checking for $ac_word... " >&6; }
4443if ${ac_cv_path_BASENAME+:} false; then :
4444  $as_echo_n "(cached) " >&6
4445else
4446  case $BASENAME in
4447  [\\/]* | ?:[\\/]*)
4448  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4449  ;;
4450  *)
4451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in $PATH
4453do
4454  IFS=$as_save_IFS
4455  test -z "$as_dir" && as_dir=.
4456    for ac_exec_ext in '' $ac_executable_extensions; do
4457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4458    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460    break 2
4461  fi
4462done
4463  done
4464IFS=$as_save_IFS
4465
4466  ;;
4467esac
4468fi
4469BASENAME=$ac_cv_path_BASENAME
4470if test -n "$BASENAME"; then
4471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4472$as_echo "$BASENAME" >&6; }
4473else
4474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475$as_echo "no" >&6; }
4476fi
4477
4478
4479  test -n "$BASENAME" && break
4480done
4481
4482  else
4483    # The variable is set, but is it from the command line or the environment?
4484
4485    # Try to remove the string !BASENAME! from our list.
4486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4488      # If it failed, the variable was not from the command line. Ignore it,
4489      # but warn the user (except for BASH, which is always set by the calling BASH).
4490      if test "xBASENAME" != xBASH; then
4491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4492$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4493      fi
4494      # Try to locate tool using the code snippet
4495      for ac_prog in basename
4496do
4497  # Extract the first word of "$ac_prog", so it can be a program name with args.
4498set dummy $ac_prog; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_path_BASENAME+:} false; then :
4502  $as_echo_n "(cached) " >&6
4503else
4504  case $BASENAME in
4505  [\\/]* | ?:[\\/]*)
4506  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4507  ;;
4508  *)
4509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in $PATH
4511do
4512  IFS=$as_save_IFS
4513  test -z "$as_dir" && as_dir=.
4514    for ac_exec_ext in '' $ac_executable_extensions; do
4515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518    break 2
4519  fi
4520done
4521  done
4522IFS=$as_save_IFS
4523
4524  ;;
4525esac
4526fi
4527BASENAME=$ac_cv_path_BASENAME
4528if test -n "$BASENAME"; then
4529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4530$as_echo "$BASENAME" >&6; }
4531else
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
4534fi
4535
4536
4537  test -n "$BASENAME" && break
4538done
4539
4540    else
4541      # If it succeeded, then it was overridden by the user. We will use it
4542      # for the tool.
4543
4544      # First remove it from the list of overridden variables, so we can test
4545      # for unknown variables in the end.
4546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4547
4548      # Check if the provided tool contains a complete path.
4549      tool_specified="$BASENAME"
4550      tool_basename="${tool_specified##*/}"
4551      if test "x$tool_basename" = "x$tool_specified"; then
4552        # A command without a complete path is provided, search $PATH.
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4554$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4555        # Extract the first word of "$tool_basename", so it can be a program name with args.
4556set dummy $tool_basename; ac_word=$2
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558$as_echo_n "checking for $ac_word... " >&6; }
4559if ${ac_cv_path_BASENAME+:} false; then :
4560  $as_echo_n "(cached) " >&6
4561else
4562  case $BASENAME in
4563  [\\/]* | ?:[\\/]*)
4564  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4565  ;;
4566  *)
4567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568for as_dir in $PATH
4569do
4570  IFS=$as_save_IFS
4571  test -z "$as_dir" && as_dir=.
4572    for ac_exec_ext in '' $ac_executable_extensions; do
4573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4574    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576    break 2
4577  fi
4578done
4579  done
4580IFS=$as_save_IFS
4581
4582  ;;
4583esac
4584fi
4585BASENAME=$ac_cv_path_BASENAME
4586if test -n "$BASENAME"; then
4587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4588$as_echo "$BASENAME" >&6; }
4589else
4590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591$as_echo "no" >&6; }
4592fi
4593
4594
4595        if test "x$BASENAME" = x; then
4596          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4597        fi
4598      else
4599        # Otherwise we believe it is a complete path. Use it as it is.
4600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4601$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4603$as_echo_n "checking for BASENAME... " >&6; }
4604        if test ! -x "$tool_specified"; then
4605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4606$as_echo "not found" >&6; }
4607          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4608        fi
4609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4610$as_echo "$tool_specified" >&6; }
4611      fi
4612    fi
4613  fi
4614
4615
4616
4617  if test "x$BASENAME" = x; then
4618    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4619  fi
4620
4621
4622
4623
4624
4625  # Publish this variable in the help.
4626
4627
4628  if test "x$BASH" = x; then
4629    # The variable is not set by user, try to locate tool using the code snippet
4630    for ac_prog in bash
4631do
4632  # Extract the first word of "$ac_prog", so it can be a program name with args.
4633set dummy $ac_prog; ac_word=$2
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4635$as_echo_n "checking for $ac_word... " >&6; }
4636if ${ac_cv_path_BASH+:} false; then :
4637  $as_echo_n "(cached) " >&6
4638else
4639  case $BASH in
4640  [\\/]* | ?:[\\/]*)
4641  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4642  ;;
4643  *)
4644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4645for as_dir in $PATH
4646do
4647  IFS=$as_save_IFS
4648  test -z "$as_dir" && as_dir=.
4649    for ac_exec_ext in '' $ac_executable_extensions; do
4650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4651    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4653    break 2
4654  fi
4655done
4656  done
4657IFS=$as_save_IFS
4658
4659  ;;
4660esac
4661fi
4662BASH=$ac_cv_path_BASH
4663if test -n "$BASH"; then
4664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4665$as_echo "$BASH" >&6; }
4666else
4667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4668$as_echo "no" >&6; }
4669fi
4670
4671
4672  test -n "$BASH" && break
4673done
4674
4675  else
4676    # The variable is set, but is it from the command line or the environment?
4677
4678    # Try to remove the string !BASH! from our list.
4679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4681      # If it failed, the variable was not from the command line. Ignore it,
4682      # but warn the user (except for BASH, which is always set by the calling BASH).
4683      if test "xBASH" != xBASH; then
4684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4685$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4686      fi
4687      # Try to locate tool using the code snippet
4688      for ac_prog in bash
4689do
4690  # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if ${ac_cv_path_BASH+:} false; then :
4695  $as_echo_n "(cached) " >&6
4696else
4697  case $BASH in
4698  [\\/]* | ?:[\\/]*)
4699  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4700  ;;
4701  *)
4702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705  IFS=$as_save_IFS
4706  test -z "$as_dir" && as_dir=.
4707    for ac_exec_ext in '' $ac_executable_extensions; do
4708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4709    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4711    break 2
4712  fi
4713done
4714  done
4715IFS=$as_save_IFS
4716
4717  ;;
4718esac
4719fi
4720BASH=$ac_cv_path_BASH
4721if test -n "$BASH"; then
4722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4723$as_echo "$BASH" >&6; }
4724else
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
4727fi
4728
4729
4730  test -n "$BASH" && break
4731done
4732
4733    else
4734      # If it succeeded, then it was overridden by the user. We will use it
4735      # for the tool.
4736
4737      # First remove it from the list of overridden variables, so we can test
4738      # for unknown variables in the end.
4739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4740
4741      # Check if the provided tool contains a complete path.
4742      tool_specified="$BASH"
4743      tool_basename="${tool_specified##*/}"
4744      if test "x$tool_basename" = "x$tool_specified"; then
4745        # A command without a complete path is provided, search $PATH.
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4747$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4748        # Extract the first word of "$tool_basename", so it can be a program name with args.
4749set dummy $tool_basename; ac_word=$2
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
4752if ${ac_cv_path_BASH+:} false; then :
4753  $as_echo_n "(cached) " >&6
4754else
4755  case $BASH in
4756  [\\/]* | ?:[\\/]*)
4757  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4758  ;;
4759  *)
4760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763  IFS=$as_save_IFS
4764  test -z "$as_dir" && as_dir=.
4765    for ac_exec_ext in '' $ac_executable_extensions; do
4766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769    break 2
4770  fi
4771done
4772  done
4773IFS=$as_save_IFS
4774
4775  ;;
4776esac
4777fi
4778BASH=$ac_cv_path_BASH
4779if test -n "$BASH"; then
4780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4781$as_echo "$BASH" >&6; }
4782else
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787
4788        if test "x$BASH" = x; then
4789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4790        fi
4791      else
4792        # Otherwise we believe it is a complete path. Use it as it is.
4793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4794$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4796$as_echo_n "checking for BASH... " >&6; }
4797        if test ! -x "$tool_specified"; then
4798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4799$as_echo "not found" >&6; }
4800          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4801        fi
4802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4803$as_echo "$tool_specified" >&6; }
4804      fi
4805    fi
4806  fi
4807
4808
4809
4810  if test "x$BASH" = x; then
4811    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4812  fi
4813
4814
4815
4816
4817
4818  # Publish this variable in the help.
4819
4820
4821  if test "x$CAT" = x; then
4822    # The variable is not set by user, try to locate tool using the code snippet
4823    for ac_prog in cat
4824do
4825  # Extract the first word of "$ac_prog", so it can be a program name with args.
4826set dummy $ac_prog; ac_word=$2
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828$as_echo_n "checking for $ac_word... " >&6; }
4829if ${ac_cv_path_CAT+:} false; then :
4830  $as_echo_n "(cached) " >&6
4831else
4832  case $CAT in
4833  [\\/]* | ?:[\\/]*)
4834  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4835  ;;
4836  *)
4837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in $PATH
4839do
4840  IFS=$as_save_IFS
4841  test -z "$as_dir" && as_dir=.
4842    for ac_exec_ext in '' $ac_executable_extensions; do
4843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4844    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846    break 2
4847  fi
4848done
4849  done
4850IFS=$as_save_IFS
4851
4852  ;;
4853esac
4854fi
4855CAT=$ac_cv_path_CAT
4856if test -n "$CAT"; then
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4858$as_echo "$CAT" >&6; }
4859else
4860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
4862fi
4863
4864
4865  test -n "$CAT" && break
4866done
4867
4868  else
4869    # The variable is set, but is it from the command line or the environment?
4870
4871    # Try to remove the string !CAT! from our list.
4872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4874      # If it failed, the variable was not from the command line. Ignore it,
4875      # but warn the user (except for BASH, which is always set by the calling BASH).
4876      if test "xCAT" != xBASH; then
4877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4878$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4879      fi
4880      # Try to locate tool using the code snippet
4881      for ac_prog in cat
4882do
4883  # Extract the first word of "$ac_prog", so it can be a program name with args.
4884set dummy $ac_prog; ac_word=$2
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CAT+:} false; then :
4888  $as_echo_n "(cached) " >&6
4889else
4890  case $CAT in
4891  [\\/]* | ?:[\\/]*)
4892  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4893  ;;
4894  *)
4895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in $PATH
4897do
4898  IFS=$as_save_IFS
4899  test -z "$as_dir" && as_dir=.
4900    for ac_exec_ext in '' $ac_executable_extensions; do
4901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4902    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904    break 2
4905  fi
4906done
4907  done
4908IFS=$as_save_IFS
4909
4910  ;;
4911esac
4912fi
4913CAT=$ac_cv_path_CAT
4914if test -n "$CAT"; then
4915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4916$as_echo "$CAT" >&6; }
4917else
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
4922
4923  test -n "$CAT" && break
4924done
4925
4926    else
4927      # If it succeeded, then it was overridden by the user. We will use it
4928      # for the tool.
4929
4930      # First remove it from the list of overridden variables, so we can test
4931      # for unknown variables in the end.
4932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4933
4934      # Check if the provided tool contains a complete path.
4935      tool_specified="$CAT"
4936      tool_basename="${tool_specified##*/}"
4937      if test "x$tool_basename" = "x$tool_specified"; then
4938        # A command without a complete path is provided, search $PATH.
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4940$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4941        # Extract the first word of "$tool_basename", so it can be a program name with args.
4942set dummy $tool_basename; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_CAT+:} false; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $CAT in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4960    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971CAT=$ac_cv_path_CAT
4972if test -n "$CAT"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4974$as_echo "$CAT" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981        if test "x$CAT" = x; then
4982          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4983        fi
4984      else
4985        # Otherwise we believe it is a complete path. Use it as it is.
4986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4987$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4989$as_echo_n "checking for CAT... " >&6; }
4990        if test ! -x "$tool_specified"; then
4991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4992$as_echo "not found" >&6; }
4993          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4994        fi
4995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4996$as_echo "$tool_specified" >&6; }
4997      fi
4998    fi
4999  fi
5000
5001
5002
5003  if test "x$CAT" = x; then
5004    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5005  fi
5006
5007
5008
5009
5010
5011  # Publish this variable in the help.
5012
5013
5014  if test "x$CHMOD" = x; then
5015    # The variable is not set by user, try to locate tool using the code snippet
5016    for ac_prog in chmod
5017do
5018  # Extract the first word of "$ac_prog", so it can be a program name with args.
5019set dummy $ac_prog; ac_word=$2
5020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
5022if ${ac_cv_path_CHMOD+:} false; then :
5023  $as_echo_n "(cached) " >&6
5024else
5025  case $CHMOD in
5026  [\\/]* | ?:[\\/]*)
5027  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5028  ;;
5029  *)
5030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033  IFS=$as_save_IFS
5034  test -z "$as_dir" && as_dir=.
5035    for ac_exec_ext in '' $ac_executable_extensions; do
5036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5037    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5039    break 2
5040  fi
5041done
5042  done
5043IFS=$as_save_IFS
5044
5045  ;;
5046esac
5047fi
5048CHMOD=$ac_cv_path_CHMOD
5049if test -n "$CHMOD"; then
5050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5051$as_echo "$CHMOD" >&6; }
5052else
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054$as_echo "no" >&6; }
5055fi
5056
5057
5058  test -n "$CHMOD" && break
5059done
5060
5061  else
5062    # The variable is set, but is it from the command line or the environment?
5063
5064    # Try to remove the string !CHMOD! from our list.
5065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5067      # If it failed, the variable was not from the command line. Ignore it,
5068      # but warn the user (except for BASH, which is always set by the calling BASH).
5069      if test "xCHMOD" != xBASH; then
5070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5071$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5072      fi
5073      # Try to locate tool using the code snippet
5074      for ac_prog in chmod
5075do
5076  # Extract the first word of "$ac_prog", so it can be a program name with args.
5077set dummy $ac_prog; ac_word=$2
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
5080if ${ac_cv_path_CHMOD+:} false; then :
5081  $as_echo_n "(cached) " >&6
5082else
5083  case $CHMOD in
5084  [\\/]* | ?:[\\/]*)
5085  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5086  ;;
5087  *)
5088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091  IFS=$as_save_IFS
5092  test -z "$as_dir" && as_dir=.
5093    for ac_exec_ext in '' $ac_executable_extensions; do
5094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5095    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097    break 2
5098  fi
5099done
5100  done
5101IFS=$as_save_IFS
5102
5103  ;;
5104esac
5105fi
5106CHMOD=$ac_cv_path_CHMOD
5107if test -n "$CHMOD"; then
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5109$as_echo "$CHMOD" >&6; }
5110else
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
5113fi
5114
5115
5116  test -n "$CHMOD" && break
5117done
5118
5119    else
5120      # If it succeeded, then it was overridden by the user. We will use it
5121      # for the tool.
5122
5123      # First remove it from the list of overridden variables, so we can test
5124      # for unknown variables in the end.
5125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5126
5127      # Check if the provided tool contains a complete path.
5128      tool_specified="$CHMOD"
5129      tool_basename="${tool_specified##*/}"
5130      if test "x$tool_basename" = "x$tool_specified"; then
5131        # A command without a complete path is provided, search $PATH.
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5133$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5134        # Extract the first word of "$tool_basename", so it can be a program name with args.
5135set dummy $tool_basename; ac_word=$2
5136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137$as_echo_n "checking for $ac_word... " >&6; }
5138if ${ac_cv_path_CHMOD+:} false; then :
5139  $as_echo_n "(cached) " >&6
5140else
5141  case $CHMOD in
5142  [\\/]* | ?:[\\/]*)
5143  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5144  ;;
5145  *)
5146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in $PATH
5148do
5149  IFS=$as_save_IFS
5150  test -z "$as_dir" && as_dir=.
5151    for ac_exec_ext in '' $ac_executable_extensions; do
5152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5153    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155    break 2
5156  fi
5157done
5158  done
5159IFS=$as_save_IFS
5160
5161  ;;
5162esac
5163fi
5164CHMOD=$ac_cv_path_CHMOD
5165if test -n "$CHMOD"; then
5166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5167$as_echo "$CHMOD" >&6; }
5168else
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
5171fi
5172
5173
5174        if test "x$CHMOD" = x; then
5175          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5176        fi
5177      else
5178        # Otherwise we believe it is a complete path. Use it as it is.
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5180$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5182$as_echo_n "checking for CHMOD... " >&6; }
5183        if test ! -x "$tool_specified"; then
5184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5185$as_echo "not found" >&6; }
5186          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5187        fi
5188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5189$as_echo "$tool_specified" >&6; }
5190      fi
5191    fi
5192  fi
5193
5194
5195
5196  if test "x$CHMOD" = x; then
5197    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5198  fi
5199
5200
5201
5202
5203
5204  # Publish this variable in the help.
5205
5206
5207  if test "x$CMP" = x; then
5208    # The variable is not set by user, try to locate tool using the code snippet
5209    for ac_prog in cmp
5210do
5211  # Extract the first word of "$ac_prog", so it can be a program name with args.
5212set dummy $ac_prog; ac_word=$2
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5214$as_echo_n "checking for $ac_word... " >&6; }
5215if ${ac_cv_path_CMP+:} false; then :
5216  $as_echo_n "(cached) " >&6
5217else
5218  case $CMP in
5219  [\\/]* | ?:[\\/]*)
5220  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5221  ;;
5222  *)
5223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226  IFS=$as_save_IFS
5227  test -z "$as_dir" && as_dir=.
5228    for ac_exec_ext in '' $ac_executable_extensions; do
5229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5230    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232    break 2
5233  fi
5234done
5235  done
5236IFS=$as_save_IFS
5237
5238  ;;
5239esac
5240fi
5241CMP=$ac_cv_path_CMP
5242if test -n "$CMP"; then
5243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5244$as_echo "$CMP" >&6; }
5245else
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251  test -n "$CMP" && break
5252done
5253
5254  else
5255    # The variable is set, but is it from the command line or the environment?
5256
5257    # Try to remove the string !CMP! from our list.
5258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5260      # If it failed, the variable was not from the command line. Ignore it,
5261      # but warn the user (except for BASH, which is always set by the calling BASH).
5262      if test "xCMP" != xBASH; then
5263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5264$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5265      fi
5266      # Try to locate tool using the code snippet
5267      for ac_prog in cmp
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272$as_echo_n "checking for $ac_word... " >&6; }
5273if ${ac_cv_path_CMP+:} false; then :
5274  $as_echo_n "(cached) " >&6
5275else
5276  case $CMP in
5277  [\\/]* | ?:[\\/]*)
5278  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5279  ;;
5280  *)
5281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282for as_dir in $PATH
5283do
5284  IFS=$as_save_IFS
5285  test -z "$as_dir" && as_dir=.
5286    for ac_exec_ext in '' $ac_executable_extensions; do
5287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5288    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290    break 2
5291  fi
5292done
5293  done
5294IFS=$as_save_IFS
5295
5296  ;;
5297esac
5298fi
5299CMP=$ac_cv_path_CMP
5300if test -n "$CMP"; then
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5302$as_echo "$CMP" >&6; }
5303else
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
5306fi
5307
5308
5309  test -n "$CMP" && break
5310done
5311
5312    else
5313      # If it succeeded, then it was overridden by the user. We will use it
5314      # for the tool.
5315
5316      # First remove it from the list of overridden variables, so we can test
5317      # for unknown variables in the end.
5318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5319
5320      # Check if the provided tool contains a complete path.
5321      tool_specified="$CMP"
5322      tool_basename="${tool_specified##*/}"
5323      if test "x$tool_basename" = "x$tool_specified"; then
5324        # A command without a complete path is provided, search $PATH.
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5326$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5327        # Extract the first word of "$tool_basename", so it can be a program name with args.
5328set dummy $tool_basename; ac_word=$2
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330$as_echo_n "checking for $ac_word... " >&6; }
5331if ${ac_cv_path_CMP+:} false; then :
5332  $as_echo_n "(cached) " >&6
5333else
5334  case $CMP in
5335  [\\/]* | ?:[\\/]*)
5336  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5337  ;;
5338  *)
5339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340for as_dir in $PATH
5341do
5342  IFS=$as_save_IFS
5343  test -z "$as_dir" && as_dir=.
5344    for ac_exec_ext in '' $ac_executable_extensions; do
5345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5346    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348    break 2
5349  fi
5350done
5351  done
5352IFS=$as_save_IFS
5353
5354  ;;
5355esac
5356fi
5357CMP=$ac_cv_path_CMP
5358if test -n "$CMP"; then
5359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5360$as_echo "$CMP" >&6; }
5361else
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365
5366
5367        if test "x$CMP" = x; then
5368          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5369        fi
5370      else
5371        # Otherwise we believe it is a complete path. Use it as it is.
5372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5373$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5375$as_echo_n "checking for CMP... " >&6; }
5376        if test ! -x "$tool_specified"; then
5377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5378$as_echo "not found" >&6; }
5379          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5380        fi
5381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5382$as_echo "$tool_specified" >&6; }
5383      fi
5384    fi
5385  fi
5386
5387
5388
5389  if test "x$CMP" = x; then
5390    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5391  fi
5392
5393
5394
5395
5396
5397  # Publish this variable in the help.
5398
5399
5400  if test "x$COMM" = x; then
5401    # The variable is not set by user, try to locate tool using the code snippet
5402    for ac_prog in comm
5403do
5404  # Extract the first word of "$ac_prog", so it can be a program name with args.
5405set dummy $ac_prog; ac_word=$2
5406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5407$as_echo_n "checking for $ac_word... " >&6; }
5408if ${ac_cv_path_COMM+:} false; then :
5409  $as_echo_n "(cached) " >&6
5410else
5411  case $COMM in
5412  [\\/]* | ?:[\\/]*)
5413  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5414  ;;
5415  *)
5416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH
5418do
5419  IFS=$as_save_IFS
5420  test -z "$as_dir" && as_dir=.
5421    for ac_exec_ext in '' $ac_executable_extensions; do
5422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5423    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5425    break 2
5426  fi
5427done
5428  done
5429IFS=$as_save_IFS
5430
5431  ;;
5432esac
5433fi
5434COMM=$ac_cv_path_COMM
5435if test -n "$COMM"; then
5436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5437$as_echo "$COMM" >&6; }
5438else
5439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
5441fi
5442
5443
5444  test -n "$COMM" && break
5445done
5446
5447  else
5448    # The variable is set, but is it from the command line or the environment?
5449
5450    # Try to remove the string !COMM! from our list.
5451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5453      # If it failed, the variable was not from the command line. Ignore it,
5454      # but warn the user (except for BASH, which is always set by the calling BASH).
5455      if test "xCOMM" != xBASH; then
5456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5457$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5458      fi
5459      # Try to locate tool using the code snippet
5460      for ac_prog in comm
5461do
5462  # Extract the first word of "$ac_prog", so it can be a program name with args.
5463set dummy $ac_prog; ac_word=$2
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465$as_echo_n "checking for $ac_word... " >&6; }
5466if ${ac_cv_path_COMM+:} false; then :
5467  $as_echo_n "(cached) " >&6
5468else
5469  case $COMM in
5470  [\\/]* | ?:[\\/]*)
5471  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5472  ;;
5473  *)
5474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475for as_dir in $PATH
5476do
5477  IFS=$as_save_IFS
5478  test -z "$as_dir" && as_dir=.
5479    for ac_exec_ext in '' $ac_executable_extensions; do
5480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483    break 2
5484  fi
5485done
5486  done
5487IFS=$as_save_IFS
5488
5489  ;;
5490esac
5491fi
5492COMM=$ac_cv_path_COMM
5493if test -n "$COMM"; then
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5495$as_echo "$COMM" >&6; }
5496else
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498$as_echo "no" >&6; }
5499fi
5500
5501
5502  test -n "$COMM" && break
5503done
5504
5505    else
5506      # If it succeeded, then it was overridden by the user. We will use it
5507      # for the tool.
5508
5509      # First remove it from the list of overridden variables, so we can test
5510      # for unknown variables in the end.
5511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5512
5513      # Check if the provided tool contains a complete path.
5514      tool_specified="$COMM"
5515      tool_basename="${tool_specified##*/}"
5516      if test "x$tool_basename" = "x$tool_specified"; then
5517        # A command without a complete path is provided, search $PATH.
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5519$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5520        # Extract the first word of "$tool_basename", so it can be a program name with args.
5521set dummy $tool_basename; ac_word=$2
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523$as_echo_n "checking for $ac_word... " >&6; }
5524if ${ac_cv_path_COMM+:} false; then :
5525  $as_echo_n "(cached) " >&6
5526else
5527  case $COMM in
5528  [\\/]* | ?:[\\/]*)
5529  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5530  ;;
5531  *)
5532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533for as_dir in $PATH
5534do
5535  IFS=$as_save_IFS
5536  test -z "$as_dir" && as_dir=.
5537    for ac_exec_ext in '' $ac_executable_extensions; do
5538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541    break 2
5542  fi
5543done
5544  done
5545IFS=$as_save_IFS
5546
5547  ;;
5548esac
5549fi
5550COMM=$ac_cv_path_COMM
5551if test -n "$COMM"; then
5552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5553$as_echo "$COMM" >&6; }
5554else
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556$as_echo "no" >&6; }
5557fi
5558
5559
5560        if test "x$COMM" = x; then
5561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5562        fi
5563      else
5564        # Otherwise we believe it is a complete path. Use it as it is.
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5566$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5568$as_echo_n "checking for COMM... " >&6; }
5569        if test ! -x "$tool_specified"; then
5570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5571$as_echo "not found" >&6; }
5572          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5573        fi
5574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5575$as_echo "$tool_specified" >&6; }
5576      fi
5577    fi
5578  fi
5579
5580
5581
5582  if test "x$COMM" = x; then
5583    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5584  fi
5585
5586
5587
5588
5589
5590  # Publish this variable in the help.
5591
5592
5593  if test "x$CP" = x; then
5594    # The variable is not set by user, try to locate tool using the code snippet
5595    for ac_prog in cp
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if ${ac_cv_path_CP+:} false; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $CP in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5616    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627CP=$ac_cv_path_CP
5628if test -n "$CP"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5630$as_echo "$CP" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$CP" && break
5638done
5639
5640  else
5641    # The variable is set, but is it from the command line or the environment?
5642
5643    # Try to remove the string !CP! from our list.
5644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5646      # If it failed, the variable was not from the command line. Ignore it,
5647      # but warn the user (except for BASH, which is always set by the calling BASH).
5648      if test "xCP" != xBASH; then
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5650$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5651      fi
5652      # Try to locate tool using the code snippet
5653      for ac_prog in cp
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if ${ac_cv_path_CP+:} false; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $CP in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685CP=$ac_cv_path_CP
5686if test -n "$CP"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5688$as_echo "$CP" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$CP" && break
5696done
5697
5698    else
5699      # If it succeeded, then it was overridden by the user. We will use it
5700      # for the tool.
5701
5702      # First remove it from the list of overridden variables, so we can test
5703      # for unknown variables in the end.
5704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5705
5706      # Check if the provided tool contains a complete path.
5707      tool_specified="$CP"
5708      tool_basename="${tool_specified##*/}"
5709      if test "x$tool_basename" = "x$tool_specified"; then
5710        # A command without a complete path is provided, search $PATH.
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5712$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5713        # Extract the first word of "$tool_basename", so it can be a program name with args.
5714set dummy $tool_basename; ac_word=$2
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716$as_echo_n "checking for $ac_word... " >&6; }
5717if ${ac_cv_path_CP+:} false; then :
5718  $as_echo_n "(cached) " >&6
5719else
5720  case $CP in
5721  [\\/]* | ?:[\\/]*)
5722  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5723  ;;
5724  *)
5725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726for as_dir in $PATH
5727do
5728  IFS=$as_save_IFS
5729  test -z "$as_dir" && as_dir=.
5730    for ac_exec_ext in '' $ac_executable_extensions; do
5731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734    break 2
5735  fi
5736done
5737  done
5738IFS=$as_save_IFS
5739
5740  ;;
5741esac
5742fi
5743CP=$ac_cv_path_CP
5744if test -n "$CP"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5746$as_echo "$CP" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753        if test "x$CP" = x; then
5754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5755        fi
5756      else
5757        # Otherwise we believe it is a complete path. Use it as it is.
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5759$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5761$as_echo_n "checking for CP... " >&6; }
5762        if test ! -x "$tool_specified"; then
5763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5764$as_echo "not found" >&6; }
5765          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5766        fi
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5768$as_echo "$tool_specified" >&6; }
5769      fi
5770    fi
5771  fi
5772
5773
5774
5775  if test "x$CP" = x; then
5776    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5777  fi
5778
5779
5780
5781
5782
5783  # Publish this variable in the help.
5784
5785
5786  if test "x$CUT" = x; then
5787    # The variable is not set by user, try to locate tool using the code snippet
5788    for ac_prog in cut
5789do
5790  # Extract the first word of "$ac_prog", so it can be a program name with args.
5791set dummy $ac_prog; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_path_CUT+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $CUT in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5800  ;;
5801  *)
5802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805  IFS=$as_save_IFS
5806  test -z "$as_dir" && as_dir=.
5807    for ac_exec_ext in '' $ac_executable_extensions; do
5808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811    break 2
5812  fi
5813done
5814  done
5815IFS=$as_save_IFS
5816
5817  ;;
5818esac
5819fi
5820CUT=$ac_cv_path_CUT
5821if test -n "$CUT"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5823$as_echo "$CUT" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830  test -n "$CUT" && break
5831done
5832
5833  else
5834    # The variable is set, but is it from the command line or the environment?
5835
5836    # Try to remove the string !CUT! from our list.
5837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5839      # If it failed, the variable was not from the command line. Ignore it,
5840      # but warn the user (except for BASH, which is always set by the calling BASH).
5841      if test "xCUT" != xBASH; then
5842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5843$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5844      fi
5845      # Try to locate tool using the code snippet
5846      for ac_prog in cut
5847do
5848  # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_CUT+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $CUT in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878CUT=$ac_cv_path_CUT
5879if test -n "$CUT"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5881$as_echo "$CUT" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888  test -n "$CUT" && break
5889done
5890
5891    else
5892      # If it succeeded, then it was overridden by the user. We will use it
5893      # for the tool.
5894
5895      # First remove it from the list of overridden variables, so we can test
5896      # for unknown variables in the end.
5897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5898
5899      # Check if the provided tool contains a complete path.
5900      tool_specified="$CUT"
5901      tool_basename="${tool_specified##*/}"
5902      if test "x$tool_basename" = "x$tool_specified"; then
5903        # A command without a complete path is provided, search $PATH.
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5905$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5906        # Extract the first word of "$tool_basename", so it can be a program name with args.
5907set dummy $tool_basename; ac_word=$2
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909$as_echo_n "checking for $ac_word... " >&6; }
5910if ${ac_cv_path_CUT+:} false; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913  case $CUT in
5914  [\\/]* | ?:[\\/]*)
5915  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5916  ;;
5917  *)
5918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921  IFS=$as_save_IFS
5922  test -z "$as_dir" && as_dir=.
5923    for ac_exec_ext in '' $ac_executable_extensions; do
5924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5925    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927    break 2
5928  fi
5929done
5930  done
5931IFS=$as_save_IFS
5932
5933  ;;
5934esac
5935fi
5936CUT=$ac_cv_path_CUT
5937if test -n "$CUT"; then
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5939$as_echo "$CUT" >&6; }
5940else
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942$as_echo "no" >&6; }
5943fi
5944
5945
5946        if test "x$CUT" = x; then
5947          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5948        fi
5949      else
5950        # Otherwise we believe it is a complete path. Use it as it is.
5951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5952$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5954$as_echo_n "checking for CUT... " >&6; }
5955        if test ! -x "$tool_specified"; then
5956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5957$as_echo "not found" >&6; }
5958          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5959        fi
5960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5961$as_echo "$tool_specified" >&6; }
5962      fi
5963    fi
5964  fi
5965
5966
5967
5968  if test "x$CUT" = x; then
5969    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5970  fi
5971
5972
5973
5974
5975
5976  # Publish this variable in the help.
5977
5978
5979  if test "x$DATE" = x; then
5980    # The variable is not set by user, try to locate tool using the code snippet
5981    for ac_prog in date
5982do
5983  # Extract the first word of "$ac_prog", so it can be a program name with args.
5984set dummy $ac_prog; ac_word=$2
5985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5986$as_echo_n "checking for $ac_word... " >&6; }
5987if ${ac_cv_path_DATE+:} false; then :
5988  $as_echo_n "(cached) " >&6
5989else
5990  case $DATE in
5991  [\\/]* | ?:[\\/]*)
5992  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5993  ;;
5994  *)
5995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996for as_dir in $PATH
5997do
5998  IFS=$as_save_IFS
5999  test -z "$as_dir" && as_dir=.
6000    for ac_exec_ext in '' $ac_executable_extensions; do
6001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6002    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6004    break 2
6005  fi
6006done
6007  done
6008IFS=$as_save_IFS
6009
6010  ;;
6011esac
6012fi
6013DATE=$ac_cv_path_DATE
6014if test -n "$DATE"; then
6015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6016$as_echo "$DATE" >&6; }
6017else
6018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019$as_echo "no" >&6; }
6020fi
6021
6022
6023  test -n "$DATE" && break
6024done
6025
6026  else
6027    # The variable is set, but is it from the command line or the environment?
6028
6029    # Try to remove the string !DATE! from our list.
6030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6032      # If it failed, the variable was not from the command line. Ignore it,
6033      # but warn the user (except for BASH, which is always set by the calling BASH).
6034      if test "xDATE" != xBASH; then
6035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6036$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6037      fi
6038      # Try to locate tool using the code snippet
6039      for ac_prog in date
6040do
6041  # Extract the first word of "$ac_prog", so it can be a program name with args.
6042set dummy $ac_prog; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if ${ac_cv_path_DATE+:} false; then :
6046  $as_echo_n "(cached) " >&6
6047else
6048  case $DATE in
6049  [\\/]* | ?:[\\/]*)
6050  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6051  ;;
6052  *)
6053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056  IFS=$as_save_IFS
6057  test -z "$as_dir" && as_dir=.
6058    for ac_exec_ext in '' $ac_executable_extensions; do
6059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062    break 2
6063  fi
6064done
6065  done
6066IFS=$as_save_IFS
6067
6068  ;;
6069esac
6070fi
6071DATE=$ac_cv_path_DATE
6072if test -n "$DATE"; then
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6074$as_echo "$DATE" >&6; }
6075else
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081  test -n "$DATE" && break
6082done
6083
6084    else
6085      # If it succeeded, then it was overridden by the user. We will use it
6086      # for the tool.
6087
6088      # First remove it from the list of overridden variables, so we can test
6089      # for unknown variables in the end.
6090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6091
6092      # Check if the provided tool contains a complete path.
6093      tool_specified="$DATE"
6094      tool_basename="${tool_specified##*/}"
6095      if test "x$tool_basename" = "x$tool_specified"; then
6096        # A command without a complete path is provided, search $PATH.
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6098$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6099        # Extract the first word of "$tool_basename", so it can be a program name with args.
6100set dummy $tool_basename; ac_word=$2
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
6103if ${ac_cv_path_DATE+:} false; then :
6104  $as_echo_n "(cached) " >&6
6105else
6106  case $DATE in
6107  [\\/]* | ?:[\\/]*)
6108  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6109  ;;
6110  *)
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_exec_ext in '' $ac_executable_extensions; do
6117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120    break 2
6121  fi
6122done
6123  done
6124IFS=$as_save_IFS
6125
6126  ;;
6127esac
6128fi
6129DATE=$ac_cv_path_DATE
6130if test -n "$DATE"; then
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6132$as_echo "$DATE" >&6; }
6133else
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139        if test "x$DATE" = x; then
6140          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6141        fi
6142      else
6143        # Otherwise we believe it is a complete path. Use it as it is.
6144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6145$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6147$as_echo_n "checking for DATE... " >&6; }
6148        if test ! -x "$tool_specified"; then
6149          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6150$as_echo "not found" >&6; }
6151          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6152        fi
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6154$as_echo "$tool_specified" >&6; }
6155      fi
6156    fi
6157  fi
6158
6159
6160
6161  if test "x$DATE" = x; then
6162    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6163  fi
6164
6165
6166
6167
6168
6169  # Publish this variable in the help.
6170
6171
6172  if test "x$DIFF" = x; then
6173    # The variable is not set by user, try to locate tool using the code snippet
6174    for ac_prog in gdiff diff
6175do
6176  # Extract the first word of "$ac_prog", so it can be a program name with args.
6177set dummy $ac_prog; ac_word=$2
6178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6179$as_echo_n "checking for $ac_word... " >&6; }
6180if ${ac_cv_path_DIFF+:} false; then :
6181  $as_echo_n "(cached) " >&6
6182else
6183  case $DIFF in
6184  [\\/]* | ?:[\\/]*)
6185  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6186  ;;
6187  *)
6188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189for as_dir in $PATH
6190do
6191  IFS=$as_save_IFS
6192  test -z "$as_dir" && as_dir=.
6193    for ac_exec_ext in '' $ac_executable_extensions; do
6194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6195    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6197    break 2
6198  fi
6199done
6200  done
6201IFS=$as_save_IFS
6202
6203  ;;
6204esac
6205fi
6206DIFF=$ac_cv_path_DIFF
6207if test -n "$DIFF"; then
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6209$as_echo "$DIFF" >&6; }
6210else
6211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6212$as_echo "no" >&6; }
6213fi
6214
6215
6216  test -n "$DIFF" && break
6217done
6218
6219  else
6220    # The variable is set, but is it from the command line or the environment?
6221
6222    # Try to remove the string !DIFF! from our list.
6223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6225      # If it failed, the variable was not from the command line. Ignore it,
6226      # but warn the user (except for BASH, which is always set by the calling BASH).
6227      if test "xDIFF" != xBASH; then
6228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6229$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6230      fi
6231      # Try to locate tool using the code snippet
6232      for ac_prog in gdiff diff
6233do
6234  # Extract the first word of "$ac_prog", so it can be a program name with args.
6235set dummy $ac_prog; ac_word=$2
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6237$as_echo_n "checking for $ac_word... " >&6; }
6238if ${ac_cv_path_DIFF+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241  case $DIFF in
6242  [\\/]* | ?:[\\/]*)
6243  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6244  ;;
6245  *)
6246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249  IFS=$as_save_IFS
6250  test -z "$as_dir" && as_dir=.
6251    for ac_exec_ext in '' $ac_executable_extensions; do
6252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6253    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6255    break 2
6256  fi
6257done
6258  done
6259IFS=$as_save_IFS
6260
6261  ;;
6262esac
6263fi
6264DIFF=$ac_cv_path_DIFF
6265if test -n "$DIFF"; then
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6267$as_echo "$DIFF" >&6; }
6268else
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270$as_echo "no" >&6; }
6271fi
6272
6273
6274  test -n "$DIFF" && break
6275done
6276
6277    else
6278      # If it succeeded, then it was overridden by the user. We will use it
6279      # for the tool.
6280
6281      # First remove it from the list of overridden variables, so we can test
6282      # for unknown variables in the end.
6283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6284
6285      # Check if the provided tool contains a complete path.
6286      tool_specified="$DIFF"
6287      tool_basename="${tool_specified##*/}"
6288      if test "x$tool_basename" = "x$tool_specified"; then
6289        # A command without a complete path is provided, search $PATH.
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6291$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6292        # Extract the first word of "$tool_basename", so it can be a program name with args.
6293set dummy $tool_basename; ac_word=$2
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295$as_echo_n "checking for $ac_word... " >&6; }
6296if ${ac_cv_path_DIFF+:} false; then :
6297  $as_echo_n "(cached) " >&6
6298else
6299  case $DIFF in
6300  [\\/]* | ?:[\\/]*)
6301  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6302  ;;
6303  *)
6304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305for as_dir in $PATH
6306do
6307  IFS=$as_save_IFS
6308  test -z "$as_dir" && as_dir=.
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313    break 2
6314  fi
6315done
6316  done
6317IFS=$as_save_IFS
6318
6319  ;;
6320esac
6321fi
6322DIFF=$ac_cv_path_DIFF
6323if test -n "$DIFF"; then
6324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6325$as_echo "$DIFF" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330
6331
6332        if test "x$DIFF" = x; then
6333          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6334        fi
6335      else
6336        # Otherwise we believe it is a complete path. Use it as it is.
6337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6338$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6340$as_echo_n "checking for DIFF... " >&6; }
6341        if test ! -x "$tool_specified"; then
6342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6343$as_echo "not found" >&6; }
6344          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6345        fi
6346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6347$as_echo "$tool_specified" >&6; }
6348      fi
6349    fi
6350  fi
6351
6352
6353
6354  if test "x$DIFF" = x; then
6355    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6356  fi
6357
6358
6359
6360
6361
6362  # Publish this variable in the help.
6363
6364
6365  if test "x$DIRNAME" = x; then
6366    # The variable is not set by user, try to locate tool using the code snippet
6367    for ac_prog in dirname
6368do
6369  # Extract the first word of "$ac_prog", so it can be a program name with args.
6370set dummy $ac_prog; ac_word=$2
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6372$as_echo_n "checking for $ac_word... " >&6; }
6373if ${ac_cv_path_DIRNAME+:} false; then :
6374  $as_echo_n "(cached) " >&6
6375else
6376  case $DIRNAME in
6377  [\\/]* | ?:[\\/]*)
6378  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6379  ;;
6380  *)
6381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6382for as_dir in $PATH
6383do
6384  IFS=$as_save_IFS
6385  test -z "$as_dir" && as_dir=.
6386    for ac_exec_ext in '' $ac_executable_extensions; do
6387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6388    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6390    break 2
6391  fi
6392done
6393  done
6394IFS=$as_save_IFS
6395
6396  ;;
6397esac
6398fi
6399DIRNAME=$ac_cv_path_DIRNAME
6400if test -n "$DIRNAME"; then
6401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6402$as_echo "$DIRNAME" >&6; }
6403else
6404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405$as_echo "no" >&6; }
6406fi
6407
6408
6409  test -n "$DIRNAME" && break
6410done
6411
6412  else
6413    # The variable is set, but is it from the command line or the environment?
6414
6415    # Try to remove the string !DIRNAME! from our list.
6416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6418      # If it failed, the variable was not from the command line. Ignore it,
6419      # but warn the user (except for BASH, which is always set by the calling BASH).
6420      if test "xDIRNAME" != xBASH; then
6421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6422$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6423      fi
6424      # Try to locate tool using the code snippet
6425      for ac_prog in dirname
6426do
6427  # Extract the first word of "$ac_prog", so it can be a program name with args.
6428set dummy $ac_prog; ac_word=$2
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430$as_echo_n "checking for $ac_word... " >&6; }
6431if ${ac_cv_path_DIRNAME+:} false; then :
6432  $as_echo_n "(cached) " >&6
6433else
6434  case $DIRNAME in
6435  [\\/]* | ?:[\\/]*)
6436  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6437  ;;
6438  *)
6439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440for as_dir in $PATH
6441do
6442  IFS=$as_save_IFS
6443  test -z "$as_dir" && as_dir=.
6444    for ac_exec_ext in '' $ac_executable_extensions; do
6445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448    break 2
6449  fi
6450done
6451  done
6452IFS=$as_save_IFS
6453
6454  ;;
6455esac
6456fi
6457DIRNAME=$ac_cv_path_DIRNAME
6458if test -n "$DIRNAME"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6460$as_echo "$DIRNAME" >&6; }
6461else
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466
6467  test -n "$DIRNAME" && break
6468done
6469
6470    else
6471      # If it succeeded, then it was overridden by the user. We will use it
6472      # for the tool.
6473
6474      # First remove it from the list of overridden variables, so we can test
6475      # for unknown variables in the end.
6476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6477
6478      # Check if the provided tool contains a complete path.
6479      tool_specified="$DIRNAME"
6480      tool_basename="${tool_specified##*/}"
6481      if test "x$tool_basename" = "x$tool_specified"; then
6482        # A command without a complete path is provided, search $PATH.
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6484$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6485        # Extract the first word of "$tool_basename", so it can be a program name with args.
6486set dummy $tool_basename; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_DIRNAME+:} false; then :
6490  $as_echo_n "(cached) " >&6
6491else
6492  case $DIRNAME in
6493  [\\/]* | ?:[\\/]*)
6494  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6495  ;;
6496  *)
6497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500  IFS=$as_save_IFS
6501  test -z "$as_dir" && as_dir=.
6502    for ac_exec_ext in '' $ac_executable_extensions; do
6503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506    break 2
6507  fi
6508done
6509  done
6510IFS=$as_save_IFS
6511
6512  ;;
6513esac
6514fi
6515DIRNAME=$ac_cv_path_DIRNAME
6516if test -n "$DIRNAME"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6518$as_echo "$DIRNAME" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525        if test "x$DIRNAME" = x; then
6526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6527        fi
6528      else
6529        # Otherwise we believe it is a complete path. Use it as it is.
6530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6531$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6533$as_echo_n "checking for DIRNAME... " >&6; }
6534        if test ! -x "$tool_specified"; then
6535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6536$as_echo "not found" >&6; }
6537          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6538        fi
6539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6540$as_echo "$tool_specified" >&6; }
6541      fi
6542    fi
6543  fi
6544
6545
6546
6547  if test "x$DIRNAME" = x; then
6548    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6549  fi
6550
6551
6552
6553
6554
6555  # Publish this variable in the help.
6556
6557
6558  if test "x$ECHO" = x; then
6559    # The variable is not set by user, try to locate tool using the code snippet
6560    for ac_prog in echo
6561do
6562  # Extract the first word of "$ac_prog", so it can be a program name with args.
6563set dummy $ac_prog; ac_word=$2
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565$as_echo_n "checking for $ac_word... " >&6; }
6566if ${ac_cv_path_ECHO+:} false; then :
6567  $as_echo_n "(cached) " >&6
6568else
6569  case $ECHO in
6570  [\\/]* | ?:[\\/]*)
6571  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6572  ;;
6573  *)
6574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6575for as_dir in $PATH
6576do
6577  IFS=$as_save_IFS
6578  test -z "$as_dir" && as_dir=.
6579    for ac_exec_ext in '' $ac_executable_extensions; do
6580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6581    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6583    break 2
6584  fi
6585done
6586  done
6587IFS=$as_save_IFS
6588
6589  ;;
6590esac
6591fi
6592ECHO=$ac_cv_path_ECHO
6593if test -n "$ECHO"; then
6594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6595$as_echo "$ECHO" >&6; }
6596else
6597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598$as_echo "no" >&6; }
6599fi
6600
6601
6602  test -n "$ECHO" && break
6603done
6604
6605  else
6606    # The variable is set, but is it from the command line or the environment?
6607
6608    # Try to remove the string !ECHO! from our list.
6609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6611      # If it failed, the variable was not from the command line. Ignore it,
6612      # but warn the user (except for BASH, which is always set by the calling BASH).
6613      if test "xECHO" != xBASH; then
6614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6615$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6616      fi
6617      # Try to locate tool using the code snippet
6618      for ac_prog in echo
6619do
6620  # Extract the first word of "$ac_prog", so it can be a program name with args.
6621set dummy $ac_prog; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_ECHO+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $ECHO in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650ECHO=$ac_cv_path_ECHO
6651if test -n "$ECHO"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6653$as_echo "$ECHO" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660  test -n "$ECHO" && break
6661done
6662
6663    else
6664      # If it succeeded, then it was overridden by the user. We will use it
6665      # for the tool.
6666
6667      # First remove it from the list of overridden variables, so we can test
6668      # for unknown variables in the end.
6669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6670
6671      # Check if the provided tool contains a complete path.
6672      tool_specified="$ECHO"
6673      tool_basename="${tool_specified##*/}"
6674      if test "x$tool_basename" = "x$tool_specified"; then
6675        # A command without a complete path is provided, search $PATH.
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6677$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6678        # Extract the first word of "$tool_basename", so it can be a program name with args.
6679set dummy $tool_basename; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_ECHO+:} false; then :
6683  $as_echo_n "(cached) " >&6
6684else
6685  case $ECHO in
6686  [\\/]* | ?:[\\/]*)
6687  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6688  ;;
6689  *)
6690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in $PATH
6692do
6693  IFS=$as_save_IFS
6694  test -z "$as_dir" && as_dir=.
6695    for ac_exec_ext in '' $ac_executable_extensions; do
6696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699    break 2
6700  fi
6701done
6702  done
6703IFS=$as_save_IFS
6704
6705  ;;
6706esac
6707fi
6708ECHO=$ac_cv_path_ECHO
6709if test -n "$ECHO"; then
6710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6711$as_echo "$ECHO" >&6; }
6712else
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717
6718        if test "x$ECHO" = x; then
6719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6720        fi
6721      else
6722        # Otherwise we believe it is a complete path. Use it as it is.
6723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6724$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6726$as_echo_n "checking for ECHO... " >&6; }
6727        if test ! -x "$tool_specified"; then
6728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6729$as_echo "not found" >&6; }
6730          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6731        fi
6732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6733$as_echo "$tool_specified" >&6; }
6734      fi
6735    fi
6736  fi
6737
6738
6739
6740  if test "x$ECHO" = x; then
6741    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6742  fi
6743
6744
6745
6746
6747
6748  # Publish this variable in the help.
6749
6750
6751  if test "x$EXPR" = x; then
6752    # The variable is not set by user, try to locate tool using the code snippet
6753    for ac_prog in expr
6754do
6755  # Extract the first word of "$ac_prog", so it can be a program name with args.
6756set dummy $ac_prog; ac_word=$2
6757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6758$as_echo_n "checking for $ac_word... " >&6; }
6759if ${ac_cv_path_EXPR+:} false; then :
6760  $as_echo_n "(cached) " >&6
6761else
6762  case $EXPR in
6763  [\\/]* | ?:[\\/]*)
6764  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6765  ;;
6766  *)
6767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6768for as_dir in $PATH
6769do
6770  IFS=$as_save_IFS
6771  test -z "$as_dir" && as_dir=.
6772    for ac_exec_ext in '' $ac_executable_extensions; do
6773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6774    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6776    break 2
6777  fi
6778done
6779  done
6780IFS=$as_save_IFS
6781
6782  ;;
6783esac
6784fi
6785EXPR=$ac_cv_path_EXPR
6786if test -n "$EXPR"; then
6787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6788$as_echo "$EXPR" >&6; }
6789else
6790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6791$as_echo "no" >&6; }
6792fi
6793
6794
6795  test -n "$EXPR" && break
6796done
6797
6798  else
6799    # The variable is set, but is it from the command line or the environment?
6800
6801    # Try to remove the string !EXPR! from our list.
6802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6804      # If it failed, the variable was not from the command line. Ignore it,
6805      # but warn the user (except for BASH, which is always set by the calling BASH).
6806      if test "xEXPR" != xBASH; then
6807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6808$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6809      fi
6810      # Try to locate tool using the code snippet
6811      for ac_prog in expr
6812do
6813  # Extract the first word of "$ac_prog", so it can be a program name with args.
6814set dummy $ac_prog; ac_word=$2
6815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_path_EXPR+:} false; then :
6818  $as_echo_n "(cached) " >&6
6819else
6820  case $EXPR in
6821  [\\/]* | ?:[\\/]*)
6822  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6823  ;;
6824  *)
6825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826for as_dir in $PATH
6827do
6828  IFS=$as_save_IFS
6829  test -z "$as_dir" && as_dir=.
6830    for ac_exec_ext in '' $ac_executable_extensions; do
6831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834    break 2
6835  fi
6836done
6837  done
6838IFS=$as_save_IFS
6839
6840  ;;
6841esac
6842fi
6843EXPR=$ac_cv_path_EXPR
6844if test -n "$EXPR"; then
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6846$as_echo "$EXPR" >&6; }
6847else
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849$as_echo "no" >&6; }
6850fi
6851
6852
6853  test -n "$EXPR" && break
6854done
6855
6856    else
6857      # If it succeeded, then it was overridden by the user. We will use it
6858      # for the tool.
6859
6860      # First remove it from the list of overridden variables, so we can test
6861      # for unknown variables in the end.
6862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6863
6864      # Check if the provided tool contains a complete path.
6865      tool_specified="$EXPR"
6866      tool_basename="${tool_specified##*/}"
6867      if test "x$tool_basename" = "x$tool_specified"; then
6868        # A command without a complete path is provided, search $PATH.
6869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6870$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6871        # Extract the first word of "$tool_basename", so it can be a program name with args.
6872set dummy $tool_basename; ac_word=$2
6873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874$as_echo_n "checking for $ac_word... " >&6; }
6875if ${ac_cv_path_EXPR+:} false; then :
6876  $as_echo_n "(cached) " >&6
6877else
6878  case $EXPR in
6879  [\\/]* | ?:[\\/]*)
6880  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6881  ;;
6882  *)
6883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884for as_dir in $PATH
6885do
6886  IFS=$as_save_IFS
6887  test -z "$as_dir" && as_dir=.
6888    for ac_exec_ext in '' $ac_executable_extensions; do
6889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892    break 2
6893  fi
6894done
6895  done
6896IFS=$as_save_IFS
6897
6898  ;;
6899esac
6900fi
6901EXPR=$ac_cv_path_EXPR
6902if test -n "$EXPR"; then
6903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6904$as_echo "$EXPR" >&6; }
6905else
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907$as_echo "no" >&6; }
6908fi
6909
6910
6911        if test "x$EXPR" = x; then
6912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6913        fi
6914      else
6915        # Otherwise we believe it is a complete path. Use it as it is.
6916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6917$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6919$as_echo_n "checking for EXPR... " >&6; }
6920        if test ! -x "$tool_specified"; then
6921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6922$as_echo "not found" >&6; }
6923          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6924        fi
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6926$as_echo "$tool_specified" >&6; }
6927      fi
6928    fi
6929  fi
6930
6931
6932
6933  if test "x$EXPR" = x; then
6934    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6935  fi
6936
6937
6938
6939
6940
6941  # Publish this variable in the help.
6942
6943
6944  if test "x$FILE" = x; then
6945    # The variable is not set by user, try to locate tool using the code snippet
6946    for ac_prog in file
6947do
6948  # Extract the first word of "$ac_prog", so it can be a program name with args.
6949set dummy $ac_prog; ac_word=$2
6950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6951$as_echo_n "checking for $ac_word... " >&6; }
6952if ${ac_cv_path_FILE+:} false; then :
6953  $as_echo_n "(cached) " >&6
6954else
6955  case $FILE in
6956  [\\/]* | ?:[\\/]*)
6957  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6958  ;;
6959  *)
6960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6961for as_dir in $PATH
6962do
6963  IFS=$as_save_IFS
6964  test -z "$as_dir" && as_dir=.
6965    for ac_exec_ext in '' $ac_executable_extensions; do
6966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6967    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6969    break 2
6970  fi
6971done
6972  done
6973IFS=$as_save_IFS
6974
6975  ;;
6976esac
6977fi
6978FILE=$ac_cv_path_FILE
6979if test -n "$FILE"; then
6980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6981$as_echo "$FILE" >&6; }
6982else
6983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6984$as_echo "no" >&6; }
6985fi
6986
6987
6988  test -n "$FILE" && break
6989done
6990
6991  else
6992    # The variable is set, but is it from the command line or the environment?
6993
6994    # Try to remove the string !FILE! from our list.
6995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6997      # If it failed, the variable was not from the command line. Ignore it,
6998      # but warn the user (except for BASH, which is always set by the calling BASH).
6999      if test "xFILE" != xBASH; then
7000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7001$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7002      fi
7003      # Try to locate tool using the code snippet
7004      for ac_prog in file
7005do
7006  # Extract the first word of "$ac_prog", so it can be a program name with args.
7007set dummy $ac_prog; ac_word=$2
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7009$as_echo_n "checking for $ac_word... " >&6; }
7010if ${ac_cv_path_FILE+:} false; then :
7011  $as_echo_n "(cached) " >&6
7012else
7013  case $FILE in
7014  [\\/]* | ?:[\\/]*)
7015  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7016  ;;
7017  *)
7018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019for as_dir in $PATH
7020do
7021  IFS=$as_save_IFS
7022  test -z "$as_dir" && as_dir=.
7023    for ac_exec_ext in '' $ac_executable_extensions; do
7024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7025    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7027    break 2
7028  fi
7029done
7030  done
7031IFS=$as_save_IFS
7032
7033  ;;
7034esac
7035fi
7036FILE=$ac_cv_path_FILE
7037if test -n "$FILE"; then
7038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7039$as_echo "$FILE" >&6; }
7040else
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
7043fi
7044
7045
7046  test -n "$FILE" && break
7047done
7048
7049    else
7050      # If it succeeded, then it was overridden by the user. We will use it
7051      # for the tool.
7052
7053      # First remove it from the list of overridden variables, so we can test
7054      # for unknown variables in the end.
7055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7056
7057      # Check if the provided tool contains a complete path.
7058      tool_specified="$FILE"
7059      tool_basename="${tool_specified##*/}"
7060      if test "x$tool_basename" = "x$tool_specified"; then
7061        # A command without a complete path is provided, search $PATH.
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7063$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7064        # Extract the first word of "$tool_basename", so it can be a program name with args.
7065set dummy $tool_basename; ac_word=$2
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7067$as_echo_n "checking for $ac_word... " >&6; }
7068if ${ac_cv_path_FILE+:} false; then :
7069  $as_echo_n "(cached) " >&6
7070else
7071  case $FILE in
7072  [\\/]* | ?:[\\/]*)
7073  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7074  ;;
7075  *)
7076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077for as_dir in $PATH
7078do
7079  IFS=$as_save_IFS
7080  test -z "$as_dir" && as_dir=.
7081    for ac_exec_ext in '' $ac_executable_extensions; do
7082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7083    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7085    break 2
7086  fi
7087done
7088  done
7089IFS=$as_save_IFS
7090
7091  ;;
7092esac
7093fi
7094FILE=$ac_cv_path_FILE
7095if test -n "$FILE"; then
7096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7097$as_echo "$FILE" >&6; }
7098else
7099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7100$as_echo "no" >&6; }
7101fi
7102
7103
7104        if test "x$FILE" = x; then
7105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7106        fi
7107      else
7108        # Otherwise we believe it is a complete path. Use it as it is.
7109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7110$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7112$as_echo_n "checking for FILE... " >&6; }
7113        if test ! -x "$tool_specified"; then
7114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7115$as_echo "not found" >&6; }
7116          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7117        fi
7118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7119$as_echo "$tool_specified" >&6; }
7120      fi
7121    fi
7122  fi
7123
7124
7125
7126  if test "x$FILE" = x; then
7127    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7128  fi
7129
7130
7131
7132
7133
7134  # Publish this variable in the help.
7135
7136
7137  if test "x$FIND" = x; then
7138    # The variable is not set by user, try to locate tool using the code snippet
7139    for ac_prog in find
7140do
7141  # Extract the first word of "$ac_prog", so it can be a program name with args.
7142set dummy $ac_prog; ac_word=$2
7143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7144$as_echo_n "checking for $ac_word... " >&6; }
7145if ${ac_cv_path_FIND+:} false; then :
7146  $as_echo_n "(cached) " >&6
7147else
7148  case $FIND in
7149  [\\/]* | ?:[\\/]*)
7150  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7151  ;;
7152  *)
7153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154for as_dir in $PATH
7155do
7156  IFS=$as_save_IFS
7157  test -z "$as_dir" && as_dir=.
7158    for ac_exec_ext in '' $ac_executable_extensions; do
7159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7160    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7162    break 2
7163  fi
7164done
7165  done
7166IFS=$as_save_IFS
7167
7168  ;;
7169esac
7170fi
7171FIND=$ac_cv_path_FIND
7172if test -n "$FIND"; then
7173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7174$as_echo "$FIND" >&6; }
7175else
7176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7177$as_echo "no" >&6; }
7178fi
7179
7180
7181  test -n "$FIND" && break
7182done
7183
7184  else
7185    # The variable is set, but is it from the command line or the environment?
7186
7187    # Try to remove the string !FIND! from our list.
7188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7190      # If it failed, the variable was not from the command line. Ignore it,
7191      # but warn the user (except for BASH, which is always set by the calling BASH).
7192      if test "xFIND" != xBASH; then
7193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7194$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7195      fi
7196      # Try to locate tool using the code snippet
7197      for ac_prog in find
7198do
7199  # Extract the first word of "$ac_prog", so it can be a program name with args.
7200set dummy $ac_prog; ac_word=$2
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202$as_echo_n "checking for $ac_word... " >&6; }
7203if ${ac_cv_path_FIND+:} false; then :
7204  $as_echo_n "(cached) " >&6
7205else
7206  case $FIND in
7207  [\\/]* | ?:[\\/]*)
7208  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7209  ;;
7210  *)
7211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214  IFS=$as_save_IFS
7215  test -z "$as_dir" && as_dir=.
7216    for ac_exec_ext in '' $ac_executable_extensions; do
7217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220    break 2
7221  fi
7222done
7223  done
7224IFS=$as_save_IFS
7225
7226  ;;
7227esac
7228fi
7229FIND=$ac_cv_path_FIND
7230if test -n "$FIND"; then
7231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7232$as_echo "$FIND" >&6; }
7233else
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
7236fi
7237
7238
7239  test -n "$FIND" && break
7240done
7241
7242    else
7243      # If it succeeded, then it was overridden by the user. We will use it
7244      # for the tool.
7245
7246      # First remove it from the list of overridden variables, so we can test
7247      # for unknown variables in the end.
7248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7249
7250      # Check if the provided tool contains a complete path.
7251      tool_specified="$FIND"
7252      tool_basename="${tool_specified##*/}"
7253      if test "x$tool_basename" = "x$tool_specified"; then
7254        # A command without a complete path is provided, search $PATH.
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7256$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7257        # Extract the first word of "$tool_basename", so it can be a program name with args.
7258set dummy $tool_basename; ac_word=$2
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260$as_echo_n "checking for $ac_word... " >&6; }
7261if ${ac_cv_path_FIND+:} false; then :
7262  $as_echo_n "(cached) " >&6
7263else
7264  case $FIND in
7265  [\\/]* | ?:[\\/]*)
7266  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7267  ;;
7268  *)
7269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7270for as_dir in $PATH
7271do
7272  IFS=$as_save_IFS
7273  test -z "$as_dir" && as_dir=.
7274    for ac_exec_ext in '' $ac_executable_extensions; do
7275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7276    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7278    break 2
7279  fi
7280done
7281  done
7282IFS=$as_save_IFS
7283
7284  ;;
7285esac
7286fi
7287FIND=$ac_cv_path_FIND
7288if test -n "$FIND"; then
7289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7290$as_echo "$FIND" >&6; }
7291else
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
7294fi
7295
7296
7297        if test "x$FIND" = x; then
7298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7299        fi
7300      else
7301        # Otherwise we believe it is a complete path. Use it as it is.
7302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7303$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7305$as_echo_n "checking for FIND... " >&6; }
7306        if test ! -x "$tool_specified"; then
7307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7308$as_echo "not found" >&6; }
7309          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7310        fi
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7312$as_echo "$tool_specified" >&6; }
7313      fi
7314    fi
7315  fi
7316
7317
7318
7319  if test "x$FIND" = x; then
7320    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7321  fi
7322
7323
7324
7325
7326
7327  # Publish this variable in the help.
7328
7329
7330  if test "x$HEAD" = x; then
7331    # The variable is not set by user, try to locate tool using the code snippet
7332    for ac_prog in head
7333do
7334  # Extract the first word of "$ac_prog", so it can be a program name with args.
7335set dummy $ac_prog; ac_word=$2
7336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7337$as_echo_n "checking for $ac_word... " >&6; }
7338if ${ac_cv_path_HEAD+:} false; then :
7339  $as_echo_n "(cached) " >&6
7340else
7341  case $HEAD in
7342  [\\/]* | ?:[\\/]*)
7343  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7344  ;;
7345  *)
7346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7347for as_dir in $PATH
7348do
7349  IFS=$as_save_IFS
7350  test -z "$as_dir" && as_dir=.
7351    for ac_exec_ext in '' $ac_executable_extensions; do
7352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7353    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7355    break 2
7356  fi
7357done
7358  done
7359IFS=$as_save_IFS
7360
7361  ;;
7362esac
7363fi
7364HEAD=$ac_cv_path_HEAD
7365if test -n "$HEAD"; then
7366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7367$as_echo "$HEAD" >&6; }
7368else
7369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370$as_echo "no" >&6; }
7371fi
7372
7373
7374  test -n "$HEAD" && break
7375done
7376
7377  else
7378    # The variable is set, but is it from the command line or the environment?
7379
7380    # Try to remove the string !HEAD! from our list.
7381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7383      # If it failed, the variable was not from the command line. Ignore it,
7384      # but warn the user (except for BASH, which is always set by the calling BASH).
7385      if test "xHEAD" != xBASH; then
7386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7387$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7388      fi
7389      # Try to locate tool using the code snippet
7390      for ac_prog in head
7391do
7392  # Extract the first word of "$ac_prog", so it can be a program name with args.
7393set dummy $ac_prog; ac_word=$2
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7395$as_echo_n "checking for $ac_word... " >&6; }
7396if ${ac_cv_path_HEAD+:} false; then :
7397  $as_echo_n "(cached) " >&6
7398else
7399  case $HEAD in
7400  [\\/]* | ?:[\\/]*)
7401  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7402  ;;
7403  *)
7404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7405for as_dir in $PATH
7406do
7407  IFS=$as_save_IFS
7408  test -z "$as_dir" && as_dir=.
7409    for ac_exec_ext in '' $ac_executable_extensions; do
7410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7411    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7413    break 2
7414  fi
7415done
7416  done
7417IFS=$as_save_IFS
7418
7419  ;;
7420esac
7421fi
7422HEAD=$ac_cv_path_HEAD
7423if test -n "$HEAD"; then
7424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7425$as_echo "$HEAD" >&6; }
7426else
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428$as_echo "no" >&6; }
7429fi
7430
7431
7432  test -n "$HEAD" && break
7433done
7434
7435    else
7436      # If it succeeded, then it was overridden by the user. We will use it
7437      # for the tool.
7438
7439      # First remove it from the list of overridden variables, so we can test
7440      # for unknown variables in the end.
7441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7442
7443      # Check if the provided tool contains a complete path.
7444      tool_specified="$HEAD"
7445      tool_basename="${tool_specified##*/}"
7446      if test "x$tool_basename" = "x$tool_specified"; then
7447        # A command without a complete path is provided, search $PATH.
7448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7449$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7450        # Extract the first word of "$tool_basename", so it can be a program name with args.
7451set dummy $tool_basename; ac_word=$2
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453$as_echo_n "checking for $ac_word... " >&6; }
7454if ${ac_cv_path_HEAD+:} false; then :
7455  $as_echo_n "(cached) " >&6
7456else
7457  case $HEAD in
7458  [\\/]* | ?:[\\/]*)
7459  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7460  ;;
7461  *)
7462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463for as_dir in $PATH
7464do
7465  IFS=$as_save_IFS
7466  test -z "$as_dir" && as_dir=.
7467    for ac_exec_ext in '' $ac_executable_extensions; do
7468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7469    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7471    break 2
7472  fi
7473done
7474  done
7475IFS=$as_save_IFS
7476
7477  ;;
7478esac
7479fi
7480HEAD=$ac_cv_path_HEAD
7481if test -n "$HEAD"; then
7482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7483$as_echo "$HEAD" >&6; }
7484else
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7486$as_echo "no" >&6; }
7487fi
7488
7489
7490        if test "x$HEAD" = x; then
7491          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7492        fi
7493      else
7494        # Otherwise we believe it is a complete path. Use it as it is.
7495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7496$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7498$as_echo_n "checking for HEAD... " >&6; }
7499        if test ! -x "$tool_specified"; then
7500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7501$as_echo "not found" >&6; }
7502          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7503        fi
7504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7505$as_echo "$tool_specified" >&6; }
7506      fi
7507    fi
7508  fi
7509
7510
7511
7512  if test "x$HEAD" = x; then
7513    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7514  fi
7515
7516
7517
7518
7519
7520  # Publish this variable in the help.
7521
7522
7523  if test "x$LN" = x; then
7524    # The variable is not set by user, try to locate tool using the code snippet
7525    for ac_prog in ln
7526do
7527  # Extract the first word of "$ac_prog", so it can be a program name with args.
7528set dummy $ac_prog; ac_word=$2
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7530$as_echo_n "checking for $ac_word... " >&6; }
7531if ${ac_cv_path_LN+:} false; then :
7532  $as_echo_n "(cached) " >&6
7533else
7534  case $LN in
7535  [\\/]* | ?:[\\/]*)
7536  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7537  ;;
7538  *)
7539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540for as_dir in $PATH
7541do
7542  IFS=$as_save_IFS
7543  test -z "$as_dir" && as_dir=.
7544    for ac_exec_ext in '' $ac_executable_extensions; do
7545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7546    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7548    break 2
7549  fi
7550done
7551  done
7552IFS=$as_save_IFS
7553
7554  ;;
7555esac
7556fi
7557LN=$ac_cv_path_LN
7558if test -n "$LN"; then
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7560$as_echo "$LN" >&6; }
7561else
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563$as_echo "no" >&6; }
7564fi
7565
7566
7567  test -n "$LN" && break
7568done
7569
7570  else
7571    # The variable is set, but is it from the command line or the environment?
7572
7573    # Try to remove the string !LN! from our list.
7574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7576      # If it failed, the variable was not from the command line. Ignore it,
7577      # but warn the user (except for BASH, which is always set by the calling BASH).
7578      if test "xLN" != xBASH; then
7579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7580$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7581      fi
7582      # Try to locate tool using the code snippet
7583      for ac_prog in ln
7584do
7585  # Extract the first word of "$ac_prog", so it can be a program name with args.
7586set dummy $ac_prog; ac_word=$2
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588$as_echo_n "checking for $ac_word... " >&6; }
7589if ${ac_cv_path_LN+:} false; then :
7590  $as_echo_n "(cached) " >&6
7591else
7592  case $LN in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  test -z "$as_dir" && as_dir=.
7602    for ac_exec_ext in '' $ac_executable_extensions; do
7603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606    break 2
7607  fi
7608done
7609  done
7610IFS=$as_save_IFS
7611
7612  ;;
7613esac
7614fi
7615LN=$ac_cv_path_LN
7616if test -n "$LN"; then
7617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7618$as_echo "$LN" >&6; }
7619else
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
7622fi
7623
7624
7625  test -n "$LN" && break
7626done
7627
7628    else
7629      # If it succeeded, then it was overridden by the user. We will use it
7630      # for the tool.
7631
7632      # First remove it from the list of overridden variables, so we can test
7633      # for unknown variables in the end.
7634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7635
7636      # Check if the provided tool contains a complete path.
7637      tool_specified="$LN"
7638      tool_basename="${tool_specified##*/}"
7639      if test "x$tool_basename" = "x$tool_specified"; then
7640        # A command without a complete path is provided, search $PATH.
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7642$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7643        # Extract the first word of "$tool_basename", so it can be a program name with args.
7644set dummy $tool_basename; ac_word=$2
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
7647if ${ac_cv_path_LN+:} false; then :
7648  $as_echo_n "(cached) " >&6
7649else
7650  case $LN in
7651  [\\/]* | ?:[\\/]*)
7652  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7653  ;;
7654  *)
7655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656for as_dir in $PATH
7657do
7658  IFS=$as_save_IFS
7659  test -z "$as_dir" && as_dir=.
7660    for ac_exec_ext in '' $ac_executable_extensions; do
7661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664    break 2
7665  fi
7666done
7667  done
7668IFS=$as_save_IFS
7669
7670  ;;
7671esac
7672fi
7673LN=$ac_cv_path_LN
7674if test -n "$LN"; then
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7676$as_echo "$LN" >&6; }
7677else
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679$as_echo "no" >&6; }
7680fi
7681
7682
7683        if test "x$LN" = x; then
7684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7685        fi
7686      else
7687        # Otherwise we believe it is a complete path. Use it as it is.
7688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7689$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7691$as_echo_n "checking for LN... " >&6; }
7692        if test ! -x "$tool_specified"; then
7693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7694$as_echo "not found" >&6; }
7695          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7696        fi
7697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7698$as_echo "$tool_specified" >&6; }
7699      fi
7700    fi
7701  fi
7702
7703
7704
7705  if test "x$LN" = x; then
7706    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7707  fi
7708
7709
7710
7711
7712
7713  # Publish this variable in the help.
7714
7715
7716  if test "x$LS" = x; then
7717    # The variable is not set by user, try to locate tool using the code snippet
7718    for ac_prog in ls
7719do
7720  # Extract the first word of "$ac_prog", so it can be a program name with args.
7721set dummy $ac_prog; ac_word=$2
7722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7723$as_echo_n "checking for $ac_word... " >&6; }
7724if ${ac_cv_path_LS+:} false; then :
7725  $as_echo_n "(cached) " >&6
7726else
7727  case $LS in
7728  [\\/]* | ?:[\\/]*)
7729  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7730  ;;
7731  *)
7732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7733for as_dir in $PATH
7734do
7735  IFS=$as_save_IFS
7736  test -z "$as_dir" && as_dir=.
7737    for ac_exec_ext in '' $ac_executable_extensions; do
7738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7739    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7741    break 2
7742  fi
7743done
7744  done
7745IFS=$as_save_IFS
7746
7747  ;;
7748esac
7749fi
7750LS=$ac_cv_path_LS
7751if test -n "$LS"; then
7752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7753$as_echo "$LS" >&6; }
7754else
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7756$as_echo "no" >&6; }
7757fi
7758
7759
7760  test -n "$LS" && break
7761done
7762
7763  else
7764    # The variable is set, but is it from the command line or the environment?
7765
7766    # Try to remove the string !LS! from our list.
7767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7769      # If it failed, the variable was not from the command line. Ignore it,
7770      # but warn the user (except for BASH, which is always set by the calling BASH).
7771      if test "xLS" != xBASH; then
7772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7773$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7774      fi
7775      # Try to locate tool using the code snippet
7776      for ac_prog in ls
7777do
7778  # Extract the first word of "$ac_prog", so it can be a program name with args.
7779set dummy $ac_prog; ac_word=$2
7780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7781$as_echo_n "checking for $ac_word... " >&6; }
7782if ${ac_cv_path_LS+:} false; then :
7783  $as_echo_n "(cached) " >&6
7784else
7785  case $LS in
7786  [\\/]* | ?:[\\/]*)
7787  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7788  ;;
7789  *)
7790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791for as_dir in $PATH
7792do
7793  IFS=$as_save_IFS
7794  test -z "$as_dir" && as_dir=.
7795    for ac_exec_ext in '' $ac_executable_extensions; do
7796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799    break 2
7800  fi
7801done
7802  done
7803IFS=$as_save_IFS
7804
7805  ;;
7806esac
7807fi
7808LS=$ac_cv_path_LS
7809if test -n "$LS"; then
7810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7811$as_echo "$LS" >&6; }
7812else
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7814$as_echo "no" >&6; }
7815fi
7816
7817
7818  test -n "$LS" && break
7819done
7820
7821    else
7822      # If it succeeded, then it was overridden by the user. We will use it
7823      # for the tool.
7824
7825      # First remove it from the list of overridden variables, so we can test
7826      # for unknown variables in the end.
7827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7828
7829      # Check if the provided tool contains a complete path.
7830      tool_specified="$LS"
7831      tool_basename="${tool_specified##*/}"
7832      if test "x$tool_basename" = "x$tool_specified"; then
7833        # A command without a complete path is provided, search $PATH.
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7835$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7836        # Extract the first word of "$tool_basename", so it can be a program name with args.
7837set dummy $tool_basename; ac_word=$2
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839$as_echo_n "checking for $ac_word... " >&6; }
7840if ${ac_cv_path_LS+:} false; then :
7841  $as_echo_n "(cached) " >&6
7842else
7843  case $LS in
7844  [\\/]* | ?:[\\/]*)
7845  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7846  ;;
7847  *)
7848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7849for as_dir in $PATH
7850do
7851  IFS=$as_save_IFS
7852  test -z "$as_dir" && as_dir=.
7853    for ac_exec_ext in '' $ac_executable_extensions; do
7854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7855    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7857    break 2
7858  fi
7859done
7860  done
7861IFS=$as_save_IFS
7862
7863  ;;
7864esac
7865fi
7866LS=$ac_cv_path_LS
7867if test -n "$LS"; then
7868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7869$as_echo "$LS" >&6; }
7870else
7871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872$as_echo "no" >&6; }
7873fi
7874
7875
7876        if test "x$LS" = x; then
7877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7878        fi
7879      else
7880        # Otherwise we believe it is a complete path. Use it as it is.
7881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7882$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7884$as_echo_n "checking for LS... " >&6; }
7885        if test ! -x "$tool_specified"; then
7886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7887$as_echo "not found" >&6; }
7888          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7889        fi
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7891$as_echo "$tool_specified" >&6; }
7892      fi
7893    fi
7894  fi
7895
7896
7897
7898  if test "x$LS" = x; then
7899    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7900  fi
7901
7902
7903
7904
7905
7906  # Publish this variable in the help.
7907
7908
7909  if test "x$MKDIR" = x; then
7910    # The variable is not set by user, try to locate tool using the code snippet
7911    for ac_prog in mkdir
7912do
7913  # Extract the first word of "$ac_prog", so it can be a program name with args.
7914set dummy $ac_prog; ac_word=$2
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7916$as_echo_n "checking for $ac_word... " >&6; }
7917if ${ac_cv_path_MKDIR+:} false; then :
7918  $as_echo_n "(cached) " >&6
7919else
7920  case $MKDIR in
7921  [\\/]* | ?:[\\/]*)
7922  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7923  ;;
7924  *)
7925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7926for as_dir in $PATH
7927do
7928  IFS=$as_save_IFS
7929  test -z "$as_dir" && as_dir=.
7930    for ac_exec_ext in '' $ac_executable_extensions; do
7931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7932    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7934    break 2
7935  fi
7936done
7937  done
7938IFS=$as_save_IFS
7939
7940  ;;
7941esac
7942fi
7943MKDIR=$ac_cv_path_MKDIR
7944if test -n "$MKDIR"; then
7945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7946$as_echo "$MKDIR" >&6; }
7947else
7948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7949$as_echo "no" >&6; }
7950fi
7951
7952
7953  test -n "$MKDIR" && break
7954done
7955
7956  else
7957    # The variable is set, but is it from the command line or the environment?
7958
7959    # Try to remove the string !MKDIR! from our list.
7960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7962      # If it failed, the variable was not from the command line. Ignore it,
7963      # but warn the user (except for BASH, which is always set by the calling BASH).
7964      if test "xMKDIR" != xBASH; then
7965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7966$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7967      fi
7968      # Try to locate tool using the code snippet
7969      for ac_prog in mkdir
7970do
7971  # Extract the first word of "$ac_prog", so it can be a program name with args.
7972set dummy $ac_prog; ac_word=$2
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7974$as_echo_n "checking for $ac_word... " >&6; }
7975if ${ac_cv_path_MKDIR+:} false; then :
7976  $as_echo_n "(cached) " >&6
7977else
7978  case $MKDIR in
7979  [\\/]* | ?:[\\/]*)
7980  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7981  ;;
7982  *)
7983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984for as_dir in $PATH
7985do
7986  IFS=$as_save_IFS
7987  test -z "$as_dir" && as_dir=.
7988    for ac_exec_ext in '' $ac_executable_extensions; do
7989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7990    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7992    break 2
7993  fi
7994done
7995  done
7996IFS=$as_save_IFS
7997
7998  ;;
7999esac
8000fi
8001MKDIR=$ac_cv_path_MKDIR
8002if test -n "$MKDIR"; then
8003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8004$as_echo "$MKDIR" >&6; }
8005else
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
8008fi
8009
8010
8011  test -n "$MKDIR" && break
8012done
8013
8014    else
8015      # If it succeeded, then it was overridden by the user. We will use it
8016      # for the tool.
8017
8018      # First remove it from the list of overridden variables, so we can test
8019      # for unknown variables in the end.
8020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8021
8022      # Check if the provided tool contains a complete path.
8023      tool_specified="$MKDIR"
8024      tool_basename="${tool_specified##*/}"
8025      if test "x$tool_basename" = "x$tool_specified"; then
8026        # A command without a complete path is provided, search $PATH.
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8028$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8029        # Extract the first word of "$tool_basename", so it can be a program name with args.
8030set dummy $tool_basename; ac_word=$2
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
8033if ${ac_cv_path_MKDIR+:} false; then :
8034  $as_echo_n "(cached) " >&6
8035else
8036  case $MKDIR in
8037  [\\/]* | ?:[\\/]*)
8038  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8039  ;;
8040  *)
8041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044  IFS=$as_save_IFS
8045  test -z "$as_dir" && as_dir=.
8046    for ac_exec_ext in '' $ac_executable_extensions; do
8047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050    break 2
8051  fi
8052done
8053  done
8054IFS=$as_save_IFS
8055
8056  ;;
8057esac
8058fi
8059MKDIR=$ac_cv_path_MKDIR
8060if test -n "$MKDIR"; then
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8062$as_echo "$MKDIR" >&6; }
8063else
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069        if test "x$MKDIR" = x; then
8070          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8071        fi
8072      else
8073        # Otherwise we believe it is a complete path. Use it as it is.
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8075$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8077$as_echo_n "checking for MKDIR... " >&6; }
8078        if test ! -x "$tool_specified"; then
8079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8080$as_echo "not found" >&6; }
8081          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8082        fi
8083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8084$as_echo "$tool_specified" >&6; }
8085      fi
8086    fi
8087  fi
8088
8089
8090
8091  if test "x$MKDIR" = x; then
8092    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8093  fi
8094
8095
8096
8097
8098
8099  # Publish this variable in the help.
8100
8101
8102  if test "x$MKTEMP" = x; then
8103    # The variable is not set by user, try to locate tool using the code snippet
8104    for ac_prog in mktemp
8105do
8106  # Extract the first word of "$ac_prog", so it can be a program name with args.
8107set dummy $ac_prog; ac_word=$2
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8109$as_echo_n "checking for $ac_word... " >&6; }
8110if ${ac_cv_path_MKTEMP+:} false; then :
8111  $as_echo_n "(cached) " >&6
8112else
8113  case $MKTEMP in
8114  [\\/]* | ?:[\\/]*)
8115  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8116  ;;
8117  *)
8118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8119for as_dir in $PATH
8120do
8121  IFS=$as_save_IFS
8122  test -z "$as_dir" && as_dir=.
8123    for ac_exec_ext in '' $ac_executable_extensions; do
8124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8125    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8127    break 2
8128  fi
8129done
8130  done
8131IFS=$as_save_IFS
8132
8133  ;;
8134esac
8135fi
8136MKTEMP=$ac_cv_path_MKTEMP
8137if test -n "$MKTEMP"; then
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8139$as_echo "$MKTEMP" >&6; }
8140else
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142$as_echo "no" >&6; }
8143fi
8144
8145
8146  test -n "$MKTEMP" && break
8147done
8148
8149  else
8150    # The variable is set, but is it from the command line or the environment?
8151
8152    # Try to remove the string !MKTEMP! from our list.
8153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8155      # If it failed, the variable was not from the command line. Ignore it,
8156      # but warn the user (except for BASH, which is always set by the calling BASH).
8157      if test "xMKTEMP" != xBASH; then
8158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8159$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8160      fi
8161      # Try to locate tool using the code snippet
8162      for ac_prog in mktemp
8163do
8164  # Extract the first word of "$ac_prog", so it can be a program name with args.
8165set dummy $ac_prog; ac_word=$2
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167$as_echo_n "checking for $ac_word... " >&6; }
8168if ${ac_cv_path_MKTEMP+:} false; then :
8169  $as_echo_n "(cached) " >&6
8170else
8171  case $MKTEMP in
8172  [\\/]* | ?:[\\/]*)
8173  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8174  ;;
8175  *)
8176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179  IFS=$as_save_IFS
8180  test -z "$as_dir" && as_dir=.
8181    for ac_exec_ext in '' $ac_executable_extensions; do
8182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185    break 2
8186  fi
8187done
8188  done
8189IFS=$as_save_IFS
8190
8191  ;;
8192esac
8193fi
8194MKTEMP=$ac_cv_path_MKTEMP
8195if test -n "$MKTEMP"; then
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8197$as_echo "$MKTEMP" >&6; }
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201fi
8202
8203
8204  test -n "$MKTEMP" && break
8205done
8206
8207    else
8208      # If it succeeded, then it was overridden by the user. We will use it
8209      # for the tool.
8210
8211      # First remove it from the list of overridden variables, so we can test
8212      # for unknown variables in the end.
8213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8214
8215      # Check if the provided tool contains a complete path.
8216      tool_specified="$MKTEMP"
8217      tool_basename="${tool_specified##*/}"
8218      if test "x$tool_basename" = "x$tool_specified"; then
8219        # A command without a complete path is provided, search $PATH.
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8221$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8222        # Extract the first word of "$tool_basename", so it can be a program name with args.
8223set dummy $tool_basename; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_MKTEMP+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $MKTEMP in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252MKTEMP=$ac_cv_path_MKTEMP
8253if test -n "$MKTEMP"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8255$as_echo "$MKTEMP" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262        if test "x$MKTEMP" = x; then
8263          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8264        fi
8265      else
8266        # Otherwise we believe it is a complete path. Use it as it is.
8267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8268$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8270$as_echo_n "checking for MKTEMP... " >&6; }
8271        if test ! -x "$tool_specified"; then
8272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8273$as_echo "not found" >&6; }
8274          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8275        fi
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8277$as_echo "$tool_specified" >&6; }
8278      fi
8279    fi
8280  fi
8281
8282
8283
8284  if test "x$MKTEMP" = x; then
8285    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8286  fi
8287
8288
8289
8290
8291
8292  # Publish this variable in the help.
8293
8294
8295  if test "x$MV" = x; then
8296    # The variable is not set by user, try to locate tool using the code snippet
8297    for ac_prog in mv
8298do
8299  # Extract the first word of "$ac_prog", so it can be a program name with args.
8300set dummy $ac_prog; ac_word=$2
8301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8302$as_echo_n "checking for $ac_word... " >&6; }
8303if ${ac_cv_path_MV+:} false; then :
8304  $as_echo_n "(cached) " >&6
8305else
8306  case $MV in
8307  [\\/]* | ?:[\\/]*)
8308  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8309  ;;
8310  *)
8311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8312for as_dir in $PATH
8313do
8314  IFS=$as_save_IFS
8315  test -z "$as_dir" && as_dir=.
8316    for ac_exec_ext in '' $ac_executable_extensions; do
8317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8318    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8320    break 2
8321  fi
8322done
8323  done
8324IFS=$as_save_IFS
8325
8326  ;;
8327esac
8328fi
8329MV=$ac_cv_path_MV
8330if test -n "$MV"; then
8331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8332$as_echo "$MV" >&6; }
8333else
8334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8335$as_echo "no" >&6; }
8336fi
8337
8338
8339  test -n "$MV" && break
8340done
8341
8342  else
8343    # The variable is set, but is it from the command line or the environment?
8344
8345    # Try to remove the string !MV! from our list.
8346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8348      # If it failed, the variable was not from the command line. Ignore it,
8349      # but warn the user (except for BASH, which is always set by the calling BASH).
8350      if test "xMV" != xBASH; then
8351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8352$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8353      fi
8354      # Try to locate tool using the code snippet
8355      for ac_prog in mv
8356do
8357  # Extract the first word of "$ac_prog", so it can be a program name with args.
8358set dummy $ac_prog; ac_word=$2
8359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8360$as_echo_n "checking for $ac_word... " >&6; }
8361if ${ac_cv_path_MV+:} false; then :
8362  $as_echo_n "(cached) " >&6
8363else
8364  case $MV in
8365  [\\/]* | ?:[\\/]*)
8366  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8367  ;;
8368  *)
8369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8370for as_dir in $PATH
8371do
8372  IFS=$as_save_IFS
8373  test -z "$as_dir" && as_dir=.
8374    for ac_exec_ext in '' $ac_executable_extensions; do
8375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8376    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8378    break 2
8379  fi
8380done
8381  done
8382IFS=$as_save_IFS
8383
8384  ;;
8385esac
8386fi
8387MV=$ac_cv_path_MV
8388if test -n "$MV"; then
8389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8390$as_echo "$MV" >&6; }
8391else
8392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393$as_echo "no" >&6; }
8394fi
8395
8396
8397  test -n "$MV" && break
8398done
8399
8400    else
8401      # If it succeeded, then it was overridden by the user. We will use it
8402      # for the tool.
8403
8404      # First remove it from the list of overridden variables, so we can test
8405      # for unknown variables in the end.
8406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8407
8408      # Check if the provided tool contains a complete path.
8409      tool_specified="$MV"
8410      tool_basename="${tool_specified##*/}"
8411      if test "x$tool_basename" = "x$tool_specified"; then
8412        # A command without a complete path is provided, search $PATH.
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8414$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8415        # Extract the first word of "$tool_basename", so it can be a program name with args.
8416set dummy $tool_basename; ac_word=$2
8417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418$as_echo_n "checking for $ac_word... " >&6; }
8419if ${ac_cv_path_MV+:} false; then :
8420  $as_echo_n "(cached) " >&6
8421else
8422  case $MV in
8423  [\\/]* | ?:[\\/]*)
8424  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8425  ;;
8426  *)
8427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8428for as_dir in $PATH
8429do
8430  IFS=$as_save_IFS
8431  test -z "$as_dir" && as_dir=.
8432    for ac_exec_ext in '' $ac_executable_extensions; do
8433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8434    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8436    break 2
8437  fi
8438done
8439  done
8440IFS=$as_save_IFS
8441
8442  ;;
8443esac
8444fi
8445MV=$ac_cv_path_MV
8446if test -n "$MV"; then
8447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8448$as_echo "$MV" >&6; }
8449else
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
8452fi
8453
8454
8455        if test "x$MV" = x; then
8456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8457        fi
8458      else
8459        # Otherwise we believe it is a complete path. Use it as it is.
8460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8461$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8463$as_echo_n "checking for MV... " >&6; }
8464        if test ! -x "$tool_specified"; then
8465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8466$as_echo "not found" >&6; }
8467          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8468        fi
8469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8470$as_echo "$tool_specified" >&6; }
8471      fi
8472    fi
8473  fi
8474
8475
8476
8477  if test "x$MV" = x; then
8478    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8479  fi
8480
8481
8482
8483
8484
8485  # Publish this variable in the help.
8486
8487
8488  if test "x$NAWK" = x; then
8489    # The variable is not set by user, try to locate tool using the code snippet
8490    for ac_prog in nawk gawk awk
8491do
8492  # Extract the first word of "$ac_prog", so it can be a program name with args.
8493set dummy $ac_prog; ac_word=$2
8494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8495$as_echo_n "checking for $ac_word... " >&6; }
8496if ${ac_cv_path_NAWK+:} false; then :
8497  $as_echo_n "(cached) " >&6
8498else
8499  case $NAWK in
8500  [\\/]* | ?:[\\/]*)
8501  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8502  ;;
8503  *)
8504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8505for as_dir in $PATH
8506do
8507  IFS=$as_save_IFS
8508  test -z "$as_dir" && as_dir=.
8509    for ac_exec_ext in '' $ac_executable_extensions; do
8510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8511    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8513    break 2
8514  fi
8515done
8516  done
8517IFS=$as_save_IFS
8518
8519  ;;
8520esac
8521fi
8522NAWK=$ac_cv_path_NAWK
8523if test -n "$NAWK"; then
8524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8525$as_echo "$NAWK" >&6; }
8526else
8527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8528$as_echo "no" >&6; }
8529fi
8530
8531
8532  test -n "$NAWK" && break
8533done
8534
8535  else
8536    # The variable is set, but is it from the command line or the environment?
8537
8538    # Try to remove the string !NAWK! from our list.
8539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8541      # If it failed, the variable was not from the command line. Ignore it,
8542      # but warn the user (except for BASH, which is always set by the calling BASH).
8543      if test "xNAWK" != xBASH; then
8544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8545$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8546      fi
8547      # Try to locate tool using the code snippet
8548      for ac_prog in nawk gawk awk
8549do
8550  # Extract the first word of "$ac_prog", so it can be a program name with args.
8551set dummy $ac_prog; ac_word=$2
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553$as_echo_n "checking for $ac_word... " >&6; }
8554if ${ac_cv_path_NAWK+:} false; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  case $NAWK in
8558  [\\/]* | ?:[\\/]*)
8559  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8560  ;;
8561  *)
8562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563for as_dir in $PATH
8564do
8565  IFS=$as_save_IFS
8566  test -z "$as_dir" && as_dir=.
8567    for ac_exec_ext in '' $ac_executable_extensions; do
8568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571    break 2
8572  fi
8573done
8574  done
8575IFS=$as_save_IFS
8576
8577  ;;
8578esac
8579fi
8580NAWK=$ac_cv_path_NAWK
8581if test -n "$NAWK"; then
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8583$as_echo "$NAWK" >&6; }
8584else
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586$as_echo "no" >&6; }
8587fi
8588
8589
8590  test -n "$NAWK" && break
8591done
8592
8593    else
8594      # If it succeeded, then it was overridden by the user. We will use it
8595      # for the tool.
8596
8597      # First remove it from the list of overridden variables, so we can test
8598      # for unknown variables in the end.
8599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8600
8601      # Check if the provided tool contains a complete path.
8602      tool_specified="$NAWK"
8603      tool_basename="${tool_specified##*/}"
8604      if test "x$tool_basename" = "x$tool_specified"; then
8605        # A command without a complete path is provided, search $PATH.
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8607$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8608        # Extract the first word of "$tool_basename", so it can be a program name with args.
8609set dummy $tool_basename; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_NAWK+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $NAWK in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638NAWK=$ac_cv_path_NAWK
8639if test -n "$NAWK"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8641$as_echo "$NAWK" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648        if test "x$NAWK" = x; then
8649          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8650        fi
8651      else
8652        # Otherwise we believe it is a complete path. Use it as it is.
8653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8654$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8656$as_echo_n "checking for NAWK... " >&6; }
8657        if test ! -x "$tool_specified"; then
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8659$as_echo "not found" >&6; }
8660          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8661        fi
8662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8663$as_echo "$tool_specified" >&6; }
8664      fi
8665    fi
8666  fi
8667
8668
8669
8670  if test "x$NAWK" = x; then
8671    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8672  fi
8673
8674
8675
8676
8677
8678  # Publish this variable in the help.
8679
8680
8681  if test "x$PRINTF" = x; then
8682    # The variable is not set by user, try to locate tool using the code snippet
8683    for ac_prog in printf
8684do
8685  # Extract the first word of "$ac_prog", so it can be a program name with args.
8686set dummy $ac_prog; ac_word=$2
8687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688$as_echo_n "checking for $ac_word... " >&6; }
8689if ${ac_cv_path_PRINTF+:} false; then :
8690  $as_echo_n "(cached) " >&6
8691else
8692  case $PRINTF in
8693  [\\/]* | ?:[\\/]*)
8694  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8695  ;;
8696  *)
8697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8698for as_dir in $PATH
8699do
8700  IFS=$as_save_IFS
8701  test -z "$as_dir" && as_dir=.
8702    for ac_exec_ext in '' $ac_executable_extensions; do
8703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8704    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8706    break 2
8707  fi
8708done
8709  done
8710IFS=$as_save_IFS
8711
8712  ;;
8713esac
8714fi
8715PRINTF=$ac_cv_path_PRINTF
8716if test -n "$PRINTF"; then
8717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8718$as_echo "$PRINTF" >&6; }
8719else
8720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721$as_echo "no" >&6; }
8722fi
8723
8724
8725  test -n "$PRINTF" && break
8726done
8727
8728  else
8729    # The variable is set, but is it from the command line or the environment?
8730
8731    # Try to remove the string !PRINTF! from our list.
8732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8734      # If it failed, the variable was not from the command line. Ignore it,
8735      # but warn the user (except for BASH, which is always set by the calling BASH).
8736      if test "xPRINTF" != xBASH; then
8737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8738$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8739      fi
8740      # Try to locate tool using the code snippet
8741      for ac_prog in printf
8742do
8743  # Extract the first word of "$ac_prog", so it can be a program name with args.
8744set dummy $ac_prog; ac_word=$2
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8746$as_echo_n "checking for $ac_word... " >&6; }
8747if ${ac_cv_path_PRINTF+:} false; then :
8748  $as_echo_n "(cached) " >&6
8749else
8750  case $PRINTF in
8751  [\\/]* | ?:[\\/]*)
8752  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8753  ;;
8754  *)
8755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8756for as_dir in $PATH
8757do
8758  IFS=$as_save_IFS
8759  test -z "$as_dir" && as_dir=.
8760    for ac_exec_ext in '' $ac_executable_extensions; do
8761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8762    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8764    break 2
8765  fi
8766done
8767  done
8768IFS=$as_save_IFS
8769
8770  ;;
8771esac
8772fi
8773PRINTF=$ac_cv_path_PRINTF
8774if test -n "$PRINTF"; then
8775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8776$as_echo "$PRINTF" >&6; }
8777else
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779$as_echo "no" >&6; }
8780fi
8781
8782
8783  test -n "$PRINTF" && break
8784done
8785
8786    else
8787      # If it succeeded, then it was overridden by the user. We will use it
8788      # for the tool.
8789
8790      # First remove it from the list of overridden variables, so we can test
8791      # for unknown variables in the end.
8792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8793
8794      # Check if the provided tool contains a complete path.
8795      tool_specified="$PRINTF"
8796      tool_basename="${tool_specified##*/}"
8797      if test "x$tool_basename" = "x$tool_specified"; then
8798        # A command without a complete path is provided, search $PATH.
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8800$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8801        # Extract the first word of "$tool_basename", so it can be a program name with args.
8802set dummy $tool_basename; ac_word=$2
8803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8804$as_echo_n "checking for $ac_word... " >&6; }
8805if ${ac_cv_path_PRINTF+:} false; then :
8806  $as_echo_n "(cached) " >&6
8807else
8808  case $PRINTF in
8809  [\\/]* | ?:[\\/]*)
8810  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8811  ;;
8812  *)
8813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814for as_dir in $PATH
8815do
8816  IFS=$as_save_IFS
8817  test -z "$as_dir" && as_dir=.
8818    for ac_exec_ext in '' $ac_executable_extensions; do
8819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8820    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8822    break 2
8823  fi
8824done
8825  done
8826IFS=$as_save_IFS
8827
8828  ;;
8829esac
8830fi
8831PRINTF=$ac_cv_path_PRINTF
8832if test -n "$PRINTF"; then
8833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8834$as_echo "$PRINTF" >&6; }
8835else
8836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
8838fi
8839
8840
8841        if test "x$PRINTF" = x; then
8842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8843        fi
8844      else
8845        # Otherwise we believe it is a complete path. Use it as it is.
8846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8847$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8849$as_echo_n "checking for PRINTF... " >&6; }
8850        if test ! -x "$tool_specified"; then
8851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8852$as_echo "not found" >&6; }
8853          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8854        fi
8855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8856$as_echo "$tool_specified" >&6; }
8857      fi
8858    fi
8859  fi
8860
8861
8862
8863  if test "x$PRINTF" = x; then
8864    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8865  fi
8866
8867
8868
8869
8870
8871  # Publish this variable in the help.
8872
8873
8874  if test "x$RM" = x; then
8875    # The variable is not set by user, try to locate tool using the code snippet
8876    for ac_prog in rm
8877do
8878  # Extract the first word of "$ac_prog", so it can be a program name with args.
8879set dummy $ac_prog; ac_word=$2
8880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8881$as_echo_n "checking for $ac_word... " >&6; }
8882if ${ac_cv_path_RM+:} false; then :
8883  $as_echo_n "(cached) " >&6
8884else
8885  case $RM in
8886  [\\/]* | ?:[\\/]*)
8887  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8888  ;;
8889  *)
8890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891for as_dir in $PATH
8892do
8893  IFS=$as_save_IFS
8894  test -z "$as_dir" && as_dir=.
8895    for ac_exec_ext in '' $ac_executable_extensions; do
8896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8897    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8899    break 2
8900  fi
8901done
8902  done
8903IFS=$as_save_IFS
8904
8905  ;;
8906esac
8907fi
8908RM=$ac_cv_path_RM
8909if test -n "$RM"; then
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8911$as_echo "$RM" >&6; }
8912else
8913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8914$as_echo "no" >&6; }
8915fi
8916
8917
8918  test -n "$RM" && break
8919done
8920
8921  else
8922    # The variable is set, but is it from the command line or the environment?
8923
8924    # Try to remove the string !RM! from our list.
8925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8927      # If it failed, the variable was not from the command line. Ignore it,
8928      # but warn the user (except for BASH, which is always set by the calling BASH).
8929      if test "xRM" != xBASH; then
8930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8931$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8932      fi
8933      # Try to locate tool using the code snippet
8934      for ac_prog in rm
8935do
8936  # Extract the first word of "$ac_prog", so it can be a program name with args.
8937set dummy $ac_prog; ac_word=$2
8938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939$as_echo_n "checking for $ac_word... " >&6; }
8940if ${ac_cv_path_RM+:} false; then :
8941  $as_echo_n "(cached) " >&6
8942else
8943  case $RM in
8944  [\\/]* | ?:[\\/]*)
8945  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8946  ;;
8947  *)
8948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951  IFS=$as_save_IFS
8952  test -z "$as_dir" && as_dir=.
8953    for ac_exec_ext in '' $ac_executable_extensions; do
8954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8955    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957    break 2
8958  fi
8959done
8960  done
8961IFS=$as_save_IFS
8962
8963  ;;
8964esac
8965fi
8966RM=$ac_cv_path_RM
8967if test -n "$RM"; then
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8969$as_echo "$RM" >&6; }
8970else
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976  test -n "$RM" && break
8977done
8978
8979    else
8980      # If it succeeded, then it was overridden by the user. We will use it
8981      # for the tool.
8982
8983      # First remove it from the list of overridden variables, so we can test
8984      # for unknown variables in the end.
8985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8986
8987      # Check if the provided tool contains a complete path.
8988      tool_specified="$RM"
8989      tool_basename="${tool_specified##*/}"
8990      if test "x$tool_basename" = "x$tool_specified"; then
8991        # A command without a complete path is provided, search $PATH.
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8993$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8994        # Extract the first word of "$tool_basename", so it can be a program name with args.
8995set dummy $tool_basename; ac_word=$2
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997$as_echo_n "checking for $ac_word... " >&6; }
8998if ${ac_cv_path_RM+:} false; then :
8999  $as_echo_n "(cached) " >&6
9000else
9001  case $RM in
9002  [\\/]* | ?:[\\/]*)
9003  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9004  ;;
9005  *)
9006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007for as_dir in $PATH
9008do
9009  IFS=$as_save_IFS
9010  test -z "$as_dir" && as_dir=.
9011    for ac_exec_ext in '' $ac_executable_extensions; do
9012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015    break 2
9016  fi
9017done
9018  done
9019IFS=$as_save_IFS
9020
9021  ;;
9022esac
9023fi
9024RM=$ac_cv_path_RM
9025if test -n "$RM"; then
9026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9027$as_echo "$RM" >&6; }
9028else
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030$as_echo "no" >&6; }
9031fi
9032
9033
9034        if test "x$RM" = x; then
9035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9036        fi
9037      else
9038        # Otherwise we believe it is a complete path. Use it as it is.
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9040$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9042$as_echo_n "checking for RM... " >&6; }
9043        if test ! -x "$tool_specified"; then
9044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9045$as_echo "not found" >&6; }
9046          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9047        fi
9048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9049$as_echo "$tool_specified" >&6; }
9050      fi
9051    fi
9052  fi
9053
9054
9055
9056  if test "x$RM" = x; then
9057    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9058  fi
9059
9060
9061
9062
9063
9064  # Publish this variable in the help.
9065
9066
9067  if test "x$SH" = x; then
9068    # The variable is not set by user, try to locate tool using the code snippet
9069    for ac_prog in sh
9070do
9071  # Extract the first word of "$ac_prog", so it can be a program name with args.
9072set dummy $ac_prog; ac_word=$2
9073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9074$as_echo_n "checking for $ac_word... " >&6; }
9075if ${ac_cv_path_SH+:} false; then :
9076  $as_echo_n "(cached) " >&6
9077else
9078  case $SH in
9079  [\\/]* | ?:[\\/]*)
9080  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9081  ;;
9082  *)
9083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9084for as_dir in $PATH
9085do
9086  IFS=$as_save_IFS
9087  test -z "$as_dir" && as_dir=.
9088    for ac_exec_ext in '' $ac_executable_extensions; do
9089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9090    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9092    break 2
9093  fi
9094done
9095  done
9096IFS=$as_save_IFS
9097
9098  ;;
9099esac
9100fi
9101SH=$ac_cv_path_SH
9102if test -n "$SH"; then
9103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9104$as_echo "$SH" >&6; }
9105else
9106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107$as_echo "no" >&6; }
9108fi
9109
9110
9111  test -n "$SH" && break
9112done
9113
9114  else
9115    # The variable is set, but is it from the command line or the environment?
9116
9117    # Try to remove the string !SH! from our list.
9118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9120      # If it failed, the variable was not from the command line. Ignore it,
9121      # but warn the user (except for BASH, which is always set by the calling BASH).
9122      if test "xSH" != xBASH; then
9123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9124$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9125      fi
9126      # Try to locate tool using the code snippet
9127      for ac_prog in sh
9128do
9129  # Extract the first word of "$ac_prog", so it can be a program name with args.
9130set dummy $ac_prog; ac_word=$2
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132$as_echo_n "checking for $ac_word... " >&6; }
9133if ${ac_cv_path_SH+:} false; then :
9134  $as_echo_n "(cached) " >&6
9135else
9136  case $SH in
9137  [\\/]* | ?:[\\/]*)
9138  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9139  ;;
9140  *)
9141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142for as_dir in $PATH
9143do
9144  IFS=$as_save_IFS
9145  test -z "$as_dir" && as_dir=.
9146    for ac_exec_ext in '' $ac_executable_extensions; do
9147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150    break 2
9151  fi
9152done
9153  done
9154IFS=$as_save_IFS
9155
9156  ;;
9157esac
9158fi
9159SH=$ac_cv_path_SH
9160if test -n "$SH"; then
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9162$as_echo "$SH" >&6; }
9163else
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
9166fi
9167
9168
9169  test -n "$SH" && break
9170done
9171
9172    else
9173      # If it succeeded, then it was overridden by the user. We will use it
9174      # for the tool.
9175
9176      # First remove it from the list of overridden variables, so we can test
9177      # for unknown variables in the end.
9178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9179
9180      # Check if the provided tool contains a complete path.
9181      tool_specified="$SH"
9182      tool_basename="${tool_specified##*/}"
9183      if test "x$tool_basename" = "x$tool_specified"; then
9184        # A command without a complete path is provided, search $PATH.
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9186$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9187        # Extract the first word of "$tool_basename", so it can be a program name with args.
9188set dummy $tool_basename; ac_word=$2
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190$as_echo_n "checking for $ac_word... " >&6; }
9191if ${ac_cv_path_SH+:} false; then :
9192  $as_echo_n "(cached) " >&6
9193else
9194  case $SH in
9195  [\\/]* | ?:[\\/]*)
9196  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9197  ;;
9198  *)
9199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9200for as_dir in $PATH
9201do
9202  IFS=$as_save_IFS
9203  test -z "$as_dir" && as_dir=.
9204    for ac_exec_ext in '' $ac_executable_extensions; do
9205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9206    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9208    break 2
9209  fi
9210done
9211  done
9212IFS=$as_save_IFS
9213
9214  ;;
9215esac
9216fi
9217SH=$ac_cv_path_SH
9218if test -n "$SH"; then
9219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9220$as_echo "$SH" >&6; }
9221else
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223$as_echo "no" >&6; }
9224fi
9225
9226
9227        if test "x$SH" = x; then
9228          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9229        fi
9230      else
9231        # Otherwise we believe it is a complete path. Use it as it is.
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9233$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9235$as_echo_n "checking for SH... " >&6; }
9236        if test ! -x "$tool_specified"; then
9237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9238$as_echo "not found" >&6; }
9239          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9240        fi
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9242$as_echo "$tool_specified" >&6; }
9243      fi
9244    fi
9245  fi
9246
9247
9248
9249  if test "x$SH" = x; then
9250    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9251  fi
9252
9253
9254
9255
9256
9257  # Publish this variable in the help.
9258
9259
9260  if test "x$SORT" = x; then
9261    # The variable is not set by user, try to locate tool using the code snippet
9262    for ac_prog in sort
9263do
9264  # Extract the first word of "$ac_prog", so it can be a program name with args.
9265set dummy $ac_prog; ac_word=$2
9266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9267$as_echo_n "checking for $ac_word... " >&6; }
9268if ${ac_cv_path_SORT+:} false; then :
9269  $as_echo_n "(cached) " >&6
9270else
9271  case $SORT in
9272  [\\/]* | ?:[\\/]*)
9273  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9274  ;;
9275  *)
9276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9277for as_dir in $PATH
9278do
9279  IFS=$as_save_IFS
9280  test -z "$as_dir" && as_dir=.
9281    for ac_exec_ext in '' $ac_executable_extensions; do
9282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9283    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9285    break 2
9286  fi
9287done
9288  done
9289IFS=$as_save_IFS
9290
9291  ;;
9292esac
9293fi
9294SORT=$ac_cv_path_SORT
9295if test -n "$SORT"; then
9296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9297$as_echo "$SORT" >&6; }
9298else
9299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300$as_echo "no" >&6; }
9301fi
9302
9303
9304  test -n "$SORT" && break
9305done
9306
9307  else
9308    # The variable is set, but is it from the command line or the environment?
9309
9310    # Try to remove the string !SORT! from our list.
9311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9313      # If it failed, the variable was not from the command line. Ignore it,
9314      # but warn the user (except for BASH, which is always set by the calling BASH).
9315      if test "xSORT" != xBASH; then
9316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9317$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9318      fi
9319      # Try to locate tool using the code snippet
9320      for ac_prog in sort
9321do
9322  # Extract the first word of "$ac_prog", so it can be a program name with args.
9323set dummy $ac_prog; ac_word=$2
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325$as_echo_n "checking for $ac_word... " >&6; }
9326if ${ac_cv_path_SORT+:} false; then :
9327  $as_echo_n "(cached) " >&6
9328else
9329  case $SORT in
9330  [\\/]* | ?:[\\/]*)
9331  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9332  ;;
9333  *)
9334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337  IFS=$as_save_IFS
9338  test -z "$as_dir" && as_dir=.
9339    for ac_exec_ext in '' $ac_executable_extensions; do
9340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343    break 2
9344  fi
9345done
9346  done
9347IFS=$as_save_IFS
9348
9349  ;;
9350esac
9351fi
9352SORT=$ac_cv_path_SORT
9353if test -n "$SORT"; then
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9355$as_echo "$SORT" >&6; }
9356else
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
9359fi
9360
9361
9362  test -n "$SORT" && break
9363done
9364
9365    else
9366      # If it succeeded, then it was overridden by the user. We will use it
9367      # for the tool.
9368
9369      # First remove it from the list of overridden variables, so we can test
9370      # for unknown variables in the end.
9371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9372
9373      # Check if the provided tool contains a complete path.
9374      tool_specified="$SORT"
9375      tool_basename="${tool_specified##*/}"
9376      if test "x$tool_basename" = "x$tool_specified"; then
9377        # A command without a complete path is provided, search $PATH.
9378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9379$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9380        # Extract the first word of "$tool_basename", so it can be a program name with args.
9381set dummy $tool_basename; ac_word=$2
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383$as_echo_n "checking for $ac_word... " >&6; }
9384if ${ac_cv_path_SORT+:} false; then :
9385  $as_echo_n "(cached) " >&6
9386else
9387  case $SORT in
9388  [\\/]* | ?:[\\/]*)
9389  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9390  ;;
9391  *)
9392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393for as_dir in $PATH
9394do
9395  IFS=$as_save_IFS
9396  test -z "$as_dir" && as_dir=.
9397    for ac_exec_ext in '' $ac_executable_extensions; do
9398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401    break 2
9402  fi
9403done
9404  done
9405IFS=$as_save_IFS
9406
9407  ;;
9408esac
9409fi
9410SORT=$ac_cv_path_SORT
9411if test -n "$SORT"; then
9412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9413$as_echo "$SORT" >&6; }
9414else
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
9417fi
9418
9419
9420        if test "x$SORT" = x; then
9421          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9422        fi
9423      else
9424        # Otherwise we believe it is a complete path. Use it as it is.
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9426$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9428$as_echo_n "checking for SORT... " >&6; }
9429        if test ! -x "$tool_specified"; then
9430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9431$as_echo "not found" >&6; }
9432          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9433        fi
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9435$as_echo "$tool_specified" >&6; }
9436      fi
9437    fi
9438  fi
9439
9440
9441
9442  if test "x$SORT" = x; then
9443    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9444  fi
9445
9446
9447
9448
9449
9450  # Publish this variable in the help.
9451
9452
9453  if test "x$TAIL" = x; then
9454    # The variable is not set by user, try to locate tool using the code snippet
9455    for ac_prog in tail
9456do
9457  # Extract the first word of "$ac_prog", so it can be a program name with args.
9458set dummy $ac_prog; ac_word=$2
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9460$as_echo_n "checking for $ac_word... " >&6; }
9461if ${ac_cv_path_TAIL+:} false; then :
9462  $as_echo_n "(cached) " >&6
9463else
9464  case $TAIL in
9465  [\\/]* | ?:[\\/]*)
9466  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9467  ;;
9468  *)
9469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9470for as_dir in $PATH
9471do
9472  IFS=$as_save_IFS
9473  test -z "$as_dir" && as_dir=.
9474    for ac_exec_ext in '' $ac_executable_extensions; do
9475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9476    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9478    break 2
9479  fi
9480done
9481  done
9482IFS=$as_save_IFS
9483
9484  ;;
9485esac
9486fi
9487TAIL=$ac_cv_path_TAIL
9488if test -n "$TAIL"; then
9489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9490$as_echo "$TAIL" >&6; }
9491else
9492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9493$as_echo "no" >&6; }
9494fi
9495
9496
9497  test -n "$TAIL" && break
9498done
9499
9500  else
9501    # The variable is set, but is it from the command line or the environment?
9502
9503    # Try to remove the string !TAIL! from our list.
9504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9506      # If it failed, the variable was not from the command line. Ignore it,
9507      # but warn the user (except for BASH, which is always set by the calling BASH).
9508      if test "xTAIL" != xBASH; then
9509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9510$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9511      fi
9512      # Try to locate tool using the code snippet
9513      for ac_prog in tail
9514do
9515  # Extract the first word of "$ac_prog", so it can be a program name with args.
9516set dummy $ac_prog; ac_word=$2
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518$as_echo_n "checking for $ac_word... " >&6; }
9519if ${ac_cv_path_TAIL+:} false; then :
9520  $as_echo_n "(cached) " >&6
9521else
9522  case $TAIL in
9523  [\\/]* | ?:[\\/]*)
9524  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9525  ;;
9526  *)
9527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528for as_dir in $PATH
9529do
9530  IFS=$as_save_IFS
9531  test -z "$as_dir" && as_dir=.
9532    for ac_exec_ext in '' $ac_executable_extensions; do
9533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536    break 2
9537  fi
9538done
9539  done
9540IFS=$as_save_IFS
9541
9542  ;;
9543esac
9544fi
9545TAIL=$ac_cv_path_TAIL
9546if test -n "$TAIL"; then
9547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9548$as_echo "$TAIL" >&6; }
9549else
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
9552fi
9553
9554
9555  test -n "$TAIL" && break
9556done
9557
9558    else
9559      # If it succeeded, then it was overridden by the user. We will use it
9560      # for the tool.
9561
9562      # First remove it from the list of overridden variables, so we can test
9563      # for unknown variables in the end.
9564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9565
9566      # Check if the provided tool contains a complete path.
9567      tool_specified="$TAIL"
9568      tool_basename="${tool_specified##*/}"
9569      if test "x$tool_basename" = "x$tool_specified"; then
9570        # A command without a complete path is provided, search $PATH.
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9572$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9573        # Extract the first word of "$tool_basename", so it can be a program name with args.
9574set dummy $tool_basename; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_TAIL+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $TAIL in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603TAIL=$ac_cv_path_TAIL
9604if test -n "$TAIL"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9606$as_echo "$TAIL" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613        if test "x$TAIL" = x; then
9614          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9615        fi
9616      else
9617        # Otherwise we believe it is a complete path. Use it as it is.
9618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9619$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9621$as_echo_n "checking for TAIL... " >&6; }
9622        if test ! -x "$tool_specified"; then
9623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9624$as_echo "not found" >&6; }
9625          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9626        fi
9627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9628$as_echo "$tool_specified" >&6; }
9629      fi
9630    fi
9631  fi
9632
9633
9634
9635  if test "x$TAIL" = x; then
9636    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9637  fi
9638
9639
9640
9641
9642
9643  # Publish this variable in the help.
9644
9645
9646  if test "x$TAR" = x; then
9647    # The variable is not set by user, try to locate tool using the code snippet
9648    for ac_prog in tar
9649do
9650  # Extract the first word of "$ac_prog", so it can be a program name with args.
9651set dummy $ac_prog; ac_word=$2
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653$as_echo_n "checking for $ac_word... " >&6; }
9654if ${ac_cv_path_TAR+:} false; then :
9655  $as_echo_n "(cached) " >&6
9656else
9657  case $TAR in
9658  [\\/]* | ?:[\\/]*)
9659  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9660  ;;
9661  *)
9662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663for as_dir in $PATH
9664do
9665  IFS=$as_save_IFS
9666  test -z "$as_dir" && as_dir=.
9667    for ac_exec_ext in '' $ac_executable_extensions; do
9668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671    break 2
9672  fi
9673done
9674  done
9675IFS=$as_save_IFS
9676
9677  ;;
9678esac
9679fi
9680TAR=$ac_cv_path_TAR
9681if test -n "$TAR"; then
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9683$as_echo "$TAR" >&6; }
9684else
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
9687fi
9688
9689
9690  test -n "$TAR" && break
9691done
9692
9693  else
9694    # The variable is set, but is it from the command line or the environment?
9695
9696    # Try to remove the string !TAR! from our list.
9697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9699      # If it failed, the variable was not from the command line. Ignore it,
9700      # but warn the user (except for BASH, which is always set by the calling BASH).
9701      if test "xTAR" != xBASH; then
9702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9703$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9704      fi
9705      # Try to locate tool using the code snippet
9706      for ac_prog in tar
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if ${ac_cv_path_TAR+:} false; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $TAR in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738TAR=$ac_cv_path_TAR
9739if test -n "$TAR"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9741$as_echo "$TAR" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$TAR" && break
9749done
9750
9751    else
9752      # If it succeeded, then it was overridden by the user. We will use it
9753      # for the tool.
9754
9755      # First remove it from the list of overridden variables, so we can test
9756      # for unknown variables in the end.
9757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9758
9759      # Check if the provided tool contains a complete path.
9760      tool_specified="$TAR"
9761      tool_basename="${tool_specified##*/}"
9762      if test "x$tool_basename" = "x$tool_specified"; then
9763        # A command without a complete path is provided, search $PATH.
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9765$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9766        # Extract the first word of "$tool_basename", so it can be a program name with args.
9767set dummy $tool_basename; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_TAR+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $TAR in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796TAR=$ac_cv_path_TAR
9797if test -n "$TAR"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9799$as_echo "$TAR" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806        if test "x$TAR" = x; then
9807          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9808        fi
9809      else
9810        # Otherwise we believe it is a complete path. Use it as it is.
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9812$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9814$as_echo_n "checking for TAR... " >&6; }
9815        if test ! -x "$tool_specified"; then
9816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9817$as_echo "not found" >&6; }
9818          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9819        fi
9820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9821$as_echo "$tool_specified" >&6; }
9822      fi
9823    fi
9824  fi
9825
9826
9827
9828  if test "x$TAR" = x; then
9829    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9830  fi
9831
9832
9833
9834
9835
9836  # Publish this variable in the help.
9837
9838
9839  if test "x$TEE" = x; then
9840    # The variable is not set by user, try to locate tool using the code snippet
9841    for ac_prog in tee
9842do
9843  # Extract the first word of "$ac_prog", so it can be a program name with args.
9844set dummy $ac_prog; ac_word=$2
9845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9846$as_echo_n "checking for $ac_word... " >&6; }
9847if ${ac_cv_path_TEE+:} false; then :
9848  $as_echo_n "(cached) " >&6
9849else
9850  case $TEE in
9851  [\\/]* | ?:[\\/]*)
9852  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9853  ;;
9854  *)
9855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9856for as_dir in $PATH
9857do
9858  IFS=$as_save_IFS
9859  test -z "$as_dir" && as_dir=.
9860    for ac_exec_ext in '' $ac_executable_extensions; do
9861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9862    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9864    break 2
9865  fi
9866done
9867  done
9868IFS=$as_save_IFS
9869
9870  ;;
9871esac
9872fi
9873TEE=$ac_cv_path_TEE
9874if test -n "$TEE"; then
9875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9876$as_echo "$TEE" >&6; }
9877else
9878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9879$as_echo "no" >&6; }
9880fi
9881
9882
9883  test -n "$TEE" && break
9884done
9885
9886  else
9887    # The variable is set, but is it from the command line or the environment?
9888
9889    # Try to remove the string !TEE! from our list.
9890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9892      # If it failed, the variable was not from the command line. Ignore it,
9893      # but warn the user (except for BASH, which is always set by the calling BASH).
9894      if test "xTEE" != xBASH; then
9895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9896$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9897      fi
9898      # Try to locate tool using the code snippet
9899      for ac_prog in tee
9900do
9901  # Extract the first word of "$ac_prog", so it can be a program name with args.
9902set dummy $ac_prog; ac_word=$2
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904$as_echo_n "checking for $ac_word... " >&6; }
9905if ${ac_cv_path_TEE+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  case $TEE in
9909  [\\/]* | ?:[\\/]*)
9910  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9911  ;;
9912  *)
9913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914for as_dir in $PATH
9915do
9916  IFS=$as_save_IFS
9917  test -z "$as_dir" && as_dir=.
9918    for ac_exec_ext in '' $ac_executable_extensions; do
9919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922    break 2
9923  fi
9924done
9925  done
9926IFS=$as_save_IFS
9927
9928  ;;
9929esac
9930fi
9931TEE=$ac_cv_path_TEE
9932if test -n "$TEE"; then
9933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9934$as_echo "$TEE" >&6; }
9935else
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
9938fi
9939
9940
9941  test -n "$TEE" && break
9942done
9943
9944    else
9945      # If it succeeded, then it was overridden by the user. We will use it
9946      # for the tool.
9947
9948      # First remove it from the list of overridden variables, so we can test
9949      # for unknown variables in the end.
9950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9951
9952      # Check if the provided tool contains a complete path.
9953      tool_specified="$TEE"
9954      tool_basename="${tool_specified##*/}"
9955      if test "x$tool_basename" = "x$tool_specified"; then
9956        # A command without a complete path is provided, search $PATH.
9957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9958$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9959        # Extract the first word of "$tool_basename", so it can be a program name with args.
9960set dummy $tool_basename; ac_word=$2
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9962$as_echo_n "checking for $ac_word... " >&6; }
9963if ${ac_cv_path_TEE+:} false; then :
9964  $as_echo_n "(cached) " >&6
9965else
9966  case $TEE in
9967  [\\/]* | ?:[\\/]*)
9968  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9969  ;;
9970  *)
9971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9972for as_dir in $PATH
9973do
9974  IFS=$as_save_IFS
9975  test -z "$as_dir" && as_dir=.
9976    for ac_exec_ext in '' $ac_executable_extensions; do
9977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9978    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9980    break 2
9981  fi
9982done
9983  done
9984IFS=$as_save_IFS
9985
9986  ;;
9987esac
9988fi
9989TEE=$ac_cv_path_TEE
9990if test -n "$TEE"; then
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9992$as_echo "$TEE" >&6; }
9993else
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
9996fi
9997
9998
9999        if test "x$TEE" = x; then
10000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10001        fi
10002      else
10003        # Otherwise we believe it is a complete path. Use it as it is.
10004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10005$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10007$as_echo_n "checking for TEE... " >&6; }
10008        if test ! -x "$tool_specified"; then
10009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10010$as_echo "not found" >&6; }
10011          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10012        fi
10013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10014$as_echo "$tool_specified" >&6; }
10015      fi
10016    fi
10017  fi
10018
10019
10020
10021  if test "x$TEE" = x; then
10022    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10023  fi
10024
10025
10026
10027
10028
10029  # Publish this variable in the help.
10030
10031
10032  if test "x$TOUCH" = x; then
10033    # The variable is not set by user, try to locate tool using the code snippet
10034    for ac_prog in touch
10035do
10036  # Extract the first word of "$ac_prog", so it can be a program name with args.
10037set dummy $ac_prog; ac_word=$2
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039$as_echo_n "checking for $ac_word... " >&6; }
10040if ${ac_cv_path_TOUCH+:} false; then :
10041  $as_echo_n "(cached) " >&6
10042else
10043  case $TOUCH in
10044  [\\/]* | ?:[\\/]*)
10045  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10046  ;;
10047  *)
10048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049for as_dir in $PATH
10050do
10051  IFS=$as_save_IFS
10052  test -z "$as_dir" && as_dir=.
10053    for ac_exec_ext in '' $ac_executable_extensions; do
10054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057    break 2
10058  fi
10059done
10060  done
10061IFS=$as_save_IFS
10062
10063  ;;
10064esac
10065fi
10066TOUCH=$ac_cv_path_TOUCH
10067if test -n "$TOUCH"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10069$as_echo "$TOUCH" >&6; }
10070else
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076  test -n "$TOUCH" && break
10077done
10078
10079  else
10080    # The variable is set, but is it from the command line or the environment?
10081
10082    # Try to remove the string !TOUCH! from our list.
10083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10085      # If it failed, the variable was not from the command line. Ignore it,
10086      # but warn the user (except for BASH, which is always set by the calling BASH).
10087      if test "xTOUCH" != xBASH; then
10088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10089$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10090      fi
10091      # Try to locate tool using the code snippet
10092      for ac_prog in touch
10093do
10094  # Extract the first word of "$ac_prog", so it can be a program name with args.
10095set dummy $ac_prog; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_TOUCH+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $TOUCH in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  ;;
10122esac
10123fi
10124TOUCH=$ac_cv_path_TOUCH
10125if test -n "$TOUCH"; then
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10127$as_echo "$TOUCH" >&6; }
10128else
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134  test -n "$TOUCH" && break
10135done
10136
10137    else
10138      # If it succeeded, then it was overridden by the user. We will use it
10139      # for the tool.
10140
10141      # First remove it from the list of overridden variables, so we can test
10142      # for unknown variables in the end.
10143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10144
10145      # Check if the provided tool contains a complete path.
10146      tool_specified="$TOUCH"
10147      tool_basename="${tool_specified##*/}"
10148      if test "x$tool_basename" = "x$tool_specified"; then
10149        # A command without a complete path is provided, search $PATH.
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10151$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10152        # Extract the first word of "$tool_basename", so it can be a program name with args.
10153set dummy $tool_basename; ac_word=$2
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155$as_echo_n "checking for $ac_word... " >&6; }
10156if ${ac_cv_path_TOUCH+:} false; then :
10157  $as_echo_n "(cached) " >&6
10158else
10159  case $TOUCH in
10160  [\\/]* | ?:[\\/]*)
10161  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10162  ;;
10163  *)
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  test -z "$as_dir" && as_dir=.
10169    for ac_exec_ext in '' $ac_executable_extensions; do
10170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10171    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173    break 2
10174  fi
10175done
10176  done
10177IFS=$as_save_IFS
10178
10179  ;;
10180esac
10181fi
10182TOUCH=$ac_cv_path_TOUCH
10183if test -n "$TOUCH"; then
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10185$as_echo "$TOUCH" >&6; }
10186else
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
10189fi
10190
10191
10192        if test "x$TOUCH" = x; then
10193          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10194        fi
10195      else
10196        # Otherwise we believe it is a complete path. Use it as it is.
10197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10198$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10200$as_echo_n "checking for TOUCH... " >&6; }
10201        if test ! -x "$tool_specified"; then
10202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10203$as_echo "not found" >&6; }
10204          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10205        fi
10206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10207$as_echo "$tool_specified" >&6; }
10208      fi
10209    fi
10210  fi
10211
10212
10213
10214  if test "x$TOUCH" = x; then
10215    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10216  fi
10217
10218
10219
10220
10221
10222  # Publish this variable in the help.
10223
10224
10225  if test "x$TR" = x; then
10226    # The variable is not set by user, try to locate tool using the code snippet
10227    for ac_prog in tr
10228do
10229  # Extract the first word of "$ac_prog", so it can be a program name with args.
10230set dummy $ac_prog; ac_word=$2
10231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10232$as_echo_n "checking for $ac_word... " >&6; }
10233if ${ac_cv_path_TR+:} false; then :
10234  $as_echo_n "(cached) " >&6
10235else
10236  case $TR in
10237  [\\/]* | ?:[\\/]*)
10238  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10239  ;;
10240  *)
10241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10242for as_dir in $PATH
10243do
10244  IFS=$as_save_IFS
10245  test -z "$as_dir" && as_dir=.
10246    for ac_exec_ext in '' $ac_executable_extensions; do
10247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10248    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10250    break 2
10251  fi
10252done
10253  done
10254IFS=$as_save_IFS
10255
10256  ;;
10257esac
10258fi
10259TR=$ac_cv_path_TR
10260if test -n "$TR"; then
10261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10262$as_echo "$TR" >&6; }
10263else
10264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10265$as_echo "no" >&6; }
10266fi
10267
10268
10269  test -n "$TR" && break
10270done
10271
10272  else
10273    # The variable is set, but is it from the command line or the environment?
10274
10275    # Try to remove the string !TR! from our list.
10276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10278      # If it failed, the variable was not from the command line. Ignore it,
10279      # but warn the user (except for BASH, which is always set by the calling BASH).
10280      if test "xTR" != xBASH; then
10281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10282$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10283      fi
10284      # Try to locate tool using the code snippet
10285      for ac_prog in tr
10286do
10287  # Extract the first word of "$ac_prog", so it can be a program name with args.
10288set dummy $ac_prog; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
10291if ${ac_cv_path_TR+:} false; then :
10292  $as_echo_n "(cached) " >&6
10293else
10294  case $TR in
10295  [\\/]* | ?:[\\/]*)
10296  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10297  ;;
10298  *)
10299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300for as_dir in $PATH
10301do
10302  IFS=$as_save_IFS
10303  test -z "$as_dir" && as_dir=.
10304    for ac_exec_ext in '' $ac_executable_extensions; do
10305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308    break 2
10309  fi
10310done
10311  done
10312IFS=$as_save_IFS
10313
10314  ;;
10315esac
10316fi
10317TR=$ac_cv_path_TR
10318if test -n "$TR"; then
10319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10320$as_echo "$TR" >&6; }
10321else
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
10324fi
10325
10326
10327  test -n "$TR" && break
10328done
10329
10330    else
10331      # If it succeeded, then it was overridden by the user. We will use it
10332      # for the tool.
10333
10334      # First remove it from the list of overridden variables, so we can test
10335      # for unknown variables in the end.
10336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10337
10338      # Check if the provided tool contains a complete path.
10339      tool_specified="$TR"
10340      tool_basename="${tool_specified##*/}"
10341      if test "x$tool_basename" = "x$tool_specified"; then
10342        # A command without a complete path is provided, search $PATH.
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10344$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10345        # Extract the first word of "$tool_basename", so it can be a program name with args.
10346set dummy $tool_basename; ac_word=$2
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348$as_echo_n "checking for $ac_word... " >&6; }
10349if ${ac_cv_path_TR+:} false; then :
10350  $as_echo_n "(cached) " >&6
10351else
10352  case $TR in
10353  [\\/]* | ?:[\\/]*)
10354  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10355  ;;
10356  *)
10357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358for as_dir in $PATH
10359do
10360  IFS=$as_save_IFS
10361  test -z "$as_dir" && as_dir=.
10362    for ac_exec_ext in '' $ac_executable_extensions; do
10363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366    break 2
10367  fi
10368done
10369  done
10370IFS=$as_save_IFS
10371
10372  ;;
10373esac
10374fi
10375TR=$ac_cv_path_TR
10376if test -n "$TR"; then
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10378$as_echo "$TR" >&6; }
10379else
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382fi
10383
10384
10385        if test "x$TR" = x; then
10386          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10387        fi
10388      else
10389        # Otherwise we believe it is a complete path. Use it as it is.
10390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10391$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10393$as_echo_n "checking for TR... " >&6; }
10394        if test ! -x "$tool_specified"; then
10395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10396$as_echo "not found" >&6; }
10397          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10398        fi
10399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10400$as_echo "$tool_specified" >&6; }
10401      fi
10402    fi
10403  fi
10404
10405
10406
10407  if test "x$TR" = x; then
10408    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10409  fi
10410
10411
10412
10413
10414
10415  # Publish this variable in the help.
10416
10417
10418  if test "x$UNAME" = x; then
10419    # The variable is not set by user, try to locate tool using the code snippet
10420    for ac_prog in uname
10421do
10422  # Extract the first word of "$ac_prog", so it can be a program name with args.
10423set dummy $ac_prog; ac_word=$2
10424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425$as_echo_n "checking for $ac_word... " >&6; }
10426if ${ac_cv_path_UNAME+:} false; then :
10427  $as_echo_n "(cached) " >&6
10428else
10429  case $UNAME in
10430  [\\/]* | ?:[\\/]*)
10431  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10432  ;;
10433  *)
10434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437  IFS=$as_save_IFS
10438  test -z "$as_dir" && as_dir=.
10439    for ac_exec_ext in '' $ac_executable_extensions; do
10440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443    break 2
10444  fi
10445done
10446  done
10447IFS=$as_save_IFS
10448
10449  ;;
10450esac
10451fi
10452UNAME=$ac_cv_path_UNAME
10453if test -n "$UNAME"; then
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10455$as_echo "$UNAME" >&6; }
10456else
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
10459fi
10460
10461
10462  test -n "$UNAME" && break
10463done
10464
10465  else
10466    # The variable is set, but is it from the command line or the environment?
10467
10468    # Try to remove the string !UNAME! from our list.
10469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10471      # If it failed, the variable was not from the command line. Ignore it,
10472      # but warn the user (except for BASH, which is always set by the calling BASH).
10473      if test "xUNAME" != xBASH; then
10474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10475$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10476      fi
10477      # Try to locate tool using the code snippet
10478      for ac_prog in uname
10479do
10480  # Extract the first word of "$ac_prog", so it can be a program name with args.
10481set dummy $ac_prog; ac_word=$2
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483$as_echo_n "checking for $ac_word... " >&6; }
10484if ${ac_cv_path_UNAME+:} false; then :
10485  $as_echo_n "(cached) " >&6
10486else
10487  case $UNAME in
10488  [\\/]* | ?:[\\/]*)
10489  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10490  ;;
10491  *)
10492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493for as_dir in $PATH
10494do
10495  IFS=$as_save_IFS
10496  test -z "$as_dir" && as_dir=.
10497    for ac_exec_ext in '' $ac_executable_extensions; do
10498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501    break 2
10502  fi
10503done
10504  done
10505IFS=$as_save_IFS
10506
10507  ;;
10508esac
10509fi
10510UNAME=$ac_cv_path_UNAME
10511if test -n "$UNAME"; then
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10513$as_echo "$UNAME" >&6; }
10514else
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
10517fi
10518
10519
10520  test -n "$UNAME" && break
10521done
10522
10523    else
10524      # If it succeeded, then it was overridden by the user. We will use it
10525      # for the tool.
10526
10527      # First remove it from the list of overridden variables, so we can test
10528      # for unknown variables in the end.
10529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10530
10531      # Check if the provided tool contains a complete path.
10532      tool_specified="$UNAME"
10533      tool_basename="${tool_specified##*/}"
10534      if test "x$tool_basename" = "x$tool_specified"; then
10535        # A command without a complete path is provided, search $PATH.
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10537$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10538        # Extract the first word of "$tool_basename", so it can be a program name with args.
10539set dummy $tool_basename; ac_word=$2
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10541$as_echo_n "checking for $ac_word... " >&6; }
10542if ${ac_cv_path_UNAME+:} false; then :
10543  $as_echo_n "(cached) " >&6
10544else
10545  case $UNAME in
10546  [\\/]* | ?:[\\/]*)
10547  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10548  ;;
10549  *)
10550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10551for as_dir in $PATH
10552do
10553  IFS=$as_save_IFS
10554  test -z "$as_dir" && as_dir=.
10555    for ac_exec_ext in '' $ac_executable_extensions; do
10556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10557    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10559    break 2
10560  fi
10561done
10562  done
10563IFS=$as_save_IFS
10564
10565  ;;
10566esac
10567fi
10568UNAME=$ac_cv_path_UNAME
10569if test -n "$UNAME"; then
10570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10571$as_echo "$UNAME" >&6; }
10572else
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574$as_echo "no" >&6; }
10575fi
10576
10577
10578        if test "x$UNAME" = x; then
10579          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10580        fi
10581      else
10582        # Otherwise we believe it is a complete path. Use it as it is.
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10584$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10586$as_echo_n "checking for UNAME... " >&6; }
10587        if test ! -x "$tool_specified"; then
10588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10589$as_echo "not found" >&6; }
10590          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10591        fi
10592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10593$as_echo "$tool_specified" >&6; }
10594      fi
10595    fi
10596  fi
10597
10598
10599
10600  if test "x$UNAME" = x; then
10601    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10602  fi
10603
10604
10605
10606
10607
10608  # Publish this variable in the help.
10609
10610
10611  if test "x$UNIQ" = x; then
10612    # The variable is not set by user, try to locate tool using the code snippet
10613    for ac_prog in uniq
10614do
10615  # Extract the first word of "$ac_prog", so it can be a program name with args.
10616set dummy $ac_prog; ac_word=$2
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10618$as_echo_n "checking for $ac_word... " >&6; }
10619if ${ac_cv_path_UNIQ+:} false; then :
10620  $as_echo_n "(cached) " >&6
10621else
10622  case $UNIQ in
10623  [\\/]* | ?:[\\/]*)
10624  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10625  ;;
10626  *)
10627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10628for as_dir in $PATH
10629do
10630  IFS=$as_save_IFS
10631  test -z "$as_dir" && as_dir=.
10632    for ac_exec_ext in '' $ac_executable_extensions; do
10633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10634    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10636    break 2
10637  fi
10638done
10639  done
10640IFS=$as_save_IFS
10641
10642  ;;
10643esac
10644fi
10645UNIQ=$ac_cv_path_UNIQ
10646if test -n "$UNIQ"; then
10647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10648$as_echo "$UNIQ" >&6; }
10649else
10650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10651$as_echo "no" >&6; }
10652fi
10653
10654
10655  test -n "$UNIQ" && break
10656done
10657
10658  else
10659    # The variable is set, but is it from the command line or the environment?
10660
10661    # Try to remove the string !UNIQ! from our list.
10662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10664      # If it failed, the variable was not from the command line. Ignore it,
10665      # but warn the user (except for BASH, which is always set by the calling BASH).
10666      if test "xUNIQ" != xBASH; then
10667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10668$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10669      fi
10670      # Try to locate tool using the code snippet
10671      for ac_prog in uniq
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_UNIQ+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $UNIQ in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703UNIQ=$ac_cv_path_UNIQ
10704if test -n "$UNIQ"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10706$as_echo "$UNIQ" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$UNIQ" && break
10714done
10715
10716    else
10717      # If it succeeded, then it was overridden by the user. We will use it
10718      # for the tool.
10719
10720      # First remove it from the list of overridden variables, so we can test
10721      # for unknown variables in the end.
10722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10723
10724      # Check if the provided tool contains a complete path.
10725      tool_specified="$UNIQ"
10726      tool_basename="${tool_specified##*/}"
10727      if test "x$tool_basename" = "x$tool_specified"; then
10728        # A command without a complete path is provided, search $PATH.
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10730$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10731        # Extract the first word of "$tool_basename", so it can be a program name with args.
10732set dummy $tool_basename; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_UNIQ+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $UNIQ in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761UNIQ=$ac_cv_path_UNIQ
10762if test -n "$UNIQ"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10764$as_echo "$UNIQ" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771        if test "x$UNIQ" = x; then
10772          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10773        fi
10774      else
10775        # Otherwise we believe it is a complete path. Use it as it is.
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10777$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10779$as_echo_n "checking for UNIQ... " >&6; }
10780        if test ! -x "$tool_specified"; then
10781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10782$as_echo "not found" >&6; }
10783          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10784        fi
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10786$as_echo "$tool_specified" >&6; }
10787      fi
10788    fi
10789  fi
10790
10791
10792
10793  if test "x$UNIQ" = x; then
10794    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10795  fi
10796
10797
10798
10799
10800
10801  # Publish this variable in the help.
10802
10803
10804  if test "x$WC" = x; then
10805    # The variable is not set by user, try to locate tool using the code snippet
10806    for ac_prog in wc
10807do
10808  # Extract the first word of "$ac_prog", so it can be a program name with args.
10809set dummy $ac_prog; ac_word=$2
10810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10811$as_echo_n "checking for $ac_word... " >&6; }
10812if ${ac_cv_path_WC+:} false; then :
10813  $as_echo_n "(cached) " >&6
10814else
10815  case $WC in
10816  [\\/]* | ?:[\\/]*)
10817  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10818  ;;
10819  *)
10820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10821for as_dir in $PATH
10822do
10823  IFS=$as_save_IFS
10824  test -z "$as_dir" && as_dir=.
10825    for ac_exec_ext in '' $ac_executable_extensions; do
10826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10827    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10829    break 2
10830  fi
10831done
10832  done
10833IFS=$as_save_IFS
10834
10835  ;;
10836esac
10837fi
10838WC=$ac_cv_path_WC
10839if test -n "$WC"; then
10840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10841$as_echo "$WC" >&6; }
10842else
10843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10844$as_echo "no" >&6; }
10845fi
10846
10847
10848  test -n "$WC" && break
10849done
10850
10851  else
10852    # The variable is set, but is it from the command line or the environment?
10853
10854    # Try to remove the string !WC! from our list.
10855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10857      # If it failed, the variable was not from the command line. Ignore it,
10858      # but warn the user (except for BASH, which is always set by the calling BASH).
10859      if test "xWC" != xBASH; then
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10861$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10862      fi
10863      # Try to locate tool using the code snippet
10864      for ac_prog in wc
10865do
10866  # Extract the first word of "$ac_prog", so it can be a program name with args.
10867set dummy $ac_prog; ac_word=$2
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10869$as_echo_n "checking for $ac_word... " >&6; }
10870if ${ac_cv_path_WC+:} false; then :
10871  $as_echo_n "(cached) " >&6
10872else
10873  case $WC in
10874  [\\/]* | ?:[\\/]*)
10875  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10876  ;;
10877  *)
10878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10879for as_dir in $PATH
10880do
10881  IFS=$as_save_IFS
10882  test -z "$as_dir" && as_dir=.
10883    for ac_exec_ext in '' $ac_executable_extensions; do
10884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10885    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10887    break 2
10888  fi
10889done
10890  done
10891IFS=$as_save_IFS
10892
10893  ;;
10894esac
10895fi
10896WC=$ac_cv_path_WC
10897if test -n "$WC"; then
10898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10899$as_echo "$WC" >&6; }
10900else
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
10903fi
10904
10905
10906  test -n "$WC" && break
10907done
10908
10909    else
10910      # If it succeeded, then it was overridden by the user. We will use it
10911      # for the tool.
10912
10913      # First remove it from the list of overridden variables, so we can test
10914      # for unknown variables in the end.
10915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10916
10917      # Check if the provided tool contains a complete path.
10918      tool_specified="$WC"
10919      tool_basename="${tool_specified##*/}"
10920      if test "x$tool_basename" = "x$tool_specified"; then
10921        # A command without a complete path is provided, search $PATH.
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10923$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10924        # Extract the first word of "$tool_basename", so it can be a program name with args.
10925set dummy $tool_basename; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if ${ac_cv_path_WC+:} false; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  case $WC in
10932  [\\/]* | ?:[\\/]*)
10933  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10934  ;;
10935  *)
10936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10937for as_dir in $PATH
10938do
10939  IFS=$as_save_IFS
10940  test -z "$as_dir" && as_dir=.
10941    for ac_exec_ext in '' $ac_executable_extensions; do
10942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10943    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10945    break 2
10946  fi
10947done
10948  done
10949IFS=$as_save_IFS
10950
10951  ;;
10952esac
10953fi
10954WC=$ac_cv_path_WC
10955if test -n "$WC"; then
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10957$as_echo "$WC" >&6; }
10958else
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960$as_echo "no" >&6; }
10961fi
10962
10963
10964        if test "x$WC" = x; then
10965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10966        fi
10967      else
10968        # Otherwise we believe it is a complete path. Use it as it is.
10969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10970$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10972$as_echo_n "checking for WC... " >&6; }
10973        if test ! -x "$tool_specified"; then
10974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10975$as_echo "not found" >&6; }
10976          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10977        fi
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10979$as_echo "$tool_specified" >&6; }
10980      fi
10981    fi
10982  fi
10983
10984
10985
10986  if test "x$WC" = x; then
10987    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10988  fi
10989
10990
10991
10992
10993
10994  # Publish this variable in the help.
10995
10996
10997  if test "x$WHICH" = x; then
10998    # The variable is not set by user, try to locate tool using the code snippet
10999    for ac_prog in which
11000do
11001  # Extract the first word of "$ac_prog", so it can be a program name with args.
11002set dummy $ac_prog; ac_word=$2
11003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
11005if ${ac_cv_path_WHICH+:} false; then :
11006  $as_echo_n "(cached) " >&6
11007else
11008  case $WHICH in
11009  [\\/]* | ?:[\\/]*)
11010  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11011  ;;
11012  *)
11013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11014for as_dir in $PATH
11015do
11016  IFS=$as_save_IFS
11017  test -z "$as_dir" && as_dir=.
11018    for ac_exec_ext in '' $ac_executable_extensions; do
11019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11020    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11022    break 2
11023  fi
11024done
11025  done
11026IFS=$as_save_IFS
11027
11028  ;;
11029esac
11030fi
11031WHICH=$ac_cv_path_WHICH
11032if test -n "$WHICH"; then
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11034$as_echo "$WHICH" >&6; }
11035else
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
11038fi
11039
11040
11041  test -n "$WHICH" && break
11042done
11043
11044  else
11045    # The variable is set, but is it from the command line or the environment?
11046
11047    # Try to remove the string !WHICH! from our list.
11048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11050      # If it failed, the variable was not from the command line. Ignore it,
11051      # but warn the user (except for BASH, which is always set by the calling BASH).
11052      if test "xWHICH" != xBASH; then
11053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11054$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11055      fi
11056      # Try to locate tool using the code snippet
11057      for ac_prog in which
11058do
11059  # Extract the first word of "$ac_prog", so it can be a program name with args.
11060set dummy $ac_prog; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_WHICH+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $WHICH in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089WHICH=$ac_cv_path_WHICH
11090if test -n "$WHICH"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11092$as_echo "$WHICH" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099  test -n "$WHICH" && break
11100done
11101
11102    else
11103      # If it succeeded, then it was overridden by the user. We will use it
11104      # for the tool.
11105
11106      # First remove it from the list of overridden variables, so we can test
11107      # for unknown variables in the end.
11108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11109
11110      # Check if the provided tool contains a complete path.
11111      tool_specified="$WHICH"
11112      tool_basename="${tool_specified##*/}"
11113      if test "x$tool_basename" = "x$tool_specified"; then
11114        # A command without a complete path is provided, search $PATH.
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11116$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11117        # Extract the first word of "$tool_basename", so it can be a program name with args.
11118set dummy $tool_basename; ac_word=$2
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11120$as_echo_n "checking for $ac_word... " >&6; }
11121if ${ac_cv_path_WHICH+:} false; then :
11122  $as_echo_n "(cached) " >&6
11123else
11124  case $WHICH in
11125  [\\/]* | ?:[\\/]*)
11126  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11127  ;;
11128  *)
11129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130for as_dir in $PATH
11131do
11132  IFS=$as_save_IFS
11133  test -z "$as_dir" && as_dir=.
11134    for ac_exec_ext in '' $ac_executable_extensions; do
11135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138    break 2
11139  fi
11140done
11141  done
11142IFS=$as_save_IFS
11143
11144  ;;
11145esac
11146fi
11147WHICH=$ac_cv_path_WHICH
11148if test -n "$WHICH"; then
11149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11150$as_echo "$WHICH" >&6; }
11151else
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
11154fi
11155
11156
11157        if test "x$WHICH" = x; then
11158          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11159        fi
11160      else
11161        # Otherwise we believe it is a complete path. Use it as it is.
11162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11163$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11165$as_echo_n "checking for WHICH... " >&6; }
11166        if test ! -x "$tool_specified"; then
11167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11168$as_echo "not found" >&6; }
11169          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11170        fi
11171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11172$as_echo "$tool_specified" >&6; }
11173      fi
11174    fi
11175  fi
11176
11177
11178
11179  if test "x$WHICH" = x; then
11180    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11181  fi
11182
11183
11184
11185
11186
11187  # Publish this variable in the help.
11188
11189
11190  if test "x$XARGS" = x; then
11191    # The variable is not set by user, try to locate tool using the code snippet
11192    for ac_prog in xargs
11193do
11194  # Extract the first word of "$ac_prog", so it can be a program name with args.
11195set dummy $ac_prog; ac_word=$2
11196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11197$as_echo_n "checking for $ac_word... " >&6; }
11198if ${ac_cv_path_XARGS+:} false; then :
11199  $as_echo_n "(cached) " >&6
11200else
11201  case $XARGS in
11202  [\\/]* | ?:[\\/]*)
11203  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11204  ;;
11205  *)
11206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11207for as_dir in $PATH
11208do
11209  IFS=$as_save_IFS
11210  test -z "$as_dir" && as_dir=.
11211    for ac_exec_ext in '' $ac_executable_extensions; do
11212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11213    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11215    break 2
11216  fi
11217done
11218  done
11219IFS=$as_save_IFS
11220
11221  ;;
11222esac
11223fi
11224XARGS=$ac_cv_path_XARGS
11225if test -n "$XARGS"; then
11226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11227$as_echo "$XARGS" >&6; }
11228else
11229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11230$as_echo "no" >&6; }
11231fi
11232
11233
11234  test -n "$XARGS" && break
11235done
11236
11237  else
11238    # The variable is set, but is it from the command line or the environment?
11239
11240    # Try to remove the string !XARGS! from our list.
11241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11243      # If it failed, the variable was not from the command line. Ignore it,
11244      # but warn the user (except for BASH, which is always set by the calling BASH).
11245      if test "xXARGS" != xBASH; then
11246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11247$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11248      fi
11249      # Try to locate tool using the code snippet
11250      for ac_prog in xargs
11251do
11252  # Extract the first word of "$ac_prog", so it can be a program name with args.
11253set dummy $ac_prog; ac_word=$2
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11255$as_echo_n "checking for $ac_word... " >&6; }
11256if ${ac_cv_path_XARGS+:} false; then :
11257  $as_echo_n "(cached) " >&6
11258else
11259  case $XARGS in
11260  [\\/]* | ?:[\\/]*)
11261  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11262  ;;
11263  *)
11264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11265for as_dir in $PATH
11266do
11267  IFS=$as_save_IFS
11268  test -z "$as_dir" && as_dir=.
11269    for ac_exec_ext in '' $ac_executable_extensions; do
11270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11271    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11273    break 2
11274  fi
11275done
11276  done
11277IFS=$as_save_IFS
11278
11279  ;;
11280esac
11281fi
11282XARGS=$ac_cv_path_XARGS
11283if test -n "$XARGS"; then
11284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11285$as_echo "$XARGS" >&6; }
11286else
11287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
11289fi
11290
11291
11292  test -n "$XARGS" && break
11293done
11294
11295    else
11296      # If it succeeded, then it was overridden by the user. We will use it
11297      # for the tool.
11298
11299      # First remove it from the list of overridden variables, so we can test
11300      # for unknown variables in the end.
11301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11302
11303      # Check if the provided tool contains a complete path.
11304      tool_specified="$XARGS"
11305      tool_basename="${tool_specified##*/}"
11306      if test "x$tool_basename" = "x$tool_specified"; then
11307        # A command without a complete path is provided, search $PATH.
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11309$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11310        # Extract the first word of "$tool_basename", so it can be a program name with args.
11311set dummy $tool_basename; ac_word=$2
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11313$as_echo_n "checking for $ac_word... " >&6; }
11314if ${ac_cv_path_XARGS+:} false; then :
11315  $as_echo_n "(cached) " >&6
11316else
11317  case $XARGS in
11318  [\\/]* | ?:[\\/]*)
11319  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11320  ;;
11321  *)
11322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11323for as_dir in $PATH
11324do
11325  IFS=$as_save_IFS
11326  test -z "$as_dir" && as_dir=.
11327    for ac_exec_ext in '' $ac_executable_extensions; do
11328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11329    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11331    break 2
11332  fi
11333done
11334  done
11335IFS=$as_save_IFS
11336
11337  ;;
11338esac
11339fi
11340XARGS=$ac_cv_path_XARGS
11341if test -n "$XARGS"; then
11342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11343$as_echo "$XARGS" >&6; }
11344else
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
11347fi
11348
11349
11350        if test "x$XARGS" = x; then
11351          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11352        fi
11353      else
11354        # Otherwise we believe it is a complete path. Use it as it is.
11355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11356$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11358$as_echo_n "checking for XARGS... " >&6; }
11359        if test ! -x "$tool_specified"; then
11360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11361$as_echo "not found" >&6; }
11362          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11363        fi
11364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11365$as_echo "$tool_specified" >&6; }
11366      fi
11367    fi
11368  fi
11369
11370
11371
11372  if test "x$XARGS" = x; then
11373    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11374  fi
11375
11376
11377
11378  # Then required tools that require some special treatment.
11379
11380
11381  # Publish this variable in the help.
11382
11383
11384  if test "x$AWK" = x; then
11385    # The variable is not set by user, try to locate tool using the code snippet
11386    for ac_prog in gawk mawk nawk awk
11387do
11388  # Extract the first word of "$ac_prog", so it can be a program name with args.
11389set dummy $ac_prog; ac_word=$2
11390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11391$as_echo_n "checking for $ac_word... " >&6; }
11392if ${ac_cv_prog_AWK+:} false; then :
11393  $as_echo_n "(cached) " >&6
11394else
11395  if test -n "$AWK"; then
11396  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11397else
11398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11399for as_dir in $PATH
11400do
11401  IFS=$as_save_IFS
11402  test -z "$as_dir" && as_dir=.
11403    for ac_exec_ext in '' $ac_executable_extensions; do
11404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11405    ac_cv_prog_AWK="$ac_prog"
11406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11407    break 2
11408  fi
11409done
11410  done
11411IFS=$as_save_IFS
11412
11413fi
11414fi
11415AWK=$ac_cv_prog_AWK
11416if test -n "$AWK"; then
11417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11418$as_echo "$AWK" >&6; }
11419else
11420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
11422fi
11423
11424
11425  test -n "$AWK" && break
11426done
11427
11428  else
11429    # The variable is set, but is it from the command line or the environment?
11430
11431    # Try to remove the string !AWK! from our list.
11432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11434      # If it failed, the variable was not from the command line. Ignore it,
11435      # but warn the user (except for BASH, which is always set by the calling BASH).
11436      if test "xAWK" != xBASH; then
11437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11438$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11439      fi
11440      # Try to locate tool using the code snippet
11441      for ac_prog in gawk mawk nawk awk
11442do
11443  # Extract the first word of "$ac_prog", so it can be a program name with args.
11444set dummy $ac_prog; ac_word=$2
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11446$as_echo_n "checking for $ac_word... " >&6; }
11447if ${ac_cv_prog_AWK+:} false; then :
11448  $as_echo_n "(cached) " >&6
11449else
11450  if test -n "$AWK"; then
11451  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11452else
11453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11454for as_dir in $PATH
11455do
11456  IFS=$as_save_IFS
11457  test -z "$as_dir" && as_dir=.
11458    for ac_exec_ext in '' $ac_executable_extensions; do
11459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11460    ac_cv_prog_AWK="$ac_prog"
11461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11462    break 2
11463  fi
11464done
11465  done
11466IFS=$as_save_IFS
11467
11468fi
11469fi
11470AWK=$ac_cv_prog_AWK
11471if test -n "$AWK"; then
11472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11473$as_echo "$AWK" >&6; }
11474else
11475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
11477fi
11478
11479
11480  test -n "$AWK" && break
11481done
11482
11483    else
11484      # If it succeeded, then it was overridden by the user. We will use it
11485      # for the tool.
11486
11487      # First remove it from the list of overridden variables, so we can test
11488      # for unknown variables in the end.
11489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11490
11491      # Check if the provided tool contains a complete path.
11492      tool_specified="$AWK"
11493      tool_basename="${tool_specified##*/}"
11494      if test "x$tool_basename" = "x$tool_specified"; then
11495        # A command without a complete path is provided, search $PATH.
11496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11497$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11498        # Extract the first word of "$tool_basename", so it can be a program name with args.
11499set dummy $tool_basename; ac_word=$2
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11501$as_echo_n "checking for $ac_word... " >&6; }
11502if ${ac_cv_path_AWK+:} false; then :
11503  $as_echo_n "(cached) " >&6
11504else
11505  case $AWK in
11506  [\\/]* | ?:[\\/]*)
11507  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11508  ;;
11509  *)
11510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11511for as_dir in $PATH
11512do
11513  IFS=$as_save_IFS
11514  test -z "$as_dir" && as_dir=.
11515    for ac_exec_ext in '' $ac_executable_extensions; do
11516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11517    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11519    break 2
11520  fi
11521done
11522  done
11523IFS=$as_save_IFS
11524
11525  ;;
11526esac
11527fi
11528AWK=$ac_cv_path_AWK
11529if test -n "$AWK"; then
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11531$as_echo "$AWK" >&6; }
11532else
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
11535fi
11536
11537
11538        if test "x$AWK" = x; then
11539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11540        fi
11541      else
11542        # Otherwise we believe it is a complete path. Use it as it is.
11543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11544$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11546$as_echo_n "checking for AWK... " >&6; }
11547        if test ! -x "$tool_specified"; then
11548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11549$as_echo "not found" >&6; }
11550          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11551        fi
11552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11553$as_echo "$tool_specified" >&6; }
11554      fi
11555    fi
11556  fi
11557
11558
11559  if test "x$AWK" = x; then
11560    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11561  fi
11562
11563
11564
11565
11566  # Publish this variable in the help.
11567
11568
11569  if test "x$GREP" = x; then
11570    # The variable is not set by user, try to locate tool using the code snippet
11571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11572$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11573if ${ac_cv_path_GREP+:} false; then :
11574  $as_echo_n "(cached) " >&6
11575else
11576  if test -z "$GREP"; then
11577  ac_path_GREP_found=false
11578  # Loop through the user's path and test for each of PROGNAME-LIST
11579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11580for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11581do
11582  IFS=$as_save_IFS
11583  test -z "$as_dir" && as_dir=.
11584    for ac_prog in grep ggrep; do
11585    for ac_exec_ext in '' $ac_executable_extensions; do
11586      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11587      as_fn_executable_p "$ac_path_GREP" || continue
11588# Check for GNU ac_path_GREP and select it if it is found.
11589  # Check for GNU $ac_path_GREP
11590case `"$ac_path_GREP" --version 2>&1` in
11591*GNU*)
11592  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11593*)
11594  ac_count=0
11595  $as_echo_n 0123456789 >"conftest.in"
11596  while :
11597  do
11598    cat "conftest.in" "conftest.in" >"conftest.tmp"
11599    mv "conftest.tmp" "conftest.in"
11600    cp "conftest.in" "conftest.nl"
11601    $as_echo 'GREP' >> "conftest.nl"
11602    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11603    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11604    as_fn_arith $ac_count + 1 && ac_count=$as_val
11605    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11606      # Best one so far, save it but keep looking for a better one
11607      ac_cv_path_GREP="$ac_path_GREP"
11608      ac_path_GREP_max=$ac_count
11609    fi
11610    # 10*(2^10) chars as input seems more than enough
11611    test $ac_count -gt 10 && break
11612  done
11613  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11614esac
11615
11616      $ac_path_GREP_found && break 3
11617    done
11618  done
11619  done
11620IFS=$as_save_IFS
11621  if test -z "$ac_cv_path_GREP"; then
11622    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11623  fi
11624else
11625  ac_cv_path_GREP=$GREP
11626fi
11627
11628fi
11629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11630$as_echo "$ac_cv_path_GREP" >&6; }
11631 GREP="$ac_cv_path_GREP"
11632
11633
11634  else
11635    # The variable is set, but is it from the command line or the environment?
11636
11637    # Try to remove the string !GREP! from our list.
11638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11640      # If it failed, the variable was not from the command line. Ignore it,
11641      # but warn the user (except for BASH, which is always set by the calling BASH).
11642      if test "xGREP" != xBASH; then
11643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11644$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11645      fi
11646      # Try to locate tool using the code snippet
11647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11648$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11649if ${ac_cv_path_GREP+:} false; then :
11650  $as_echo_n "(cached) " >&6
11651else
11652  if test -z "$GREP"; then
11653  ac_path_GREP_found=false
11654  # Loop through the user's path and test for each of PROGNAME-LIST
11655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11656for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11657do
11658  IFS=$as_save_IFS
11659  test -z "$as_dir" && as_dir=.
11660    for ac_prog in grep ggrep; do
11661    for ac_exec_ext in '' $ac_executable_extensions; do
11662      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11663      as_fn_executable_p "$ac_path_GREP" || continue
11664# Check for GNU ac_path_GREP and select it if it is found.
11665  # Check for GNU $ac_path_GREP
11666case `"$ac_path_GREP" --version 2>&1` in
11667*GNU*)
11668  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11669*)
11670  ac_count=0
11671  $as_echo_n 0123456789 >"conftest.in"
11672  while :
11673  do
11674    cat "conftest.in" "conftest.in" >"conftest.tmp"
11675    mv "conftest.tmp" "conftest.in"
11676    cp "conftest.in" "conftest.nl"
11677    $as_echo 'GREP' >> "conftest.nl"
11678    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11679    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11680    as_fn_arith $ac_count + 1 && ac_count=$as_val
11681    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11682      # Best one so far, save it but keep looking for a better one
11683      ac_cv_path_GREP="$ac_path_GREP"
11684      ac_path_GREP_max=$ac_count
11685    fi
11686    # 10*(2^10) chars as input seems more than enough
11687    test $ac_count -gt 10 && break
11688  done
11689  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11690esac
11691
11692      $ac_path_GREP_found && break 3
11693    done
11694  done
11695  done
11696IFS=$as_save_IFS
11697  if test -z "$ac_cv_path_GREP"; then
11698    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11699  fi
11700else
11701  ac_cv_path_GREP=$GREP
11702fi
11703
11704fi
11705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11706$as_echo "$ac_cv_path_GREP" >&6; }
11707 GREP="$ac_cv_path_GREP"
11708
11709
11710    else
11711      # If it succeeded, then it was overridden by the user. We will use it
11712      # for the tool.
11713
11714      # First remove it from the list of overridden variables, so we can test
11715      # for unknown variables in the end.
11716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11717
11718      # Check if the provided tool contains a complete path.
11719      tool_specified="$GREP"
11720      tool_basename="${tool_specified##*/}"
11721      if test "x$tool_basename" = "x$tool_specified"; then
11722        # A command without a complete path is provided, search $PATH.
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11724$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11725        # Extract the first word of "$tool_basename", so it can be a program name with args.
11726set dummy $tool_basename; ac_word=$2
11727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11728$as_echo_n "checking for $ac_word... " >&6; }
11729if ${ac_cv_path_GREP+:} false; then :
11730  $as_echo_n "(cached) " >&6
11731else
11732  case $GREP in
11733  [\\/]* | ?:[\\/]*)
11734  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11735  ;;
11736  *)
11737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11738for as_dir in $PATH
11739do
11740  IFS=$as_save_IFS
11741  test -z "$as_dir" && as_dir=.
11742    for ac_exec_ext in '' $ac_executable_extensions; do
11743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11744    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11746    break 2
11747  fi
11748done
11749  done
11750IFS=$as_save_IFS
11751
11752  ;;
11753esac
11754fi
11755GREP=$ac_cv_path_GREP
11756if test -n "$GREP"; then
11757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11758$as_echo "$GREP" >&6; }
11759else
11760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
11762fi
11763
11764
11765        if test "x$GREP" = x; then
11766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11767        fi
11768      else
11769        # Otherwise we believe it is a complete path. Use it as it is.
11770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11771$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11773$as_echo_n "checking for GREP... " >&6; }
11774        if test ! -x "$tool_specified"; then
11775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11776$as_echo "not found" >&6; }
11777          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11778        fi
11779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11780$as_echo "$tool_specified" >&6; }
11781      fi
11782    fi
11783  fi
11784
11785
11786  if test "x$GREP" = x; then
11787    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11788  fi
11789
11790
11791
11792
11793  # Publish this variable in the help.
11794
11795
11796  if test "x$EGREP" = x; then
11797    # The variable is not set by user, try to locate tool using the code snippet
11798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11799$as_echo_n "checking for egrep... " >&6; }
11800if ${ac_cv_path_EGREP+:} false; then :
11801  $as_echo_n "(cached) " >&6
11802else
11803  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11804   then ac_cv_path_EGREP="$GREP -E"
11805   else
11806     if test -z "$EGREP"; then
11807  ac_path_EGREP_found=false
11808  # Loop through the user's path and test for each of PROGNAME-LIST
11809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11810for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11811do
11812  IFS=$as_save_IFS
11813  test -z "$as_dir" && as_dir=.
11814    for ac_prog in egrep; do
11815    for ac_exec_ext in '' $ac_executable_extensions; do
11816      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11817      as_fn_executable_p "$ac_path_EGREP" || continue
11818# Check for GNU ac_path_EGREP and select it if it is found.
11819  # Check for GNU $ac_path_EGREP
11820case `"$ac_path_EGREP" --version 2>&1` in
11821*GNU*)
11822  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11823*)
11824  ac_count=0
11825  $as_echo_n 0123456789 >"conftest.in"
11826  while :
11827  do
11828    cat "conftest.in" "conftest.in" >"conftest.tmp"
11829    mv "conftest.tmp" "conftest.in"
11830    cp "conftest.in" "conftest.nl"
11831    $as_echo 'EGREP' >> "conftest.nl"
11832    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11833    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11834    as_fn_arith $ac_count + 1 && ac_count=$as_val
11835    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11836      # Best one so far, save it but keep looking for a better one
11837      ac_cv_path_EGREP="$ac_path_EGREP"
11838      ac_path_EGREP_max=$ac_count
11839    fi
11840    # 10*(2^10) chars as input seems more than enough
11841    test $ac_count -gt 10 && break
11842  done
11843  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11844esac
11845
11846      $ac_path_EGREP_found && break 3
11847    done
11848  done
11849  done
11850IFS=$as_save_IFS
11851  if test -z "$ac_cv_path_EGREP"; then
11852    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11853  fi
11854else
11855  ac_cv_path_EGREP=$EGREP
11856fi
11857
11858   fi
11859fi
11860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11861$as_echo "$ac_cv_path_EGREP" >&6; }
11862 EGREP="$ac_cv_path_EGREP"
11863
11864
11865  else
11866    # The variable is set, but is it from the command line or the environment?
11867
11868    # Try to remove the string !EGREP! from our list.
11869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11871      # If it failed, the variable was not from the command line. Ignore it,
11872      # but warn the user (except for BASH, which is always set by the calling BASH).
11873      if test "xEGREP" != xBASH; then
11874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11875$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11876      fi
11877      # Try to locate tool using the code snippet
11878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11879$as_echo_n "checking for egrep... " >&6; }
11880if ${ac_cv_path_EGREP+:} false; then :
11881  $as_echo_n "(cached) " >&6
11882else
11883  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11884   then ac_cv_path_EGREP="$GREP -E"
11885   else
11886     if test -z "$EGREP"; then
11887  ac_path_EGREP_found=false
11888  # Loop through the user's path and test for each of PROGNAME-LIST
11889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11890for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11891do
11892  IFS=$as_save_IFS
11893  test -z "$as_dir" && as_dir=.
11894    for ac_prog in egrep; do
11895    for ac_exec_ext in '' $ac_executable_extensions; do
11896      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11897      as_fn_executable_p "$ac_path_EGREP" || continue
11898# Check for GNU ac_path_EGREP and select it if it is found.
11899  # Check for GNU $ac_path_EGREP
11900case `"$ac_path_EGREP" --version 2>&1` in
11901*GNU*)
11902  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11903*)
11904  ac_count=0
11905  $as_echo_n 0123456789 >"conftest.in"
11906  while :
11907  do
11908    cat "conftest.in" "conftest.in" >"conftest.tmp"
11909    mv "conftest.tmp" "conftest.in"
11910    cp "conftest.in" "conftest.nl"
11911    $as_echo 'EGREP' >> "conftest.nl"
11912    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11913    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11914    as_fn_arith $ac_count + 1 && ac_count=$as_val
11915    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11916      # Best one so far, save it but keep looking for a better one
11917      ac_cv_path_EGREP="$ac_path_EGREP"
11918      ac_path_EGREP_max=$ac_count
11919    fi
11920    # 10*(2^10) chars as input seems more than enough
11921    test $ac_count -gt 10 && break
11922  done
11923  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11924esac
11925
11926      $ac_path_EGREP_found && break 3
11927    done
11928  done
11929  done
11930IFS=$as_save_IFS
11931  if test -z "$ac_cv_path_EGREP"; then
11932    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11933  fi
11934else
11935  ac_cv_path_EGREP=$EGREP
11936fi
11937
11938   fi
11939fi
11940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11941$as_echo "$ac_cv_path_EGREP" >&6; }
11942 EGREP="$ac_cv_path_EGREP"
11943
11944
11945    else
11946      # If it succeeded, then it was overridden by the user. We will use it
11947      # for the tool.
11948
11949      # First remove it from the list of overridden variables, so we can test
11950      # for unknown variables in the end.
11951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11952
11953      # Check if the provided tool contains a complete path.
11954      tool_specified="$EGREP"
11955      tool_basename="${tool_specified##*/}"
11956      if test "x$tool_basename" = "x$tool_specified"; then
11957        # A command without a complete path is provided, search $PATH.
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11959$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11960        # Extract the first word of "$tool_basename", so it can be a program name with args.
11961set dummy $tool_basename; ac_word=$2
11962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11963$as_echo_n "checking for $ac_word... " >&6; }
11964if ${ac_cv_path_EGREP+:} false; then :
11965  $as_echo_n "(cached) " >&6
11966else
11967  case $EGREP in
11968  [\\/]* | ?:[\\/]*)
11969  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11970  ;;
11971  *)
11972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11973for as_dir in $PATH
11974do
11975  IFS=$as_save_IFS
11976  test -z "$as_dir" && as_dir=.
11977    for ac_exec_ext in '' $ac_executable_extensions; do
11978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11979    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11981    break 2
11982  fi
11983done
11984  done
11985IFS=$as_save_IFS
11986
11987  ;;
11988esac
11989fi
11990EGREP=$ac_cv_path_EGREP
11991if test -n "$EGREP"; then
11992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11993$as_echo "$EGREP" >&6; }
11994else
11995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
11997fi
11998
11999
12000        if test "x$EGREP" = x; then
12001          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12002        fi
12003      else
12004        # Otherwise we believe it is a complete path. Use it as it is.
12005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12006$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12008$as_echo_n "checking for EGREP... " >&6; }
12009        if test ! -x "$tool_specified"; then
12010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12011$as_echo "not found" >&6; }
12012          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12013        fi
12014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12015$as_echo "$tool_specified" >&6; }
12016      fi
12017    fi
12018  fi
12019
12020
12021  if test "x$EGREP" = x; then
12022    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12023  fi
12024
12025
12026
12027
12028  # Publish this variable in the help.
12029
12030
12031  if test "x$FGREP" = x; then
12032    # The variable is not set by user, try to locate tool using the code snippet
12033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12034$as_echo_n "checking for fgrep... " >&6; }
12035if ${ac_cv_path_FGREP+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12039   then ac_cv_path_FGREP="$GREP -F"
12040   else
12041     if test -z "$FGREP"; then
12042  ac_path_FGREP_found=false
12043  # Loop through the user's path and test for each of PROGNAME-LIST
12044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12045for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12046do
12047  IFS=$as_save_IFS
12048  test -z "$as_dir" && as_dir=.
12049    for ac_prog in fgrep; do
12050    for ac_exec_ext in '' $ac_executable_extensions; do
12051      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12052      as_fn_executable_p "$ac_path_FGREP" || continue
12053# Check for GNU ac_path_FGREP and select it if it is found.
12054  # Check for GNU $ac_path_FGREP
12055case `"$ac_path_FGREP" --version 2>&1` in
12056*GNU*)
12057  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12058*)
12059  ac_count=0
12060  $as_echo_n 0123456789 >"conftest.in"
12061  while :
12062  do
12063    cat "conftest.in" "conftest.in" >"conftest.tmp"
12064    mv "conftest.tmp" "conftest.in"
12065    cp "conftest.in" "conftest.nl"
12066    $as_echo 'FGREP' >> "conftest.nl"
12067    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12068    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12069    as_fn_arith $ac_count + 1 && ac_count=$as_val
12070    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12071      # Best one so far, save it but keep looking for a better one
12072      ac_cv_path_FGREP="$ac_path_FGREP"
12073      ac_path_FGREP_max=$ac_count
12074    fi
12075    # 10*(2^10) chars as input seems more than enough
12076    test $ac_count -gt 10 && break
12077  done
12078  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12079esac
12080
12081      $ac_path_FGREP_found && break 3
12082    done
12083  done
12084  done
12085IFS=$as_save_IFS
12086  if test -z "$ac_cv_path_FGREP"; then
12087    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12088  fi
12089else
12090  ac_cv_path_FGREP=$FGREP
12091fi
12092
12093   fi
12094fi
12095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12096$as_echo "$ac_cv_path_FGREP" >&6; }
12097 FGREP="$ac_cv_path_FGREP"
12098
12099
12100  else
12101    # The variable is set, but is it from the command line or the environment?
12102
12103    # Try to remove the string !FGREP! from our list.
12104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12106      # If it failed, the variable was not from the command line. Ignore it,
12107      # but warn the user (except for BASH, which is always set by the calling BASH).
12108      if test "xFGREP" != xBASH; then
12109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12110$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12111      fi
12112      # Try to locate tool using the code snippet
12113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12114$as_echo_n "checking for fgrep... " >&6; }
12115if ${ac_cv_path_FGREP+:} false; then :
12116  $as_echo_n "(cached) " >&6
12117else
12118  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12119   then ac_cv_path_FGREP="$GREP -F"
12120   else
12121     if test -z "$FGREP"; then
12122  ac_path_FGREP_found=false
12123  # Loop through the user's path and test for each of PROGNAME-LIST
12124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12125for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12126do
12127  IFS=$as_save_IFS
12128  test -z "$as_dir" && as_dir=.
12129    for ac_prog in fgrep; do
12130    for ac_exec_ext in '' $ac_executable_extensions; do
12131      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12132      as_fn_executable_p "$ac_path_FGREP" || continue
12133# Check for GNU ac_path_FGREP and select it if it is found.
12134  # Check for GNU $ac_path_FGREP
12135case `"$ac_path_FGREP" --version 2>&1` in
12136*GNU*)
12137  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12138*)
12139  ac_count=0
12140  $as_echo_n 0123456789 >"conftest.in"
12141  while :
12142  do
12143    cat "conftest.in" "conftest.in" >"conftest.tmp"
12144    mv "conftest.tmp" "conftest.in"
12145    cp "conftest.in" "conftest.nl"
12146    $as_echo 'FGREP' >> "conftest.nl"
12147    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12148    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12149    as_fn_arith $ac_count + 1 && ac_count=$as_val
12150    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12151      # Best one so far, save it but keep looking for a better one
12152      ac_cv_path_FGREP="$ac_path_FGREP"
12153      ac_path_FGREP_max=$ac_count
12154    fi
12155    # 10*(2^10) chars as input seems more than enough
12156    test $ac_count -gt 10 && break
12157  done
12158  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12159esac
12160
12161      $ac_path_FGREP_found && break 3
12162    done
12163  done
12164  done
12165IFS=$as_save_IFS
12166  if test -z "$ac_cv_path_FGREP"; then
12167    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12168  fi
12169else
12170  ac_cv_path_FGREP=$FGREP
12171fi
12172
12173   fi
12174fi
12175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12176$as_echo "$ac_cv_path_FGREP" >&6; }
12177 FGREP="$ac_cv_path_FGREP"
12178
12179
12180    else
12181      # If it succeeded, then it was overridden by the user. We will use it
12182      # for the tool.
12183
12184      # First remove it from the list of overridden variables, so we can test
12185      # for unknown variables in the end.
12186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12187
12188      # Check if the provided tool contains a complete path.
12189      tool_specified="$FGREP"
12190      tool_basename="${tool_specified##*/}"
12191      if test "x$tool_basename" = "x$tool_specified"; then
12192        # A command without a complete path is provided, search $PATH.
12193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12194$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12195        # Extract the first word of "$tool_basename", so it can be a program name with args.
12196set dummy $tool_basename; ac_word=$2
12197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12198$as_echo_n "checking for $ac_word... " >&6; }
12199if ${ac_cv_path_FGREP+:} false; then :
12200  $as_echo_n "(cached) " >&6
12201else
12202  case $FGREP in
12203  [\\/]* | ?:[\\/]*)
12204  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12205  ;;
12206  *)
12207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12208for as_dir in $PATH
12209do
12210  IFS=$as_save_IFS
12211  test -z "$as_dir" && as_dir=.
12212    for ac_exec_ext in '' $ac_executable_extensions; do
12213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12214    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12216    break 2
12217  fi
12218done
12219  done
12220IFS=$as_save_IFS
12221
12222  ;;
12223esac
12224fi
12225FGREP=$ac_cv_path_FGREP
12226if test -n "$FGREP"; then
12227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12228$as_echo "$FGREP" >&6; }
12229else
12230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12231$as_echo "no" >&6; }
12232fi
12233
12234
12235        if test "x$FGREP" = x; then
12236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12237        fi
12238      else
12239        # Otherwise we believe it is a complete path. Use it as it is.
12240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12241$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12243$as_echo_n "checking for FGREP... " >&6; }
12244        if test ! -x "$tool_specified"; then
12245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12246$as_echo "not found" >&6; }
12247          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12248        fi
12249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12250$as_echo "$tool_specified" >&6; }
12251      fi
12252    fi
12253  fi
12254
12255
12256  if test "x$FGREP" = x; then
12257    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12258  fi
12259
12260
12261
12262
12263  # Publish this variable in the help.
12264
12265
12266  if test "x$SED" = x; then
12267    # The variable is not set by user, try to locate tool using the code snippet
12268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12269$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12270if ${ac_cv_path_SED+:} false; then :
12271  $as_echo_n "(cached) " >&6
12272else
12273            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12274     for ac_i in 1 2 3 4 5 6 7; do
12275       ac_script="$ac_script$as_nl$ac_script"
12276     done
12277     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12278     { ac_script=; unset ac_script;}
12279     if test -z "$SED"; then
12280  ac_path_SED_found=false
12281  # Loop through the user's path and test for each of PROGNAME-LIST
12282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12283for as_dir in $PATH
12284do
12285  IFS=$as_save_IFS
12286  test -z "$as_dir" && as_dir=.
12287    for ac_prog in sed gsed; do
12288    for ac_exec_ext in '' $ac_executable_extensions; do
12289      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12290      as_fn_executable_p "$ac_path_SED" || continue
12291# Check for GNU ac_path_SED and select it if it is found.
12292  # Check for GNU $ac_path_SED
12293case `"$ac_path_SED" --version 2>&1` in
12294*GNU*)
12295  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12296*)
12297  ac_count=0
12298  $as_echo_n 0123456789 >"conftest.in"
12299  while :
12300  do
12301    cat "conftest.in" "conftest.in" >"conftest.tmp"
12302    mv "conftest.tmp" "conftest.in"
12303    cp "conftest.in" "conftest.nl"
12304    $as_echo '' >> "conftest.nl"
12305    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12306    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12307    as_fn_arith $ac_count + 1 && ac_count=$as_val
12308    if test $ac_count -gt ${ac_path_SED_max-0}; then
12309      # Best one so far, save it but keep looking for a better one
12310      ac_cv_path_SED="$ac_path_SED"
12311      ac_path_SED_max=$ac_count
12312    fi
12313    # 10*(2^10) chars as input seems more than enough
12314    test $ac_count -gt 10 && break
12315  done
12316  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12317esac
12318
12319      $ac_path_SED_found && break 3
12320    done
12321  done
12322  done
12323IFS=$as_save_IFS
12324  if test -z "$ac_cv_path_SED"; then
12325    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12326  fi
12327else
12328  ac_cv_path_SED=$SED
12329fi
12330
12331fi
12332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12333$as_echo "$ac_cv_path_SED" >&6; }
12334 SED="$ac_cv_path_SED"
12335  rm -f conftest.sed
12336
12337  else
12338    # The variable is set, but is it from the command line or the environment?
12339
12340    # Try to remove the string !SED! from our list.
12341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12343      # If it failed, the variable was not from the command line. Ignore it,
12344      # but warn the user (except for BASH, which is always set by the calling BASH).
12345      if test "xSED" != xBASH; then
12346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12347$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12348      fi
12349      # Try to locate tool using the code snippet
12350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12351$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12352if ${ac_cv_path_SED+:} false; then :
12353  $as_echo_n "(cached) " >&6
12354else
12355            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12356     for ac_i in 1 2 3 4 5 6 7; do
12357       ac_script="$ac_script$as_nl$ac_script"
12358     done
12359     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12360     { ac_script=; unset ac_script;}
12361     if test -z "$SED"; then
12362  ac_path_SED_found=false
12363  # Loop through the user's path and test for each of PROGNAME-LIST
12364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12365for as_dir in $PATH
12366do
12367  IFS=$as_save_IFS
12368  test -z "$as_dir" && as_dir=.
12369    for ac_prog in sed gsed; do
12370    for ac_exec_ext in '' $ac_executable_extensions; do
12371      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12372      as_fn_executable_p "$ac_path_SED" || continue
12373# Check for GNU ac_path_SED and select it if it is found.
12374  # Check for GNU $ac_path_SED
12375case `"$ac_path_SED" --version 2>&1` in
12376*GNU*)
12377  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12378*)
12379  ac_count=0
12380  $as_echo_n 0123456789 >"conftest.in"
12381  while :
12382  do
12383    cat "conftest.in" "conftest.in" >"conftest.tmp"
12384    mv "conftest.tmp" "conftest.in"
12385    cp "conftest.in" "conftest.nl"
12386    $as_echo '' >> "conftest.nl"
12387    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12388    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12389    as_fn_arith $ac_count + 1 && ac_count=$as_val
12390    if test $ac_count -gt ${ac_path_SED_max-0}; then
12391      # Best one so far, save it but keep looking for a better one
12392      ac_cv_path_SED="$ac_path_SED"
12393      ac_path_SED_max=$ac_count
12394    fi
12395    # 10*(2^10) chars as input seems more than enough
12396    test $ac_count -gt 10 && break
12397  done
12398  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12399esac
12400
12401      $ac_path_SED_found && break 3
12402    done
12403  done
12404  done
12405IFS=$as_save_IFS
12406  if test -z "$ac_cv_path_SED"; then
12407    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12408  fi
12409else
12410  ac_cv_path_SED=$SED
12411fi
12412
12413fi
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12415$as_echo "$ac_cv_path_SED" >&6; }
12416 SED="$ac_cv_path_SED"
12417  rm -f conftest.sed
12418
12419    else
12420      # If it succeeded, then it was overridden by the user. We will use it
12421      # for the tool.
12422
12423      # First remove it from the list of overridden variables, so we can test
12424      # for unknown variables in the end.
12425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12426
12427      # Check if the provided tool contains a complete path.
12428      tool_specified="$SED"
12429      tool_basename="${tool_specified##*/}"
12430      if test "x$tool_basename" = "x$tool_specified"; then
12431        # A command without a complete path is provided, search $PATH.
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12433$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12434        # Extract the first word of "$tool_basename", so it can be a program name with args.
12435set dummy $tool_basename; ac_word=$2
12436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12437$as_echo_n "checking for $ac_word... " >&6; }
12438if ${ac_cv_path_SED+:} false; then :
12439  $as_echo_n "(cached) " >&6
12440else
12441  case $SED in
12442  [\\/]* | ?:[\\/]*)
12443  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12444  ;;
12445  *)
12446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12447for as_dir in $PATH
12448do
12449  IFS=$as_save_IFS
12450  test -z "$as_dir" && as_dir=.
12451    for ac_exec_ext in '' $ac_executable_extensions; do
12452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12453    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12455    break 2
12456  fi
12457done
12458  done
12459IFS=$as_save_IFS
12460
12461  ;;
12462esac
12463fi
12464SED=$ac_cv_path_SED
12465if test -n "$SED"; then
12466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12467$as_echo "$SED" >&6; }
12468else
12469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12470$as_echo "no" >&6; }
12471fi
12472
12473
12474        if test "x$SED" = x; then
12475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12476        fi
12477      else
12478        # Otherwise we believe it is a complete path. Use it as it is.
12479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12480$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12482$as_echo_n "checking for SED... " >&6; }
12483        if test ! -x "$tool_specified"; then
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12485$as_echo "not found" >&6; }
12486          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12487        fi
12488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12489$as_echo "$tool_specified" >&6; }
12490      fi
12491    fi
12492  fi
12493
12494
12495  if test "x$SED" = x; then
12496    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12497  fi
12498
12499
12500
12501  # Always force rm.
12502  RM="$RM -f"
12503
12504  # pwd behaves differently on various platforms and some don't support the -L flag.
12505  # Always use the bash builtin pwd to get uniform behavior.
12506  THEPWDCMD=pwd
12507
12508  # These are not required on all platforms
12509
12510
12511  # Publish this variable in the help.
12512
12513
12514  if test "x$CYGPATH" = x; then
12515    # The variable is not set by user, try to locate tool using the code snippet
12516    for ac_prog in cygpath
12517do
12518  # Extract the first word of "$ac_prog", so it can be a program name with args.
12519set dummy $ac_prog; ac_word=$2
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12521$as_echo_n "checking for $ac_word... " >&6; }
12522if ${ac_cv_path_CYGPATH+:} false; then :
12523  $as_echo_n "(cached) " >&6
12524else
12525  case $CYGPATH in
12526  [\\/]* | ?:[\\/]*)
12527  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12528  ;;
12529  *)
12530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12531for as_dir in $PATH
12532do
12533  IFS=$as_save_IFS
12534  test -z "$as_dir" && as_dir=.
12535    for ac_exec_ext in '' $ac_executable_extensions; do
12536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12537    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12539    break 2
12540  fi
12541done
12542  done
12543IFS=$as_save_IFS
12544
12545  ;;
12546esac
12547fi
12548CYGPATH=$ac_cv_path_CYGPATH
12549if test -n "$CYGPATH"; then
12550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12551$as_echo "$CYGPATH" >&6; }
12552else
12553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12554$as_echo "no" >&6; }
12555fi
12556
12557
12558  test -n "$CYGPATH" && break
12559done
12560
12561  else
12562    # The variable is set, but is it from the command line or the environment?
12563
12564    # Try to remove the string !CYGPATH! from our list.
12565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12567      # If it failed, the variable was not from the command line. Ignore it,
12568      # but warn the user (except for BASH, which is always set by the calling BASH).
12569      if test "xCYGPATH" != xBASH; then
12570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12571$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12572      fi
12573      # Try to locate tool using the code snippet
12574      for ac_prog in cygpath
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_CYGPATH+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $CYGPATH in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606CYGPATH=$ac_cv_path_CYGPATH
12607if test -n "$CYGPATH"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12609$as_echo "$CYGPATH" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$CYGPATH" && break
12617done
12618
12619    else
12620      # If it succeeded, then it was overridden by the user. We will use it
12621      # for the tool.
12622
12623      # First remove it from the list of overridden variables, so we can test
12624      # for unknown variables in the end.
12625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12626
12627      # Check if the provided tool contains a complete path.
12628      tool_specified="$CYGPATH"
12629      tool_basename="${tool_specified##*/}"
12630      if test "x$tool_basename" = "x$tool_specified"; then
12631        # A command without a complete path is provided, search $PATH.
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12633$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12634        # Extract the first word of "$tool_basename", so it can be a program name with args.
12635set dummy $tool_basename; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_CYGPATH+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $CYGPATH in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664CYGPATH=$ac_cv_path_CYGPATH
12665if test -n "$CYGPATH"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12667$as_echo "$CYGPATH" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674        if test "x$CYGPATH" = x; then
12675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12676        fi
12677      else
12678        # Otherwise we believe it is a complete path. Use it as it is.
12679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12680$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12682$as_echo_n "checking for CYGPATH... " >&6; }
12683        if test ! -x "$tool_specified"; then
12684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12685$as_echo "not found" >&6; }
12686          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12687        fi
12688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12689$as_echo "$tool_specified" >&6; }
12690      fi
12691    fi
12692  fi
12693
12694
12695
12696
12697  # Publish this variable in the help.
12698
12699
12700  if test "x$READLINK" = x; then
12701    # The variable is not set by user, try to locate tool using the code snippet
12702    for ac_prog in greadlink readlink
12703do
12704  # Extract the first word of "$ac_prog", so it can be a program name with args.
12705set dummy $ac_prog; ac_word=$2
12706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12707$as_echo_n "checking for $ac_word... " >&6; }
12708if ${ac_cv_path_READLINK+:} false; then :
12709  $as_echo_n "(cached) " >&6
12710else
12711  case $READLINK in
12712  [\\/]* | ?:[\\/]*)
12713  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12714  ;;
12715  *)
12716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12717for as_dir in $PATH
12718do
12719  IFS=$as_save_IFS
12720  test -z "$as_dir" && as_dir=.
12721    for ac_exec_ext in '' $ac_executable_extensions; do
12722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12723    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12725    break 2
12726  fi
12727done
12728  done
12729IFS=$as_save_IFS
12730
12731  ;;
12732esac
12733fi
12734READLINK=$ac_cv_path_READLINK
12735if test -n "$READLINK"; then
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12737$as_echo "$READLINK" >&6; }
12738else
12739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12740$as_echo "no" >&6; }
12741fi
12742
12743
12744  test -n "$READLINK" && break
12745done
12746
12747  else
12748    # The variable is set, but is it from the command line or the environment?
12749
12750    # Try to remove the string !READLINK! from our list.
12751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12753      # If it failed, the variable was not from the command line. Ignore it,
12754      # but warn the user (except for BASH, which is always set by the calling BASH).
12755      if test "xREADLINK" != xBASH; then
12756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12757$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12758      fi
12759      # Try to locate tool using the code snippet
12760      for ac_prog in greadlink readlink
12761do
12762  # Extract the first word of "$ac_prog", so it can be a program name with args.
12763set dummy $ac_prog; ac_word=$2
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12765$as_echo_n "checking for $ac_word... " >&6; }
12766if ${ac_cv_path_READLINK+:} false; then :
12767  $as_echo_n "(cached) " >&6
12768else
12769  case $READLINK in
12770  [\\/]* | ?:[\\/]*)
12771  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12772  ;;
12773  *)
12774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12775for as_dir in $PATH
12776do
12777  IFS=$as_save_IFS
12778  test -z "$as_dir" && as_dir=.
12779    for ac_exec_ext in '' $ac_executable_extensions; do
12780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12781    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12783    break 2
12784  fi
12785done
12786  done
12787IFS=$as_save_IFS
12788
12789  ;;
12790esac
12791fi
12792READLINK=$ac_cv_path_READLINK
12793if test -n "$READLINK"; then
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12795$as_echo "$READLINK" >&6; }
12796else
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12798$as_echo "no" >&6; }
12799fi
12800
12801
12802  test -n "$READLINK" && break
12803done
12804
12805    else
12806      # If it succeeded, then it was overridden by the user. We will use it
12807      # for the tool.
12808
12809      # First remove it from the list of overridden variables, so we can test
12810      # for unknown variables in the end.
12811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12812
12813      # Check if the provided tool contains a complete path.
12814      tool_specified="$READLINK"
12815      tool_basename="${tool_specified##*/}"
12816      if test "x$tool_basename" = "x$tool_specified"; then
12817        # A command without a complete path is provided, search $PATH.
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12819$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12820        # Extract the first word of "$tool_basename", so it can be a program name with args.
12821set dummy $tool_basename; ac_word=$2
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12823$as_echo_n "checking for $ac_word... " >&6; }
12824if ${ac_cv_path_READLINK+:} false; then :
12825  $as_echo_n "(cached) " >&6
12826else
12827  case $READLINK in
12828  [\\/]* | ?:[\\/]*)
12829  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12830  ;;
12831  *)
12832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12833for as_dir in $PATH
12834do
12835  IFS=$as_save_IFS
12836  test -z "$as_dir" && as_dir=.
12837    for ac_exec_ext in '' $ac_executable_extensions; do
12838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12839    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12841    break 2
12842  fi
12843done
12844  done
12845IFS=$as_save_IFS
12846
12847  ;;
12848esac
12849fi
12850READLINK=$ac_cv_path_READLINK
12851if test -n "$READLINK"; then
12852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12853$as_echo "$READLINK" >&6; }
12854else
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12856$as_echo "no" >&6; }
12857fi
12858
12859
12860        if test "x$READLINK" = x; then
12861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12862        fi
12863      else
12864        # Otherwise we believe it is a complete path. Use it as it is.
12865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12866$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12868$as_echo_n "checking for READLINK... " >&6; }
12869        if test ! -x "$tool_specified"; then
12870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12871$as_echo "not found" >&6; }
12872          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12873        fi
12874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12875$as_echo "$tool_specified" >&6; }
12876      fi
12877    fi
12878  fi
12879
12880
12881
12882
12883  # Publish this variable in the help.
12884
12885
12886  if test "x$DF" = x; then
12887    # The variable is not set by user, try to locate tool using the code snippet
12888    for ac_prog in df
12889do
12890  # Extract the first word of "$ac_prog", so it can be a program name with args.
12891set dummy $ac_prog; ac_word=$2
12892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12893$as_echo_n "checking for $ac_word... " >&6; }
12894if ${ac_cv_path_DF+:} false; then :
12895  $as_echo_n "(cached) " >&6
12896else
12897  case $DF in
12898  [\\/]* | ?:[\\/]*)
12899  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12900  ;;
12901  *)
12902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12903for as_dir in $PATH
12904do
12905  IFS=$as_save_IFS
12906  test -z "$as_dir" && as_dir=.
12907    for ac_exec_ext in '' $ac_executable_extensions; do
12908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12909    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12911    break 2
12912  fi
12913done
12914  done
12915IFS=$as_save_IFS
12916
12917  ;;
12918esac
12919fi
12920DF=$ac_cv_path_DF
12921if test -n "$DF"; then
12922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12923$as_echo "$DF" >&6; }
12924else
12925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12926$as_echo "no" >&6; }
12927fi
12928
12929
12930  test -n "$DF" && break
12931done
12932
12933  else
12934    # The variable is set, but is it from the command line or the environment?
12935
12936    # Try to remove the string !DF! from our list.
12937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12939      # If it failed, the variable was not from the command line. Ignore it,
12940      # but warn the user (except for BASH, which is always set by the calling BASH).
12941      if test "xDF" != xBASH; then
12942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12943$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12944      fi
12945      # Try to locate tool using the code snippet
12946      for ac_prog in df
12947do
12948  # Extract the first word of "$ac_prog", so it can be a program name with args.
12949set dummy $ac_prog; ac_word=$2
12950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12951$as_echo_n "checking for $ac_word... " >&6; }
12952if ${ac_cv_path_DF+:} false; then :
12953  $as_echo_n "(cached) " >&6
12954else
12955  case $DF in
12956  [\\/]* | ?:[\\/]*)
12957  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12958  ;;
12959  *)
12960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12961for as_dir in $PATH
12962do
12963  IFS=$as_save_IFS
12964  test -z "$as_dir" && as_dir=.
12965    for ac_exec_ext in '' $ac_executable_extensions; do
12966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12967    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12969    break 2
12970  fi
12971done
12972  done
12973IFS=$as_save_IFS
12974
12975  ;;
12976esac
12977fi
12978DF=$ac_cv_path_DF
12979if test -n "$DF"; then
12980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12981$as_echo "$DF" >&6; }
12982else
12983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12984$as_echo "no" >&6; }
12985fi
12986
12987
12988  test -n "$DF" && break
12989done
12990
12991    else
12992      # If it succeeded, then it was overridden by the user. We will use it
12993      # for the tool.
12994
12995      # First remove it from the list of overridden variables, so we can test
12996      # for unknown variables in the end.
12997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12998
12999      # Check if the provided tool contains a complete path.
13000      tool_specified="$DF"
13001      tool_basename="${tool_specified##*/}"
13002      if test "x$tool_basename" = "x$tool_specified"; then
13003        # A command without a complete path is provided, search $PATH.
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13005$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13006        # Extract the first word of "$tool_basename", so it can be a program name with args.
13007set dummy $tool_basename; 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_DF+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $DF in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_DF="$DF" # 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_DF="$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
13036DF=$ac_cv_path_DF
13037if test -n "$DF"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13039$as_echo "$DF" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046        if test "x$DF" = x; then
13047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13048        fi
13049      else
13050        # Otherwise we believe it is a complete path. Use it as it is.
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13052$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13054$as_echo_n "checking for DF... " >&6; }
13055        if test ! -x "$tool_specified"; then
13056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13057$as_echo "not found" >&6; }
13058          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13059        fi
13060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13061$as_echo "$tool_specified" >&6; }
13062      fi
13063    fi
13064  fi
13065
13066
13067
13068
13069  # Publish this variable in the help.
13070
13071
13072  if test "x$CPIO" = x; then
13073    # The variable is not set by user, try to locate tool using the code snippet
13074    for ac_prog in cpio bsdcpio
13075do
13076  # Extract the first word of "$ac_prog", so it can be a program name with args.
13077set dummy $ac_prog; ac_word=$2
13078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13079$as_echo_n "checking for $ac_word... " >&6; }
13080if ${ac_cv_path_CPIO+:} false; then :
13081  $as_echo_n "(cached) " >&6
13082else
13083  case $CPIO in
13084  [\\/]* | ?:[\\/]*)
13085  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13086  ;;
13087  *)
13088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13089for as_dir in $PATH
13090do
13091  IFS=$as_save_IFS
13092  test -z "$as_dir" && as_dir=.
13093    for ac_exec_ext in '' $ac_executable_extensions; do
13094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13095    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13097    break 2
13098  fi
13099done
13100  done
13101IFS=$as_save_IFS
13102
13103  ;;
13104esac
13105fi
13106CPIO=$ac_cv_path_CPIO
13107if test -n "$CPIO"; then
13108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13109$as_echo "$CPIO" >&6; }
13110else
13111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13112$as_echo "no" >&6; }
13113fi
13114
13115
13116  test -n "$CPIO" && break
13117done
13118
13119  else
13120    # The variable is set, but is it from the command line or the environment?
13121
13122    # Try to remove the string !CPIO! from our list.
13123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13125      # If it failed, the variable was not from the command line. Ignore it,
13126      # but warn the user (except for BASH, which is always set by the calling BASH).
13127      if test "xCPIO" != xBASH; then
13128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13129$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13130      fi
13131      # Try to locate tool using the code snippet
13132      for ac_prog in cpio bsdcpio
13133do
13134  # Extract the first word of "$ac_prog", so it can be a program name with args.
13135set dummy $ac_prog; ac_word=$2
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if ${ac_cv_path_CPIO+:} false; then :
13139  $as_echo_n "(cached) " >&6
13140else
13141  case $CPIO in
13142  [\\/]* | ?:[\\/]*)
13143  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13144  ;;
13145  *)
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_exec_ext in '' $ac_executable_extensions; do
13152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155    break 2
13156  fi
13157done
13158  done
13159IFS=$as_save_IFS
13160
13161  ;;
13162esac
13163fi
13164CPIO=$ac_cv_path_CPIO
13165if test -n "$CPIO"; then
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13167$as_echo "$CPIO" >&6; }
13168else
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
13171fi
13172
13173
13174  test -n "$CPIO" && break
13175done
13176
13177    else
13178      # If it succeeded, then it was overridden by the user. We will use it
13179      # for the tool.
13180
13181      # First remove it from the list of overridden variables, so we can test
13182      # for unknown variables in the end.
13183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13184
13185      # Check if the provided tool contains a complete path.
13186      tool_specified="$CPIO"
13187      tool_basename="${tool_specified##*/}"
13188      if test "x$tool_basename" = "x$tool_specified"; then
13189        # A command without a complete path is provided, search $PATH.
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13191$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13192        # Extract the first word of "$tool_basename", so it can be a program name with args.
13193set dummy $tool_basename; ac_word=$2
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13195$as_echo_n "checking for $ac_word... " >&6; }
13196if ${ac_cv_path_CPIO+:} false; then :
13197  $as_echo_n "(cached) " >&6
13198else
13199  case $CPIO in
13200  [\\/]* | ?:[\\/]*)
13201  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13202  ;;
13203  *)
13204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13205for as_dir in $PATH
13206do
13207  IFS=$as_save_IFS
13208  test -z "$as_dir" && as_dir=.
13209    for ac_exec_ext in '' $ac_executable_extensions; do
13210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13211    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13213    break 2
13214  fi
13215done
13216  done
13217IFS=$as_save_IFS
13218
13219  ;;
13220esac
13221fi
13222CPIO=$ac_cv_path_CPIO
13223if test -n "$CPIO"; then
13224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13225$as_echo "$CPIO" >&6; }
13226else
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228$as_echo "no" >&6; }
13229fi
13230
13231
13232        if test "x$CPIO" = x; then
13233          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13234        fi
13235      else
13236        # Otherwise we believe it is a complete path. Use it as it is.
13237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13238$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13240$as_echo_n "checking for CPIO... " >&6; }
13241        if test ! -x "$tool_specified"; then
13242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13243$as_echo "not found" >&6; }
13244          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13245        fi
13246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13247$as_echo "$tool_specified" >&6; }
13248      fi
13249    fi
13250  fi
13251
13252
13253
13254
13255# Now we can determine OpenJDK build and target platforms. This is required to
13256# have early on.
13257# Make sure we can run config.sub.
13258$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13259  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13260
13261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13262$as_echo_n "checking build system type... " >&6; }
13263if ${ac_cv_build+:} false; then :
13264  $as_echo_n "(cached) " >&6
13265else
13266  ac_build_alias=$build_alias
13267test "x$ac_build_alias" = x &&
13268  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13269test "x$ac_build_alias" = x &&
13270  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13271ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13272  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13273
13274fi
13275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13276$as_echo "$ac_cv_build" >&6; }
13277case $ac_cv_build in
13278*-*-*) ;;
13279*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13280esac
13281build=$ac_cv_build
13282ac_save_IFS=$IFS; IFS='-'
13283set x $ac_cv_build
13284shift
13285build_cpu=$1
13286build_vendor=$2
13287shift; shift
13288# Remember, the first character of IFS is used to create $*,
13289# except with old shells:
13290build_os=$*
13291IFS=$ac_save_IFS
13292case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13293
13294
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13296$as_echo_n "checking host system type... " >&6; }
13297if ${ac_cv_host+:} false; then :
13298  $as_echo_n "(cached) " >&6
13299else
13300  if test "x$host_alias" = x; then
13301  ac_cv_host=$ac_cv_build
13302else
13303  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13304    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13305fi
13306
13307fi
13308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13309$as_echo "$ac_cv_host" >&6; }
13310case $ac_cv_host in
13311*-*-*) ;;
13312*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13313esac
13314host=$ac_cv_host
13315ac_save_IFS=$IFS; IFS='-'
13316set x $ac_cv_host
13317shift
13318host_cpu=$1
13319host_vendor=$2
13320shift; shift
13321# Remember, the first character of IFS is used to create $*,
13322# except with old shells:
13323host_os=$*
13324IFS=$ac_save_IFS
13325case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13326
13327
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13329$as_echo_n "checking target system type... " >&6; }
13330if ${ac_cv_target+:} false; then :
13331  $as_echo_n "(cached) " >&6
13332else
13333  if test "x$target_alias" = x; then
13334  ac_cv_target=$ac_cv_host
13335else
13336  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13337    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13338fi
13339
13340fi
13341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13342$as_echo "$ac_cv_target" >&6; }
13343case $ac_cv_target in
13344*-*-*) ;;
13345*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13346esac
13347target=$ac_cv_target
13348ac_save_IFS=$IFS; IFS='-'
13349set x $ac_cv_target
13350shift
13351target_cpu=$1
13352target_vendor=$2
13353shift; shift
13354# Remember, the first character of IFS is used to create $*,
13355# except with old shells:
13356target_os=$*
13357IFS=$ac_save_IFS
13358case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13359
13360
13361# The aliases save the names the user supplied, while $host etc.
13362# will get canonicalized.
13363test -n "$target_alias" &&
13364  test "$program_prefix$program_suffix$program_transform_name" = \
13365    NONENONEs,x,x, &&
13366  program_prefix=${target_alias}-
13367
13368  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13369  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13370  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13371  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13372  # to use the configure naming style.
13373
13374
13375
13376
13377
13378  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13379  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13380  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13381  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13382  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13383  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13384
13385
13386
13387  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13388
13389  case "$build_os" in
13390    *linux*)
13391      VAR_OS=linux
13392      VAR_OS_TYPE=unix
13393      ;;
13394    *solaris*)
13395      VAR_OS=solaris
13396      VAR_OS_TYPE=unix
13397      ;;
13398    *darwin*)
13399      VAR_OS=macosx
13400      VAR_OS_TYPE=unix
13401      ;;
13402    *bsd*)
13403      VAR_OS=bsd
13404      VAR_OS_TYPE=unix
13405      ;;
13406    *cygwin*)
13407      VAR_OS=windows
13408      VAR_OS_ENV=windows.cygwin
13409      ;;
13410    *mingw*)
13411      VAR_OS=windows
13412      VAR_OS_ENV=windows.msys
13413      ;;
13414    *aix*)
13415      VAR_OS=aix
13416      VAR_OS_TYPE=unix
13417      ;;
13418    *)
13419      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13420      ;;
13421  esac
13422
13423
13424  # First argument is the cpu name from the trip/quad
13425  case "$build_cpu" in
13426    x86_64)
13427      VAR_CPU=x86_64
13428      VAR_CPU_ARCH=x86
13429      VAR_CPU_BITS=64
13430      VAR_CPU_ENDIAN=little
13431      ;;
13432    i?86)
13433      VAR_CPU=x86
13434      VAR_CPU_ARCH=x86
13435      VAR_CPU_BITS=32
13436      VAR_CPU_ENDIAN=little
13437      ;;
13438    arm*)
13439      VAR_CPU=arm
13440      VAR_CPU_ARCH=arm
13441      VAR_CPU_BITS=32
13442      VAR_CPU_ENDIAN=little
13443      ;;
13444    aarch64)
13445      VAR_CPU=aarch64
13446      VAR_CPU_ARCH=aarch64
13447      VAR_CPU_BITS=64
13448      VAR_CPU_ENDIAN=little
13449      ;;
13450    powerpc)
13451      VAR_CPU=ppc
13452      VAR_CPU_ARCH=ppc
13453      VAR_CPU_BITS=32
13454      VAR_CPU_ENDIAN=big
13455      ;;
13456    powerpc64)
13457      VAR_CPU=ppc64
13458      VAR_CPU_ARCH=ppc
13459      VAR_CPU_BITS=64
13460      VAR_CPU_ENDIAN=big
13461      ;;
13462    powerpc64le)
13463      VAR_CPU=ppc64
13464      VAR_CPU_ARCH=ppc
13465      VAR_CPU_BITS=64
13466      VAR_CPU_ENDIAN=little
13467      ;;
13468    s390)
13469      VAR_CPU=s390
13470      VAR_CPU_ARCH=s390
13471      VAR_CPU_BITS=32
13472      VAR_CPU_ENDIAN=big
13473      ;;
13474    s390x)
13475      VAR_CPU=s390x
13476      VAR_CPU_ARCH=s390
13477      VAR_CPU_BITS=64
13478      VAR_CPU_ENDIAN=big
13479      ;;
13480    sparc)
13481      VAR_CPU=sparc
13482      VAR_CPU_ARCH=sparc
13483      VAR_CPU_BITS=32
13484      VAR_CPU_ENDIAN=big
13485      ;;
13486    sparcv9|sparc64)
13487      VAR_CPU=sparcv9
13488      VAR_CPU_ARCH=sparc
13489      VAR_CPU_BITS=64
13490      VAR_CPU_ENDIAN=big
13491      ;;
13492    *)
13493      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13494      ;;
13495  esac
13496
13497  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13498  OPENJDK_BUILD_OS="$VAR_OS"
13499  if test "x$VAR_OS_TYPE" != x; then
13500    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13501  else
13502    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13503  fi
13504  if test "x$VAR_OS_ENV" != x; then
13505    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13506  else
13507    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13508  fi
13509  OPENJDK_BUILD_CPU="$VAR_CPU"
13510  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13511  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13512  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13513
13514
13515
13516
13517
13518
13519
13520
13521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13522$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13524$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13525
13526  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13527
13528  case "$host_os" in
13529    *linux*)
13530      VAR_OS=linux
13531      VAR_OS_TYPE=unix
13532      ;;
13533    *solaris*)
13534      VAR_OS=solaris
13535      VAR_OS_TYPE=unix
13536      ;;
13537    *darwin*)
13538      VAR_OS=macosx
13539      VAR_OS_TYPE=unix
13540      ;;
13541    *bsd*)
13542      VAR_OS=bsd
13543      VAR_OS_TYPE=unix
13544      ;;
13545    *cygwin*)
13546      VAR_OS=windows
13547      VAR_OS_ENV=windows.cygwin
13548      ;;
13549    *mingw*)
13550      VAR_OS=windows
13551      VAR_OS_ENV=windows.msys
13552      ;;
13553    *aix*)
13554      VAR_OS=aix
13555      VAR_OS_TYPE=unix
13556      ;;
13557    *)
13558      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13559      ;;
13560  esac
13561
13562
13563  # First argument is the cpu name from the trip/quad
13564  case "$host_cpu" in
13565    x86_64)
13566      VAR_CPU=x86_64
13567      VAR_CPU_ARCH=x86
13568      VAR_CPU_BITS=64
13569      VAR_CPU_ENDIAN=little
13570      ;;
13571    i?86)
13572      VAR_CPU=x86
13573      VAR_CPU_ARCH=x86
13574      VAR_CPU_BITS=32
13575      VAR_CPU_ENDIAN=little
13576      ;;
13577    arm*)
13578      VAR_CPU=arm
13579      VAR_CPU_ARCH=arm
13580      VAR_CPU_BITS=32
13581      VAR_CPU_ENDIAN=little
13582      ;;
13583    aarch64)
13584      VAR_CPU=aarch64
13585      VAR_CPU_ARCH=aarch64
13586      VAR_CPU_BITS=64
13587      VAR_CPU_ENDIAN=little
13588      ;;
13589    powerpc)
13590      VAR_CPU=ppc
13591      VAR_CPU_ARCH=ppc
13592      VAR_CPU_BITS=32
13593      VAR_CPU_ENDIAN=big
13594      ;;
13595    powerpc64)
13596      VAR_CPU=ppc64
13597      VAR_CPU_ARCH=ppc
13598      VAR_CPU_BITS=64
13599      VAR_CPU_ENDIAN=big
13600      ;;
13601    powerpc64le)
13602      VAR_CPU=ppc64
13603      VAR_CPU_ARCH=ppc
13604      VAR_CPU_BITS=64
13605      VAR_CPU_ENDIAN=little
13606      ;;
13607    s390)
13608      VAR_CPU=s390
13609      VAR_CPU_ARCH=s390
13610      VAR_CPU_BITS=32
13611      VAR_CPU_ENDIAN=big
13612      ;;
13613    s390x)
13614      VAR_CPU=s390x
13615      VAR_CPU_ARCH=s390
13616      VAR_CPU_BITS=64
13617      VAR_CPU_ENDIAN=big
13618      ;;
13619    sparc)
13620      VAR_CPU=sparc
13621      VAR_CPU_ARCH=sparc
13622      VAR_CPU_BITS=32
13623      VAR_CPU_ENDIAN=big
13624      ;;
13625    sparcv9|sparc64)
13626      VAR_CPU=sparcv9
13627      VAR_CPU_ARCH=sparc
13628      VAR_CPU_BITS=64
13629      VAR_CPU_ENDIAN=big
13630      ;;
13631    *)
13632      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13633      ;;
13634  esac
13635
13636  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13637  OPENJDK_TARGET_OS="$VAR_OS"
13638  if test "x$VAR_OS_TYPE" != x; then
13639    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13640  else
13641    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13642  fi
13643  if test "x$VAR_OS_ENV" != x; then
13644    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13645  else
13646    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13647  fi
13648  OPENJDK_TARGET_CPU="$VAR_CPU"
13649  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13650  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13651  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13652
13653
13654
13655
13656
13657
13658
13659
13660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13661$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13663$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13664
13665
13666
13667# Check whether --with-target-bits was given.
13668if test "${with_target_bits+set}" = set; then :
13669  withval=$with_target_bits;
13670fi
13671
13672
13673  # We have three types of compiles:
13674  # native  == normal compilation, target system == build system
13675  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13676  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13677  #
13678  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13679    # We're doing a proper cross-compilation
13680    COMPILE_TYPE="cross"
13681  else
13682    COMPILE_TYPE="native"
13683  fi
13684
13685  if test "x$with_target_bits" != x; then
13686    if test "x$COMPILE_TYPE" = "xcross"; then
13687      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13688    fi
13689
13690    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13691      # A reduced build is requested
13692      COMPILE_TYPE="reduced"
13693      OPENJDK_TARGET_CPU_BITS=32
13694      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13695        OPENJDK_TARGET_CPU=x86
13696      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13697        OPENJDK_TARGET_CPU=sparc
13698      else
13699        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13700      fi
13701    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13702      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
13703    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13704      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13705$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13706    else
13707      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13708    fi
13709  fi
13710
13711
13712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13713$as_echo_n "checking compilation type... " >&6; }
13714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13715$as_echo "$COMPILE_TYPE" >&6; }
13716
13717
13718  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13719    REQUIRED_OS_NAME=SunOS
13720    REQUIRED_OS_VERSION=5.10
13721  fi
13722  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13723    REQUIRED_OS_NAME=Linux
13724    REQUIRED_OS_VERSION=2.6
13725  fi
13726  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13727    REQUIRED_OS_NAME=Windows
13728    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13729      REQUIRED_OS_VERSION=5.2
13730    else
13731      REQUIRED_OS_VERSION=5.1
13732    fi
13733  fi
13734  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13735    REQUIRED_OS_NAME=Darwin
13736    REQUIRED_OS_VERSION=11.2
13737  fi
13738
13739
13740
13741
13742
13743  # Also store the legacy naming of the cpu.
13744  # Ie i586 and amd64 instead of x86 and x86_64
13745  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13746  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13747    OPENJDK_TARGET_CPU_LEGACY="i586"
13748  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13749    # On all platforms except MacOSX replace x86_64 with amd64.
13750    OPENJDK_TARGET_CPU_LEGACY="amd64"
13751  fi
13752
13753
13754  # And the second legacy naming of the cpu.
13755  # Ie i386 and amd64 instead of x86 and x86_64.
13756  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13757  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13758    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13759  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13760    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13761  fi
13762
13763
13764  # This is the name of the cpu (but using i386 and amd64 instead of
13765  # x86 and x86_64, respectively), preceeded by a /, to be used when
13766  # locating libraries. On macosx, it's empty, though.
13767  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13768  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13769    OPENJDK_TARGET_CPU_LIBDIR=""
13770  fi
13771
13772
13773  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13774  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13775  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13776  OPENJDK_TARGET_CPU_ISADIR=""
13777  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13778    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13779      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13780    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13781      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13782    fi
13783  fi
13784
13785
13786  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13787  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13788  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13789    # On linux only, we replace x86 with i386.
13790    OPENJDK_TARGET_CPU_OSARCH="i386"
13791  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13792    # On all platforms except macosx, we replace x86_64 with amd64.
13793    OPENJDK_TARGET_CPU_OSARCH="amd64"
13794  fi
13795
13796
13797  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13798  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13799    OPENJDK_TARGET_CPU_JLI="i386"
13800  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13801    # On all platforms except macosx, we replace x86_64 with amd64.
13802    OPENJDK_TARGET_CPU_JLI="amd64"
13803  fi
13804  # Now setup the -D flags for building libjli.
13805  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13806  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13807    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13808      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13809    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13810      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13811    fi
13812  fi
13813
13814
13815  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13816      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13817  else
13818      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13819  fi
13820
13821
13822  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13823    A_LP64="LP64:="
13824    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13825    # unpack200.exe
13826    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13827      ADD_LP64="-D_LP64=1"
13828    fi
13829  fi
13830  LP64=$A_LP64
13831
13832
13833  if test "x$COMPILE_TYPE" = "xcross"; then
13834    # FIXME: ... or should this include reduced builds..?
13835    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13836  else
13837    DEFINE_CROSS_COMPILE_ARCH=""
13838  fi
13839
13840
13841  # ZERO_ARCHDEF is used to enable architecture-specific code
13842  case "${OPENJDK_TARGET_CPU}" in
13843    ppc)     ZERO_ARCHDEF=PPC32 ;;
13844    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13845    s390*)   ZERO_ARCHDEF=S390  ;;
13846    sparc*)  ZERO_ARCHDEF=SPARC ;;
13847    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13848    x86)     ZERO_ARCHDEF=IA32  ;;
13849    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13850  esac
13851
13852
13853
13854
13855# Continue setting up basic stuff. Most remaining code require fundamental tools.
13856
13857  # Save the current directory this script was started from
13858  CURDIR="$PWD"
13859
13860  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
13861  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
13862  # was not available at that time.
13863  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
13864  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
13865    ORIGINAL_PATH="$REWRITTEN_PATH"
13866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
13867$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
13868  fi
13869
13870  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13871    PATH_SEP=";"
13872
13873  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13874  if test $SRC_ROOT_LENGTH -gt 100; then
13875    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13876  fi
13877
13878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13880$as_echo_n "checking cygwin release... " >&6; }
13881    CYGWIN_VERSION=`$UNAME -r`
13882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13883$as_echo "$CYGWIN_VERSION" >&6; }
13884    WINDOWS_ENV_VENDOR='cygwin'
13885    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13886
13887    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13888    if test "x$CYGWIN_VERSION_OLD" != x; then
13889      { $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
13890$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;}
13891      as_fn_error $? "Cannot continue" "$LINENO" 5
13892    fi
13893    if test "x$CYGPATH" = x; then
13894      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13895    fi
13896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13897$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13898    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13899    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13900    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13901    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13903$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13904    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13905    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13906    if test "x$test_cygdrive_prefix" = x; then
13907      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13908    fi
13909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13911$as_echo_n "checking msys release... " >&6; }
13912    MSYS_VERSION=`$UNAME -r`
13913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13914$as_echo "$MSYS_VERSION" >&6; }
13915
13916    WINDOWS_ENV_VENDOR='msys'
13917    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13918
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13920$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13921    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13922    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13923
13924  windows_path="$MSYS_ROOT_PATH"
13925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13926    unix_path=`$CYGPATH -u "$windows_path"`
13927    MSYS_ROOT_PATH="$unix_path"
13928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13930    MSYS_ROOT_PATH="$unix_path"
13931  fi
13932
13933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13934$as_echo "$MSYS_ROOT_PATH" >&6; }
13935    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13936  else
13937    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13938  fi
13939
13940  # Test if windows or unix (cygwin/msys) find is first in path.
13941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13942$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13943  FIND_BINARY_OUTPUT=`find --version 2>&1`
13944  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13946$as_echo "unix style" >&6; }
13947  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13949$as_echo "Windows" >&6; }
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13951$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13952    { $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
13953$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13954    as_fn_error $? "Cannot continue" "$LINENO" 5
13955  else
13956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13957$as_echo "unknown" >&6; }
13958    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13959$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13960  fi
13961
13962  else
13963    PATH_SEP=":"
13964  fi
13965
13966
13967  # We get the top-level directory from the supporting wrappers.
13968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13969$as_echo_n "checking for top-level directory... " >&6; }
13970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13971$as_echo "$TOPDIR" >&6; }
13972
13973
13974  # Save the original version of TOPDIR for string comparisons
13975  ORIGINAL_TOPDIR="$TOPDIR"
13976
13977
13978  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13979
13980  # Only process if variable expands to non-empty
13981
13982  if test "x$CURDIR" != x; then
13983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13984
13985  # Input might be given as Windows format, start by converting to
13986  # unix format.
13987  path="$CURDIR"
13988  new_path=`$CYGPATH -u "$path"`
13989
13990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13993  # "foo.exe" is OK but "foo" is an error.
13994  #
13995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13996  # It is also a way to make sure we got the proper file name for the real test later on.
13997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13998  if test "x$test_shortpath" = x; then
13999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14000$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14001    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14002  fi
14003
14004  # Call helper function which possibly converts this using DOS-style short mode.
14005  # If so, the updated path is stored in $new_path.
14006
14007  input_path="$new_path"
14008  # Check if we need to convert this using DOS-style short mode. If the path
14009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14010  # take no chances and rewrite it.
14011  # Note: m4 eats our [], so we need to use [ and ] instead.
14012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14013  if test "x$has_forbidden_chars" != x; then
14014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14018      # Going to short mode and back again did indeed matter. Since short mode is
14019      # case insensitive, let's make it lowercase to improve readability.
14020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14021      # Now convert it back to Unix-style (cygpath)
14022      input_path=`$CYGPATH -u "$shortmode_path"`
14023      new_path="$input_path"
14024    fi
14025  fi
14026
14027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14028  if test "x$test_cygdrive_prefix" = x; then
14029    # As a simple fix, exclude /usr/bin since it's not a real path.
14030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14032      # a path prefixed by /cygdrive for fixpath to work.
14033      new_path="$CYGWIN_ROOT_PATH$input_path"
14034    fi
14035  fi
14036
14037
14038  if test "x$path" != "x$new_path"; then
14039    CURDIR="$new_path"
14040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14041$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14042  fi
14043
14044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14045
14046  path="$CURDIR"
14047  has_colon=`$ECHO $path | $GREP ^.:`
14048  new_path="$path"
14049  if test "x$has_colon" = x; then
14050    # Not in mixed or Windows style, start by that.
14051    new_path=`cmd //c echo $path`
14052  fi
14053
14054
14055  input_path="$new_path"
14056  # Check if we need to convert this using DOS-style short mode. If the path
14057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14058  # take no chances and rewrite it.
14059  # Note: m4 eats our [], so we need to use [ and ] instead.
14060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14061  if test "x$has_forbidden_chars" != x; then
14062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14064  fi
14065
14066
14067  windows_path="$new_path"
14068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14069    unix_path=`$CYGPATH -u "$windows_path"`
14070    new_path="$unix_path"
14071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14073    new_path="$unix_path"
14074  fi
14075
14076  if test "x$path" != "x$new_path"; then
14077    CURDIR="$new_path"
14078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14079$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14080  fi
14081
14082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14084
14085    else
14086      # We're on a unix platform. Hooray! :)
14087      path="$CURDIR"
14088      has_space=`$ECHO "$path" | $GREP " "`
14089      if test "x$has_space" != x; then
14090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14091$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14093      fi
14094
14095      # Use eval to expand a potential ~
14096      eval path="$path"
14097      if test ! -f "$path" && test ! -d "$path"; then
14098        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14099      fi
14100
14101      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14102    fi
14103  fi
14104
14105
14106  # Only process if variable expands to non-empty
14107
14108  if test "x$TOPDIR" != x; then
14109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14110
14111  # Input might be given as Windows format, start by converting to
14112  # unix format.
14113  path="$TOPDIR"
14114  new_path=`$CYGPATH -u "$path"`
14115
14116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14119  # "foo.exe" is OK but "foo" is an error.
14120  #
14121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14122  # It is also a way to make sure we got the proper file name for the real test later on.
14123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14124  if test "x$test_shortpath" = x; then
14125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14126$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14127    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14128  fi
14129
14130  # Call helper function which possibly converts this using DOS-style short mode.
14131  # If so, the updated path is stored in $new_path.
14132
14133  input_path="$new_path"
14134  # Check if we need to convert this using DOS-style short mode. If the path
14135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14136  # take no chances and rewrite it.
14137  # Note: m4 eats our [], so we need to use [ and ] instead.
14138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14139  if test "x$has_forbidden_chars" != x; then
14140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14144      # Going to short mode and back again did indeed matter. Since short mode is
14145      # case insensitive, let's make it lowercase to improve readability.
14146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14147      # Now convert it back to Unix-style (cygpath)
14148      input_path=`$CYGPATH -u "$shortmode_path"`
14149      new_path="$input_path"
14150    fi
14151  fi
14152
14153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14154  if test "x$test_cygdrive_prefix" = x; then
14155    # As a simple fix, exclude /usr/bin since it's not a real path.
14156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14158      # a path prefixed by /cygdrive for fixpath to work.
14159      new_path="$CYGWIN_ROOT_PATH$input_path"
14160    fi
14161  fi
14162
14163
14164  if test "x$path" != "x$new_path"; then
14165    TOPDIR="$new_path"
14166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14167$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14168  fi
14169
14170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14171
14172  path="$TOPDIR"
14173  has_colon=`$ECHO $path | $GREP ^.:`
14174  new_path="$path"
14175  if test "x$has_colon" = x; then
14176    # Not in mixed or Windows style, start by that.
14177    new_path=`cmd //c echo $path`
14178  fi
14179
14180
14181  input_path="$new_path"
14182  # Check if we need to convert this using DOS-style short mode. If the path
14183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14184  # take no chances and rewrite it.
14185  # Note: m4 eats our [], so we need to use [ and ] instead.
14186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14187  if test "x$has_forbidden_chars" != x; then
14188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14190  fi
14191
14192
14193  windows_path="$new_path"
14194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14195    unix_path=`$CYGPATH -u "$windows_path"`
14196    new_path="$unix_path"
14197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14199    new_path="$unix_path"
14200  fi
14201
14202  if test "x$path" != "x$new_path"; then
14203    TOPDIR="$new_path"
14204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14205$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14206  fi
14207
14208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14210
14211    else
14212      # We're on a unix platform. Hooray! :)
14213      path="$TOPDIR"
14214      has_space=`$ECHO "$path" | $GREP " "`
14215      if test "x$has_space" != x; then
14216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14217$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14219      fi
14220
14221      # Use eval to expand a potential ~
14222      eval path="$path"
14223      if test ! -f "$path" && test ! -d "$path"; then
14224        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14225      fi
14226
14227      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14228    fi
14229  fi
14230
14231  # SRC_ROOT is a traditional alias for TOPDIR.
14232  SRC_ROOT=$TOPDIR
14233
14234  # Calculate a canonical version of TOPDIR for string comparisons
14235  CANONICAL_TOPDIR=$TOPDIR
14236
14237  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14238    # Follow a chain of symbolic links. Use readlink
14239    # where it exists, else fall back to horribly
14240    # complicated shell code.
14241    if test "x$READLINK_TESTED" != yes; then
14242      # On MacOSX there is a readlink tool with a different
14243      # purpose than the GNU readlink tool. Check the found readlink.
14244      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14245      if test "x$ISGNU" = x; then
14246        # A readlink that we do not know how to use.
14247        # Are there other non-GNU readlinks out there?
14248        READLINK_TESTED=yes
14249        READLINK=
14250      fi
14251    fi
14252
14253    if test "x$READLINK" != x; then
14254      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14255    else
14256      # Save the current directory for restoring afterwards
14257      STARTDIR=$PWD
14258      COUNTER=0
14259      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14260      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14261      cd $sym_link_dir
14262      # Use -P flag to resolve symlinks in directories.
14263      cd `$THEPWDCMD -P`
14264      sym_link_dir=`$THEPWDCMD -P`
14265      # Resolve file symlinks
14266      while test $COUNTER -lt 20; do
14267        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14268        if test "x$ISLINK" == x; then
14269          # This is not a symbolic link! We are done!
14270          break
14271        fi
14272        # Again resolve directory symlinks since the target of the just found
14273        # link could be in a different directory
14274        cd `$DIRNAME $ISLINK`
14275        sym_link_dir=`$THEPWDCMD -P`
14276        sym_link_file=`$BASENAME $ISLINK`
14277        let COUNTER=COUNTER+1
14278      done
14279      cd $STARTDIR
14280      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14281    fi
14282  fi
14283
14284
14285
14286  # Locate the directory of this script.
14287  AUTOCONF_DIR=$TOPDIR/common/autoconf
14288
14289
14290# Check if it's a pure open build or if custom sources are to be used.
14291
14292  # Check whether --enable-openjdk-only was given.
14293if test "${enable_openjdk_only+set}" = set; then :
14294  enableval=$enable_openjdk_only;
14295else
14296  enable_openjdk_only="no"
14297fi
14298
14299
14300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14301$as_echo_n "checking for presence of closed sources... " >&6; }
14302  if test -d "$SRC_ROOT/jdk/src/closed"; then
14303    CLOSED_SOURCE_PRESENT=yes
14304  else
14305    CLOSED_SOURCE_PRESENT=no
14306  fi
14307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14308$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14309
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14311$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14312  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14314$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14315
14316  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14317    OPENJDK=true
14318    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14319      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14320$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14321    fi
14322  else
14323    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14324      OPENJDK=true
14325    else
14326      OPENJDK=false
14327    fi
14328  fi
14329
14330  if test "x$OPENJDK" = "xtrue"; then
14331    SET_OPENJDK="OPENJDK=true"
14332  fi
14333
14334
14335
14336  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14337  # the IncludeCustomExtension macro.
14338
14339
14340# Check whether --with-custom-make-dir was given.
14341if test "${with_custom_make_dir+set}" = set; then :
14342  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
14343$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14344fi
14345
14346
14347
14348
14349# These are needed to be able to create a configuration name (and thus the output directory)
14350
14351  ###############################################################################
14352  #
14353  # Check which variant of the JDK that we want to build.
14354  # Currently we have:
14355  #    normal:   standard edition
14356  # but the custom make system may add other variants
14357  #
14358  # Effectively the JDK variant gives a name to a specific set of
14359  # modules to compile into the JDK. In the future, these modules
14360  # might even be Jigsaw modules.
14361  #
14362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14363$as_echo_n "checking which variant of the JDK to build... " >&6; }
14364
14365# Check whether --with-jdk-variant was given.
14366if test "${with_jdk_variant+set}" = set; then :
14367  withval=$with_jdk_variant;
14368fi
14369
14370
14371  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14372    JDK_VARIANT="normal"
14373  else
14374    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14375  fi
14376
14377
14378
14379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14380$as_echo "$JDK_VARIANT" >&6; }
14381
14382
14383###############################################################################
14384#
14385# Check which interpreter of the JVM we want to build.
14386# Currently we have:
14387#    template: Template interpreter (the default)
14388#    cpp     : C++ interpreter
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14390$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14391
14392# Check whether --with-jvm-interpreter was given.
14393if test "${with_jvm_interpreter+set}" = set; then :
14394  withval=$with_jvm_interpreter;
14395fi
14396
14397
14398if test "x$with_jvm_interpreter" = x; then
14399     with_jvm_interpreter="template"
14400fi
14401
14402JVM_INTERPRETER="$with_jvm_interpreter"
14403
14404if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14405   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14406fi
14407
14408
14409
14410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14411$as_echo "$with_jvm_interpreter" >&6; }
14412
14413
14414
14415  ###############################################################################
14416  #
14417  # Check which variants of the JVM that we want to build.
14418  # Currently we have:
14419  #    server: normal interpreter and a tiered C1/C2 compiler
14420  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14421  #    minimal1: reduced form of client with optional VM services and features stripped out
14422  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14423  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14424  #    zero: no machine code interpreter, no compiler
14425  #    zeroshark: zero interpreter and shark/llvm compiler backend
14426#    core: interpreter only, no compiler (only works on some platforms)
14427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14428$as_echo_n "checking which variants of the JVM to build... " >&6; }
14429
14430# Check whether --with-jvm-variants was given.
14431if test "${with_jvm_variants+set}" = set; then :
14432  withval=$with_jvm_variants;
14433fi
14434
14435
14436  if test "x$with_jvm_variants" = x; then
14437    with_jvm_variants="server"
14438  fi
14439
14440  JVM_VARIANTS=",$with_jvm_variants,"
14441  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14442
14443  if test "x$TEST_VARIANTS" != "x,"; then
14444     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14445  fi
14446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14447$as_echo "$with_jvm_variants" >&6; }
14448
14449  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14450  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14451  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14452  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14453  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14454  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14455  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14456
14457  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14458    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14459      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14460    fi
14461  fi
14462  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14463    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14464      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14465    fi
14466  fi
14467  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14468    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14469      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14470    fi
14471  fi
14472
14473  # Replace the commas with AND for use in the build directory name.
14474  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14475  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14476  if test "x$COUNT_VARIANTS" != "x,1"; then
14477    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14478  else
14479    BUILDING_MULTIPLE_JVM_VARIANTS=no
14480  fi
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491  INCLUDE_SA=true
14492  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14493    INCLUDE_SA=false
14494  fi
14495  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14496    INCLUDE_SA=false
14497  fi
14498  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14499    INCLUDE_SA=false
14500  fi
14501  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14502    INCLUDE_SA=false
14503  fi
14504
14505
14506  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14507    MACOSX_UNIVERSAL="true"
14508  fi
14509
14510
14511
14512
14513  ###############################################################################
14514  #
14515  # Set the debug level
14516  #    release: no debug information, all optimizations, no asserts.
14517  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14518  #    fastdebug: debug information (-g), all optimizations, all asserts
14519  #    slowdebug: debug information (-g), no optimizations, all asserts
14520  #
14521  DEBUG_LEVEL="release"
14522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14523$as_echo_n "checking which debug level to use... " >&6; }
14524  # Check whether --enable-debug was given.
14525if test "${enable_debug+set}" = set; then :
14526  enableval=$enable_debug;
14527        ENABLE_DEBUG="${enableval}"
14528        DEBUG_LEVEL="fastdebug"
14529
14530else
14531  ENABLE_DEBUG="no"
14532fi
14533
14534
14535
14536# Check whether --with-debug-level was given.
14537if test "${with_debug_level+set}" = set; then :
14538  withval=$with_debug_level;
14539        DEBUG_LEVEL="${withval}"
14540        if test "x$ENABLE_DEBUG" = xyes; then
14541          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14542        fi
14543
14544fi
14545
14546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14547$as_echo "$DEBUG_LEVEL" >&6; }
14548
14549  if test "x$DEBUG_LEVEL" != xrelease && \
14550      test "x$DEBUG_LEVEL" != xoptimized && \
14551      test "x$DEBUG_LEVEL" != xfastdebug && \
14552      test "x$DEBUG_LEVEL" != xslowdebug; then
14553    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14554  fi
14555
14556
14557  ###############################################################################
14558  #
14559  # Setup legacy vars/targets and new vars to deal with different debug levels.
14560  #
14561
14562  case $DEBUG_LEVEL in
14563    release )
14564      VARIANT="OPT"
14565      FASTDEBUG="false"
14566      DEBUG_CLASSFILES="false"
14567      BUILD_VARIANT_RELEASE=""
14568      HOTSPOT_DEBUG_LEVEL="product"
14569      HOTSPOT_EXPORT="product"
14570      ;;
14571    fastdebug )
14572      VARIANT="DBG"
14573      FASTDEBUG="true"
14574      DEBUG_CLASSFILES="true"
14575      BUILD_VARIANT_RELEASE="-fastdebug"
14576      HOTSPOT_DEBUG_LEVEL="fastdebug"
14577      HOTSPOT_EXPORT="fastdebug"
14578      ;;
14579    slowdebug )
14580      VARIANT="DBG"
14581      FASTDEBUG="false"
14582      DEBUG_CLASSFILES="true"
14583      BUILD_VARIANT_RELEASE="-debug"
14584      HOTSPOT_DEBUG_LEVEL="debug"
14585      HOTSPOT_EXPORT="debug"
14586      ;;
14587    optimized )
14588      VARIANT="OPT"
14589      FASTDEBUG="false"
14590      DEBUG_CLASSFILES="false"
14591      BUILD_VARIANT_RELEASE="-optimized"
14592      HOTSPOT_DEBUG_LEVEL="optimized"
14593      HOTSPOT_EXPORT="optimized"
14594      ;;
14595  esac
14596
14597  # The debug level 'optimized' is a little special because it is currently only
14598  # applicable to the HotSpot build where it means to build a completely
14599  # optimized version of the VM without any debugging code (like for the
14600  # 'release' debug level which is called 'product' in the HotSpot build) but
14601  # with the exception that it can contain additional code which is otherwise
14602  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14603  # test new and/or experimental features which are not intended for customer
14604  # shipment. Because these new features need to be tested and benchmarked in
14605  # real world scenarios, we want to build the containing JDK at the 'release'
14606  # debug level.
14607  if test "x$DEBUG_LEVEL" = xoptimized; then
14608    DEBUG_LEVEL="release"
14609  fi
14610
14611  #####
14612  # Generate the legacy makefile targets for hotspot.
14613  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14614  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14615  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14616  # But until then ...
14617  HOTSPOT_TARGET=""
14618
14619  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14620    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14621  fi
14622
14623  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14624    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14625  fi
14626
14627  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14628    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14629  fi
14630
14631  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14632    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14633  fi
14634
14635  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14636    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14637  fi
14638
14639  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14640    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14641  fi
14642
14643  if test "x$JVM_VARIANT_CORE" = xtrue; then
14644    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14645  fi
14646
14647  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14648
14649  # On Macosx universal binaries are produced, but they only contain
14650  # 64 bit intel. This invalidates control of which jvms are built
14651  # from configure, but only server is valid anyway. Fix this
14652  # when hotspot makefiles are rewritten.
14653  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14654    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14655  fi
14656
14657  #####
14658
14659
14660
14661
14662
14663
14664
14665
14666# With basic setup done, call the custom early hook.
14667
14668
14669# Check if we have devkits, extra paths or sysroot set.
14670
14671
14672# Check whether --with-devkit was given.
14673if test "${with_devkit+set}" = set; then :
14674  withval=$with_devkit;
14675
14676  # Only process if variable expands to non-empty
14677
14678  if test "x$with_devkit" != x; then
14679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14680
14681  # Input might be given as Windows format, start by converting to
14682  # unix format.
14683  path="$with_devkit"
14684  new_path=`$CYGPATH -u "$path"`
14685
14686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14689  # "foo.exe" is OK but "foo" is an error.
14690  #
14691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14692  # It is also a way to make sure we got the proper file name for the real test later on.
14693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14694  if test "x$test_shortpath" = x; then
14695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14696$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14697    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14698  fi
14699
14700  # Call helper function which possibly converts this using DOS-style short mode.
14701  # If so, the updated path is stored in $new_path.
14702
14703  input_path="$new_path"
14704  # Check if we need to convert this using DOS-style short mode. If the path
14705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14706  # take no chances and rewrite it.
14707  # Note: m4 eats our [], so we need to use [ and ] instead.
14708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14709  if test "x$has_forbidden_chars" != x; then
14710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14714      # Going to short mode and back again did indeed matter. Since short mode is
14715      # case insensitive, let's make it lowercase to improve readability.
14716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14717      # Now convert it back to Unix-style (cygpath)
14718      input_path=`$CYGPATH -u "$shortmode_path"`
14719      new_path="$input_path"
14720    fi
14721  fi
14722
14723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14724  if test "x$test_cygdrive_prefix" = x; then
14725    # As a simple fix, exclude /usr/bin since it's not a real path.
14726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14728      # a path prefixed by /cygdrive for fixpath to work.
14729      new_path="$CYGWIN_ROOT_PATH$input_path"
14730    fi
14731  fi
14732
14733
14734  if test "x$path" != "x$new_path"; then
14735    with_devkit="$new_path"
14736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14737$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14738  fi
14739
14740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14741
14742  path="$with_devkit"
14743  has_colon=`$ECHO $path | $GREP ^.:`
14744  new_path="$path"
14745  if test "x$has_colon" = x; then
14746    # Not in mixed or Windows style, start by that.
14747    new_path=`cmd //c echo $path`
14748  fi
14749
14750
14751  input_path="$new_path"
14752  # Check if we need to convert this using DOS-style short mode. If the path
14753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14754  # take no chances and rewrite it.
14755  # Note: m4 eats our [], so we need to use [ and ] instead.
14756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14757  if test "x$has_forbidden_chars" != x; then
14758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14760  fi
14761
14762
14763  windows_path="$new_path"
14764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14765    unix_path=`$CYGPATH -u "$windows_path"`
14766    new_path="$unix_path"
14767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14769    new_path="$unix_path"
14770  fi
14771
14772  if test "x$path" != "x$new_path"; then
14773    with_devkit="$new_path"
14774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14775$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14776  fi
14777
14778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14780
14781    else
14782      # We're on a unix platform. Hooray! :)
14783      path="$with_devkit"
14784      has_space=`$ECHO "$path" | $GREP " "`
14785      if test "x$has_space" != x; then
14786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14787$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14789      fi
14790
14791      # Use eval to expand a potential ~
14792      eval path="$path"
14793      if test ! -f "$path" && test ! -d "$path"; then
14794        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14795      fi
14796
14797      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14798    fi
14799  fi
14800
14801        DEVKIT_ROOT="$with_devkit"
14802        # Check for a meta data info file in the root of the devkit
14803        if test -f "$DEVKIT_ROOT/devkit.info"; then
14804          . $DEVKIT_ROOT/devkit.info
14805          # This potentially sets the following:
14806          # A descriptive name of the devkit
14807
14808  if test "x$DEVKIT_NAME" = x; then
14809    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14810  fi
14811
14812          # Corresponds to --with-extra-path
14813
14814  if test "x$DEVKIT_EXTRA_PATH" = x; then
14815    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14816  fi
14817
14818          # Corresponds to --with-toolchain-path
14819
14820  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14821    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14822  fi
14823
14824          # Corresponds to --with-sysroot
14825
14826  if test "x$DEVKIT_SYSROOT" = x; then
14827    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14828  fi
14829
14830
14831          # Identifies the Visual Studio version in the devkit
14832
14833  if test "x$DEVKIT_VS_VERSION" = x; then
14834    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14835  fi
14836
14837          # The Visual Studio include environment variable
14838
14839  if test "x$DEVKIT_VS_INCLUDE" = x; then
14840    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14841  fi
14842
14843          # The Visual Studio lib environment variable
14844
14845  if test "x$DEVKIT_VS_LIB" = x; then
14846    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14847  fi
14848
14849          # Corresponds to --with-msvcr-dll
14850
14851  if test "x$DEVKIT_MSVCR_DLL" = x; then
14852    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14853  fi
14854
14855          # Corresponds to --with-msvcp-dll
14856
14857  if test "x$DEVKIT_MSVCP_DLL" = x; then
14858    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14859  fi
14860
14861        fi
14862
14863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14864$as_echo_n "checking for devkit... " >&6; }
14865        if test "x$DEVKIT_NAME" != x; then
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14867$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14868        else
14869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14870$as_echo "$DEVKIT_ROOT" >&6; }
14871        fi
14872
14873
14874  if test "x$DEVKIT_EXTRA_PATH" != x; then
14875    if test "x$EXTRA_PATH" = x; then
14876      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14877    else
14878      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14879    fi
14880  fi
14881
14882
14883        # Fallback default of just /bin if DEVKIT_PATH is not defined
14884        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14885          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14886        fi
14887
14888  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14889    if test "x$TOOLCHAIN_PATH" = x; then
14890      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14891    else
14892      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14893    fi
14894  fi
14895
14896
14897        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14898        # places for backwards compatiblity.
14899        if test "x$DEVKIT_SYSROOT" != x; then
14900          SYSROOT="$DEVKIT_SYSROOT"
14901        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14902          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14903        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14904          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14905        fi
14906
14907
14908fi
14909
14910
14911  # You can force the sysroot if the sysroot encoded into the compiler tools
14912  # is not correct.
14913
14914# Check whether --with-sys-root was given.
14915if test "${with_sys_root+set}" = set; then :
14916  withval=$with_sys_root; SYSROOT=$with_sys_root
14917
14918fi
14919
14920
14921
14922# Check whether --with-sysroot was given.
14923if test "${with_sysroot+set}" = set; then :
14924  withval=$with_sysroot; SYSROOT=$with_sysroot
14925
14926fi
14927
14928
14929
14930# Check whether --with-tools-dir was given.
14931if test "${with_tools_dir+set}" = set; then :
14932  withval=$with_tools_dir;
14933  if test "x$with_tools_dir" != x; then
14934    if test "x$TOOLCHAIN_PATH" = x; then
14935      TOOLCHAIN_PATH="$with_tools_dir"
14936    else
14937      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14938    fi
14939  fi
14940
14941
14942fi
14943
14944
14945
14946# Check whether --with-toolchain-path was given.
14947if test "${with_toolchain_path+set}" = set; then :
14948  withval=$with_toolchain_path;
14949  if test "x$with_toolchain_path" != x; then
14950    if test "x$TOOLCHAIN_PATH" = x; then
14951      TOOLCHAIN_PATH="$with_toolchain_path"
14952    else
14953      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14954    fi
14955  fi
14956
14957
14958fi
14959
14960
14961
14962# Check whether --with-extra-path was given.
14963if test "${with_extra_path+set}" = set; then :
14964  withval=$with_extra_path;
14965  if test "x$with_extra_path" != x; then
14966    if test "x$EXTRA_PATH" = x; then
14967      EXTRA_PATH="$with_extra_path"
14968    else
14969      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14970    fi
14971  fi
14972
14973
14974fi
14975
14976
14977  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14978    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14979    # If not, detect if Xcode is installed by running xcodebuild -version
14980    # if no Xcode installed, xcodebuild exits with 1
14981    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14982    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14983      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14984      # fall back on the stub binary in /usr/bin/xcodebuild
14985      # Extract the first word of "xcodebuild", so it can be a program name with args.
14986set dummy xcodebuild; ac_word=$2
14987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14988$as_echo_n "checking for $ac_word... " >&6; }
14989if ${ac_cv_path_XCODEBUILD+:} false; then :
14990  $as_echo_n "(cached) " >&6
14991else
14992  case $XCODEBUILD in
14993  [\\/]* | ?:[\\/]*)
14994  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14995  ;;
14996  *)
14997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14998for as_dir in $TOOLCHAIN_PATH
14999do
15000  IFS=$as_save_IFS
15001  test -z "$as_dir" && as_dir=.
15002    for ac_exec_ext in '' $ac_executable_extensions; do
15003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15004    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15006    break 2
15007  fi
15008done
15009  done
15010IFS=$as_save_IFS
15011
15012  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15013  ;;
15014esac
15015fi
15016XCODEBUILD=$ac_cv_path_XCODEBUILD
15017if test -n "$XCODEBUILD"; then
15018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15019$as_echo "$XCODEBUILD" >&6; }
15020else
15021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15022$as_echo "no" >&6; }
15023fi
15024
15025
15026    else
15027      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15028      # when only the command line tools are installed there are no SDKs, so headers
15029      # are copied into the system frameworks
15030      XCODEBUILD=
15031
15032    fi
15033
15034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15035$as_echo_n "checking for sdk name... " >&6; }
15036
15037# Check whether --with-sdk-name was given.
15038if test "${with_sdk_name+set}" = set; then :
15039  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15040
15041fi
15042
15043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15044$as_echo "$SDKNAME" >&6; }
15045
15046    # if toolchain path is specified then don't rely on system headers, they may not compile
15047    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15048    test -z "$TOOLCHAIN_PATH" && \
15049      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15050
15051    if test -z "$SYSROOT"; then
15052      if test -n "$XCODEBUILD"; then
15053        # if we don't have system headers, use default SDK name (last resort)
15054        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15055          SDKNAME=${SDKNAME:-macosx}
15056        fi
15057
15058        if test -n "$SDKNAME"; then
15059          # Call xcodebuild to determine SYSROOT
15060          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15061        fi
15062      else
15063        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15064          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
15065        fi
15066      fi
15067    else
15068      # warn user if --with-sdk-name was also set
15069      if test -n "$with_sdk_name"; then
15070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15071$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15072      fi
15073    fi
15074
15075    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15076      # If no system framework headers, then SYSROOT must be set, or we won't build
15077      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
15078    fi
15079
15080    # Perform a basic sanity test
15081    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15082      if test -z "$SYSROOT"; then
15083        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
15084      else
15085        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15086      fi
15087    fi
15088
15089    # set SDKROOT too, Xcode tools will pick it up
15090    SDKROOT=$SYSROOT
15091
15092  fi
15093
15094  # Prepend the extra path to the global path
15095
15096  if test "x$EXTRA_PATH" != x; then
15097    if test "x$PATH" = x; then
15098      PATH="$EXTRA_PATH"
15099    else
15100      PATH="$EXTRA_PATH:$PATH"
15101    fi
15102  fi
15103
15104
15105  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15106    # Add extra search paths on solaris for utilities like ar and as etc...
15107    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15108  fi
15109
15110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15111$as_echo_n "checking for sysroot... " >&6; }
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15113$as_echo "$SYSROOT" >&6; }
15114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15115$as_echo_n "checking for toolchain path... " >&6; }
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15117$as_echo "$TOOLCHAIN_PATH" >&6; }
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15119$as_echo_n "checking for extra path... " >&6; }
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15121$as_echo "$EXTRA_PATH" >&6; }
15122
15123
15124# To properly create a configuration name, we need to have the OpenJDK target
15125# and options (variants and debug level) parsed.
15126
15127
15128
15129# Check whether --with-conf-name was given.
15130if test "${with_conf_name+set}" = set; then :
15131  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15132fi
15133
15134
15135  # Test from where we are running configure, in or outside of src root.
15136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15137$as_echo_n "checking where to store configuration... " >&6; }
15138  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15139      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15140      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15141    # We are running configure from the src root.
15142    # Create a default ./build/target-variant-debuglevel output root.
15143    if test "x${CONF_NAME}" = x; then
15144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15145$as_echo "in default location" >&6; }
15146      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15147    else
15148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15149$as_echo "in build directory with custom name" >&6; }
15150    fi
15151    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15152    $MKDIR -p "$OUTPUT_ROOT"
15153    if test ! -d "$OUTPUT_ROOT"; then
15154      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15155    fi
15156  else
15157    # We are running configure from outside of the src dir.
15158    # Then use the current directory as output dir!
15159    # If configuration is situated in normal build directory, just use the build
15160    # directory name as configuration name, otherwise use the complete path.
15161    if test "x${CONF_NAME}" = x; then
15162      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15163    fi
15164    OUTPUT_ROOT="$CURDIR"
15165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15166$as_echo "in current directory" >&6; }
15167
15168    # WARNING: This might be a bad thing to do. You need to be sure you want to
15169    # have a configuration in this directory. Do some sanity checks!
15170
15171    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15172      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15173      # other files
15174      files_present=`$LS $OUTPUT_ROOT`
15175      # Configure has already touched config.log and confdefs.h in the current dir when this check
15176      # is performed.
15177      filtered_files=`$ECHO "$files_present" \
15178          | $SED -e 's/config.log//g' \
15179              -e 's/configure.log//g' \
15180              -e 's/confdefs.h//g' \
15181              -e 's/ //g' \
15182          | $TR -d '\n'`
15183      if test "x$filtered_files" != x; then
15184        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15185$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15187$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15189$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15191$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15193$as_echo "$as_me: seriously mess up just about everything." >&6;}
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15195$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15197$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15198        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15199      fi
15200    fi
15201  fi
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15203$as_echo_n "checking what configuration name to use... " >&6; }
15204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15205$as_echo "$CONF_NAME" >&6; }
15206
15207
15208  # Only process if variable expands to non-empty
15209
15210  if test "x$OUTPUT_ROOT" != x; then
15211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15212
15213  # Input might be given as Windows format, start by converting to
15214  # unix format.
15215  path="$OUTPUT_ROOT"
15216  new_path=`$CYGPATH -u "$path"`
15217
15218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15221  # "foo.exe" is OK but "foo" is an error.
15222  #
15223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15224  # It is also a way to make sure we got the proper file name for the real test later on.
15225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15226  if test "x$test_shortpath" = x; then
15227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15228$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15229    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15230  fi
15231
15232  # Call helper function which possibly converts this using DOS-style short mode.
15233  # If so, the updated path is stored in $new_path.
15234
15235  input_path="$new_path"
15236  # Check if we need to convert this using DOS-style short mode. If the path
15237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15238  # take no chances and rewrite it.
15239  # Note: m4 eats our [], so we need to use [ and ] instead.
15240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15241  if test "x$has_forbidden_chars" != x; then
15242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15246      # Going to short mode and back again did indeed matter. Since short mode is
15247      # case insensitive, let's make it lowercase to improve readability.
15248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249      # Now convert it back to Unix-style (cygpath)
15250      input_path=`$CYGPATH -u "$shortmode_path"`
15251      new_path="$input_path"
15252    fi
15253  fi
15254
15255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15256  if test "x$test_cygdrive_prefix" = x; then
15257    # As a simple fix, exclude /usr/bin since it's not a real path.
15258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15260      # a path prefixed by /cygdrive for fixpath to work.
15261      new_path="$CYGWIN_ROOT_PATH$input_path"
15262    fi
15263  fi
15264
15265
15266  if test "x$path" != "x$new_path"; then
15267    OUTPUT_ROOT="$new_path"
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15269$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15270  fi
15271
15272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15273
15274  path="$OUTPUT_ROOT"
15275  has_colon=`$ECHO $path | $GREP ^.:`
15276  new_path="$path"
15277  if test "x$has_colon" = x; then
15278    # Not in mixed or Windows style, start by that.
15279    new_path=`cmd //c echo $path`
15280  fi
15281
15282
15283  input_path="$new_path"
15284  # Check if we need to convert this using DOS-style short mode. If the path
15285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15286  # take no chances and rewrite it.
15287  # Note: m4 eats our [], so we need to use [ and ] instead.
15288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15289  if test "x$has_forbidden_chars" != x; then
15290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15292  fi
15293
15294
15295  windows_path="$new_path"
15296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15297    unix_path=`$CYGPATH -u "$windows_path"`
15298    new_path="$unix_path"
15299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15301    new_path="$unix_path"
15302  fi
15303
15304  if test "x$path" != "x$new_path"; then
15305    OUTPUT_ROOT="$new_path"
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15307$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15308  fi
15309
15310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15312
15313    else
15314      # We're on a unix platform. Hooray! :)
15315      path="$OUTPUT_ROOT"
15316      has_space=`$ECHO "$path" | $GREP " "`
15317      if test "x$has_space" != x; then
15318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15319$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15321      fi
15322
15323      # Use eval to expand a potential ~
15324      eval path="$path"
15325      if test ! -f "$path" && test ! -d "$path"; then
15326        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15327      fi
15328
15329      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15330    fi
15331  fi
15332
15333
15334  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15335  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15336
15337  SPEC=$OUTPUT_ROOT/spec.gmk
15338
15339  CONF_NAME=$CONF_NAME
15340
15341  OUTPUT_ROOT=$OUTPUT_ROOT
15342
15343
15344
15345  # The spec.gmk file contains all variables for the make system.
15346  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15347
15348  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15349  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15350
15351  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15352  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15353
15354  # The compare.sh is used to compare the build output to other builds.
15355  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15356
15357  # The generated Makefile knows where the spec.gmk is and where the source is.
15358  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15359  # which will look for generated configurations
15360  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15361
15362
15363
15364# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15365
15366  for ac_prog in apt-get yum port pkgutil pkgadd
15367do
15368  # Extract the first word of "$ac_prog", so it can be a program name with args.
15369set dummy $ac_prog; ac_word=$2
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15371$as_echo_n "checking for $ac_word... " >&6; }
15372if ${ac_cv_prog_PKGHANDLER+:} false; then :
15373  $as_echo_n "(cached) " >&6
15374else
15375  if test -n "$PKGHANDLER"; then
15376  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15377else
15378as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15379for as_dir in $PATH
15380do
15381  IFS=$as_save_IFS
15382  test -z "$as_dir" && as_dir=.
15383    for ac_exec_ext in '' $ac_executable_extensions; do
15384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15385    ac_cv_prog_PKGHANDLER="$ac_prog"
15386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15387    break 2
15388  fi
15389done
15390  done
15391IFS=$as_save_IFS
15392
15393fi
15394fi
15395PKGHANDLER=$ac_cv_prog_PKGHANDLER
15396if test -n "$PKGHANDLER"; then
15397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15398$as_echo "$PKGHANDLER" >&6; }
15399else
15400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15401$as_echo "no" >&6; }
15402fi
15403
15404
15405  test -n "$PKGHANDLER" && break
15406done
15407
15408
15409
15410# Setup tools that requires more complex handling, or that is not needed by the configure script.
15411
15412
15413  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15414  if test "x$MAKE" != x; then
15415    # User has supplied a make, test it.
15416    if test ! -f "$MAKE"; then
15417      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15418    fi
15419
15420  MAKE_CANDIDATE=""$MAKE""
15421  DESCRIPTION="user supplied MAKE=$MAKE"
15422
15423  # On Cygwin, we require a newer version of make than on other platforms
15424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15425    MAKE_VERSION_EXPR="-e 4\."
15426    MAKE_REQUIRED_VERSION="4.0"
15427   else
15428    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15429    MAKE_REQUIRED_VERSION="3.81"
15430  fi
15431
15432  if test "x$MAKE_CANDIDATE" != x; then
15433    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15434$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15435    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15436    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15437    if test "x$IS_GNU_MAKE" = x; then
15438      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15439$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15440    else
15441      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15442      if test "x$IS_MODERN_MAKE" = x; then
15443        { $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
15444$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;}
15445      else
15446        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15447          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15448            MAKE_EXPECTED_ENV='cygwin'
15449          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15450            MAKE_EXPECTED_ENV='msys'
15451          else
15452            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15453          fi
15454          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15455          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15456        else
15457          # Not relevant for non-Windows
15458          IS_MAKE_CORRECT_ENV=true
15459        fi
15460        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15461          { $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
15462$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;}
15463        else
15464          FOUND_MAKE=$MAKE_CANDIDATE
15465
15466  # Only process if variable expands to non-empty
15467
15468  if test "x$FOUND_MAKE" != x; then
15469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15470
15471  # First separate the path from the arguments. This will split at the first
15472  # space.
15473  complete="$FOUND_MAKE"
15474  path="${complete%% *}"
15475  tmp="$complete EOL"
15476  arguments="${tmp#* }"
15477
15478  # Input might be given as Windows format, start by converting to
15479  # unix format.
15480  new_path=`$CYGPATH -u "$path"`
15481
15482  # Now try to locate executable using which
15483  new_path=`$WHICH "$new_path" 2> /dev/null`
15484  # bat and cmd files are not always considered executable in cygwin causing which
15485  # to not find them
15486  if test "x$new_path" = x \
15487      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15488      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15489    new_path=`$CYGPATH -u "$path"`
15490  fi
15491  if test "x$new_path" = x; then
15492    # Oops. Which didn't find the executable.
15493    # The splitting of arguments from the executable at a space might have been incorrect,
15494    # since paths with space are more likely in Windows. Give it another try with the whole
15495    # argument.
15496    path="$complete"
15497    arguments="EOL"
15498    new_path=`$CYGPATH -u "$path"`
15499    new_path=`$WHICH "$new_path" 2> /dev/null`
15500    # bat and cmd files are not always considered executable in cygwin causing which
15501    # to not find them
15502    if test "x$new_path" = x \
15503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15505      new_path=`$CYGPATH -u "$path"`
15506    fi
15507    if test "x$new_path" = x; then
15508      # It's still not found. Now this is an unrecoverable error.
15509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15510$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15511      has_space=`$ECHO "$complete" | $GREP " "`
15512      if test "x$has_space" != x; then
15513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15515      fi
15516      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15517    fi
15518  fi
15519
15520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15523  # "foo.exe" is OK but "foo" is an error.
15524  #
15525  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15526  # It is also a way to make sure we got the proper file name for the real test later on.
15527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15528  if test "x$test_shortpath" = x; then
15529    # Short path failed, file does not exist as specified.
15530    # Try adding .exe or .cmd
15531    if test -f "${new_path}.exe"; then
15532      input_to_shortpath="${new_path}.exe"
15533    elif test -f "${new_path}.cmd"; then
15534      input_to_shortpath="${new_path}.cmd"
15535    else
15536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15537$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15538      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15539$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15540      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15541    fi
15542  else
15543    input_to_shortpath="$new_path"
15544  fi
15545
15546  # Call helper function which possibly converts this using DOS-style short mode.
15547  # If so, the updated path is stored in $new_path.
15548  new_path="$input_to_shortpath"
15549
15550  input_path="$input_to_shortpath"
15551  # Check if we need to convert this using DOS-style short mode. If the path
15552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15553  # take no chances and rewrite it.
15554  # Note: m4 eats our [], so we need to use [ and ] instead.
15555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15556  if test "x$has_forbidden_chars" != x; then
15557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15561      # Going to short mode and back again did indeed matter. Since short mode is
15562      # case insensitive, let's make it lowercase to improve readability.
15563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15564      # Now convert it back to Unix-style (cygpath)
15565      input_path=`$CYGPATH -u "$shortmode_path"`
15566      new_path="$input_path"
15567    fi
15568  fi
15569
15570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15571  if test "x$test_cygdrive_prefix" = x; then
15572    # As a simple fix, exclude /usr/bin since it's not a real path.
15573    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15575      # a path prefixed by /cygdrive for fixpath to work.
15576      new_path="$CYGWIN_ROOT_PATH$input_path"
15577    fi
15578  fi
15579
15580  # remove trailing .exe if any
15581  new_path="${new_path/%.exe/}"
15582
15583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15584
15585  # First separate the path from the arguments. This will split at the first
15586  # space.
15587  complete="$FOUND_MAKE"
15588  path="${complete%% *}"
15589  tmp="$complete EOL"
15590  arguments="${tmp#* }"
15591
15592  # Input might be given as Windows format, start by converting to
15593  # unix format.
15594  new_path="$path"
15595
15596  windows_path="$new_path"
15597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15598    unix_path=`$CYGPATH -u "$windows_path"`
15599    new_path="$unix_path"
15600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15602    new_path="$unix_path"
15603  fi
15604
15605
15606  # Now try to locate executable using which
15607  new_path=`$WHICH "$new_path" 2> /dev/null`
15608
15609  if test "x$new_path" = x; then
15610    # Oops. Which didn't find the executable.
15611    # The splitting of arguments from the executable at a space might have been incorrect,
15612    # since paths with space are more likely in Windows. Give it another try with the whole
15613    # argument.
15614    path="$complete"
15615    arguments="EOL"
15616    new_path="$path"
15617
15618  windows_path="$new_path"
15619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15620    unix_path=`$CYGPATH -u "$windows_path"`
15621    new_path="$unix_path"
15622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15624    new_path="$unix_path"
15625  fi
15626
15627
15628    new_path=`$WHICH "$new_path" 2> /dev/null`
15629    # bat and cmd files are not always considered executable in MSYS causing which
15630    # to not find them
15631    if test "x$new_path" = x \
15632        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15633        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15634      new_path="$path"
15635
15636  windows_path="$new_path"
15637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15638    unix_path=`$CYGPATH -u "$windows_path"`
15639    new_path="$unix_path"
15640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15642    new_path="$unix_path"
15643  fi
15644
15645    fi
15646
15647    if test "x$new_path" = x; then
15648      # It's still not found. Now this is an unrecoverable error.
15649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15650$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15651      has_space=`$ECHO "$complete" | $GREP " "`
15652      if test "x$has_space" != x; then
15653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15655      fi
15656      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15657    fi
15658  fi
15659
15660  # Now new_path has a complete unix path to the binary
15661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15662    # Keep paths in /bin as-is, but remove trailing .exe if any
15663    new_path="${new_path/%.exe/}"
15664    # Do not save /bin paths to all_fixpath_prefixes!
15665  else
15666    # Not in mixed or Windows style, start by that.
15667    new_path=`cmd //c echo $new_path`
15668
15669  input_path="$new_path"
15670  # Check if we need to convert this using DOS-style short mode. If the path
15671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15672  # take no chances and rewrite it.
15673  # Note: m4 eats our [], so we need to use [ and ] instead.
15674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15675  if test "x$has_forbidden_chars" != x; then
15676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15678  fi
15679
15680    # Output is in $new_path
15681
15682  windows_path="$new_path"
15683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684    unix_path=`$CYGPATH -u "$windows_path"`
15685    new_path="$unix_path"
15686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15688    new_path="$unix_path"
15689  fi
15690
15691    # remove trailing .exe if any
15692    new_path="${new_path/%.exe/}"
15693
15694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15696  fi
15697
15698    else
15699      # We're on a unix platform. Hooray! :)
15700      # First separate the path from the arguments. This will split at the first
15701      # space.
15702      complete="$FOUND_MAKE"
15703      path="${complete%% *}"
15704      tmp="$complete EOL"
15705      arguments="${tmp#* }"
15706
15707      # Cannot rely on the command "which" here since it doesn't always work.
15708      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15709      if test -z "$is_absolute_path"; then
15710        # Path to executable is not absolute. Find it.
15711        IFS_save="$IFS"
15712        IFS=:
15713        for p in $PATH; do
15714          if test -f "$p/$path" && test -x "$p/$path"; then
15715            new_path="$p/$path"
15716            break
15717          fi
15718        done
15719        IFS="$IFS_save"
15720      else
15721        # This is an absolute path, we can use it without further modifications.
15722        new_path="$path"
15723      fi
15724
15725      if test "x$new_path" = x; then
15726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15727$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15728        has_space=`$ECHO "$complete" | $GREP " "`
15729        if test "x$has_space" != x; then
15730          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15731$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15732        fi
15733        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15734      fi
15735    fi
15736
15737    # Now join together the path and the arguments once again
15738    if test "x$arguments" != xEOL; then
15739      new_complete="$new_path ${arguments% *}"
15740    else
15741      new_complete="$new_path"
15742    fi
15743
15744    if test "x$complete" != "x$new_complete"; then
15745      FOUND_MAKE="$new_complete"
15746      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15747$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15748    fi
15749  fi
15750
15751        fi
15752      fi
15753    fi
15754  fi
15755
15756    if test "x$FOUND_MAKE" = x; then
15757      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15758    fi
15759  else
15760    # Try our hardest to locate a correct version of GNU make
15761    for ac_prog in gmake
15762do
15763  # Extract the first word of "$ac_prog", so it can be a program name with args.
15764set dummy $ac_prog; ac_word=$2
15765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15766$as_echo_n "checking for $ac_word... " >&6; }
15767if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15768  $as_echo_n "(cached) " >&6
15769else
15770  case $CHECK_GMAKE in
15771  [\\/]* | ?:[\\/]*)
15772  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15773  ;;
15774  *)
15775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15776for as_dir in $PATH
15777do
15778  IFS=$as_save_IFS
15779  test -z "$as_dir" && as_dir=.
15780    for ac_exec_ext in '' $ac_executable_extensions; do
15781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15782    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15784    break 2
15785  fi
15786done
15787  done
15788IFS=$as_save_IFS
15789
15790  ;;
15791esac
15792fi
15793CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15794if test -n "$CHECK_GMAKE"; then
15795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15796$as_echo "$CHECK_GMAKE" >&6; }
15797else
15798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15799$as_echo "no" >&6; }
15800fi
15801
15802
15803  test -n "$CHECK_GMAKE" && break
15804done
15805
15806
15807  MAKE_CANDIDATE=""$CHECK_GMAKE""
15808  DESCRIPTION="gmake in PATH"
15809
15810  # On Cygwin, we require a newer version of make than on other platforms
15811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15812    MAKE_VERSION_EXPR="-e 4\."
15813    MAKE_REQUIRED_VERSION="4.0"
15814   else
15815    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15816    MAKE_REQUIRED_VERSION="3.81"
15817  fi
15818
15819  if test "x$MAKE_CANDIDATE" != x; then
15820    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15821$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15822    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15823    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15824    if test "x$IS_GNU_MAKE" = x; then
15825      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15826$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15827    else
15828      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15829      if test "x$IS_MODERN_MAKE" = x; then
15830        { $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
15831$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;}
15832      else
15833        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15834          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15835            MAKE_EXPECTED_ENV='cygwin'
15836          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15837            MAKE_EXPECTED_ENV='msys'
15838          else
15839            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15840          fi
15841          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15842          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15843        else
15844          # Not relevant for non-Windows
15845          IS_MAKE_CORRECT_ENV=true
15846        fi
15847        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15848          { $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
15849$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;}
15850        else
15851          FOUND_MAKE=$MAKE_CANDIDATE
15852
15853  # Only process if variable expands to non-empty
15854
15855  if test "x$FOUND_MAKE" != x; then
15856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15857
15858  # First separate the path from the arguments. This will split at the first
15859  # space.
15860  complete="$FOUND_MAKE"
15861  path="${complete%% *}"
15862  tmp="$complete EOL"
15863  arguments="${tmp#* }"
15864
15865  # Input might be given as Windows format, start by converting to
15866  # unix format.
15867  new_path=`$CYGPATH -u "$path"`
15868
15869  # Now try to locate executable using which
15870  new_path=`$WHICH "$new_path" 2> /dev/null`
15871  # bat and cmd files are not always considered executable in cygwin causing which
15872  # to not find them
15873  if test "x$new_path" = x \
15874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15876    new_path=`$CYGPATH -u "$path"`
15877  fi
15878  if test "x$new_path" = x; then
15879    # Oops. Which didn't find the executable.
15880    # The splitting of arguments from the executable at a space might have been incorrect,
15881    # since paths with space are more likely in Windows. Give it another try with the whole
15882    # argument.
15883    path="$complete"
15884    arguments="EOL"
15885    new_path=`$CYGPATH -u "$path"`
15886    new_path=`$WHICH "$new_path" 2> /dev/null`
15887    # bat and cmd files are not always considered executable in cygwin causing which
15888    # to not find them
15889    if test "x$new_path" = x \
15890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15892      new_path=`$CYGPATH -u "$path"`
15893    fi
15894    if test "x$new_path" = x; then
15895      # It's still not found. Now this is an unrecoverable error.
15896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15897$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15898      has_space=`$ECHO "$complete" | $GREP " "`
15899      if test "x$has_space" != x; then
15900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15902      fi
15903      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15904    fi
15905  fi
15906
15907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15910  # "foo.exe" is OK but "foo" is an error.
15911  #
15912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15913  # It is also a way to make sure we got the proper file name for the real test later on.
15914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15915  if test "x$test_shortpath" = x; then
15916    # Short path failed, file does not exist as specified.
15917    # Try adding .exe or .cmd
15918    if test -f "${new_path}.exe"; then
15919      input_to_shortpath="${new_path}.exe"
15920    elif test -f "${new_path}.cmd"; then
15921      input_to_shortpath="${new_path}.cmd"
15922    else
15923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15927      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15928    fi
15929  else
15930    input_to_shortpath="$new_path"
15931  fi
15932
15933  # Call helper function which possibly converts this using DOS-style short mode.
15934  # If so, the updated path is stored in $new_path.
15935  new_path="$input_to_shortpath"
15936
15937  input_path="$input_to_shortpath"
15938  # Check if we need to convert this using DOS-style short mode. If the path
15939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15940  # take no chances and rewrite it.
15941  # Note: m4 eats our [], so we need to use [ and ] instead.
15942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15943  if test "x$has_forbidden_chars" != x; then
15944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15948      # Going to short mode and back again did indeed matter. Since short mode is
15949      # case insensitive, let's make it lowercase to improve readability.
15950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15951      # Now convert it back to Unix-style (cygpath)
15952      input_path=`$CYGPATH -u "$shortmode_path"`
15953      new_path="$input_path"
15954    fi
15955  fi
15956
15957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15958  if test "x$test_cygdrive_prefix" = x; then
15959    # As a simple fix, exclude /usr/bin since it's not a real path.
15960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15962      # a path prefixed by /cygdrive for fixpath to work.
15963      new_path="$CYGWIN_ROOT_PATH$input_path"
15964    fi
15965  fi
15966
15967  # remove trailing .exe if any
15968  new_path="${new_path/%.exe/}"
15969
15970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15971
15972  # First separate the path from the arguments. This will split at the first
15973  # space.
15974  complete="$FOUND_MAKE"
15975  path="${complete%% *}"
15976  tmp="$complete EOL"
15977  arguments="${tmp#* }"
15978
15979  # Input might be given as Windows format, start by converting to
15980  # unix format.
15981  new_path="$path"
15982
15983  windows_path="$new_path"
15984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15985    unix_path=`$CYGPATH -u "$windows_path"`
15986    new_path="$unix_path"
15987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15989    new_path="$unix_path"
15990  fi
15991
15992
15993  # Now try to locate executable using which
15994  new_path=`$WHICH "$new_path" 2> /dev/null`
15995
15996  if test "x$new_path" = x; then
15997    # Oops. Which didn't find the executable.
15998    # The splitting of arguments from the executable at a space might have been incorrect,
15999    # since paths with space are more likely in Windows. Give it another try with the whole
16000    # argument.
16001    path="$complete"
16002    arguments="EOL"
16003    new_path="$path"
16004
16005  windows_path="$new_path"
16006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16007    unix_path=`$CYGPATH -u "$windows_path"`
16008    new_path="$unix_path"
16009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16011    new_path="$unix_path"
16012  fi
16013
16014
16015    new_path=`$WHICH "$new_path" 2> /dev/null`
16016    # bat and cmd files are not always considered executable in MSYS causing which
16017    # to not find them
16018    if test "x$new_path" = x \
16019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16021      new_path="$path"
16022
16023  windows_path="$new_path"
16024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16025    unix_path=`$CYGPATH -u "$windows_path"`
16026    new_path="$unix_path"
16027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16029    new_path="$unix_path"
16030  fi
16031
16032    fi
16033
16034    if test "x$new_path" = x; then
16035      # It's still not found. Now this is an unrecoverable error.
16036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16038      has_space=`$ECHO "$complete" | $GREP " "`
16039      if test "x$has_space" != x; then
16040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16042      fi
16043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16044    fi
16045  fi
16046
16047  # Now new_path has a complete unix path to the binary
16048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16049    # Keep paths in /bin as-is, but remove trailing .exe if any
16050    new_path="${new_path/%.exe/}"
16051    # Do not save /bin paths to all_fixpath_prefixes!
16052  else
16053    # Not in mixed or Windows style, start by that.
16054    new_path=`cmd //c echo $new_path`
16055
16056  input_path="$new_path"
16057  # Check if we need to convert this using DOS-style short mode. If the path
16058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16059  # take no chances and rewrite it.
16060  # Note: m4 eats our [], so we need to use [ and ] instead.
16061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16062  if test "x$has_forbidden_chars" != x; then
16063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16065  fi
16066
16067    # Output is in $new_path
16068
16069  windows_path="$new_path"
16070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16071    unix_path=`$CYGPATH -u "$windows_path"`
16072    new_path="$unix_path"
16073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16075    new_path="$unix_path"
16076  fi
16077
16078    # remove trailing .exe if any
16079    new_path="${new_path/%.exe/}"
16080
16081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16083  fi
16084
16085    else
16086      # We're on a unix platform. Hooray! :)
16087      # First separate the path from the arguments. This will split at the first
16088      # space.
16089      complete="$FOUND_MAKE"
16090      path="${complete%% *}"
16091      tmp="$complete EOL"
16092      arguments="${tmp#* }"
16093
16094      # Cannot rely on the command "which" here since it doesn't always work.
16095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16096      if test -z "$is_absolute_path"; then
16097        # Path to executable is not absolute. Find it.
16098        IFS_save="$IFS"
16099        IFS=:
16100        for p in $PATH; do
16101          if test -f "$p/$path" && test -x "$p/$path"; then
16102            new_path="$p/$path"
16103            break
16104          fi
16105        done
16106        IFS="$IFS_save"
16107      else
16108        # This is an absolute path, we can use it without further modifications.
16109        new_path="$path"
16110      fi
16111
16112      if test "x$new_path" = x; then
16113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16115        has_space=`$ECHO "$complete" | $GREP " "`
16116        if test "x$has_space" != x; then
16117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16119        fi
16120        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16121      fi
16122    fi
16123
16124    # Now join together the path and the arguments once again
16125    if test "x$arguments" != xEOL; then
16126      new_complete="$new_path ${arguments% *}"
16127    else
16128      new_complete="$new_path"
16129    fi
16130
16131    if test "x$complete" != "x$new_complete"; then
16132      FOUND_MAKE="$new_complete"
16133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16134$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16135    fi
16136  fi
16137
16138        fi
16139      fi
16140    fi
16141  fi
16142
16143
16144    if test "x$FOUND_MAKE" = x; then
16145      for ac_prog in make
16146do
16147  # Extract the first word of "$ac_prog", so it can be a program name with args.
16148set dummy $ac_prog; ac_word=$2
16149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16150$as_echo_n "checking for $ac_word... " >&6; }
16151if ${ac_cv_path_CHECK_MAKE+:} false; then :
16152  $as_echo_n "(cached) " >&6
16153else
16154  case $CHECK_MAKE in
16155  [\\/]* | ?:[\\/]*)
16156  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16157  ;;
16158  *)
16159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16160for as_dir in $PATH
16161do
16162  IFS=$as_save_IFS
16163  test -z "$as_dir" && as_dir=.
16164    for ac_exec_ext in '' $ac_executable_extensions; do
16165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16166    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16168    break 2
16169  fi
16170done
16171  done
16172IFS=$as_save_IFS
16173
16174  ;;
16175esac
16176fi
16177CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16178if test -n "$CHECK_MAKE"; then
16179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16180$as_echo "$CHECK_MAKE" >&6; }
16181else
16182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16183$as_echo "no" >&6; }
16184fi
16185
16186
16187  test -n "$CHECK_MAKE" && break
16188done
16189
16190
16191  MAKE_CANDIDATE=""$CHECK_MAKE""
16192  DESCRIPTION="make in PATH"
16193
16194  # On Cygwin, we require a newer version of make than on other platforms
16195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16196    MAKE_VERSION_EXPR="-e 4\."
16197    MAKE_REQUIRED_VERSION="4.0"
16198   else
16199    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16200    MAKE_REQUIRED_VERSION="3.81"
16201  fi
16202
16203  if test "x$MAKE_CANDIDATE" != x; then
16204    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16205$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16206    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16207    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16208    if test "x$IS_GNU_MAKE" = x; then
16209      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16210$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16211    else
16212      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16213      if test "x$IS_MODERN_MAKE" = x; then
16214        { $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
16215$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;}
16216      else
16217        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16218          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16219            MAKE_EXPECTED_ENV='cygwin'
16220          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16221            MAKE_EXPECTED_ENV='msys'
16222          else
16223            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16224          fi
16225          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16226          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16227        else
16228          # Not relevant for non-Windows
16229          IS_MAKE_CORRECT_ENV=true
16230        fi
16231        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16232          { $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
16233$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;}
16234        else
16235          FOUND_MAKE=$MAKE_CANDIDATE
16236
16237  # Only process if variable expands to non-empty
16238
16239  if test "x$FOUND_MAKE" != x; then
16240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16241
16242  # First separate the path from the arguments. This will split at the first
16243  # space.
16244  complete="$FOUND_MAKE"
16245  path="${complete%% *}"
16246  tmp="$complete EOL"
16247  arguments="${tmp#* }"
16248
16249  # Input might be given as Windows format, start by converting to
16250  # unix format.
16251  new_path=`$CYGPATH -u "$path"`
16252
16253  # Now try to locate executable using which
16254  new_path=`$WHICH "$new_path" 2> /dev/null`
16255  # bat and cmd files are not always considered executable in cygwin causing which
16256  # to not find them
16257  if test "x$new_path" = x \
16258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16260    new_path=`$CYGPATH -u "$path"`
16261  fi
16262  if test "x$new_path" = x; then
16263    # Oops. Which didn't find the executable.
16264    # The splitting of arguments from the executable at a space might have been incorrect,
16265    # since paths with space are more likely in Windows. Give it another try with the whole
16266    # argument.
16267    path="$complete"
16268    arguments="EOL"
16269    new_path=`$CYGPATH -u "$path"`
16270    new_path=`$WHICH "$new_path" 2> /dev/null`
16271    # bat and cmd files are not always considered executable in cygwin causing which
16272    # to not find them
16273    if test "x$new_path" = x \
16274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16276      new_path=`$CYGPATH -u "$path"`
16277    fi
16278    if test "x$new_path" = x; then
16279      # It's still not found. Now this is an unrecoverable error.
16280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16282      has_space=`$ECHO "$complete" | $GREP " "`
16283      if test "x$has_space" != x; then
16284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16286      fi
16287      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16288    fi
16289  fi
16290
16291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16294  # "foo.exe" is OK but "foo" is an error.
16295  #
16296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16297  # It is also a way to make sure we got the proper file name for the real test later on.
16298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16299  if test "x$test_shortpath" = x; then
16300    # Short path failed, file does not exist as specified.
16301    # Try adding .exe or .cmd
16302    if test -f "${new_path}.exe"; then
16303      input_to_shortpath="${new_path}.exe"
16304    elif test -f "${new_path}.cmd"; then
16305      input_to_shortpath="${new_path}.cmd"
16306    else
16307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16308$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16311      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16312    fi
16313  else
16314    input_to_shortpath="$new_path"
16315  fi
16316
16317  # Call helper function which possibly converts this using DOS-style short mode.
16318  # If so, the updated path is stored in $new_path.
16319  new_path="$input_to_shortpath"
16320
16321  input_path="$input_to_shortpath"
16322  # Check if we need to convert this using DOS-style short mode. If the path
16323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16324  # take no chances and rewrite it.
16325  # Note: m4 eats our [], so we need to use [ and ] instead.
16326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16327  if test "x$has_forbidden_chars" != x; then
16328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16332      # Going to short mode and back again did indeed matter. Since short mode is
16333      # case insensitive, let's make it lowercase to improve readability.
16334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16335      # Now convert it back to Unix-style (cygpath)
16336      input_path=`$CYGPATH -u "$shortmode_path"`
16337      new_path="$input_path"
16338    fi
16339  fi
16340
16341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16342  if test "x$test_cygdrive_prefix" = x; then
16343    # As a simple fix, exclude /usr/bin since it's not a real path.
16344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16346      # a path prefixed by /cygdrive for fixpath to work.
16347      new_path="$CYGWIN_ROOT_PATH$input_path"
16348    fi
16349  fi
16350
16351  # remove trailing .exe if any
16352  new_path="${new_path/%.exe/}"
16353
16354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16355
16356  # First separate the path from the arguments. This will split at the first
16357  # space.
16358  complete="$FOUND_MAKE"
16359  path="${complete%% *}"
16360  tmp="$complete EOL"
16361  arguments="${tmp#* }"
16362
16363  # Input might be given as Windows format, start by converting to
16364  # unix format.
16365  new_path="$path"
16366
16367  windows_path="$new_path"
16368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16369    unix_path=`$CYGPATH -u "$windows_path"`
16370    new_path="$unix_path"
16371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16373    new_path="$unix_path"
16374  fi
16375
16376
16377  # Now try to locate executable using which
16378  new_path=`$WHICH "$new_path" 2> /dev/null`
16379
16380  if test "x$new_path" = x; then
16381    # Oops. Which didn't find the executable.
16382    # The splitting of arguments from the executable at a space might have been incorrect,
16383    # since paths with space are more likely in Windows. Give it another try with the whole
16384    # argument.
16385    path="$complete"
16386    arguments="EOL"
16387    new_path="$path"
16388
16389  windows_path="$new_path"
16390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391    unix_path=`$CYGPATH -u "$windows_path"`
16392    new_path="$unix_path"
16393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16395    new_path="$unix_path"
16396  fi
16397
16398
16399    new_path=`$WHICH "$new_path" 2> /dev/null`
16400    # bat and cmd files are not always considered executable in MSYS causing which
16401    # to not find them
16402    if test "x$new_path" = x \
16403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16405      new_path="$path"
16406
16407  windows_path="$new_path"
16408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16409    unix_path=`$CYGPATH -u "$windows_path"`
16410    new_path="$unix_path"
16411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16413    new_path="$unix_path"
16414  fi
16415
16416    fi
16417
16418    if test "x$new_path" = x; then
16419      # It's still not found. Now this is an unrecoverable error.
16420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16421$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16422      has_space=`$ECHO "$complete" | $GREP " "`
16423      if test "x$has_space" != x; then
16424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16426      fi
16427      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16428    fi
16429  fi
16430
16431  # Now new_path has a complete unix path to the binary
16432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16433    # Keep paths in /bin as-is, but remove trailing .exe if any
16434    new_path="${new_path/%.exe/}"
16435    # Do not save /bin paths to all_fixpath_prefixes!
16436  else
16437    # Not in mixed or Windows style, start by that.
16438    new_path=`cmd //c echo $new_path`
16439
16440  input_path="$new_path"
16441  # Check if we need to convert this using DOS-style short mode. If the path
16442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16443  # take no chances and rewrite it.
16444  # Note: m4 eats our [], so we need to use [ and ] instead.
16445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16446  if test "x$has_forbidden_chars" != x; then
16447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16449  fi
16450
16451    # Output is in $new_path
16452
16453  windows_path="$new_path"
16454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16455    unix_path=`$CYGPATH -u "$windows_path"`
16456    new_path="$unix_path"
16457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16459    new_path="$unix_path"
16460  fi
16461
16462    # remove trailing .exe if any
16463    new_path="${new_path/%.exe/}"
16464
16465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16467  fi
16468
16469    else
16470      # We're on a unix platform. Hooray! :)
16471      # First separate the path from the arguments. This will split at the first
16472      # space.
16473      complete="$FOUND_MAKE"
16474      path="${complete%% *}"
16475      tmp="$complete EOL"
16476      arguments="${tmp#* }"
16477
16478      # Cannot rely on the command "which" here since it doesn't always work.
16479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16480      if test -z "$is_absolute_path"; then
16481        # Path to executable is not absolute. Find it.
16482        IFS_save="$IFS"
16483        IFS=:
16484        for p in $PATH; do
16485          if test -f "$p/$path" && test -x "$p/$path"; then
16486            new_path="$p/$path"
16487            break
16488          fi
16489        done
16490        IFS="$IFS_save"
16491      else
16492        # This is an absolute path, we can use it without further modifications.
16493        new_path="$path"
16494      fi
16495
16496      if test "x$new_path" = x; then
16497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16499        has_space=`$ECHO "$complete" | $GREP " "`
16500        if test "x$has_space" != x; then
16501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16503        fi
16504        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16505      fi
16506    fi
16507
16508    # Now join together the path and the arguments once again
16509    if test "x$arguments" != xEOL; then
16510      new_complete="$new_path ${arguments% *}"
16511    else
16512      new_complete="$new_path"
16513    fi
16514
16515    if test "x$complete" != "x$new_complete"; then
16516      FOUND_MAKE="$new_complete"
16517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16518$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16519    fi
16520  fi
16521
16522        fi
16523      fi
16524    fi
16525  fi
16526
16527    fi
16528
16529    if test "x$FOUND_MAKE" = x; then
16530      if test "x$TOOLCHAIN_PATH" != x; then
16531        # We have a toolchain path, check that as well before giving up.
16532        OLD_PATH=$PATH
16533        PATH=$TOOLCHAIN_PATH:$PATH
16534        for ac_prog in gmake
16535do
16536  # Extract the first word of "$ac_prog", so it can be a program name with args.
16537set dummy $ac_prog; ac_word=$2
16538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16539$as_echo_n "checking for $ac_word... " >&6; }
16540if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16541  $as_echo_n "(cached) " >&6
16542else
16543  case $CHECK_TOOLSDIR_GMAKE in
16544  [\\/]* | ?:[\\/]*)
16545  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16546  ;;
16547  *)
16548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16549for as_dir in $PATH
16550do
16551  IFS=$as_save_IFS
16552  test -z "$as_dir" && as_dir=.
16553    for ac_exec_ext in '' $ac_executable_extensions; do
16554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16555    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16557    break 2
16558  fi
16559done
16560  done
16561IFS=$as_save_IFS
16562
16563  ;;
16564esac
16565fi
16566CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16567if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16569$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16570else
16571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16572$as_echo "no" >&6; }
16573fi
16574
16575
16576  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16577done
16578
16579
16580  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16581  DESCRIPTION="gmake in tools-dir"
16582
16583  # On Cygwin, we require a newer version of make than on other platforms
16584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16585    MAKE_VERSION_EXPR="-e 4\."
16586    MAKE_REQUIRED_VERSION="4.0"
16587   else
16588    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16589    MAKE_REQUIRED_VERSION="3.81"
16590  fi
16591
16592  if test "x$MAKE_CANDIDATE" != x; then
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16594$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16595    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16596    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16597    if test "x$IS_GNU_MAKE" = x; then
16598      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16599$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16600    else
16601      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16602      if test "x$IS_MODERN_MAKE" = x; then
16603        { $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
16604$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;}
16605      else
16606        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16607          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16608            MAKE_EXPECTED_ENV='cygwin'
16609          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16610            MAKE_EXPECTED_ENV='msys'
16611          else
16612            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16613          fi
16614          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16615          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16616        else
16617          # Not relevant for non-Windows
16618          IS_MAKE_CORRECT_ENV=true
16619        fi
16620        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16621          { $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
16622$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;}
16623        else
16624          FOUND_MAKE=$MAKE_CANDIDATE
16625
16626  # Only process if variable expands to non-empty
16627
16628  if test "x$FOUND_MAKE" != x; then
16629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16630
16631  # First separate the path from the arguments. This will split at the first
16632  # space.
16633  complete="$FOUND_MAKE"
16634  path="${complete%% *}"
16635  tmp="$complete EOL"
16636  arguments="${tmp#* }"
16637
16638  # Input might be given as Windows format, start by converting to
16639  # unix format.
16640  new_path=`$CYGPATH -u "$path"`
16641
16642  # Now try to locate executable using which
16643  new_path=`$WHICH "$new_path" 2> /dev/null`
16644  # bat and cmd files are not always considered executable in cygwin causing which
16645  # to not find them
16646  if test "x$new_path" = x \
16647      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16648      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16649    new_path=`$CYGPATH -u "$path"`
16650  fi
16651  if test "x$new_path" = x; then
16652    # Oops. Which didn't find the executable.
16653    # The splitting of arguments from the executable at a space might have been incorrect,
16654    # since paths with space are more likely in Windows. Give it another try with the whole
16655    # argument.
16656    path="$complete"
16657    arguments="EOL"
16658    new_path=`$CYGPATH -u "$path"`
16659    new_path=`$WHICH "$new_path" 2> /dev/null`
16660    # bat and cmd files are not always considered executable in cygwin causing which
16661    # to not find them
16662    if test "x$new_path" = x \
16663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16665      new_path=`$CYGPATH -u "$path"`
16666    fi
16667    if test "x$new_path" = x; then
16668      # It's still not found. Now this is an unrecoverable error.
16669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16670$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16671      has_space=`$ECHO "$complete" | $GREP " "`
16672      if test "x$has_space" != x; then
16673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16675      fi
16676      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16677    fi
16678  fi
16679
16680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16683  # "foo.exe" is OK but "foo" is an error.
16684  #
16685  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16686  # It is also a way to make sure we got the proper file name for the real test later on.
16687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16688  if test "x$test_shortpath" = x; then
16689    # Short path failed, file does not exist as specified.
16690    # Try adding .exe or .cmd
16691    if test -f "${new_path}.exe"; then
16692      input_to_shortpath="${new_path}.exe"
16693    elif test -f "${new_path}.cmd"; then
16694      input_to_shortpath="${new_path}.cmd"
16695    else
16696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16698      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16699$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16700      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16701    fi
16702  else
16703    input_to_shortpath="$new_path"
16704  fi
16705
16706  # Call helper function which possibly converts this using DOS-style short mode.
16707  # If so, the updated path is stored in $new_path.
16708  new_path="$input_to_shortpath"
16709
16710  input_path="$input_to_shortpath"
16711  # Check if we need to convert this using DOS-style short mode. If the path
16712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16713  # take no chances and rewrite it.
16714  # Note: m4 eats our [], so we need to use [ and ] instead.
16715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16716  if test "x$has_forbidden_chars" != x; then
16717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16721      # Going to short mode and back again did indeed matter. Since short mode is
16722      # case insensitive, let's make it lowercase to improve readability.
16723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16724      # Now convert it back to Unix-style (cygpath)
16725      input_path=`$CYGPATH -u "$shortmode_path"`
16726      new_path="$input_path"
16727    fi
16728  fi
16729
16730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16731  if test "x$test_cygdrive_prefix" = x; then
16732    # As a simple fix, exclude /usr/bin since it's not a real path.
16733    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16735      # a path prefixed by /cygdrive for fixpath to work.
16736      new_path="$CYGWIN_ROOT_PATH$input_path"
16737    fi
16738  fi
16739
16740  # remove trailing .exe if any
16741  new_path="${new_path/%.exe/}"
16742
16743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16744
16745  # First separate the path from the arguments. This will split at the first
16746  # space.
16747  complete="$FOUND_MAKE"
16748  path="${complete%% *}"
16749  tmp="$complete EOL"
16750  arguments="${tmp#* }"
16751
16752  # Input might be given as Windows format, start by converting to
16753  # unix format.
16754  new_path="$path"
16755
16756  windows_path="$new_path"
16757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16758    unix_path=`$CYGPATH -u "$windows_path"`
16759    new_path="$unix_path"
16760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16762    new_path="$unix_path"
16763  fi
16764
16765
16766  # Now try to locate executable using which
16767  new_path=`$WHICH "$new_path" 2> /dev/null`
16768
16769  if test "x$new_path" = x; then
16770    # Oops. Which didn't find the executable.
16771    # The splitting of arguments from the executable at a space might have been incorrect,
16772    # since paths with space are more likely in Windows. Give it another try with the whole
16773    # argument.
16774    path="$complete"
16775    arguments="EOL"
16776    new_path="$path"
16777
16778  windows_path="$new_path"
16779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16780    unix_path=`$CYGPATH -u "$windows_path"`
16781    new_path="$unix_path"
16782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16784    new_path="$unix_path"
16785  fi
16786
16787
16788    new_path=`$WHICH "$new_path" 2> /dev/null`
16789    # bat and cmd files are not always considered executable in MSYS causing which
16790    # to not find them
16791    if test "x$new_path" = x \
16792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16794      new_path="$path"
16795
16796  windows_path="$new_path"
16797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16798    unix_path=`$CYGPATH -u "$windows_path"`
16799    new_path="$unix_path"
16800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16802    new_path="$unix_path"
16803  fi
16804
16805    fi
16806
16807    if test "x$new_path" = x; then
16808      # It's still not found. Now this is an unrecoverable error.
16809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16810$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16811      has_space=`$ECHO "$complete" | $GREP " "`
16812      if test "x$has_space" != x; then
16813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16815      fi
16816      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16817    fi
16818  fi
16819
16820  # Now new_path has a complete unix path to the binary
16821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16822    # Keep paths in /bin as-is, but remove trailing .exe if any
16823    new_path="${new_path/%.exe/}"
16824    # Do not save /bin paths to all_fixpath_prefixes!
16825  else
16826    # Not in mixed or Windows style, start by that.
16827    new_path=`cmd //c echo $new_path`
16828
16829  input_path="$new_path"
16830  # Check if we need to convert this using DOS-style short mode. If the path
16831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16832  # take no chances and rewrite it.
16833  # Note: m4 eats our [], so we need to use [ and ] instead.
16834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16835  if test "x$has_forbidden_chars" != x; then
16836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16838  fi
16839
16840    # Output is in $new_path
16841
16842  windows_path="$new_path"
16843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844    unix_path=`$CYGPATH -u "$windows_path"`
16845    new_path="$unix_path"
16846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16848    new_path="$unix_path"
16849  fi
16850
16851    # remove trailing .exe if any
16852    new_path="${new_path/%.exe/}"
16853
16854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16856  fi
16857
16858    else
16859      # We're on a unix platform. Hooray! :)
16860      # First separate the path from the arguments. This will split at the first
16861      # space.
16862      complete="$FOUND_MAKE"
16863      path="${complete%% *}"
16864      tmp="$complete EOL"
16865      arguments="${tmp#* }"
16866
16867      # Cannot rely on the command "which" here since it doesn't always work.
16868      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16869      if test -z "$is_absolute_path"; then
16870        # Path to executable is not absolute. Find it.
16871        IFS_save="$IFS"
16872        IFS=:
16873        for p in $PATH; do
16874          if test -f "$p/$path" && test -x "$p/$path"; then
16875            new_path="$p/$path"
16876            break
16877          fi
16878        done
16879        IFS="$IFS_save"
16880      else
16881        # This is an absolute path, we can use it without further modifications.
16882        new_path="$path"
16883      fi
16884
16885      if test "x$new_path" = x; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16888        has_space=`$ECHO "$complete" | $GREP " "`
16889        if test "x$has_space" != x; then
16890          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16892        fi
16893        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16894      fi
16895    fi
16896
16897    # Now join together the path and the arguments once again
16898    if test "x$arguments" != xEOL; then
16899      new_complete="$new_path ${arguments% *}"
16900    else
16901      new_complete="$new_path"
16902    fi
16903
16904    if test "x$complete" != "x$new_complete"; then
16905      FOUND_MAKE="$new_complete"
16906      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16907$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16908    fi
16909  fi
16910
16911        fi
16912      fi
16913    fi
16914  fi
16915
16916        if test "x$FOUND_MAKE" = x; then
16917          for ac_prog in make
16918do
16919  # Extract the first word of "$ac_prog", so it can be a program name with args.
16920set dummy $ac_prog; ac_word=$2
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16922$as_echo_n "checking for $ac_word... " >&6; }
16923if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16924  $as_echo_n "(cached) " >&6
16925else
16926  case $CHECK_TOOLSDIR_MAKE in
16927  [\\/]* | ?:[\\/]*)
16928  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16929  ;;
16930  *)
16931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16932for as_dir in $PATH
16933do
16934  IFS=$as_save_IFS
16935  test -z "$as_dir" && as_dir=.
16936    for ac_exec_ext in '' $ac_executable_extensions; do
16937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16938    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16940    break 2
16941  fi
16942done
16943  done
16944IFS=$as_save_IFS
16945
16946  ;;
16947esac
16948fi
16949CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16950if test -n "$CHECK_TOOLSDIR_MAKE"; then
16951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16952$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16953else
16954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16955$as_echo "no" >&6; }
16956fi
16957
16958
16959  test -n "$CHECK_TOOLSDIR_MAKE" && break
16960done
16961
16962
16963  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16964  DESCRIPTION="make in tools-dir"
16965
16966  # On Cygwin, we require a newer version of make than on other platforms
16967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16968    MAKE_VERSION_EXPR="-e 4\."
16969    MAKE_REQUIRED_VERSION="4.0"
16970   else
16971    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16972    MAKE_REQUIRED_VERSION="3.81"
16973  fi
16974
16975  if test "x$MAKE_CANDIDATE" != x; then
16976    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16977$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16978    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16979    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16980    if test "x$IS_GNU_MAKE" = x; then
16981      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16982$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16983    else
16984      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16985      if test "x$IS_MODERN_MAKE" = x; then
16986        { $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
16987$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;}
16988      else
16989        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16990          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991            MAKE_EXPECTED_ENV='cygwin'
16992          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16993            MAKE_EXPECTED_ENV='msys'
16994          else
16995            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16996          fi
16997          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16998          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16999        else
17000          # Not relevant for non-Windows
17001          IS_MAKE_CORRECT_ENV=true
17002        fi
17003        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17004          { $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
17005$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;}
17006        else
17007          FOUND_MAKE=$MAKE_CANDIDATE
17008
17009  # Only process if variable expands to non-empty
17010
17011  if test "x$FOUND_MAKE" != x; then
17012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013
17014  # First separate the path from the arguments. This will split at the first
17015  # space.
17016  complete="$FOUND_MAKE"
17017  path="${complete%% *}"
17018  tmp="$complete EOL"
17019  arguments="${tmp#* }"
17020
17021  # Input might be given as Windows format, start by converting to
17022  # unix format.
17023  new_path=`$CYGPATH -u "$path"`
17024
17025  # Now try to locate executable using which
17026  new_path=`$WHICH "$new_path" 2> /dev/null`
17027  # bat and cmd files are not always considered executable in cygwin causing which
17028  # to not find them
17029  if test "x$new_path" = x \
17030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17032    new_path=`$CYGPATH -u "$path"`
17033  fi
17034  if test "x$new_path" = x; then
17035    # Oops. Which didn't find the executable.
17036    # The splitting of arguments from the executable at a space might have been incorrect,
17037    # since paths with space are more likely in Windows. Give it another try with the whole
17038    # argument.
17039    path="$complete"
17040    arguments="EOL"
17041    new_path=`$CYGPATH -u "$path"`
17042    new_path=`$WHICH "$new_path" 2> /dev/null`
17043    # bat and cmd files are not always considered executable in cygwin causing which
17044    # to not find them
17045    if test "x$new_path" = x \
17046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17048      new_path=`$CYGPATH -u "$path"`
17049    fi
17050    if test "x$new_path" = x; then
17051      # It's still not found. Now this is an unrecoverable error.
17052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17054      has_space=`$ECHO "$complete" | $GREP " "`
17055      if test "x$has_space" != x; then
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17058      fi
17059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17060    fi
17061  fi
17062
17063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17066  # "foo.exe" is OK but "foo" is an error.
17067  #
17068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17069  # It is also a way to make sure we got the proper file name for the real test later on.
17070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17071  if test "x$test_shortpath" = x; then
17072    # Short path failed, file does not exist as specified.
17073    # Try adding .exe or .cmd
17074    if test -f "${new_path}.exe"; then
17075      input_to_shortpath="${new_path}.exe"
17076    elif test -f "${new_path}.cmd"; then
17077      input_to_shortpath="${new_path}.cmd"
17078    else
17079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17084    fi
17085  else
17086    input_to_shortpath="$new_path"
17087  fi
17088
17089  # Call helper function which possibly converts this using DOS-style short mode.
17090  # If so, the updated path is stored in $new_path.
17091  new_path="$input_to_shortpath"
17092
17093  input_path="$input_to_shortpath"
17094  # Check if we need to convert this using DOS-style short mode. If the path
17095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17096  # take no chances and rewrite it.
17097  # Note: m4 eats our [], so we need to use [ and ] instead.
17098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17099  if test "x$has_forbidden_chars" != x; then
17100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17104      # Going to short mode and back again did indeed matter. Since short mode is
17105      # case insensitive, let's make it lowercase to improve readability.
17106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17107      # Now convert it back to Unix-style (cygpath)
17108      input_path=`$CYGPATH -u "$shortmode_path"`
17109      new_path="$input_path"
17110    fi
17111  fi
17112
17113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17114  if test "x$test_cygdrive_prefix" = x; then
17115    # As a simple fix, exclude /usr/bin since it's not a real path.
17116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17118      # a path prefixed by /cygdrive for fixpath to work.
17119      new_path="$CYGWIN_ROOT_PATH$input_path"
17120    fi
17121  fi
17122
17123  # remove trailing .exe if any
17124  new_path="${new_path/%.exe/}"
17125
17126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17127
17128  # First separate the path from the arguments. This will split at the first
17129  # space.
17130  complete="$FOUND_MAKE"
17131  path="${complete%% *}"
17132  tmp="$complete EOL"
17133  arguments="${tmp#* }"
17134
17135  # Input might be given as Windows format, start by converting to
17136  # unix format.
17137  new_path="$path"
17138
17139  windows_path="$new_path"
17140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141    unix_path=`$CYGPATH -u "$windows_path"`
17142    new_path="$unix_path"
17143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17145    new_path="$unix_path"
17146  fi
17147
17148
17149  # Now try to locate executable using which
17150  new_path=`$WHICH "$new_path" 2> /dev/null`
17151
17152  if test "x$new_path" = x; then
17153    # Oops. Which didn't find the executable.
17154    # The splitting of arguments from the executable at a space might have been incorrect,
17155    # since paths with space are more likely in Windows. Give it another try with the whole
17156    # argument.
17157    path="$complete"
17158    arguments="EOL"
17159    new_path="$path"
17160
17161  windows_path="$new_path"
17162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17163    unix_path=`$CYGPATH -u "$windows_path"`
17164    new_path="$unix_path"
17165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17167    new_path="$unix_path"
17168  fi
17169
17170
17171    new_path=`$WHICH "$new_path" 2> /dev/null`
17172    # bat and cmd files are not always considered executable in MSYS causing which
17173    # to not find them
17174    if test "x$new_path" = x \
17175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17177      new_path="$path"
17178
17179  windows_path="$new_path"
17180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17181    unix_path=`$CYGPATH -u "$windows_path"`
17182    new_path="$unix_path"
17183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17185    new_path="$unix_path"
17186  fi
17187
17188    fi
17189
17190    if test "x$new_path" = x; then
17191      # It's still not found. Now this is an unrecoverable error.
17192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17194      has_space=`$ECHO "$complete" | $GREP " "`
17195      if test "x$has_space" != x; then
17196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17198      fi
17199      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17200    fi
17201  fi
17202
17203  # Now new_path has a complete unix path to the binary
17204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17205    # Keep paths in /bin as-is, but remove trailing .exe if any
17206    new_path="${new_path/%.exe/}"
17207    # Do not save /bin paths to all_fixpath_prefixes!
17208  else
17209    # Not in mixed or Windows style, start by that.
17210    new_path=`cmd //c echo $new_path`
17211
17212  input_path="$new_path"
17213  # Check if we need to convert this using DOS-style short mode. If the path
17214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17215  # take no chances and rewrite it.
17216  # Note: m4 eats our [], so we need to use [ and ] instead.
17217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17218  if test "x$has_forbidden_chars" != x; then
17219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17221  fi
17222
17223    # Output is in $new_path
17224
17225  windows_path="$new_path"
17226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17227    unix_path=`$CYGPATH -u "$windows_path"`
17228    new_path="$unix_path"
17229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17231    new_path="$unix_path"
17232  fi
17233
17234    # remove trailing .exe if any
17235    new_path="${new_path/%.exe/}"
17236
17237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17239  fi
17240
17241    else
17242      # We're on a unix platform. Hooray! :)
17243      # First separate the path from the arguments. This will split at the first
17244      # space.
17245      complete="$FOUND_MAKE"
17246      path="${complete%% *}"
17247      tmp="$complete EOL"
17248      arguments="${tmp#* }"
17249
17250      # Cannot rely on the command "which" here since it doesn't always work.
17251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17252      if test -z "$is_absolute_path"; then
17253        # Path to executable is not absolute. Find it.
17254        IFS_save="$IFS"
17255        IFS=:
17256        for p in $PATH; do
17257          if test -f "$p/$path" && test -x "$p/$path"; then
17258            new_path="$p/$path"
17259            break
17260          fi
17261        done
17262        IFS="$IFS_save"
17263      else
17264        # This is an absolute path, we can use it without further modifications.
17265        new_path="$path"
17266      fi
17267
17268      if test "x$new_path" = x; then
17269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17271        has_space=`$ECHO "$complete" | $GREP " "`
17272        if test "x$has_space" != x; then
17273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17275        fi
17276        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17277      fi
17278    fi
17279
17280    # Now join together the path and the arguments once again
17281    if test "x$arguments" != xEOL; then
17282      new_complete="$new_path ${arguments% *}"
17283    else
17284      new_complete="$new_path"
17285    fi
17286
17287    if test "x$complete" != "x$new_complete"; then
17288      FOUND_MAKE="$new_complete"
17289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17290$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17291    fi
17292  fi
17293
17294        fi
17295      fi
17296    fi
17297  fi
17298
17299        fi
17300        PATH=$OLD_PATH
17301      fi
17302    fi
17303
17304    if test "x$FOUND_MAKE" = x; then
17305      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
17306    fi
17307  fi
17308
17309  MAKE=$FOUND_MAKE
17310
17311  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17312$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17313
17314
17315  # Check if make supports the output sync option and if so, setup using it.
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17317$as_echo_n "checking if make --output-sync is supported... " >&6; }
17318  if $MAKE --version -O > /dev/null 2>&1; then
17319    OUTPUT_SYNC_SUPPORTED=true
17320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17321$as_echo "yes" >&6; }
17322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17323$as_echo_n "checking for output-sync value... " >&6; }
17324
17325# Check whether --with-output-sync was given.
17326if test "${with_output_sync+set}" = set; then :
17327  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17328fi
17329
17330    if test "x$OUTPUT_SYNC" = "x"; then
17331      OUTPUT_SYNC=none
17332    fi
17333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17334$as_echo "$OUTPUT_SYNC" >&6; }
17335    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17336      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17337    fi
17338  else
17339    OUTPUT_SYNC_SUPPORTED=false
17340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17341$as_echo "no" >&6; }
17342  fi
17343
17344
17345
17346
17347
17348
17349  # Test if find supports -delete
17350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17351$as_echo_n "checking if find supports -delete... " >&6; }
17352  FIND_DELETE="-delete"
17353
17354  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17355
17356  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17357
17358  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17359  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17360    # No, it does not.
17361    rm $DELETEDIR/TestIfFindSupportsDelete
17362    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17363      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17364      FIND_DELETE="-print | xargs rm"
17365    else
17366      FIND_DELETE="-exec rm \{\} \+"
17367    fi
17368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17369$as_echo "no" >&6; }
17370  else
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17372$as_echo "yes" >&6; }
17373  fi
17374  rmdir $DELETEDIR
17375
17376
17377
17378  # These tools might not be installed by default,
17379  # need hint on how to install them.
17380
17381
17382
17383  # Publish this variable in the help.
17384
17385
17386  if test "x$UNZIP" = x; then
17387    # The variable is not set by user, try to locate tool using the code snippet
17388    for ac_prog in unzip
17389do
17390  # Extract the first word of "$ac_prog", so it can be a program name with args.
17391set dummy $ac_prog; ac_word=$2
17392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17393$as_echo_n "checking for $ac_word... " >&6; }
17394if ${ac_cv_path_UNZIP+:} false; then :
17395  $as_echo_n "(cached) " >&6
17396else
17397  case $UNZIP in
17398  [\\/]* | ?:[\\/]*)
17399  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17400  ;;
17401  *)
17402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17403for as_dir in $PATH
17404do
17405  IFS=$as_save_IFS
17406  test -z "$as_dir" && as_dir=.
17407    for ac_exec_ext in '' $ac_executable_extensions; do
17408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17409    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17411    break 2
17412  fi
17413done
17414  done
17415IFS=$as_save_IFS
17416
17417  ;;
17418esac
17419fi
17420UNZIP=$ac_cv_path_UNZIP
17421if test -n "$UNZIP"; then
17422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17423$as_echo "$UNZIP" >&6; }
17424else
17425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17426$as_echo "no" >&6; }
17427fi
17428
17429
17430  test -n "$UNZIP" && break
17431done
17432
17433  else
17434    # The variable is set, but is it from the command line or the environment?
17435
17436    # Try to remove the string !UNZIP! from our list.
17437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17439      # If it failed, the variable was not from the command line. Ignore it,
17440      # but warn the user (except for BASH, which is always set by the calling BASH).
17441      if test "xUNZIP" != xBASH; then
17442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17443$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17444      fi
17445      # Try to locate tool using the code snippet
17446      for ac_prog in unzip
17447do
17448  # Extract the first word of "$ac_prog", so it can be a program name with args.
17449set dummy $ac_prog; ac_word=$2
17450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17451$as_echo_n "checking for $ac_word... " >&6; }
17452if ${ac_cv_path_UNZIP+:} false; then :
17453  $as_echo_n "(cached) " >&6
17454else
17455  case $UNZIP in
17456  [\\/]* | ?:[\\/]*)
17457  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17458  ;;
17459  *)
17460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17461for as_dir in $PATH
17462do
17463  IFS=$as_save_IFS
17464  test -z "$as_dir" && as_dir=.
17465    for ac_exec_ext in '' $ac_executable_extensions; do
17466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17467    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17469    break 2
17470  fi
17471done
17472  done
17473IFS=$as_save_IFS
17474
17475  ;;
17476esac
17477fi
17478UNZIP=$ac_cv_path_UNZIP
17479if test -n "$UNZIP"; then
17480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17481$as_echo "$UNZIP" >&6; }
17482else
17483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17484$as_echo "no" >&6; }
17485fi
17486
17487
17488  test -n "$UNZIP" && break
17489done
17490
17491    else
17492      # If it succeeded, then it was overridden by the user. We will use it
17493      # for the tool.
17494
17495      # First remove it from the list of overridden variables, so we can test
17496      # for unknown variables in the end.
17497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17498
17499      # Check if the provided tool contains a complete path.
17500      tool_specified="$UNZIP"
17501      tool_basename="${tool_specified##*/}"
17502      if test "x$tool_basename" = "x$tool_specified"; then
17503        # A command without a complete path is provided, search $PATH.
17504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17505$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17506        # Extract the first word of "$tool_basename", so it can be a program name with args.
17507set dummy $tool_basename; ac_word=$2
17508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17509$as_echo_n "checking for $ac_word... " >&6; }
17510if ${ac_cv_path_UNZIP+:} false; then :
17511  $as_echo_n "(cached) " >&6
17512else
17513  case $UNZIP in
17514  [\\/]* | ?:[\\/]*)
17515  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17516  ;;
17517  *)
17518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17519for as_dir in $PATH
17520do
17521  IFS=$as_save_IFS
17522  test -z "$as_dir" && as_dir=.
17523    for ac_exec_ext in '' $ac_executable_extensions; do
17524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17525    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17527    break 2
17528  fi
17529done
17530  done
17531IFS=$as_save_IFS
17532
17533  ;;
17534esac
17535fi
17536UNZIP=$ac_cv_path_UNZIP
17537if test -n "$UNZIP"; then
17538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17539$as_echo "$UNZIP" >&6; }
17540else
17541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17542$as_echo "no" >&6; }
17543fi
17544
17545
17546        if test "x$UNZIP" = x; then
17547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17548        fi
17549      else
17550        # Otherwise we believe it is a complete path. Use it as it is.
17551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17552$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17554$as_echo_n "checking for UNZIP... " >&6; }
17555        if test ! -x "$tool_specified"; then
17556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17557$as_echo "not found" >&6; }
17558          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17559        fi
17560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17561$as_echo "$tool_specified" >&6; }
17562      fi
17563    fi
17564  fi
17565
17566
17567
17568  if test "x$UNZIP" = x; then
17569    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17570  fi
17571
17572
17573
17574
17575
17576  # Publish this variable in the help.
17577
17578
17579  if test "x$ZIP" = x; then
17580    # The variable is not set by user, try to locate tool using the code snippet
17581    for ac_prog in zip
17582do
17583  # Extract the first word of "$ac_prog", so it can be a program name with args.
17584set dummy $ac_prog; ac_word=$2
17585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17586$as_echo_n "checking for $ac_word... " >&6; }
17587if ${ac_cv_path_ZIP+:} false; then :
17588  $as_echo_n "(cached) " >&6
17589else
17590  case $ZIP in
17591  [\\/]* | ?:[\\/]*)
17592  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17593  ;;
17594  *)
17595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17596for as_dir in $PATH
17597do
17598  IFS=$as_save_IFS
17599  test -z "$as_dir" && as_dir=.
17600    for ac_exec_ext in '' $ac_executable_extensions; do
17601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17602    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17604    break 2
17605  fi
17606done
17607  done
17608IFS=$as_save_IFS
17609
17610  ;;
17611esac
17612fi
17613ZIP=$ac_cv_path_ZIP
17614if test -n "$ZIP"; then
17615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17616$as_echo "$ZIP" >&6; }
17617else
17618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17619$as_echo "no" >&6; }
17620fi
17621
17622
17623  test -n "$ZIP" && break
17624done
17625
17626  else
17627    # The variable is set, but is it from the command line or the environment?
17628
17629    # Try to remove the string !ZIP! from our list.
17630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17632      # If it failed, the variable was not from the command line. Ignore it,
17633      # but warn the user (except for BASH, which is always set by the calling BASH).
17634      if test "xZIP" != xBASH; then
17635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17636$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17637      fi
17638      # Try to locate tool using the code snippet
17639      for ac_prog in zip
17640do
17641  # Extract the first word of "$ac_prog", so it can be a program name with args.
17642set dummy $ac_prog; ac_word=$2
17643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17644$as_echo_n "checking for $ac_word... " >&6; }
17645if ${ac_cv_path_ZIP+:} false; then :
17646  $as_echo_n "(cached) " >&6
17647else
17648  case $ZIP in
17649  [\\/]* | ?:[\\/]*)
17650  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17651  ;;
17652  *)
17653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17654for as_dir in $PATH
17655do
17656  IFS=$as_save_IFS
17657  test -z "$as_dir" && as_dir=.
17658    for ac_exec_ext in '' $ac_executable_extensions; do
17659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17660    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17662    break 2
17663  fi
17664done
17665  done
17666IFS=$as_save_IFS
17667
17668  ;;
17669esac
17670fi
17671ZIP=$ac_cv_path_ZIP
17672if test -n "$ZIP"; then
17673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17674$as_echo "$ZIP" >&6; }
17675else
17676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17677$as_echo "no" >&6; }
17678fi
17679
17680
17681  test -n "$ZIP" && break
17682done
17683
17684    else
17685      # If it succeeded, then it was overridden by the user. We will use it
17686      # for the tool.
17687
17688      # First remove it from the list of overridden variables, so we can test
17689      # for unknown variables in the end.
17690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17691
17692      # Check if the provided tool contains a complete path.
17693      tool_specified="$ZIP"
17694      tool_basename="${tool_specified##*/}"
17695      if test "x$tool_basename" = "x$tool_specified"; then
17696        # A command without a complete path is provided, search $PATH.
17697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17698$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17699        # Extract the first word of "$tool_basename", so it can be a program name with args.
17700set dummy $tool_basename; ac_word=$2
17701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702$as_echo_n "checking for $ac_word... " >&6; }
17703if ${ac_cv_path_ZIP+:} false; then :
17704  $as_echo_n "(cached) " >&6
17705else
17706  case $ZIP in
17707  [\\/]* | ?:[\\/]*)
17708  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17709  ;;
17710  *)
17711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712for as_dir in $PATH
17713do
17714  IFS=$as_save_IFS
17715  test -z "$as_dir" && as_dir=.
17716    for ac_exec_ext in '' $ac_executable_extensions; do
17717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17718    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720    break 2
17721  fi
17722done
17723  done
17724IFS=$as_save_IFS
17725
17726  ;;
17727esac
17728fi
17729ZIP=$ac_cv_path_ZIP
17730if test -n "$ZIP"; then
17731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17732$as_echo "$ZIP" >&6; }
17733else
17734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735$as_echo "no" >&6; }
17736fi
17737
17738
17739        if test "x$ZIP" = x; then
17740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17741        fi
17742      else
17743        # Otherwise we believe it is a complete path. Use it as it is.
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17745$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17747$as_echo_n "checking for ZIP... " >&6; }
17748        if test ! -x "$tool_specified"; then
17749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17750$as_echo "not found" >&6; }
17751          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17752        fi
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17754$as_echo "$tool_specified" >&6; }
17755      fi
17756    fi
17757  fi
17758
17759
17760
17761  if test "x$ZIP" = x; then
17762    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17763  fi
17764
17765
17766
17767  # Non-required basic tools
17768
17769
17770
17771  # Publish this variable in the help.
17772
17773
17774  if test "x$LDD" = x; then
17775    # The variable is not set by user, try to locate tool using the code snippet
17776    for ac_prog in ldd
17777do
17778  # Extract the first word of "$ac_prog", so it can be a program name with args.
17779set dummy $ac_prog; ac_word=$2
17780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17781$as_echo_n "checking for $ac_word... " >&6; }
17782if ${ac_cv_path_LDD+:} false; then :
17783  $as_echo_n "(cached) " >&6
17784else
17785  case $LDD in
17786  [\\/]* | ?:[\\/]*)
17787  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17788  ;;
17789  *)
17790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17791for as_dir in $PATH
17792do
17793  IFS=$as_save_IFS
17794  test -z "$as_dir" && as_dir=.
17795    for ac_exec_ext in '' $ac_executable_extensions; do
17796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17797    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17799    break 2
17800  fi
17801done
17802  done
17803IFS=$as_save_IFS
17804
17805  ;;
17806esac
17807fi
17808LDD=$ac_cv_path_LDD
17809if test -n "$LDD"; then
17810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17811$as_echo "$LDD" >&6; }
17812else
17813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17814$as_echo "no" >&6; }
17815fi
17816
17817
17818  test -n "$LDD" && break
17819done
17820
17821  else
17822    # The variable is set, but is it from the command line or the environment?
17823
17824    # Try to remove the string !LDD! from our list.
17825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17827      # If it failed, the variable was not from the command line. Ignore it,
17828      # but warn the user (except for BASH, which is always set by the calling BASH).
17829      if test "xLDD" != xBASH; then
17830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17831$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17832      fi
17833      # Try to locate tool using the code snippet
17834      for ac_prog in ldd
17835do
17836  # Extract the first word of "$ac_prog", so it can be a program name with args.
17837set dummy $ac_prog; ac_word=$2
17838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17839$as_echo_n "checking for $ac_word... " >&6; }
17840if ${ac_cv_path_LDD+:} false; then :
17841  $as_echo_n "(cached) " >&6
17842else
17843  case $LDD in
17844  [\\/]* | ?:[\\/]*)
17845  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17846  ;;
17847  *)
17848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17849for as_dir in $PATH
17850do
17851  IFS=$as_save_IFS
17852  test -z "$as_dir" && as_dir=.
17853    for ac_exec_ext in '' $ac_executable_extensions; do
17854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17855    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17857    break 2
17858  fi
17859done
17860  done
17861IFS=$as_save_IFS
17862
17863  ;;
17864esac
17865fi
17866LDD=$ac_cv_path_LDD
17867if test -n "$LDD"; then
17868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17869$as_echo "$LDD" >&6; }
17870else
17871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17872$as_echo "no" >&6; }
17873fi
17874
17875
17876  test -n "$LDD" && break
17877done
17878
17879    else
17880      # If it succeeded, then it was overridden by the user. We will use it
17881      # for the tool.
17882
17883      # First remove it from the list of overridden variables, so we can test
17884      # for unknown variables in the end.
17885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17886
17887      # Check if the provided tool contains a complete path.
17888      tool_specified="$LDD"
17889      tool_basename="${tool_specified##*/}"
17890      if test "x$tool_basename" = "x$tool_specified"; then
17891        # A command without a complete path is provided, search $PATH.
17892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17893$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17894        # Extract the first word of "$tool_basename", so it can be a program name with args.
17895set dummy $tool_basename; ac_word=$2
17896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17897$as_echo_n "checking for $ac_word... " >&6; }
17898if ${ac_cv_path_LDD+:} false; then :
17899  $as_echo_n "(cached) " >&6
17900else
17901  case $LDD in
17902  [\\/]* | ?:[\\/]*)
17903  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17904  ;;
17905  *)
17906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17907for as_dir in $PATH
17908do
17909  IFS=$as_save_IFS
17910  test -z "$as_dir" && as_dir=.
17911    for ac_exec_ext in '' $ac_executable_extensions; do
17912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17913    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17915    break 2
17916  fi
17917done
17918  done
17919IFS=$as_save_IFS
17920
17921  ;;
17922esac
17923fi
17924LDD=$ac_cv_path_LDD
17925if test -n "$LDD"; then
17926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17927$as_echo "$LDD" >&6; }
17928else
17929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17930$as_echo "no" >&6; }
17931fi
17932
17933
17934        if test "x$LDD" = x; then
17935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17936        fi
17937      else
17938        # Otherwise we believe it is a complete path. Use it as it is.
17939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17940$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17942$as_echo_n "checking for LDD... " >&6; }
17943        if test ! -x "$tool_specified"; then
17944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17945$as_echo "not found" >&6; }
17946          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17947        fi
17948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17949$as_echo "$tool_specified" >&6; }
17950      fi
17951    fi
17952  fi
17953
17954
17955  if test "x$LDD" = "x"; then
17956    # List shared lib dependencies is used for
17957    # debug output and checking for forbidden dependencies.
17958    # We can build without it.
17959    LDD="true"
17960  fi
17961
17962
17963  # Publish this variable in the help.
17964
17965
17966  if test "x$OTOOL" = x; then
17967    # The variable is not set by user, try to locate tool using the code snippet
17968    for ac_prog in otool
17969do
17970  # Extract the first word of "$ac_prog", so it can be a program name with args.
17971set dummy $ac_prog; ac_word=$2
17972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17973$as_echo_n "checking for $ac_word... " >&6; }
17974if ${ac_cv_path_OTOOL+:} false; then :
17975  $as_echo_n "(cached) " >&6
17976else
17977  case $OTOOL in
17978  [\\/]* | ?:[\\/]*)
17979  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17980  ;;
17981  *)
17982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17983for as_dir in $PATH
17984do
17985  IFS=$as_save_IFS
17986  test -z "$as_dir" && as_dir=.
17987    for ac_exec_ext in '' $ac_executable_extensions; do
17988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17989    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17991    break 2
17992  fi
17993done
17994  done
17995IFS=$as_save_IFS
17996
17997  ;;
17998esac
17999fi
18000OTOOL=$ac_cv_path_OTOOL
18001if test -n "$OTOOL"; then
18002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18003$as_echo "$OTOOL" >&6; }
18004else
18005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18006$as_echo "no" >&6; }
18007fi
18008
18009
18010  test -n "$OTOOL" && break
18011done
18012
18013  else
18014    # The variable is set, but is it from the command line or the environment?
18015
18016    # Try to remove the string !OTOOL! from our list.
18017    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18018    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18019      # If it failed, the variable was not from the command line. Ignore it,
18020      # but warn the user (except for BASH, which is always set by the calling BASH).
18021      if test "xOTOOL" != xBASH; then
18022        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18023$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18024      fi
18025      # Try to locate tool using the code snippet
18026      for ac_prog in otool
18027do
18028  # Extract the first word of "$ac_prog", so it can be a program name with args.
18029set dummy $ac_prog; ac_word=$2
18030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18031$as_echo_n "checking for $ac_word... " >&6; }
18032if ${ac_cv_path_OTOOL+:} false; then :
18033  $as_echo_n "(cached) " >&6
18034else
18035  case $OTOOL in
18036  [\\/]* | ?:[\\/]*)
18037  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18038  ;;
18039  *)
18040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18041for as_dir in $PATH
18042do
18043  IFS=$as_save_IFS
18044  test -z "$as_dir" && as_dir=.
18045    for ac_exec_ext in '' $ac_executable_extensions; do
18046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18047    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18049    break 2
18050  fi
18051done
18052  done
18053IFS=$as_save_IFS
18054
18055  ;;
18056esac
18057fi
18058OTOOL=$ac_cv_path_OTOOL
18059if test -n "$OTOOL"; then
18060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18061$as_echo "$OTOOL" >&6; }
18062else
18063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18064$as_echo "no" >&6; }
18065fi
18066
18067
18068  test -n "$OTOOL" && break
18069done
18070
18071    else
18072      # If it succeeded, then it was overridden by the user. We will use it
18073      # for the tool.
18074
18075      # First remove it from the list of overridden variables, so we can test
18076      # for unknown variables in the end.
18077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18078
18079      # Check if the provided tool contains a complete path.
18080      tool_specified="$OTOOL"
18081      tool_basename="${tool_specified##*/}"
18082      if test "x$tool_basename" = "x$tool_specified"; then
18083        # A command without a complete path is provided, search $PATH.
18084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18085$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18086        # Extract the first word of "$tool_basename", so it can be a program name with args.
18087set dummy $tool_basename; ac_word=$2
18088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18089$as_echo_n "checking for $ac_word... " >&6; }
18090if ${ac_cv_path_OTOOL+:} false; then :
18091  $as_echo_n "(cached) " >&6
18092else
18093  case $OTOOL in
18094  [\\/]* | ?:[\\/]*)
18095  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18096  ;;
18097  *)
18098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18099for as_dir in $PATH
18100do
18101  IFS=$as_save_IFS
18102  test -z "$as_dir" && as_dir=.
18103    for ac_exec_ext in '' $ac_executable_extensions; do
18104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18105    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18107    break 2
18108  fi
18109done
18110  done
18111IFS=$as_save_IFS
18112
18113  ;;
18114esac
18115fi
18116OTOOL=$ac_cv_path_OTOOL
18117if test -n "$OTOOL"; then
18118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18119$as_echo "$OTOOL" >&6; }
18120else
18121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18122$as_echo "no" >&6; }
18123fi
18124
18125
18126        if test "x$OTOOL" = x; then
18127          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18128        fi
18129      else
18130        # Otherwise we believe it is a complete path. Use it as it is.
18131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18132$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18134$as_echo_n "checking for OTOOL... " >&6; }
18135        if test ! -x "$tool_specified"; then
18136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18137$as_echo "not found" >&6; }
18138          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18139        fi
18140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18141$as_echo "$tool_specified" >&6; }
18142      fi
18143    fi
18144  fi
18145
18146
18147  if test "x$OTOOL" = "x"; then
18148    OTOOL="true"
18149  fi
18150
18151
18152  # Publish this variable in the help.
18153
18154
18155  if test "x$READELF" = x; then
18156    # The variable is not set by user, try to locate tool using the code snippet
18157    for ac_prog in greadelf readelf
18158do
18159  # Extract the first word of "$ac_prog", so it can be a program name with args.
18160set dummy $ac_prog; ac_word=$2
18161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18162$as_echo_n "checking for $ac_word... " >&6; }
18163if ${ac_cv_path_READELF+:} false; then :
18164  $as_echo_n "(cached) " >&6
18165else
18166  case $READELF in
18167  [\\/]* | ?:[\\/]*)
18168  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18169  ;;
18170  *)
18171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18172for as_dir in $PATH
18173do
18174  IFS=$as_save_IFS
18175  test -z "$as_dir" && as_dir=.
18176    for ac_exec_ext in '' $ac_executable_extensions; do
18177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18178    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18180    break 2
18181  fi
18182done
18183  done
18184IFS=$as_save_IFS
18185
18186  ;;
18187esac
18188fi
18189READELF=$ac_cv_path_READELF
18190if test -n "$READELF"; then
18191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18192$as_echo "$READELF" >&6; }
18193else
18194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18195$as_echo "no" >&6; }
18196fi
18197
18198
18199  test -n "$READELF" && break
18200done
18201
18202  else
18203    # The variable is set, but is it from the command line or the environment?
18204
18205    # Try to remove the string !READELF! from our list.
18206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18208      # If it failed, the variable was not from the command line. Ignore it,
18209      # but warn the user (except for BASH, which is always set by the calling BASH).
18210      if test "xREADELF" != xBASH; then
18211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18212$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18213      fi
18214      # Try to locate tool using the code snippet
18215      for ac_prog in greadelf readelf
18216do
18217  # Extract the first word of "$ac_prog", so it can be a program name with args.
18218set dummy $ac_prog; ac_word=$2
18219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18220$as_echo_n "checking for $ac_word... " >&6; }
18221if ${ac_cv_path_READELF+:} false; then :
18222  $as_echo_n "(cached) " >&6
18223else
18224  case $READELF in
18225  [\\/]* | ?:[\\/]*)
18226  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18227  ;;
18228  *)
18229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18230for as_dir in $PATH
18231do
18232  IFS=$as_save_IFS
18233  test -z "$as_dir" && as_dir=.
18234    for ac_exec_ext in '' $ac_executable_extensions; do
18235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18236    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18238    break 2
18239  fi
18240done
18241  done
18242IFS=$as_save_IFS
18243
18244  ;;
18245esac
18246fi
18247READELF=$ac_cv_path_READELF
18248if test -n "$READELF"; then
18249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18250$as_echo "$READELF" >&6; }
18251else
18252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18253$as_echo "no" >&6; }
18254fi
18255
18256
18257  test -n "$READELF" && break
18258done
18259
18260    else
18261      # If it succeeded, then it was overridden by the user. We will use it
18262      # for the tool.
18263
18264      # First remove it from the list of overridden variables, so we can test
18265      # for unknown variables in the end.
18266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18267
18268      # Check if the provided tool contains a complete path.
18269      tool_specified="$READELF"
18270      tool_basename="${tool_specified##*/}"
18271      if test "x$tool_basename" = "x$tool_specified"; then
18272        # A command without a complete path is provided, search $PATH.
18273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18274$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18275        # Extract the first word of "$tool_basename", so it can be a program name with args.
18276set dummy $tool_basename; ac_word=$2
18277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18278$as_echo_n "checking for $ac_word... " >&6; }
18279if ${ac_cv_path_READELF+:} false; then :
18280  $as_echo_n "(cached) " >&6
18281else
18282  case $READELF in
18283  [\\/]* | ?:[\\/]*)
18284  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18285  ;;
18286  *)
18287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18288for as_dir in $PATH
18289do
18290  IFS=$as_save_IFS
18291  test -z "$as_dir" && as_dir=.
18292    for ac_exec_ext in '' $ac_executable_extensions; do
18293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18294    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18296    break 2
18297  fi
18298done
18299  done
18300IFS=$as_save_IFS
18301
18302  ;;
18303esac
18304fi
18305READELF=$ac_cv_path_READELF
18306if test -n "$READELF"; then
18307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18308$as_echo "$READELF" >&6; }
18309else
18310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18311$as_echo "no" >&6; }
18312fi
18313
18314
18315        if test "x$READELF" = x; then
18316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18317        fi
18318      else
18319        # Otherwise we believe it is a complete path. Use it as it is.
18320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18321$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18323$as_echo_n "checking for READELF... " >&6; }
18324        if test ! -x "$tool_specified"; then
18325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18326$as_echo "not found" >&6; }
18327          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18328        fi
18329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18330$as_echo "$tool_specified" >&6; }
18331      fi
18332    fi
18333  fi
18334
18335
18336
18337
18338  # Publish this variable in the help.
18339
18340
18341  if test "x$HG" = x; then
18342    # The variable is not set by user, try to locate tool using the code snippet
18343    for ac_prog in hg
18344do
18345  # Extract the first word of "$ac_prog", so it can be a program name with args.
18346set dummy $ac_prog; ac_word=$2
18347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18348$as_echo_n "checking for $ac_word... " >&6; }
18349if ${ac_cv_path_HG+:} false; then :
18350  $as_echo_n "(cached) " >&6
18351else
18352  case $HG in
18353  [\\/]* | ?:[\\/]*)
18354  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18355  ;;
18356  *)
18357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18358for as_dir in $PATH
18359do
18360  IFS=$as_save_IFS
18361  test -z "$as_dir" && as_dir=.
18362    for ac_exec_ext in '' $ac_executable_extensions; do
18363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18364    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18366    break 2
18367  fi
18368done
18369  done
18370IFS=$as_save_IFS
18371
18372  ;;
18373esac
18374fi
18375HG=$ac_cv_path_HG
18376if test -n "$HG"; then
18377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18378$as_echo "$HG" >&6; }
18379else
18380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18381$as_echo "no" >&6; }
18382fi
18383
18384
18385  test -n "$HG" && break
18386done
18387
18388  else
18389    # The variable is set, but is it from the command line or the environment?
18390
18391    # Try to remove the string !HG! from our list.
18392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18394      # If it failed, the variable was not from the command line. Ignore it,
18395      # but warn the user (except for BASH, which is always set by the calling BASH).
18396      if test "xHG" != xBASH; then
18397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18398$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18399      fi
18400      # Try to locate tool using the code snippet
18401      for ac_prog in hg
18402do
18403  # Extract the first word of "$ac_prog", so it can be a program name with args.
18404set dummy $ac_prog; ac_word=$2
18405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18406$as_echo_n "checking for $ac_word... " >&6; }
18407if ${ac_cv_path_HG+:} false; then :
18408  $as_echo_n "(cached) " >&6
18409else
18410  case $HG in
18411  [\\/]* | ?:[\\/]*)
18412  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18413  ;;
18414  *)
18415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18416for as_dir in $PATH
18417do
18418  IFS=$as_save_IFS
18419  test -z "$as_dir" && as_dir=.
18420    for ac_exec_ext in '' $ac_executable_extensions; do
18421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18422    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18424    break 2
18425  fi
18426done
18427  done
18428IFS=$as_save_IFS
18429
18430  ;;
18431esac
18432fi
18433HG=$ac_cv_path_HG
18434if test -n "$HG"; then
18435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18436$as_echo "$HG" >&6; }
18437else
18438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18439$as_echo "no" >&6; }
18440fi
18441
18442
18443  test -n "$HG" && break
18444done
18445
18446    else
18447      # If it succeeded, then it was overridden by the user. We will use it
18448      # for the tool.
18449
18450      # First remove it from the list of overridden variables, so we can test
18451      # for unknown variables in the end.
18452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18453
18454      # Check if the provided tool contains a complete path.
18455      tool_specified="$HG"
18456      tool_basename="${tool_specified##*/}"
18457      if test "x$tool_basename" = "x$tool_specified"; then
18458        # A command without a complete path is provided, search $PATH.
18459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18460$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18461        # Extract the first word of "$tool_basename", so it can be a program name with args.
18462set dummy $tool_basename; ac_word=$2
18463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18464$as_echo_n "checking for $ac_word... " >&6; }
18465if ${ac_cv_path_HG+:} false; then :
18466  $as_echo_n "(cached) " >&6
18467else
18468  case $HG in
18469  [\\/]* | ?:[\\/]*)
18470  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18471  ;;
18472  *)
18473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18474for as_dir in $PATH
18475do
18476  IFS=$as_save_IFS
18477  test -z "$as_dir" && as_dir=.
18478    for ac_exec_ext in '' $ac_executable_extensions; do
18479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18480    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18482    break 2
18483  fi
18484done
18485  done
18486IFS=$as_save_IFS
18487
18488  ;;
18489esac
18490fi
18491HG=$ac_cv_path_HG
18492if test -n "$HG"; then
18493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18494$as_echo "$HG" >&6; }
18495else
18496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18497$as_echo "no" >&6; }
18498fi
18499
18500
18501        if test "x$HG" = x; then
18502          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18503        fi
18504      else
18505        # Otherwise we believe it is a complete path. Use it as it is.
18506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18507$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18509$as_echo_n "checking for HG... " >&6; }
18510        if test ! -x "$tool_specified"; then
18511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18512$as_echo "not found" >&6; }
18513          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18514        fi
18515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18516$as_echo "$tool_specified" >&6; }
18517      fi
18518    fi
18519  fi
18520
18521
18522
18523
18524  # Publish this variable in the help.
18525
18526
18527  if test "x$STAT" = x; then
18528    # The variable is not set by user, try to locate tool using the code snippet
18529    for ac_prog in stat
18530do
18531  # Extract the first word of "$ac_prog", so it can be a program name with args.
18532set dummy $ac_prog; ac_word=$2
18533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18534$as_echo_n "checking for $ac_word... " >&6; }
18535if ${ac_cv_path_STAT+:} false; then :
18536  $as_echo_n "(cached) " >&6
18537else
18538  case $STAT in
18539  [\\/]* | ?:[\\/]*)
18540  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18541  ;;
18542  *)
18543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18544for as_dir in $PATH
18545do
18546  IFS=$as_save_IFS
18547  test -z "$as_dir" && as_dir=.
18548    for ac_exec_ext in '' $ac_executable_extensions; do
18549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18550    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18552    break 2
18553  fi
18554done
18555  done
18556IFS=$as_save_IFS
18557
18558  ;;
18559esac
18560fi
18561STAT=$ac_cv_path_STAT
18562if test -n "$STAT"; then
18563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18564$as_echo "$STAT" >&6; }
18565else
18566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18567$as_echo "no" >&6; }
18568fi
18569
18570
18571  test -n "$STAT" && break
18572done
18573
18574  else
18575    # The variable is set, but is it from the command line or the environment?
18576
18577    # Try to remove the string !STAT! from our list.
18578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18580      # If it failed, the variable was not from the command line. Ignore it,
18581      # but warn the user (except for BASH, which is always set by the calling BASH).
18582      if test "xSTAT" != xBASH; then
18583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18584$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18585      fi
18586      # Try to locate tool using the code snippet
18587      for ac_prog in stat
18588do
18589  # Extract the first word of "$ac_prog", so it can be a program name with args.
18590set dummy $ac_prog; ac_word=$2
18591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18592$as_echo_n "checking for $ac_word... " >&6; }
18593if ${ac_cv_path_STAT+:} false; then :
18594  $as_echo_n "(cached) " >&6
18595else
18596  case $STAT in
18597  [\\/]* | ?:[\\/]*)
18598  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18599  ;;
18600  *)
18601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18602for as_dir in $PATH
18603do
18604  IFS=$as_save_IFS
18605  test -z "$as_dir" && as_dir=.
18606    for ac_exec_ext in '' $ac_executable_extensions; do
18607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18608    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18610    break 2
18611  fi
18612done
18613  done
18614IFS=$as_save_IFS
18615
18616  ;;
18617esac
18618fi
18619STAT=$ac_cv_path_STAT
18620if test -n "$STAT"; then
18621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18622$as_echo "$STAT" >&6; }
18623else
18624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18625$as_echo "no" >&6; }
18626fi
18627
18628
18629  test -n "$STAT" && break
18630done
18631
18632    else
18633      # If it succeeded, then it was overridden by the user. We will use it
18634      # for the tool.
18635
18636      # First remove it from the list of overridden variables, so we can test
18637      # for unknown variables in the end.
18638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18639
18640      # Check if the provided tool contains a complete path.
18641      tool_specified="$STAT"
18642      tool_basename="${tool_specified##*/}"
18643      if test "x$tool_basename" = "x$tool_specified"; then
18644        # A command without a complete path is provided, search $PATH.
18645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18646$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18647        # Extract the first word of "$tool_basename", so it can be a program name with args.
18648set dummy $tool_basename; ac_word=$2
18649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18650$as_echo_n "checking for $ac_word... " >&6; }
18651if ${ac_cv_path_STAT+:} false; then :
18652  $as_echo_n "(cached) " >&6
18653else
18654  case $STAT in
18655  [\\/]* | ?:[\\/]*)
18656  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18657  ;;
18658  *)
18659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18660for as_dir in $PATH
18661do
18662  IFS=$as_save_IFS
18663  test -z "$as_dir" && as_dir=.
18664    for ac_exec_ext in '' $ac_executable_extensions; do
18665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18666    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18668    break 2
18669  fi
18670done
18671  done
18672IFS=$as_save_IFS
18673
18674  ;;
18675esac
18676fi
18677STAT=$ac_cv_path_STAT
18678if test -n "$STAT"; then
18679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18680$as_echo "$STAT" >&6; }
18681else
18682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18683$as_echo "no" >&6; }
18684fi
18685
18686
18687        if test "x$STAT" = x; then
18688          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18689        fi
18690      else
18691        # Otherwise we believe it is a complete path. Use it as it is.
18692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18693$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18695$as_echo_n "checking for STAT... " >&6; }
18696        if test ! -x "$tool_specified"; then
18697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18698$as_echo "not found" >&6; }
18699          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18700        fi
18701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18702$as_echo "$tool_specified" >&6; }
18703      fi
18704    fi
18705  fi
18706
18707
18708
18709
18710  # Publish this variable in the help.
18711
18712
18713  if test "x$TIME" = x; then
18714    # The variable is not set by user, try to locate tool using the code snippet
18715    for ac_prog in time
18716do
18717  # Extract the first word of "$ac_prog", so it can be a program name with args.
18718set dummy $ac_prog; ac_word=$2
18719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18720$as_echo_n "checking for $ac_word... " >&6; }
18721if ${ac_cv_path_TIME+:} false; then :
18722  $as_echo_n "(cached) " >&6
18723else
18724  case $TIME in
18725  [\\/]* | ?:[\\/]*)
18726  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18727  ;;
18728  *)
18729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18730for as_dir in $PATH
18731do
18732  IFS=$as_save_IFS
18733  test -z "$as_dir" && as_dir=.
18734    for ac_exec_ext in '' $ac_executable_extensions; do
18735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18736    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18738    break 2
18739  fi
18740done
18741  done
18742IFS=$as_save_IFS
18743
18744  ;;
18745esac
18746fi
18747TIME=$ac_cv_path_TIME
18748if test -n "$TIME"; then
18749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18750$as_echo "$TIME" >&6; }
18751else
18752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18753$as_echo "no" >&6; }
18754fi
18755
18756
18757  test -n "$TIME" && break
18758done
18759
18760  else
18761    # The variable is set, but is it from the command line or the environment?
18762
18763    # Try to remove the string !TIME! from our list.
18764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18766      # If it failed, the variable was not from the command line. Ignore it,
18767      # but warn the user (except for BASH, which is always set by the calling BASH).
18768      if test "xTIME" != xBASH; then
18769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18770$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18771      fi
18772      # Try to locate tool using the code snippet
18773      for ac_prog in time
18774do
18775  # Extract the first word of "$ac_prog", so it can be a program name with args.
18776set dummy $ac_prog; ac_word=$2
18777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18778$as_echo_n "checking for $ac_word... " >&6; }
18779if ${ac_cv_path_TIME+:} false; then :
18780  $as_echo_n "(cached) " >&6
18781else
18782  case $TIME in
18783  [\\/]* | ?:[\\/]*)
18784  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18785  ;;
18786  *)
18787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18788for as_dir in $PATH
18789do
18790  IFS=$as_save_IFS
18791  test -z "$as_dir" && as_dir=.
18792    for ac_exec_ext in '' $ac_executable_extensions; do
18793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18794    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18796    break 2
18797  fi
18798done
18799  done
18800IFS=$as_save_IFS
18801
18802  ;;
18803esac
18804fi
18805TIME=$ac_cv_path_TIME
18806if test -n "$TIME"; then
18807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18808$as_echo "$TIME" >&6; }
18809else
18810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18811$as_echo "no" >&6; }
18812fi
18813
18814
18815  test -n "$TIME" && break
18816done
18817
18818    else
18819      # If it succeeded, then it was overridden by the user. We will use it
18820      # for the tool.
18821
18822      # First remove it from the list of overridden variables, so we can test
18823      # for unknown variables in the end.
18824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18825
18826      # Check if the provided tool contains a complete path.
18827      tool_specified="$TIME"
18828      tool_basename="${tool_specified##*/}"
18829      if test "x$tool_basename" = "x$tool_specified"; then
18830        # A command without a complete path is provided, search $PATH.
18831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18832$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18833        # Extract the first word of "$tool_basename", so it can be a program name with args.
18834set dummy $tool_basename; ac_word=$2
18835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18836$as_echo_n "checking for $ac_word... " >&6; }
18837if ${ac_cv_path_TIME+:} false; then :
18838  $as_echo_n "(cached) " >&6
18839else
18840  case $TIME in
18841  [\\/]* | ?:[\\/]*)
18842  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18843  ;;
18844  *)
18845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18846for as_dir in $PATH
18847do
18848  IFS=$as_save_IFS
18849  test -z "$as_dir" && as_dir=.
18850    for ac_exec_ext in '' $ac_executable_extensions; do
18851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18852    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18854    break 2
18855  fi
18856done
18857  done
18858IFS=$as_save_IFS
18859
18860  ;;
18861esac
18862fi
18863TIME=$ac_cv_path_TIME
18864if test -n "$TIME"; then
18865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18866$as_echo "$TIME" >&6; }
18867else
18868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18869$as_echo "no" >&6; }
18870fi
18871
18872
18873        if test "x$TIME" = x; then
18874          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18875        fi
18876      else
18877        # Otherwise we believe it is a complete path. Use it as it is.
18878        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18879$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18881$as_echo_n "checking for TIME... " >&6; }
18882        if test ! -x "$tool_specified"; then
18883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18884$as_echo "not found" >&6; }
18885          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18886        fi
18887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18888$as_echo "$tool_specified" >&6; }
18889      fi
18890    fi
18891  fi
18892
18893
18894
18895
18896  # Publish this variable in the help.
18897
18898
18899  if test "x$PATCH" = x; then
18900    # The variable is not set by user, try to locate tool using the code snippet
18901    for ac_prog in gpatch patch
18902do
18903  # Extract the first word of "$ac_prog", so it can be a program name with args.
18904set dummy $ac_prog; ac_word=$2
18905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18906$as_echo_n "checking for $ac_word... " >&6; }
18907if ${ac_cv_path_PATCH+:} false; then :
18908  $as_echo_n "(cached) " >&6
18909else
18910  case $PATCH in
18911  [\\/]* | ?:[\\/]*)
18912  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18913  ;;
18914  *)
18915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18916for as_dir in $PATH
18917do
18918  IFS=$as_save_IFS
18919  test -z "$as_dir" && as_dir=.
18920    for ac_exec_ext in '' $ac_executable_extensions; do
18921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18922    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18924    break 2
18925  fi
18926done
18927  done
18928IFS=$as_save_IFS
18929
18930  ;;
18931esac
18932fi
18933PATCH=$ac_cv_path_PATCH
18934if test -n "$PATCH"; then
18935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18936$as_echo "$PATCH" >&6; }
18937else
18938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18939$as_echo "no" >&6; }
18940fi
18941
18942
18943  test -n "$PATCH" && break
18944done
18945
18946  else
18947    # The variable is set, but is it from the command line or the environment?
18948
18949    # Try to remove the string !PATCH! from our list.
18950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
18951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18952      # If it failed, the variable was not from the command line. Ignore it,
18953      # but warn the user (except for BASH, which is always set by the calling BASH).
18954      if test "xPATCH" != xBASH; then
18955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
18956$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
18957      fi
18958      # Try to locate tool using the code snippet
18959      for ac_prog in gpatch patch
18960do
18961  # Extract the first word of "$ac_prog", so it can be a program name with args.
18962set dummy $ac_prog; ac_word=$2
18963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18964$as_echo_n "checking for $ac_word... " >&6; }
18965if ${ac_cv_path_PATCH+:} false; then :
18966  $as_echo_n "(cached) " >&6
18967else
18968  case $PATCH in
18969  [\\/]* | ?:[\\/]*)
18970  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18971  ;;
18972  *)
18973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18974for as_dir in $PATH
18975do
18976  IFS=$as_save_IFS
18977  test -z "$as_dir" && as_dir=.
18978    for ac_exec_ext in '' $ac_executable_extensions; do
18979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18980    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18982    break 2
18983  fi
18984done
18985  done
18986IFS=$as_save_IFS
18987
18988  ;;
18989esac
18990fi
18991PATCH=$ac_cv_path_PATCH
18992if test -n "$PATCH"; then
18993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18994$as_echo "$PATCH" >&6; }
18995else
18996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18997$as_echo "no" >&6; }
18998fi
18999
19000
19001  test -n "$PATCH" && break
19002done
19003
19004    else
19005      # If it succeeded, then it was overridden by the user. We will use it
19006      # for the tool.
19007
19008      # First remove it from the list of overridden variables, so we can test
19009      # for unknown variables in the end.
19010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19011
19012      # Check if the provided tool contains a complete path.
19013      tool_specified="$PATCH"
19014      tool_basename="${tool_specified##*/}"
19015      if test "x$tool_basename" = "x$tool_specified"; then
19016        # A command without a complete path is provided, search $PATH.
19017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19018$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19019        # Extract the first word of "$tool_basename", so it can be a program name with args.
19020set dummy $tool_basename; ac_word=$2
19021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19022$as_echo_n "checking for $ac_word... " >&6; }
19023if ${ac_cv_path_PATCH+:} false; then :
19024  $as_echo_n "(cached) " >&6
19025else
19026  case $PATCH in
19027  [\\/]* | ?:[\\/]*)
19028  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19029  ;;
19030  *)
19031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19032for as_dir in $PATH
19033do
19034  IFS=$as_save_IFS
19035  test -z "$as_dir" && as_dir=.
19036    for ac_exec_ext in '' $ac_executable_extensions; do
19037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19038    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19040    break 2
19041  fi
19042done
19043  done
19044IFS=$as_save_IFS
19045
19046  ;;
19047esac
19048fi
19049PATCH=$ac_cv_path_PATCH
19050if test -n "$PATCH"; then
19051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19052$as_echo "$PATCH" >&6; }
19053else
19054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19055$as_echo "no" >&6; }
19056fi
19057
19058
19059        if test "x$PATCH" = x; then
19060          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19061        fi
19062      else
19063        # Otherwise we believe it is a complete path. Use it as it is.
19064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
19065$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
19066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19067$as_echo_n "checking for PATCH... " >&6; }
19068        if test ! -x "$tool_specified"; then
19069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19070$as_echo "not found" >&6; }
19071          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
19072        fi
19073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19074$as_echo "$tool_specified" >&6; }
19075      fi
19076    fi
19077  fi
19078
19079
19080  # Check if it's GNU time
19081  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19082  if test "x$IS_GNU_TIME" != x; then
19083    IS_GNU_TIME=yes
19084  else
19085    IS_GNU_TIME=no
19086  fi
19087
19088
19089  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19090
19091
19092
19093  # Publish this variable in the help.
19094
19095
19096  if test "x$DSYMUTIL" = x; then
19097    # The variable is not set by user, try to locate tool using the code snippet
19098    for ac_prog in dsymutil
19099do
19100  # Extract the first word of "$ac_prog", so it can be a program name with args.
19101set dummy $ac_prog; ac_word=$2
19102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19103$as_echo_n "checking for $ac_word... " >&6; }
19104if ${ac_cv_path_DSYMUTIL+:} false; then :
19105  $as_echo_n "(cached) " >&6
19106else
19107  case $DSYMUTIL in
19108  [\\/]* | ?:[\\/]*)
19109  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19110  ;;
19111  *)
19112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19113for as_dir in $PATH
19114do
19115  IFS=$as_save_IFS
19116  test -z "$as_dir" && as_dir=.
19117    for ac_exec_ext in '' $ac_executable_extensions; do
19118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19119    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19121    break 2
19122  fi
19123done
19124  done
19125IFS=$as_save_IFS
19126
19127  ;;
19128esac
19129fi
19130DSYMUTIL=$ac_cv_path_DSYMUTIL
19131if test -n "$DSYMUTIL"; then
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19133$as_echo "$DSYMUTIL" >&6; }
19134else
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19136$as_echo "no" >&6; }
19137fi
19138
19139
19140  test -n "$DSYMUTIL" && break
19141done
19142
19143  else
19144    # The variable is set, but is it from the command line or the environment?
19145
19146    # Try to remove the string !DSYMUTIL! from our list.
19147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19149      # If it failed, the variable was not from the command line. Ignore it,
19150      # but warn the user (except for BASH, which is always set by the calling BASH).
19151      if test "xDSYMUTIL" != xBASH; then
19152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19153$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19154      fi
19155      # Try to locate tool using the code snippet
19156      for ac_prog in dsymutil
19157do
19158  # Extract the first word of "$ac_prog", so it can be a program name with args.
19159set dummy $ac_prog; ac_word=$2
19160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19161$as_echo_n "checking for $ac_word... " >&6; }
19162if ${ac_cv_path_DSYMUTIL+:} false; then :
19163  $as_echo_n "(cached) " >&6
19164else
19165  case $DSYMUTIL in
19166  [\\/]* | ?:[\\/]*)
19167  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19168  ;;
19169  *)
19170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19171for as_dir in $PATH
19172do
19173  IFS=$as_save_IFS
19174  test -z "$as_dir" && as_dir=.
19175    for ac_exec_ext in '' $ac_executable_extensions; do
19176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19177    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19179    break 2
19180  fi
19181done
19182  done
19183IFS=$as_save_IFS
19184
19185  ;;
19186esac
19187fi
19188DSYMUTIL=$ac_cv_path_DSYMUTIL
19189if test -n "$DSYMUTIL"; then
19190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19191$as_echo "$DSYMUTIL" >&6; }
19192else
19193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19194$as_echo "no" >&6; }
19195fi
19196
19197
19198  test -n "$DSYMUTIL" && break
19199done
19200
19201    else
19202      # If it succeeded, then it was overridden by the user. We will use it
19203      # for the tool.
19204
19205      # First remove it from the list of overridden variables, so we can test
19206      # for unknown variables in the end.
19207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19208
19209      # Check if the provided tool contains a complete path.
19210      tool_specified="$DSYMUTIL"
19211      tool_basename="${tool_specified##*/}"
19212      if test "x$tool_basename" = "x$tool_specified"; then
19213        # A command without a complete path is provided, search $PATH.
19214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19215$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19216        # Extract the first word of "$tool_basename", so it can be a program name with args.
19217set dummy $tool_basename; ac_word=$2
19218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19219$as_echo_n "checking for $ac_word... " >&6; }
19220if ${ac_cv_path_DSYMUTIL+:} false; then :
19221  $as_echo_n "(cached) " >&6
19222else
19223  case $DSYMUTIL in
19224  [\\/]* | ?:[\\/]*)
19225  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19226  ;;
19227  *)
19228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19229for as_dir in $PATH
19230do
19231  IFS=$as_save_IFS
19232  test -z "$as_dir" && as_dir=.
19233    for ac_exec_ext in '' $ac_executable_extensions; do
19234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19235    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19237    break 2
19238  fi
19239done
19240  done
19241IFS=$as_save_IFS
19242
19243  ;;
19244esac
19245fi
19246DSYMUTIL=$ac_cv_path_DSYMUTIL
19247if test -n "$DSYMUTIL"; then
19248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19249$as_echo "$DSYMUTIL" >&6; }
19250else
19251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19252$as_echo "no" >&6; }
19253fi
19254
19255
19256        if test "x$DSYMUTIL" = x; then
19257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19258        fi
19259      else
19260        # Otherwise we believe it is a complete path. Use it as it is.
19261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19262$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19264$as_echo_n "checking for DSYMUTIL... " >&6; }
19265        if test ! -x "$tool_specified"; then
19266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19267$as_echo "not found" >&6; }
19268          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19269        fi
19270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19271$as_echo "$tool_specified" >&6; }
19272      fi
19273    fi
19274  fi
19275
19276
19277
19278  if test "x$DSYMUTIL" = x; then
19279    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19280  fi
19281
19282
19283
19284
19285
19286  # Publish this variable in the help.
19287
19288
19289  if test "x$XATTR" = x; then
19290    # The variable is not set by user, try to locate tool using the code snippet
19291    for ac_prog in xattr
19292do
19293  # Extract the first word of "$ac_prog", so it can be a program name with args.
19294set dummy $ac_prog; ac_word=$2
19295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19296$as_echo_n "checking for $ac_word... " >&6; }
19297if ${ac_cv_path_XATTR+:} false; then :
19298  $as_echo_n "(cached) " >&6
19299else
19300  case $XATTR in
19301  [\\/]* | ?:[\\/]*)
19302  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19303  ;;
19304  *)
19305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19306for as_dir in $PATH
19307do
19308  IFS=$as_save_IFS
19309  test -z "$as_dir" && as_dir=.
19310    for ac_exec_ext in '' $ac_executable_extensions; do
19311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19312    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19314    break 2
19315  fi
19316done
19317  done
19318IFS=$as_save_IFS
19319
19320  ;;
19321esac
19322fi
19323XATTR=$ac_cv_path_XATTR
19324if test -n "$XATTR"; then
19325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19326$as_echo "$XATTR" >&6; }
19327else
19328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19329$as_echo "no" >&6; }
19330fi
19331
19332
19333  test -n "$XATTR" && break
19334done
19335
19336  else
19337    # The variable is set, but is it from the command line or the environment?
19338
19339    # Try to remove the string !XATTR! from our list.
19340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19342      # If it failed, the variable was not from the command line. Ignore it,
19343      # but warn the user (except for BASH, which is always set by the calling BASH).
19344      if test "xXATTR" != xBASH; then
19345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19346$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19347      fi
19348      # Try to locate tool using the code snippet
19349      for ac_prog in xattr
19350do
19351  # Extract the first word of "$ac_prog", so it can be a program name with args.
19352set dummy $ac_prog; ac_word=$2
19353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19354$as_echo_n "checking for $ac_word... " >&6; }
19355if ${ac_cv_path_XATTR+:} false; then :
19356  $as_echo_n "(cached) " >&6
19357else
19358  case $XATTR in
19359  [\\/]* | ?:[\\/]*)
19360  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19361  ;;
19362  *)
19363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19364for as_dir in $PATH
19365do
19366  IFS=$as_save_IFS
19367  test -z "$as_dir" && as_dir=.
19368    for ac_exec_ext in '' $ac_executable_extensions; do
19369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19370    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19372    break 2
19373  fi
19374done
19375  done
19376IFS=$as_save_IFS
19377
19378  ;;
19379esac
19380fi
19381XATTR=$ac_cv_path_XATTR
19382if test -n "$XATTR"; then
19383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19384$as_echo "$XATTR" >&6; }
19385else
19386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19387$as_echo "no" >&6; }
19388fi
19389
19390
19391  test -n "$XATTR" && break
19392done
19393
19394    else
19395      # If it succeeded, then it was overridden by the user. We will use it
19396      # for the tool.
19397
19398      # First remove it from the list of overridden variables, so we can test
19399      # for unknown variables in the end.
19400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19401
19402      # Check if the provided tool contains a complete path.
19403      tool_specified="$XATTR"
19404      tool_basename="${tool_specified##*/}"
19405      if test "x$tool_basename" = "x$tool_specified"; then
19406        # A command without a complete path is provided, search $PATH.
19407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19408$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19409        # Extract the first word of "$tool_basename", so it can be a program name with args.
19410set dummy $tool_basename; ac_word=$2
19411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19412$as_echo_n "checking for $ac_word... " >&6; }
19413if ${ac_cv_path_XATTR+:} false; then :
19414  $as_echo_n "(cached) " >&6
19415else
19416  case $XATTR in
19417  [\\/]* | ?:[\\/]*)
19418  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19419  ;;
19420  *)
19421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19422for as_dir in $PATH
19423do
19424  IFS=$as_save_IFS
19425  test -z "$as_dir" && as_dir=.
19426    for ac_exec_ext in '' $ac_executable_extensions; do
19427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19428    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19430    break 2
19431  fi
19432done
19433  done
19434IFS=$as_save_IFS
19435
19436  ;;
19437esac
19438fi
19439XATTR=$ac_cv_path_XATTR
19440if test -n "$XATTR"; then
19441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19442$as_echo "$XATTR" >&6; }
19443else
19444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19445$as_echo "no" >&6; }
19446fi
19447
19448
19449        if test "x$XATTR" = x; then
19450          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19451        fi
19452      else
19453        # Otherwise we believe it is a complete path. Use it as it is.
19454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19455$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19457$as_echo_n "checking for XATTR... " >&6; }
19458        if test ! -x "$tool_specified"; then
19459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19460$as_echo "not found" >&6; }
19461          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19462        fi
19463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19464$as_echo "$tool_specified" >&6; }
19465      fi
19466    fi
19467  fi
19468
19469
19470
19471  if test "x$XATTR" = x; then
19472    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19473  fi
19474
19475
19476
19477
19478  # Publish this variable in the help.
19479
19480
19481  if test "x$CODESIGN" = x; then
19482    # The variable is not set by user, try to locate tool using the code snippet
19483    for ac_prog in codesign
19484do
19485  # Extract the first word of "$ac_prog", so it can be a program name with args.
19486set dummy $ac_prog; ac_word=$2
19487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19488$as_echo_n "checking for $ac_word... " >&6; }
19489if ${ac_cv_path_CODESIGN+:} false; then :
19490  $as_echo_n "(cached) " >&6
19491else
19492  case $CODESIGN in
19493  [\\/]* | ?:[\\/]*)
19494  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19495  ;;
19496  *)
19497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19498for as_dir in $PATH
19499do
19500  IFS=$as_save_IFS
19501  test -z "$as_dir" && as_dir=.
19502    for ac_exec_ext in '' $ac_executable_extensions; do
19503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19504    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19506    break 2
19507  fi
19508done
19509  done
19510IFS=$as_save_IFS
19511
19512  ;;
19513esac
19514fi
19515CODESIGN=$ac_cv_path_CODESIGN
19516if test -n "$CODESIGN"; then
19517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19518$as_echo "$CODESIGN" >&6; }
19519else
19520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19521$as_echo "no" >&6; }
19522fi
19523
19524
19525  test -n "$CODESIGN" && break
19526done
19527
19528  else
19529    # The variable is set, but is it from the command line or the environment?
19530
19531    # Try to remove the string !CODESIGN! from our list.
19532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19534      # If it failed, the variable was not from the command line. Ignore it,
19535      # but warn the user (except for BASH, which is always set by the calling BASH).
19536      if test "xCODESIGN" != xBASH; then
19537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19538$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19539      fi
19540      # Try to locate tool using the code snippet
19541      for ac_prog in codesign
19542do
19543  # Extract the first word of "$ac_prog", so it can be a program name with args.
19544set dummy $ac_prog; ac_word=$2
19545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19546$as_echo_n "checking for $ac_word... " >&6; }
19547if ${ac_cv_path_CODESIGN+:} false; then :
19548  $as_echo_n "(cached) " >&6
19549else
19550  case $CODESIGN in
19551  [\\/]* | ?:[\\/]*)
19552  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19553  ;;
19554  *)
19555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19556for as_dir in $PATH
19557do
19558  IFS=$as_save_IFS
19559  test -z "$as_dir" && as_dir=.
19560    for ac_exec_ext in '' $ac_executable_extensions; do
19561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19562    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19564    break 2
19565  fi
19566done
19567  done
19568IFS=$as_save_IFS
19569
19570  ;;
19571esac
19572fi
19573CODESIGN=$ac_cv_path_CODESIGN
19574if test -n "$CODESIGN"; then
19575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19576$as_echo "$CODESIGN" >&6; }
19577else
19578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19579$as_echo "no" >&6; }
19580fi
19581
19582
19583  test -n "$CODESIGN" && break
19584done
19585
19586    else
19587      # If it succeeded, then it was overridden by the user. We will use it
19588      # for the tool.
19589
19590      # First remove it from the list of overridden variables, so we can test
19591      # for unknown variables in the end.
19592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19593
19594      # Check if the provided tool contains a complete path.
19595      tool_specified="$CODESIGN"
19596      tool_basename="${tool_specified##*/}"
19597      if test "x$tool_basename" = "x$tool_specified"; then
19598        # A command without a complete path is provided, search $PATH.
19599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19600$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19601        # Extract the first word of "$tool_basename", so it can be a program name with args.
19602set dummy $tool_basename; ac_word=$2
19603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19604$as_echo_n "checking for $ac_word... " >&6; }
19605if ${ac_cv_path_CODESIGN+:} false; then :
19606  $as_echo_n "(cached) " >&6
19607else
19608  case $CODESIGN in
19609  [\\/]* | ?:[\\/]*)
19610  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19611  ;;
19612  *)
19613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19614for as_dir in $PATH
19615do
19616  IFS=$as_save_IFS
19617  test -z "$as_dir" && as_dir=.
19618    for ac_exec_ext in '' $ac_executable_extensions; do
19619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19620    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19622    break 2
19623  fi
19624done
19625  done
19626IFS=$as_save_IFS
19627
19628  ;;
19629esac
19630fi
19631CODESIGN=$ac_cv_path_CODESIGN
19632if test -n "$CODESIGN"; then
19633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19634$as_echo "$CODESIGN" >&6; }
19635else
19636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19637$as_echo "no" >&6; }
19638fi
19639
19640
19641        if test "x$CODESIGN" = x; then
19642          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19643        fi
19644      else
19645        # Otherwise we believe it is a complete path. Use it as it is.
19646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19647$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19649$as_echo_n "checking for CODESIGN... " >&6; }
19650        if test ! -x "$tool_specified"; then
19651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19652$as_echo "not found" >&6; }
19653          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19654        fi
19655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19656$as_echo "$tool_specified" >&6; }
19657      fi
19658    fi
19659  fi
19660
19661
19662    if test "x$CODESIGN" != "x"; then
19663      # Verify that the openjdk_codesign certificate is present
19664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19665$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19666      rm -f codesign-testfile
19667      touch codesign-testfile
19668      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19669      rm -f codesign-testfile
19670      if test "x$CODESIGN" = x; then
19671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19672$as_echo "no" >&6; }
19673      else
19674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19675$as_echo "yes" >&6; }
19676      fi
19677    fi
19678
19679
19680
19681  # Publish this variable in the help.
19682
19683
19684  if test "x$SETFILE" = x; then
19685    # The variable is not set by user, try to locate tool using the code snippet
19686    for ac_prog in SetFile
19687do
19688  # Extract the first word of "$ac_prog", so it can be a program name with args.
19689set dummy $ac_prog; ac_word=$2
19690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19691$as_echo_n "checking for $ac_word... " >&6; }
19692if ${ac_cv_path_SETFILE+:} false; then :
19693  $as_echo_n "(cached) " >&6
19694else
19695  case $SETFILE in
19696  [\\/]* | ?:[\\/]*)
19697  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19698  ;;
19699  *)
19700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19701for as_dir in $PATH
19702do
19703  IFS=$as_save_IFS
19704  test -z "$as_dir" && as_dir=.
19705    for ac_exec_ext in '' $ac_executable_extensions; do
19706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19707    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19709    break 2
19710  fi
19711done
19712  done
19713IFS=$as_save_IFS
19714
19715  ;;
19716esac
19717fi
19718SETFILE=$ac_cv_path_SETFILE
19719if test -n "$SETFILE"; then
19720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19721$as_echo "$SETFILE" >&6; }
19722else
19723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724$as_echo "no" >&6; }
19725fi
19726
19727
19728  test -n "$SETFILE" && break
19729done
19730
19731  else
19732    # The variable is set, but is it from the command line or the environment?
19733
19734    # Try to remove the string !SETFILE! from our list.
19735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19737      # If it failed, the variable was not from the command line. Ignore it,
19738      # but warn the user (except for BASH, which is always set by the calling BASH).
19739      if test "xSETFILE" != xBASH; then
19740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19741$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19742      fi
19743      # Try to locate tool using the code snippet
19744      for ac_prog in SetFile
19745do
19746  # Extract the first word of "$ac_prog", so it can be a program name with args.
19747set dummy $ac_prog; ac_word=$2
19748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19749$as_echo_n "checking for $ac_word... " >&6; }
19750if ${ac_cv_path_SETFILE+:} false; then :
19751  $as_echo_n "(cached) " >&6
19752else
19753  case $SETFILE in
19754  [\\/]* | ?:[\\/]*)
19755  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19756  ;;
19757  *)
19758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19759for as_dir in $PATH
19760do
19761  IFS=$as_save_IFS
19762  test -z "$as_dir" && as_dir=.
19763    for ac_exec_ext in '' $ac_executable_extensions; do
19764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19765    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19767    break 2
19768  fi
19769done
19770  done
19771IFS=$as_save_IFS
19772
19773  ;;
19774esac
19775fi
19776SETFILE=$ac_cv_path_SETFILE
19777if test -n "$SETFILE"; then
19778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19779$as_echo "$SETFILE" >&6; }
19780else
19781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19782$as_echo "no" >&6; }
19783fi
19784
19785
19786  test -n "$SETFILE" && break
19787done
19788
19789    else
19790      # If it succeeded, then it was overridden by the user. We will use it
19791      # for the tool.
19792
19793      # First remove it from the list of overridden variables, so we can test
19794      # for unknown variables in the end.
19795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19796
19797      # Check if the provided tool contains a complete path.
19798      tool_specified="$SETFILE"
19799      tool_basename="${tool_specified##*/}"
19800      if test "x$tool_basename" = "x$tool_specified"; then
19801        # A command without a complete path is provided, search $PATH.
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19803$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19804        # Extract the first word of "$tool_basename", so it can be a program name with args.
19805set dummy $tool_basename; ac_word=$2
19806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19807$as_echo_n "checking for $ac_word... " >&6; }
19808if ${ac_cv_path_SETFILE+:} false; then :
19809  $as_echo_n "(cached) " >&6
19810else
19811  case $SETFILE in
19812  [\\/]* | ?:[\\/]*)
19813  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19814  ;;
19815  *)
19816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19817for as_dir in $PATH
19818do
19819  IFS=$as_save_IFS
19820  test -z "$as_dir" && as_dir=.
19821    for ac_exec_ext in '' $ac_executable_extensions; do
19822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19823    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19825    break 2
19826  fi
19827done
19828  done
19829IFS=$as_save_IFS
19830
19831  ;;
19832esac
19833fi
19834SETFILE=$ac_cv_path_SETFILE
19835if test -n "$SETFILE"; then
19836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19837$as_echo "$SETFILE" >&6; }
19838else
19839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19840$as_echo "no" >&6; }
19841fi
19842
19843
19844        if test "x$SETFILE" = x; then
19845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19846        fi
19847      else
19848        # Otherwise we believe it is a complete path. Use it as it is.
19849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19850$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19852$as_echo_n "checking for SETFILE... " >&6; }
19853        if test ! -x "$tool_specified"; then
19854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19855$as_echo "not found" >&6; }
19856          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19857        fi
19858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19859$as_echo "$tool_specified" >&6; }
19860      fi
19861    fi
19862  fi
19863
19864
19865
19866  if test "x$SETFILE" = x; then
19867    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19868  fi
19869
19870
19871  fi
19872
19873
19874  # Test if bash supports pipefail.
19875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19876$as_echo_n "checking if bash supports pipefail... " >&6; }
19877  if ${BASH} -c 'set -o pipefail'; then
19878    BASH_ARGS="$BASH_ARGS -o pipefail"
19879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19880$as_echo "yes" >&6; }
19881  else
19882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19883$as_echo "no" >&6; }
19884  fi
19885
19886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19887$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19888  if ${BASH} -e -c 'true'; then
19889    BASH_ARGS="$BASH_ARGS -e"
19890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19891$as_echo "yes" >&6; }
19892  else
19893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19894$as_echo "no" >&6; }
19895  fi
19896
19897
19898
19899
19900# Check if pkg-config is available.
19901
19902
19903if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19904	if test -n "$ac_tool_prefix"; then
19905  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19906set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19908$as_echo_n "checking for $ac_word... " >&6; }
19909if ${ac_cv_path_PKG_CONFIG+:} false; then :
19910  $as_echo_n "(cached) " >&6
19911else
19912  case $PKG_CONFIG in
19913  [\\/]* | ?:[\\/]*)
19914  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19915  ;;
19916  *)
19917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19918for as_dir in $PATH
19919do
19920  IFS=$as_save_IFS
19921  test -z "$as_dir" && as_dir=.
19922    for ac_exec_ext in '' $ac_executable_extensions; do
19923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19924    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19926    break 2
19927  fi
19928done
19929  done
19930IFS=$as_save_IFS
19931
19932  ;;
19933esac
19934fi
19935PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19936if test -n "$PKG_CONFIG"; then
19937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19938$as_echo "$PKG_CONFIG" >&6; }
19939else
19940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19941$as_echo "no" >&6; }
19942fi
19943
19944
19945fi
19946if test -z "$ac_cv_path_PKG_CONFIG"; then
19947  ac_pt_PKG_CONFIG=$PKG_CONFIG
19948  # Extract the first word of "pkg-config", so it can be a program name with args.
19949set dummy pkg-config; ac_word=$2
19950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19951$as_echo_n "checking for $ac_word... " >&6; }
19952if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19953  $as_echo_n "(cached) " >&6
19954else
19955  case $ac_pt_PKG_CONFIG in
19956  [\\/]* | ?:[\\/]*)
19957  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19958  ;;
19959  *)
19960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19961for as_dir in $PATH
19962do
19963  IFS=$as_save_IFS
19964  test -z "$as_dir" && as_dir=.
19965    for ac_exec_ext in '' $ac_executable_extensions; do
19966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19967    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19969    break 2
19970  fi
19971done
19972  done
19973IFS=$as_save_IFS
19974
19975  ;;
19976esac
19977fi
19978ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19979if test -n "$ac_pt_PKG_CONFIG"; then
19980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19981$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19982else
19983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19984$as_echo "no" >&6; }
19985fi
19986
19987  if test "x$ac_pt_PKG_CONFIG" = x; then
19988    PKG_CONFIG=""
19989  else
19990    case $cross_compiling:$ac_tool_warned in
19991yes:)
19992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19994ac_tool_warned=yes ;;
19995esac
19996    PKG_CONFIG=$ac_pt_PKG_CONFIG
19997  fi
19998else
19999  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
20000fi
20001
20002fi
20003if test -n "$PKG_CONFIG"; then
20004	_pkg_min_version=0.9.0
20005	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
20006$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
20007	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
20008		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20009$as_echo "yes" >&6; }
20010	else
20011		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20012$as_echo "no" >&6; }
20013		PKG_CONFIG=""
20014	fi
20015
20016fi
20017
20018# After basic tools have been setup, we can check build os specific details.
20019
20020  ###############################################################################
20021
20022  # Note that this is the build platform OS version!
20023
20024  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
20025  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
20026  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
20027  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
20028
20029
20030
20031
20032
20033# Setup builddeps, for automatic downloading of tools we need.
20034# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
20035# boot-jdk setup, but we need to have basic tools setup first.
20036
20037
20038# Check whether --with-builddeps-conf was given.
20039if test "${with_builddeps_conf+set}" = set; then :
20040  withval=$with_builddeps_conf;
20041fi
20042
20043
20044
20045# Check whether --with-builddeps-server was given.
20046if test "${with_builddeps_server+set}" = set; then :
20047  withval=$with_builddeps_server;
20048fi
20049
20050
20051
20052# Check whether --with-builddeps-dir was given.
20053if test "${with_builddeps_dir+set}" = set; then :
20054  withval=$with_builddeps_dir;
20055else
20056  with_builddeps_dir=/localhome/builddeps
20057fi
20058
20059
20060
20061# Check whether --with-builddeps-group was given.
20062if test "${with_builddeps_group+set}" = set; then :
20063  withval=$with_builddeps_group;
20064fi
20065
20066
20067
20068
20069  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20070    if test "x$with_builddeps_conf" != x; then
20071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
20072$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
20073      builddepsfile=$with_builddeps_conf
20074      if test -s $builddepsfile; then
20075        . $builddepsfile
20076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
20077$as_echo "loaded!" >&6; }
20078      else
20079        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
20080      fi
20081    else
20082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
20083$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
20084      builddepsfile=`mktemp`
20085      touch $builddepsfile
20086      # Put all found confs into a single file.
20087      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
20088      # Source the file to acquire the variables
20089      if test -s $builddepsfile; then
20090        . $builddepsfile
20091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
20092$as_echo "found at least one!" >&6; }
20093      else
20094        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
20095      fi
20096    fi
20097    # Create build and target names that use _ instead of "-" and ".".
20098    # This is necessary to use them in variable names.
20099    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20100    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20101    # Extract rewrite information for build and target
20102    eval rewritten_build=\${REWRITE_${build_var}}
20103    if test "x$rewritten_build" = x; then
20104      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
20105      echo Build stays the same $rewritten_build
20106    else
20107      echo Rewriting build for builddeps into $rewritten_build
20108    fi
20109    eval rewritten_target=\${REWRITE_${target_var}}
20110    if test "x$rewritten_target" = x; then
20111      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
20112      echo Target stays the same $rewritten_target
20113    else
20114      echo Rewriting target for builddeps into $rewritten_target
20115    fi
20116    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
20117    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
20118  fi
20119  for ac_prog in 7z unzip
20120do
20121  # Extract the first word of "$ac_prog", so it can be a program name with args.
20122set dummy $ac_prog; ac_word=$2
20123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20124$as_echo_n "checking for $ac_word... " >&6; }
20125if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
20126  $as_echo_n "(cached) " >&6
20127else
20128  if test -n "$BDEPS_UNZIP"; then
20129  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
20130else
20131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20132for as_dir in $PATH
20133do
20134  IFS=$as_save_IFS
20135  test -z "$as_dir" && as_dir=.
20136    for ac_exec_ext in '' $ac_executable_extensions; do
20137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20138    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20140    break 2
20141  fi
20142done
20143  done
20144IFS=$as_save_IFS
20145
20146fi
20147fi
20148BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20149if test -n "$BDEPS_UNZIP"; then
20150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20151$as_echo "$BDEPS_UNZIP" >&6; }
20152else
20153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20154$as_echo "no" >&6; }
20155fi
20156
20157
20158  test -n "$BDEPS_UNZIP" && break
20159done
20160
20161  if test "x$BDEPS_UNZIP" = x7z; then
20162    BDEPS_UNZIP="7z x"
20163  fi
20164
20165  for ac_prog in wget lftp ftp
20166do
20167  # Extract the first word of "$ac_prog", so it can be a program name with args.
20168set dummy $ac_prog; ac_word=$2
20169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20170$as_echo_n "checking for $ac_word... " >&6; }
20171if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20172  $as_echo_n "(cached) " >&6
20173else
20174  if test -n "$BDEPS_FTP"; then
20175  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20176else
20177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20178for as_dir in $PATH
20179do
20180  IFS=$as_save_IFS
20181  test -z "$as_dir" && as_dir=.
20182    for ac_exec_ext in '' $ac_executable_extensions; do
20183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20184    ac_cv_prog_BDEPS_FTP="$ac_prog"
20185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20186    break 2
20187  fi
20188done
20189  done
20190IFS=$as_save_IFS
20191
20192fi
20193fi
20194BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20195if test -n "$BDEPS_FTP"; then
20196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20197$as_echo "$BDEPS_FTP" >&6; }
20198else
20199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20200$as_echo "no" >&6; }
20201fi
20202
20203
20204  test -n "$BDEPS_FTP" && break
20205done
20206
20207
20208
20209###############################################################################
20210#
20211# Determine OpenJDK variants, options and version numbers.
20212#
20213###############################################################################
20214
20215# We need build & target for this.
20216
20217
20218  ###############################################################################
20219  #
20220  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20221  # We always build headless support.
20222  #
20223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20224$as_echo_n "checking headful support... " >&6; }
20225  # Check whether --enable-headful was given.
20226if test "${enable_headful+set}" = set; then :
20227  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20228else
20229  SUPPORT_HEADFUL=yes
20230fi
20231
20232
20233  SUPPORT_HEADLESS=yes
20234  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20235
20236  if test "x$SUPPORT_HEADFUL" = xyes; then
20237    # We are building both headful and headless.
20238    headful_msg="include support for both headful and headless"
20239  fi
20240
20241  if test "x$SUPPORT_HEADFUL" = xno; then
20242    # Thus we are building headless only.
20243    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20244    headful_msg="headless only"
20245  fi
20246
20247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20248$as_echo "$headful_msg" >&6; }
20249
20250
20251
20252
20253
20254  # Control wether Hotspot runs Queens test after build.
20255  # Check whether --enable-hotspot-test-in-build was given.
20256if test "${enable_hotspot_test_in_build+set}" = set; then :
20257  enableval=$enable_hotspot_test_in_build;
20258else
20259  enable_hotspot_test_in_build=no
20260fi
20261
20262  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20263    TEST_IN_BUILD=true
20264  else
20265    TEST_IN_BUILD=false
20266  fi
20267
20268
20269  ###############################################################################
20270  #
20271  # Choose cacerts source file
20272  #
20273
20274# Check whether --with-cacerts-file was given.
20275if test "${with_cacerts_file+set}" = set; then :
20276  withval=$with_cacerts_file;
20277fi
20278
20279  if test "x$with_cacerts_file" != x; then
20280    CACERTS_FILE=$with_cacerts_file
20281  fi
20282
20283
20284  ###############################################################################
20285  #
20286  # Enable or disable unlimited crypto
20287  #
20288  # Check whether --enable-unlimited-crypto was given.
20289if test "${enable_unlimited_crypto+set}" = set; then :
20290  enableval=$enable_unlimited_crypto;
20291else
20292  enable_unlimited_crypto=no
20293fi
20294
20295  if test "x$enable_unlimited_crypto" = "xyes"; then
20296    UNLIMITED_CRYPTO=true
20297  else
20298    UNLIMITED_CRYPTO=false
20299  fi
20300
20301
20302  ###############################################################################
20303  #
20304  # Enable or disable the elliptic curve crypto implementation
20305  #
20306
20307
20308  ###############################################################################
20309  #
20310  # Compress jars
20311  #
20312  COMPRESS_JARS=false
20313
20314
20315
20316
20317  # Source the version numbers
20318  . $AUTOCONF_DIR/version-numbers
20319
20320  # Get the settings from parameters
20321
20322# Check whether --with-milestone was given.
20323if test "${with_milestone+set}" = set; then :
20324  withval=$with_milestone;
20325fi
20326
20327  if test "x$with_milestone" = xyes; then
20328    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20329  elif test "x$with_milestone" != x; then
20330    MILESTONE="$with_milestone"
20331  fi
20332  if test "x$MILESTONE" = x; then
20333    MILESTONE=internal
20334  fi
20335
20336
20337# Check whether --with-update-version was given.
20338if test "${with_update_version+set}" = set; then :
20339  withval=$with_update_version;
20340fi
20341
20342  if test "x$with_update_version" = xyes; then
20343    as_fn_error $? "Update version must have a value" "$LINENO" 5
20344  elif test "x$with_update_version" != x; then
20345    JDK_UPDATE_VERSION="$with_update_version"
20346    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20347    # to a bug in expr (which reduces it to just X). To work around this, we
20348    # always add a 0 to one digit update versions.
20349    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20350      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20351    fi
20352  fi
20353
20354
20355# Check whether --with-user-release-suffix was given.
20356if test "${with_user_release_suffix+set}" = set; then :
20357  withval=$with_user_release_suffix;
20358fi
20359
20360  if test "x$with_user_release_suffix" = xyes; then
20361    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20362  elif test "x$with_user_release_suffix" != x; then
20363    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20364  fi
20365
20366
20367# Check whether --with-build-number was given.
20368if test "${with_build_number+set}" = set; then :
20369  withval=$with_build_number;
20370fi
20371
20372  if test "x$with_build_number" = xyes; then
20373    as_fn_error $? "Build number must have a value" "$LINENO" 5
20374  elif test "x$with_build_number" != x; then
20375    JDK_BUILD_NUMBER="$with_build_number"
20376  fi
20377  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20378  if test "x$JDK_BUILD_NUMBER" = x; then
20379    JDK_BUILD_NUMBER=b00
20380    if test "x$USER_RELEASE_SUFFIX" = x; then
20381      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20382      # Avoid [:alnum:] since it depends on the locale.
20383      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20384      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20385    fi
20386  fi
20387
20388  # Now set the JDK version, milestone, build number etc.
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405# Check whether --with-copyright-year was given.
20406if test "${with_copyright_year+set}" = set; then :
20407  withval=$with_copyright_year;
20408fi
20409
20410  if test "x$with_copyright_year" = xyes; then
20411    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20412  elif test "x$with_copyright_year" != x; then
20413    COPYRIGHT_YEAR="$with_copyright_year"
20414  else
20415    COPYRIGHT_YEAR=`date +'%Y'`
20416  fi
20417
20418
20419  if test "x$JDK_UPDATE_VERSION" != x; then
20420    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20421  else
20422    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20423  fi
20424
20425
20426  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20427
20428
20429
20430###############################################################################
20431#
20432# Setup BootJDK, used to bootstrap the build.
20433#
20434###############################################################################
20435
20436
20437  BOOT_JDK_FOUND=no
20438
20439# Check whether --with-boot-jdk was given.
20440if test "${with_boot_jdk+set}" = set; then :
20441  withval=$with_boot_jdk;
20442fi
20443
20444
20445  # We look for the Boot JDK through various means, going from more certain to
20446  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20447  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20448  # must check if this is indeed valid; otherwise we'll continue looking.
20449
20450  # Test: Is bootjdk explicitely set by command line arguments?
20451
20452  if test "x$BOOT_JDK_FOUND" = xno; then
20453    # Now execute the test
20454
20455  if test "x$with_boot_jdk" != x; then
20456    BOOT_JDK=$with_boot_jdk
20457    BOOT_JDK_FOUND=maybe
20458    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20459$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20460  fi
20461
20462
20463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20465      # Do we have a bin/java?
20466      if test ! -x "$BOOT_JDK/bin/java"; then
20467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20469        BOOT_JDK_FOUND=no
20470      else
20471        # Do we have a bin/javac?
20472        if test ! -x "$BOOT_JDK/bin/javac"; then
20473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20477          BOOT_JDK_FOUND=no
20478        else
20479          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20480          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20481
20482          # Extra M4 quote needed to protect [] in grep expression.
20483          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20484          if test "x$FOUND_CORRECT_VERSION" = x; then
20485            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20487            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20488$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20489            BOOT_JDK_FOUND=no
20490          else
20491            # We're done! :-)
20492            BOOT_JDK_FOUND=yes
20493
20494  # Only process if variable expands to non-empty
20495
20496  if test "x$BOOT_JDK" != x; then
20497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20498
20499  # Input might be given as Windows format, start by converting to
20500  # unix format.
20501  path="$BOOT_JDK"
20502  new_path=`$CYGPATH -u "$path"`
20503
20504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20507  # "foo.exe" is OK but "foo" is an error.
20508  #
20509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20510  # It is also a way to make sure we got the proper file name for the real test later on.
20511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20512  if test "x$test_shortpath" = x; then
20513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20515    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20516  fi
20517
20518  # Call helper function which possibly converts this using DOS-style short mode.
20519  # If so, the updated path is stored in $new_path.
20520
20521  input_path="$new_path"
20522  # Check if we need to convert this using DOS-style short mode. If the path
20523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20524  # take no chances and rewrite it.
20525  # Note: m4 eats our [], so we need to use [ and ] instead.
20526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20527  if test "x$has_forbidden_chars" != x; then
20528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20532      # Going to short mode and back again did indeed matter. Since short mode is
20533      # case insensitive, let's make it lowercase to improve readability.
20534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20535      # Now convert it back to Unix-style (cygpath)
20536      input_path=`$CYGPATH -u "$shortmode_path"`
20537      new_path="$input_path"
20538    fi
20539  fi
20540
20541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20542  if test "x$test_cygdrive_prefix" = x; then
20543    # As a simple fix, exclude /usr/bin since it's not a real path.
20544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20546      # a path prefixed by /cygdrive for fixpath to work.
20547      new_path="$CYGWIN_ROOT_PATH$input_path"
20548    fi
20549  fi
20550
20551
20552  if test "x$path" != "x$new_path"; then
20553    BOOT_JDK="$new_path"
20554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20556  fi
20557
20558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20559
20560  path="$BOOT_JDK"
20561  has_colon=`$ECHO $path | $GREP ^.:`
20562  new_path="$path"
20563  if test "x$has_colon" = x; then
20564    # Not in mixed or Windows style, start by that.
20565    new_path=`cmd //c echo $path`
20566  fi
20567
20568
20569  input_path="$new_path"
20570  # Check if we need to convert this using DOS-style short mode. If the path
20571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20572  # take no chances and rewrite it.
20573  # Note: m4 eats our [], so we need to use [ and ] instead.
20574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20575  if test "x$has_forbidden_chars" != x; then
20576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20578  fi
20579
20580
20581  windows_path="$new_path"
20582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20583    unix_path=`$CYGPATH -u "$windows_path"`
20584    new_path="$unix_path"
20585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20587    new_path="$unix_path"
20588  fi
20589
20590  if test "x$path" != "x$new_path"; then
20591    BOOT_JDK="$new_path"
20592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20594  fi
20595
20596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20598
20599    else
20600      # We're on a unix platform. Hooray! :)
20601      path="$BOOT_JDK"
20602      has_space=`$ECHO "$path" | $GREP " "`
20603      if test "x$has_space" != x; then
20604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20607      fi
20608
20609      # Use eval to expand a potential ~
20610      eval path="$path"
20611      if test ! -f "$path" && test ! -d "$path"; then
20612        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20613      fi
20614
20615      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20616    fi
20617  fi
20618
20619            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20620$as_echo_n "checking for Boot JDK... " >&6; }
20621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20622$as_echo "$BOOT_JDK" >&6; }
20623            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20624$as_echo_n "checking Boot JDK version... " >&6; }
20625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20627$as_echo "$BOOT_JDK_VERSION" >&6; }
20628          fi # end check jdk version
20629        fi # end check javac
20630      fi # end check java
20631    fi # end check boot jdk found
20632  fi
20633
20634  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20635    # Having specified an argument which is incorrect will produce an instant failure;
20636    # we should not go on looking
20637    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20638  fi
20639
20640  # Test: Is bootjdk available from builddeps?
20641
20642  if test "x$BOOT_JDK_FOUND" = xno; then
20643    # Now execute the test
20644
20645
20646
20647  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20648    # Source the builddeps file again, to make sure it uses the latest variables!
20649    . $builddepsfile
20650    # Look for a target and build machine specific resource!
20651    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20652    if test "x$resource" = x; then
20653      # Ok, lets instead look for a target specific resource
20654      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20655    fi
20656    if test "x$resource" = x; then
20657      # Ok, lets instead look for a build specific resource
20658      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20659    fi
20660    if test "x$resource" = x; then
20661      # Ok, lets instead look for a generic resource
20662      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20663      resource=${builddep_bootjdk}
20664    fi
20665    if test "x$resource" != x; then
20666      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20667$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20668      # If the resource in the builddeps.conf file is an existing directory,
20669      # for example /java/linux/cups
20670      if test -d ${resource}; then
20671        depdir=${resource}
20672      else
20673
20674  # bootjdk is for example mymodule
20675  # $resource is for example libs/general/libmymod_1_2_3.zip
20676  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20677  # $with_builddeps_dir is for example /localhome/builddeps
20678  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20679  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20680  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20681  filename=`basename $resource`
20682  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20683  filebase=${filename%%.*}
20684  extension=${filename#*.}
20685  installdir=$with_builddeps_dir/$filebase
20686  if test ! -f $installdir/$filename.unpacked; then
20687    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20688$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20689    if test ! -d $installdir; then
20690      mkdir -p $installdir
20691    fi
20692    if test ! -d $installdir; then
20693      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20694    fi
20695    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20696    touch $tmpfile
20697    if test ! -f $tmpfile; then
20698      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20699    fi
20700
20701  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20702  # $tmpfile is the local file name for the downloaded file.
20703  VALID_TOOL=no
20704  if test "x$BDEPS_FTP" = xwget; then
20705    VALID_TOOL=yes
20706    wget -O $tmpfile $with_builddeps_server/$resource
20707  fi
20708  if test "x$BDEPS_FTP" = xlftp; then
20709    VALID_TOOL=yes
20710    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20711  fi
20712  if test "x$BDEPS_FTP" = xftp; then
20713    VALID_TOOL=yes
20714    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20715    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20716    FTPUSERPWD=${FTPSERVER%%@*}
20717    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20718      FTPUSER=${userpwd%%:*}
20719      FTPPWD=${userpwd#*@}
20720      FTPSERVER=${FTPSERVER#*@}
20721    else
20722      FTPUSER=ftp
20723      FTPPWD=ftp
20724    fi
20725    # the "pass" command does not work on some
20726    # ftp clients (read ftp.exe) but if it works,
20727    # passive mode is better!
20728    ( \
20729        echo "user $FTPUSER $FTPPWD"        ; \
20730        echo "pass"                         ; \
20731        echo "bin"                          ; \
20732        echo "get $FTPPATH $tmpfile"              ; \
20733    ) | ftp -in $FTPSERVER
20734  fi
20735  if test "x$VALID_TOOL" != xyes; then
20736    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20737  fi
20738
20739    mv $tmpfile $installdir/$filename
20740    if test ! -s $installdir/$filename; then
20741      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20742    fi
20743    case "$extension" in
20744      zip)  echo "Unzipping $installdir/$filename..."
20745        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20746        ;;
20747      tar.gz) echo "Untaring $installdir/$filename..."
20748        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20749        ;;
20750      tgz) echo "Untaring $installdir/$filename..."
20751        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20752        ;;
20753      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20754        ;;
20755    esac
20756  fi
20757  if test -f $installdir/$filename.unpacked; then
20758    depdir=$installdir
20759  fi
20760
20761      fi
20762      # Source the builddeps file again, because in the previous command, the depdir
20763      # was updated to point at the current build dependency install directory.
20764      . $builddepsfile
20765      # Now extract variables from the builddeps.conf files.
20766      theroot=${builddep_bootjdk_ROOT}
20767      thecflags=${builddep_bootjdk_CFLAGS}
20768      thelibs=${builddep_bootjdk_LIBS}
20769      if test "x$depdir" = x; then
20770        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20771      fi
20772      BOOT_JDK=$depdir
20773      if test "x$theroot" != x; then
20774        BOOT_JDK="$theroot"
20775      fi
20776      if test "x$thecflags" != x; then
20777        BOOT_JDK_CFLAGS="$thecflags"
20778      fi
20779      if test "x$thelibs" != x; then
20780        BOOT_JDK_LIBS="$thelibs"
20781      fi
20782      BOOT_JDK_FOUND=maybe
20783      else BOOT_JDK_FOUND=no
20784
20785    fi
20786    else BOOT_JDK_FOUND=no
20787
20788  fi
20789
20790
20791
20792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20794      # Do we have a bin/java?
20795      if test ! -x "$BOOT_JDK/bin/java"; then
20796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20798        BOOT_JDK_FOUND=no
20799      else
20800        # Do we have a bin/javac?
20801        if test ! -x "$BOOT_JDK/bin/javac"; then
20802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20806          BOOT_JDK_FOUND=no
20807        else
20808          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20809          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20810
20811          # Extra M4 quote needed to protect [] in grep expression.
20812          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20813          if test "x$FOUND_CORRECT_VERSION" = x; then
20814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20816            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20818            BOOT_JDK_FOUND=no
20819          else
20820            # We're done! :-)
20821            BOOT_JDK_FOUND=yes
20822
20823  # Only process if variable expands to non-empty
20824
20825  if test "x$BOOT_JDK" != x; then
20826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827
20828  # Input might be given as Windows format, start by converting to
20829  # unix format.
20830  path="$BOOT_JDK"
20831  new_path=`$CYGPATH -u "$path"`
20832
20833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20836  # "foo.exe" is OK but "foo" is an error.
20837  #
20838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20839  # It is also a way to make sure we got the proper file name for the real test later on.
20840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20841  if test "x$test_shortpath" = x; then
20842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20845  fi
20846
20847  # Call helper function which possibly converts this using DOS-style short mode.
20848  # If so, the updated path is stored in $new_path.
20849
20850  input_path="$new_path"
20851  # Check if we need to convert this using DOS-style short mode. If the path
20852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20853  # take no chances and rewrite it.
20854  # Note: m4 eats our [], so we need to use [ and ] instead.
20855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20856  if test "x$has_forbidden_chars" != x; then
20857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20861      # Going to short mode and back again did indeed matter. Since short mode is
20862      # case insensitive, let's make it lowercase to improve readability.
20863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20864      # Now convert it back to Unix-style (cygpath)
20865      input_path=`$CYGPATH -u "$shortmode_path"`
20866      new_path="$input_path"
20867    fi
20868  fi
20869
20870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20871  if test "x$test_cygdrive_prefix" = x; then
20872    # As a simple fix, exclude /usr/bin since it's not a real path.
20873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20875      # a path prefixed by /cygdrive for fixpath to work.
20876      new_path="$CYGWIN_ROOT_PATH$input_path"
20877    fi
20878  fi
20879
20880
20881  if test "x$path" != "x$new_path"; then
20882    BOOT_JDK="$new_path"
20883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20885  fi
20886
20887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20888
20889  path="$BOOT_JDK"
20890  has_colon=`$ECHO $path | $GREP ^.:`
20891  new_path="$path"
20892  if test "x$has_colon" = x; then
20893    # Not in mixed or Windows style, start by that.
20894    new_path=`cmd //c echo $path`
20895  fi
20896
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20907  fi
20908
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919  if test "x$path" != "x$new_path"; then
20920    BOOT_JDK="$new_path"
20921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20923  fi
20924
20925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20927
20928    else
20929      # We're on a unix platform. Hooray! :)
20930      path="$BOOT_JDK"
20931      has_space=`$ECHO "$path" | $GREP " "`
20932      if test "x$has_space" != x; then
20933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20936      fi
20937
20938      # Use eval to expand a potential ~
20939      eval path="$path"
20940      if test ! -f "$path" && test ! -d "$path"; then
20941        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20942      fi
20943
20944      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20945    fi
20946  fi
20947
20948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20949$as_echo_n "checking for Boot JDK... " >&6; }
20950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20951$as_echo "$BOOT_JDK" >&6; }
20952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20953$as_echo_n "checking Boot JDK version... " >&6; }
20954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20956$as_echo "$BOOT_JDK_VERSION" >&6; }
20957          fi # end check jdk version
20958        fi # end check javac
20959      fi # end check java
20960    fi # end check boot jdk found
20961  fi
20962
20963
20964  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20965
20966  if test "x$BOOT_JDK_FOUND" = xno; then
20967    # Now execute the test
20968
20969  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20970    # First check at user selected default
20971
20972  if test "x$BOOT_JDK_FOUND" = xno; then
20973    # Now execute the test
20974
20975  if test -x /usr/libexec/java_home; then
20976    BOOT_JDK=`/usr/libexec/java_home `
20977    BOOT_JDK_FOUND=maybe
20978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20979$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20980  fi
20981
20982
20983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20985      # Do we have a bin/java?
20986      if test ! -x "$BOOT_JDK/bin/java"; then
20987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20989        BOOT_JDK_FOUND=no
20990      else
20991        # Do we have a bin/javac?
20992        if test ! -x "$BOOT_JDK/bin/javac"; then
20993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20997          BOOT_JDK_FOUND=no
20998        else
20999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21001
21002          # Extra M4 quote needed to protect [] in grep expression.
21003          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21004          if test "x$FOUND_CORRECT_VERSION" = x; then
21005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21009            BOOT_JDK_FOUND=no
21010          else
21011            # We're done! :-)
21012            BOOT_JDK_FOUND=yes
21013
21014  # Only process if variable expands to non-empty
21015
21016  if test "x$BOOT_JDK" != x; then
21017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21018
21019  # Input might be given as Windows format, start by converting to
21020  # unix format.
21021  path="$BOOT_JDK"
21022  new_path=`$CYGPATH -u "$path"`
21023
21024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21027  # "foo.exe" is OK but "foo" is an error.
21028  #
21029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21030  # It is also a way to make sure we got the proper file name for the real test later on.
21031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21032  if test "x$test_shortpath" = x; then
21033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21036  fi
21037
21038  # Call helper function which possibly converts this using DOS-style short mode.
21039  # If so, the updated path is stored in $new_path.
21040
21041  input_path="$new_path"
21042  # Check if we need to convert this using DOS-style short mode. If the path
21043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21044  # take no chances and rewrite it.
21045  # Note: m4 eats our [], so we need to use [ and ] instead.
21046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21047  if test "x$has_forbidden_chars" != x; then
21048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21052      # Going to short mode and back again did indeed matter. Since short mode is
21053      # case insensitive, let's make it lowercase to improve readability.
21054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21055      # Now convert it back to Unix-style (cygpath)
21056      input_path=`$CYGPATH -u "$shortmode_path"`
21057      new_path="$input_path"
21058    fi
21059  fi
21060
21061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21062  if test "x$test_cygdrive_prefix" = x; then
21063    # As a simple fix, exclude /usr/bin since it's not a real path.
21064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21066      # a path prefixed by /cygdrive for fixpath to work.
21067      new_path="$CYGWIN_ROOT_PATH$input_path"
21068    fi
21069  fi
21070
21071
21072  if test "x$path" != "x$new_path"; then
21073    BOOT_JDK="$new_path"
21074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21076  fi
21077
21078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21079
21080  path="$BOOT_JDK"
21081  has_colon=`$ECHO $path | $GREP ^.:`
21082  new_path="$path"
21083  if test "x$has_colon" = x; then
21084    # Not in mixed or Windows style, start by that.
21085    new_path=`cmd //c echo $path`
21086  fi
21087
21088
21089  input_path="$new_path"
21090  # Check if we need to convert this using DOS-style short mode. If the path
21091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21092  # take no chances and rewrite it.
21093  # Note: m4 eats our [], so we need to use [ and ] instead.
21094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21095  if test "x$has_forbidden_chars" != x; then
21096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21098  fi
21099
21100
21101  windows_path="$new_path"
21102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21103    unix_path=`$CYGPATH -u "$windows_path"`
21104    new_path="$unix_path"
21105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21107    new_path="$unix_path"
21108  fi
21109
21110  if test "x$path" != "x$new_path"; then
21111    BOOT_JDK="$new_path"
21112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21114  fi
21115
21116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21118
21119    else
21120      # We're on a unix platform. Hooray! :)
21121      path="$BOOT_JDK"
21122      has_space=`$ECHO "$path" | $GREP " "`
21123      if test "x$has_space" != x; then
21124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21127      fi
21128
21129      # Use eval to expand a potential ~
21130      eval path="$path"
21131      if test ! -f "$path" && test ! -d "$path"; then
21132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21133      fi
21134
21135      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21136    fi
21137  fi
21138
21139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21140$as_echo_n "checking for Boot JDK... " >&6; }
21141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21142$as_echo "$BOOT_JDK" >&6; }
21143            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21144$as_echo_n "checking Boot JDK version... " >&6; }
21145            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21147$as_echo "$BOOT_JDK_VERSION" >&6; }
21148          fi # end check jdk version
21149        fi # end check javac
21150      fi # end check java
21151    fi # end check boot jdk found
21152  fi
21153
21154    # If that did not work out (e.g. too old), try explicit versions instead
21155
21156  if test "x$BOOT_JDK_FOUND" = xno; then
21157    # Now execute the test
21158
21159  if test -x /usr/libexec/java_home; then
21160    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21161    BOOT_JDK_FOUND=maybe
21162    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21163$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21164  fi
21165
21166
21167    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21168    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21169      # Do we have a bin/java?
21170      if test ! -x "$BOOT_JDK/bin/java"; then
21171        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21173        BOOT_JDK_FOUND=no
21174      else
21175        # Do we have a bin/javac?
21176        if test ! -x "$BOOT_JDK/bin/javac"; then
21177          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21179          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21180$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21181          BOOT_JDK_FOUND=no
21182        else
21183          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21184          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21185
21186          # Extra M4 quote needed to protect [] in grep expression.
21187          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21188          if test "x$FOUND_CORRECT_VERSION" = x; then
21189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21191            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21192$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21193            BOOT_JDK_FOUND=no
21194          else
21195            # We're done! :-)
21196            BOOT_JDK_FOUND=yes
21197
21198  # Only process if variable expands to non-empty
21199
21200  if test "x$BOOT_JDK" != x; then
21201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21202
21203  # Input might be given as Windows format, start by converting to
21204  # unix format.
21205  path="$BOOT_JDK"
21206  new_path=`$CYGPATH -u "$path"`
21207
21208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21211  # "foo.exe" is OK but "foo" is an error.
21212  #
21213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21214  # It is also a way to make sure we got the proper file name for the real test later on.
21215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21216  if test "x$test_shortpath" = x; then
21217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21219    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21220  fi
21221
21222  # Call helper function which possibly converts this using DOS-style short mode.
21223  # If so, the updated path is stored in $new_path.
21224
21225  input_path="$new_path"
21226  # Check if we need to convert this using DOS-style short mode. If the path
21227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21228  # take no chances and rewrite it.
21229  # Note: m4 eats our [], so we need to use [ and ] instead.
21230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21231  if test "x$has_forbidden_chars" != x; then
21232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21236      # Going to short mode and back again did indeed matter. Since short mode is
21237      # case insensitive, let's make it lowercase to improve readability.
21238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21239      # Now convert it back to Unix-style (cygpath)
21240      input_path=`$CYGPATH -u "$shortmode_path"`
21241      new_path="$input_path"
21242    fi
21243  fi
21244
21245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21246  if test "x$test_cygdrive_prefix" = x; then
21247    # As a simple fix, exclude /usr/bin since it's not a real path.
21248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21250      # a path prefixed by /cygdrive for fixpath to work.
21251      new_path="$CYGWIN_ROOT_PATH$input_path"
21252    fi
21253  fi
21254
21255
21256  if test "x$path" != "x$new_path"; then
21257    BOOT_JDK="$new_path"
21258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21260  fi
21261
21262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21263
21264  path="$BOOT_JDK"
21265  has_colon=`$ECHO $path | $GREP ^.:`
21266  new_path="$path"
21267  if test "x$has_colon" = x; then
21268    # Not in mixed or Windows style, start by that.
21269    new_path=`cmd //c echo $path`
21270  fi
21271
21272
21273  input_path="$new_path"
21274  # Check if we need to convert this using DOS-style short mode. If the path
21275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21276  # take no chances and rewrite it.
21277  # Note: m4 eats our [], so we need to use [ and ] instead.
21278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21279  if test "x$has_forbidden_chars" != x; then
21280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21282  fi
21283
21284
21285  windows_path="$new_path"
21286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21287    unix_path=`$CYGPATH -u "$windows_path"`
21288    new_path="$unix_path"
21289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21291    new_path="$unix_path"
21292  fi
21293
21294  if test "x$path" != "x$new_path"; then
21295    BOOT_JDK="$new_path"
21296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21298  fi
21299
21300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21302
21303    else
21304      # We're on a unix platform. Hooray! :)
21305      path="$BOOT_JDK"
21306      has_space=`$ECHO "$path" | $GREP " "`
21307      if test "x$has_space" != x; then
21308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21311      fi
21312
21313      # Use eval to expand a potential ~
21314      eval path="$path"
21315      if test ! -f "$path" && test ! -d "$path"; then
21316        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21317      fi
21318
21319      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21320    fi
21321  fi
21322
21323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21324$as_echo_n "checking for Boot JDK... " >&6; }
21325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21326$as_echo "$BOOT_JDK" >&6; }
21327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21328$as_echo_n "checking Boot JDK version... " >&6; }
21329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21331$as_echo "$BOOT_JDK_VERSION" >&6; }
21332          fi # end check jdk version
21333        fi # end check javac
21334      fi # end check java
21335    fi # end check boot jdk found
21336  fi
21337
21338
21339  if test "x$BOOT_JDK_FOUND" = xno; then
21340    # Now execute the test
21341
21342  if test -x /usr/libexec/java_home; then
21343    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21344    BOOT_JDK_FOUND=maybe
21345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21346$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21347  fi
21348
21349
21350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21352      # Do we have a bin/java?
21353      if test ! -x "$BOOT_JDK/bin/java"; then
21354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21356        BOOT_JDK_FOUND=no
21357      else
21358        # Do we have a bin/javac?
21359        if test ! -x "$BOOT_JDK/bin/javac"; then
21360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21364          BOOT_JDK_FOUND=no
21365        else
21366          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21367          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21368
21369          # Extra M4 quote needed to protect [] in grep expression.
21370          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21371          if test "x$FOUND_CORRECT_VERSION" = x; then
21372            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21374            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21375$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21376            BOOT_JDK_FOUND=no
21377          else
21378            # We're done! :-)
21379            BOOT_JDK_FOUND=yes
21380
21381  # Only process if variable expands to non-empty
21382
21383  if test "x$BOOT_JDK" != x; then
21384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21385
21386  # Input might be given as Windows format, start by converting to
21387  # unix format.
21388  path="$BOOT_JDK"
21389  new_path=`$CYGPATH -u "$path"`
21390
21391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21394  # "foo.exe" is OK but "foo" is an error.
21395  #
21396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21397  # It is also a way to make sure we got the proper file name for the real test later on.
21398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21399  if test "x$test_shortpath" = x; then
21400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21402    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21403  fi
21404
21405  # Call helper function which possibly converts this using DOS-style short mode.
21406  # If so, the updated path is stored in $new_path.
21407
21408  input_path="$new_path"
21409  # Check if we need to convert this using DOS-style short mode. If the path
21410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21411  # take no chances and rewrite it.
21412  # Note: m4 eats our [], so we need to use [ and ] instead.
21413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21414  if test "x$has_forbidden_chars" != x; then
21415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21419      # Going to short mode and back again did indeed matter. Since short mode is
21420      # case insensitive, let's make it lowercase to improve readability.
21421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21422      # Now convert it back to Unix-style (cygpath)
21423      input_path=`$CYGPATH -u "$shortmode_path"`
21424      new_path="$input_path"
21425    fi
21426  fi
21427
21428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21429  if test "x$test_cygdrive_prefix" = x; then
21430    # As a simple fix, exclude /usr/bin since it's not a real path.
21431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21433      # a path prefixed by /cygdrive for fixpath to work.
21434      new_path="$CYGWIN_ROOT_PATH$input_path"
21435    fi
21436  fi
21437
21438
21439  if test "x$path" != "x$new_path"; then
21440    BOOT_JDK="$new_path"
21441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21443  fi
21444
21445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21446
21447  path="$BOOT_JDK"
21448  has_colon=`$ECHO $path | $GREP ^.:`
21449  new_path="$path"
21450  if test "x$has_colon" = x; then
21451    # Not in mixed or Windows style, start by that.
21452    new_path=`cmd //c echo $path`
21453  fi
21454
21455
21456  input_path="$new_path"
21457  # Check if we need to convert this using DOS-style short mode. If the path
21458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21459  # take no chances and rewrite it.
21460  # Note: m4 eats our [], so we need to use [ and ] instead.
21461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21462  if test "x$has_forbidden_chars" != x; then
21463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21465  fi
21466
21467
21468  windows_path="$new_path"
21469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21470    unix_path=`$CYGPATH -u "$windows_path"`
21471    new_path="$unix_path"
21472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21474    new_path="$unix_path"
21475  fi
21476
21477  if test "x$path" != "x$new_path"; then
21478    BOOT_JDK="$new_path"
21479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21480$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21481  fi
21482
21483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21485
21486    else
21487      # We're on a unix platform. Hooray! :)
21488      path="$BOOT_JDK"
21489      has_space=`$ECHO "$path" | $GREP " "`
21490      if test "x$has_space" != x; then
21491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21494      fi
21495
21496      # Use eval to expand a potential ~
21497      eval path="$path"
21498      if test ! -f "$path" && test ! -d "$path"; then
21499        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21500      fi
21501
21502      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21503    fi
21504  fi
21505
21506            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21507$as_echo_n "checking for Boot JDK... " >&6; }
21508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21509$as_echo "$BOOT_JDK" >&6; }
21510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21511$as_echo_n "checking Boot JDK version... " >&6; }
21512            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21513            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21514$as_echo "$BOOT_JDK_VERSION" >&6; }
21515          fi # end check jdk version
21516        fi # end check javac
21517      fi # end check java
21518    fi # end check boot jdk found
21519  fi
21520
21521
21522  if test "x$BOOT_JDK_FOUND" = xno; then
21523    # Now execute the test
21524
21525  if test -x /usr/libexec/java_home; then
21526    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21527    BOOT_JDK_FOUND=maybe
21528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21529$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21530  fi
21531
21532
21533    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21534    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21535      # Do we have a bin/java?
21536      if test ! -x "$BOOT_JDK/bin/java"; then
21537        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21539        BOOT_JDK_FOUND=no
21540      else
21541        # Do we have a bin/javac?
21542        if test ! -x "$BOOT_JDK/bin/javac"; then
21543          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21545          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21546$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21547          BOOT_JDK_FOUND=no
21548        else
21549          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21550          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21551
21552          # Extra M4 quote needed to protect [] in grep expression.
21553          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21554          if test "x$FOUND_CORRECT_VERSION" = x; then
21555            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21557            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21558$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21559            BOOT_JDK_FOUND=no
21560          else
21561            # We're done! :-)
21562            BOOT_JDK_FOUND=yes
21563
21564  # Only process if variable expands to non-empty
21565
21566  if test "x$BOOT_JDK" != x; then
21567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21568
21569  # Input might be given as Windows format, start by converting to
21570  # unix format.
21571  path="$BOOT_JDK"
21572  new_path=`$CYGPATH -u "$path"`
21573
21574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21577  # "foo.exe" is OK but "foo" is an error.
21578  #
21579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21580  # It is also a way to make sure we got the proper file name for the real test later on.
21581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21582  if test "x$test_shortpath" = x; then
21583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21585    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21586  fi
21587
21588  # Call helper function which possibly converts this using DOS-style short mode.
21589  # If so, the updated path is stored in $new_path.
21590
21591  input_path="$new_path"
21592  # Check if we need to convert this using DOS-style short mode. If the path
21593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21594  # take no chances and rewrite it.
21595  # Note: m4 eats our [], so we need to use [ and ] instead.
21596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21597  if test "x$has_forbidden_chars" != x; then
21598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21602      # Going to short mode and back again did indeed matter. Since short mode is
21603      # case insensitive, let's make it lowercase to improve readability.
21604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21605      # Now convert it back to Unix-style (cygpath)
21606      input_path=`$CYGPATH -u "$shortmode_path"`
21607      new_path="$input_path"
21608    fi
21609  fi
21610
21611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21612  if test "x$test_cygdrive_prefix" = x; then
21613    # As a simple fix, exclude /usr/bin since it's not a real path.
21614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21616      # a path prefixed by /cygdrive for fixpath to work.
21617      new_path="$CYGWIN_ROOT_PATH$input_path"
21618    fi
21619  fi
21620
21621
21622  if test "x$path" != "x$new_path"; then
21623    BOOT_JDK="$new_path"
21624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21626  fi
21627
21628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21629
21630  path="$BOOT_JDK"
21631  has_colon=`$ECHO $path | $GREP ^.:`
21632  new_path="$path"
21633  if test "x$has_colon" = x; then
21634    # Not in mixed or Windows style, start by that.
21635    new_path=`cmd //c echo $path`
21636  fi
21637
21638
21639  input_path="$new_path"
21640  # Check if we need to convert this using DOS-style short mode. If the path
21641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21642  # take no chances and rewrite it.
21643  # Note: m4 eats our [], so we need to use [ and ] instead.
21644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21645  if test "x$has_forbidden_chars" != x; then
21646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21648  fi
21649
21650
21651  windows_path="$new_path"
21652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21653    unix_path=`$CYGPATH -u "$windows_path"`
21654    new_path="$unix_path"
21655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21657    new_path="$unix_path"
21658  fi
21659
21660  if test "x$path" != "x$new_path"; then
21661    BOOT_JDK="$new_path"
21662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21664  fi
21665
21666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21668
21669    else
21670      # We're on a unix platform. Hooray! :)
21671      path="$BOOT_JDK"
21672      has_space=`$ECHO "$path" | $GREP " "`
21673      if test "x$has_space" != x; then
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21677      fi
21678
21679      # Use eval to expand a potential ~
21680      eval path="$path"
21681      if test ! -f "$path" && test ! -d "$path"; then
21682        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21683      fi
21684
21685      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21686    fi
21687  fi
21688
21689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21690$as_echo_n "checking for Boot JDK... " >&6; }
21691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21692$as_echo "$BOOT_JDK" >&6; }
21693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21694$as_echo_n "checking Boot JDK version... " >&6; }
21695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21697$as_echo "$BOOT_JDK_VERSION" >&6; }
21698          fi # end check jdk version
21699        fi # end check javac
21700      fi # end check java
21701    fi # end check boot jdk found
21702  fi
21703
21704  fi
21705
21706
21707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21709      # Do we have a bin/java?
21710      if test ! -x "$BOOT_JDK/bin/java"; then
21711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21713        BOOT_JDK_FOUND=no
21714      else
21715        # Do we have a bin/javac?
21716        if test ! -x "$BOOT_JDK/bin/javac"; then
21717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21721          BOOT_JDK_FOUND=no
21722        else
21723          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21724          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21725
21726          # Extra M4 quote needed to protect [] in grep expression.
21727          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21728          if test "x$FOUND_CORRECT_VERSION" = x; then
21729            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21731            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21732$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21733            BOOT_JDK_FOUND=no
21734          else
21735            # We're done! :-)
21736            BOOT_JDK_FOUND=yes
21737
21738  # Only process if variable expands to non-empty
21739
21740  if test "x$BOOT_JDK" != x; then
21741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21742
21743  # Input might be given as Windows format, start by converting to
21744  # unix format.
21745  path="$BOOT_JDK"
21746  new_path=`$CYGPATH -u "$path"`
21747
21748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21751  # "foo.exe" is OK but "foo" is an error.
21752  #
21753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21754  # It is also a way to make sure we got the proper file name for the real test later on.
21755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21756  if test "x$test_shortpath" = x; then
21757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21760  fi
21761
21762  # Call helper function which possibly converts this using DOS-style short mode.
21763  # If so, the updated path is stored in $new_path.
21764
21765  input_path="$new_path"
21766  # Check if we need to convert this using DOS-style short mode. If the path
21767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21768  # take no chances and rewrite it.
21769  # Note: m4 eats our [], so we need to use [ and ] instead.
21770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21771  if test "x$has_forbidden_chars" != x; then
21772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21776      # Going to short mode and back again did indeed matter. Since short mode is
21777      # case insensitive, let's make it lowercase to improve readability.
21778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21779      # Now convert it back to Unix-style (cygpath)
21780      input_path=`$CYGPATH -u "$shortmode_path"`
21781      new_path="$input_path"
21782    fi
21783  fi
21784
21785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21786  if test "x$test_cygdrive_prefix" = x; then
21787    # As a simple fix, exclude /usr/bin since it's not a real path.
21788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21790      # a path prefixed by /cygdrive for fixpath to work.
21791      new_path="$CYGWIN_ROOT_PATH$input_path"
21792    fi
21793  fi
21794
21795
21796  if test "x$path" != "x$new_path"; then
21797    BOOT_JDK="$new_path"
21798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21800  fi
21801
21802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21803
21804  path="$BOOT_JDK"
21805  has_colon=`$ECHO $path | $GREP ^.:`
21806  new_path="$path"
21807  if test "x$has_colon" = x; then
21808    # Not in mixed or Windows style, start by that.
21809    new_path=`cmd //c echo $path`
21810  fi
21811
21812
21813  input_path="$new_path"
21814  # Check if we need to convert this using DOS-style short mode. If the path
21815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21816  # take no chances and rewrite it.
21817  # Note: m4 eats our [], so we need to use [ and ] instead.
21818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21819  if test "x$has_forbidden_chars" != x; then
21820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21822  fi
21823
21824
21825  windows_path="$new_path"
21826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21827    unix_path=`$CYGPATH -u "$windows_path"`
21828    new_path="$unix_path"
21829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21831    new_path="$unix_path"
21832  fi
21833
21834  if test "x$path" != "x$new_path"; then
21835    BOOT_JDK="$new_path"
21836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21838  fi
21839
21840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21842
21843    else
21844      # We're on a unix platform. Hooray! :)
21845      path="$BOOT_JDK"
21846      has_space=`$ECHO "$path" | $GREP " "`
21847      if test "x$has_space" != x; then
21848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21851      fi
21852
21853      # Use eval to expand a potential ~
21854      eval path="$path"
21855      if test ! -f "$path" && test ! -d "$path"; then
21856        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21857      fi
21858
21859      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21860    fi
21861  fi
21862
21863            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21864$as_echo_n "checking for Boot JDK... " >&6; }
21865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21866$as_echo "$BOOT_JDK" >&6; }
21867            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21868$as_echo_n "checking Boot JDK version... " >&6; }
21869            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21871$as_echo "$BOOT_JDK_VERSION" >&6; }
21872          fi # end check jdk version
21873        fi # end check javac
21874      fi # end check java
21875    fi # end check boot jdk found
21876  fi
21877
21878
21879  # Test: Is $JAVA_HOME set?
21880
21881  if test "x$BOOT_JDK_FOUND" = xno; then
21882    # Now execute the test
21883
21884  if test "x$JAVA_HOME" != x; then
21885    JAVA_HOME_PROCESSED="$JAVA_HOME"
21886
21887  # Only process if variable expands to non-empty
21888
21889  if test "x$JAVA_HOME_PROCESSED" != x; then
21890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21891
21892  # Input might be given as Windows format, start by converting to
21893  # unix format.
21894  path="$JAVA_HOME_PROCESSED"
21895  new_path=`$CYGPATH -u "$path"`
21896
21897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21900  # "foo.exe" is OK but "foo" is an error.
21901  #
21902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21903  # It is also a way to make sure we got the proper file name for the real test later on.
21904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21905  if test "x$test_shortpath" = x; then
21906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21907$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21908    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21909  fi
21910
21911  # Call helper function which possibly converts this using DOS-style short mode.
21912  # If so, the updated path is stored in $new_path.
21913
21914  input_path="$new_path"
21915  # Check if we need to convert this using DOS-style short mode. If the path
21916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21917  # take no chances and rewrite it.
21918  # Note: m4 eats our [], so we need to use [ and ] instead.
21919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21920  if test "x$has_forbidden_chars" != x; then
21921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21925      # Going to short mode and back again did indeed matter. Since short mode is
21926      # case insensitive, let's make it lowercase to improve readability.
21927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21928      # Now convert it back to Unix-style (cygpath)
21929      input_path=`$CYGPATH -u "$shortmode_path"`
21930      new_path="$input_path"
21931    fi
21932  fi
21933
21934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21935  if test "x$test_cygdrive_prefix" = x; then
21936    # As a simple fix, exclude /usr/bin since it's not a real path.
21937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21939      # a path prefixed by /cygdrive for fixpath to work.
21940      new_path="$CYGWIN_ROOT_PATH$input_path"
21941    fi
21942  fi
21943
21944
21945  if test "x$path" != "x$new_path"; then
21946    JAVA_HOME_PROCESSED="$new_path"
21947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21948$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21949  fi
21950
21951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21952
21953  path="$JAVA_HOME_PROCESSED"
21954  has_colon=`$ECHO $path | $GREP ^.:`
21955  new_path="$path"
21956  if test "x$has_colon" = x; then
21957    # Not in mixed or Windows style, start by that.
21958    new_path=`cmd //c echo $path`
21959  fi
21960
21961
21962  input_path="$new_path"
21963  # Check if we need to convert this using DOS-style short mode. If the path
21964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21965  # take no chances and rewrite it.
21966  # Note: m4 eats our [], so we need to use [ and ] instead.
21967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21968  if test "x$has_forbidden_chars" != x; then
21969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21971  fi
21972
21973
21974  windows_path="$new_path"
21975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21976    unix_path=`$CYGPATH -u "$windows_path"`
21977    new_path="$unix_path"
21978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21980    new_path="$unix_path"
21981  fi
21982
21983  if test "x$path" != "x$new_path"; then
21984    JAVA_HOME_PROCESSED="$new_path"
21985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21986$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21987  fi
21988
21989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21991
21992    else
21993      # We're on a unix platform. Hooray! :)
21994      path="$JAVA_HOME_PROCESSED"
21995      has_space=`$ECHO "$path" | $GREP " "`
21996      if test "x$has_space" != x; then
21997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21998$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22000      fi
22001
22002      # Use eval to expand a potential ~
22003      eval path="$path"
22004      if test ! -f "$path" && test ! -d "$path"; then
22005        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22006      fi
22007
22008      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22009    fi
22010  fi
22011
22012    if test ! -d "$JAVA_HOME_PROCESSED"; then
22013      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22014$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22015    else
22016      # Aha, the user has set a JAVA_HOME
22017      # let us use that as the Boot JDK.
22018      BOOT_JDK="$JAVA_HOME_PROCESSED"
22019      BOOT_JDK_FOUND=maybe
22020      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22021$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22022    fi
22023  fi
22024
22025
22026    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22027    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22028      # Do we have a bin/java?
22029      if test ! -x "$BOOT_JDK/bin/java"; then
22030        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22032        BOOT_JDK_FOUND=no
22033      else
22034        # Do we have a bin/javac?
22035        if test ! -x "$BOOT_JDK/bin/javac"; then
22036          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22038          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22039$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22040          BOOT_JDK_FOUND=no
22041        else
22042          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22043          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22044
22045          # Extra M4 quote needed to protect [] in grep expression.
22046          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22047          if test "x$FOUND_CORRECT_VERSION" = x; then
22048            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22050            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22051$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22052            BOOT_JDK_FOUND=no
22053          else
22054            # We're done! :-)
22055            BOOT_JDK_FOUND=yes
22056
22057  # Only process if variable expands to non-empty
22058
22059  if test "x$BOOT_JDK" != x; then
22060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22061
22062  # Input might be given as Windows format, start by converting to
22063  # unix format.
22064  path="$BOOT_JDK"
22065  new_path=`$CYGPATH -u "$path"`
22066
22067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22070  # "foo.exe" is OK but "foo" is an error.
22071  #
22072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22073  # It is also a way to make sure we got the proper file name for the real test later on.
22074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22075  if test "x$test_shortpath" = x; then
22076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22078    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22079  fi
22080
22081  # Call helper function which possibly converts this using DOS-style short mode.
22082  # If so, the updated path is stored in $new_path.
22083
22084  input_path="$new_path"
22085  # Check if we need to convert this using DOS-style short mode. If the path
22086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22087  # take no chances and rewrite it.
22088  # Note: m4 eats our [], so we need to use [ and ] instead.
22089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22090  if test "x$has_forbidden_chars" != x; then
22091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22095      # Going to short mode and back again did indeed matter. Since short mode is
22096      # case insensitive, let's make it lowercase to improve readability.
22097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22098      # Now convert it back to Unix-style (cygpath)
22099      input_path=`$CYGPATH -u "$shortmode_path"`
22100      new_path="$input_path"
22101    fi
22102  fi
22103
22104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22105  if test "x$test_cygdrive_prefix" = x; then
22106    # As a simple fix, exclude /usr/bin since it's not a real path.
22107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22109      # a path prefixed by /cygdrive for fixpath to work.
22110      new_path="$CYGWIN_ROOT_PATH$input_path"
22111    fi
22112  fi
22113
22114
22115  if test "x$path" != "x$new_path"; then
22116    BOOT_JDK="$new_path"
22117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22119  fi
22120
22121    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22122
22123  path="$BOOT_JDK"
22124  has_colon=`$ECHO $path | $GREP ^.:`
22125  new_path="$path"
22126  if test "x$has_colon" = x; then
22127    # Not in mixed or Windows style, start by that.
22128    new_path=`cmd //c echo $path`
22129  fi
22130
22131
22132  input_path="$new_path"
22133  # Check if we need to convert this using DOS-style short mode. If the path
22134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22135  # take no chances and rewrite it.
22136  # Note: m4 eats our [], so we need to use [ and ] instead.
22137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22138  if test "x$has_forbidden_chars" != x; then
22139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22141  fi
22142
22143
22144  windows_path="$new_path"
22145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22146    unix_path=`$CYGPATH -u "$windows_path"`
22147    new_path="$unix_path"
22148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22150    new_path="$unix_path"
22151  fi
22152
22153  if test "x$path" != "x$new_path"; then
22154    BOOT_JDK="$new_path"
22155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22157  fi
22158
22159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22161
22162    else
22163      # We're on a unix platform. Hooray! :)
22164      path="$BOOT_JDK"
22165      has_space=`$ECHO "$path" | $GREP " "`
22166      if test "x$has_space" != x; then
22167        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22169        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22170      fi
22171
22172      # Use eval to expand a potential ~
22173      eval path="$path"
22174      if test ! -f "$path" && test ! -d "$path"; then
22175        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22176      fi
22177
22178      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22179    fi
22180  fi
22181
22182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22183$as_echo_n "checking for Boot JDK... " >&6; }
22184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22185$as_echo "$BOOT_JDK" >&6; }
22186            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22187$as_echo_n "checking Boot JDK version... " >&6; }
22188            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22190$as_echo "$BOOT_JDK_VERSION" >&6; }
22191          fi # end check jdk version
22192        fi # end check javac
22193      fi # end check java
22194    fi # end check boot jdk found
22195  fi
22196
22197
22198  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22199
22200  if test "x$BOOT_JDK_FOUND" = xno; then
22201    # Now execute the test
22202
22203  # Extract the first word of "javac", so it can be a program name with args.
22204set dummy javac; ac_word=$2
22205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22206$as_echo_n "checking for $ac_word... " >&6; }
22207if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22208  $as_echo_n "(cached) " >&6
22209else
22210  case $JAVAC_CHECK in
22211  [\\/]* | ?:[\\/]*)
22212  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22213  ;;
22214  *)
22215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22216for as_dir in $PATH
22217do
22218  IFS=$as_save_IFS
22219  test -z "$as_dir" && as_dir=.
22220    for ac_exec_ext in '' $ac_executable_extensions; do
22221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22222    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22224    break 2
22225  fi
22226done
22227  done
22228IFS=$as_save_IFS
22229
22230  ;;
22231esac
22232fi
22233JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22234if test -n "$JAVAC_CHECK"; then
22235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22236$as_echo "$JAVAC_CHECK" >&6; }
22237else
22238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22239$as_echo "no" >&6; }
22240fi
22241
22242
22243  # Extract the first word of "java", so it can be a program name with args.
22244set dummy java; ac_word=$2
22245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22246$as_echo_n "checking for $ac_word... " >&6; }
22247if ${ac_cv_path_JAVA_CHECK+:} false; then :
22248  $as_echo_n "(cached) " >&6
22249else
22250  case $JAVA_CHECK in
22251  [\\/]* | ?:[\\/]*)
22252  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22253  ;;
22254  *)
22255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22256for as_dir in $PATH
22257do
22258  IFS=$as_save_IFS
22259  test -z "$as_dir" && as_dir=.
22260    for ac_exec_ext in '' $ac_executable_extensions; do
22261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22262    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22264    break 2
22265  fi
22266done
22267  done
22268IFS=$as_save_IFS
22269
22270  ;;
22271esac
22272fi
22273JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22274if test -n "$JAVA_CHECK"; then
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22276$as_echo "$JAVA_CHECK" >&6; }
22277else
22278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22279$as_echo "no" >&6; }
22280fi
22281
22282
22283  BINARY="$JAVAC_CHECK"
22284  if test "x$JAVAC_CHECK" = x; then
22285    BINARY="$JAVA_CHECK"
22286  fi
22287  if test "x$BINARY" != x; then
22288    # So there is a java(c) binary, it might be part of a JDK.
22289    # Lets find the JDK/JRE directory by following symbolic links.
22290    # Linux/GNU systems often have links from /usr/bin/java to
22291    # /etc/alternatives/java to the real JDK binary.
22292
22293  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22294    # Follow a chain of symbolic links. Use readlink
22295    # where it exists, else fall back to horribly
22296    # complicated shell code.
22297    if test "x$READLINK_TESTED" != yes; then
22298      # On MacOSX there is a readlink tool with a different
22299      # purpose than the GNU readlink tool. Check the found readlink.
22300      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22301      if test "x$ISGNU" = x; then
22302        # A readlink that we do not know how to use.
22303        # Are there other non-GNU readlinks out there?
22304        READLINK_TESTED=yes
22305        READLINK=
22306      fi
22307    fi
22308
22309    if test "x$READLINK" != x; then
22310      BINARY=`$READLINK -f $BINARY`
22311    else
22312      # Save the current directory for restoring afterwards
22313      STARTDIR=$PWD
22314      COUNTER=0
22315      sym_link_dir=`$DIRNAME $BINARY`
22316      sym_link_file=`$BASENAME $BINARY`
22317      cd $sym_link_dir
22318      # Use -P flag to resolve symlinks in directories.
22319      cd `$THEPWDCMD -P`
22320      sym_link_dir=`$THEPWDCMD -P`
22321      # Resolve file symlinks
22322      while test $COUNTER -lt 20; do
22323        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22324        if test "x$ISLINK" == x; then
22325          # This is not a symbolic link! We are done!
22326          break
22327        fi
22328        # Again resolve directory symlinks since the target of the just found
22329        # link could be in a different directory
22330        cd `$DIRNAME $ISLINK`
22331        sym_link_dir=`$THEPWDCMD -P`
22332        sym_link_file=`$BASENAME $ISLINK`
22333        let COUNTER=COUNTER+1
22334      done
22335      cd $STARTDIR
22336      BINARY=$sym_link_dir/$sym_link_file
22337    fi
22338  fi
22339
22340    BOOT_JDK=`dirname "$BINARY"`
22341    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22342    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22343      # Looks like we found ourselves an JDK
22344      BOOT_JDK_FOUND=maybe
22345      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22346$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22347    fi
22348  fi
22349
22350
22351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22353      # Do we have a bin/java?
22354      if test ! -x "$BOOT_JDK/bin/java"; then
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22357        BOOT_JDK_FOUND=no
22358      else
22359        # Do we have a bin/javac?
22360        if test ! -x "$BOOT_JDK/bin/javac"; then
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22365          BOOT_JDK_FOUND=no
22366        else
22367          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22368          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22369
22370          # Extra M4 quote needed to protect [] in grep expression.
22371          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22372          if test "x$FOUND_CORRECT_VERSION" = x; then
22373            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22375            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22376$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22377            BOOT_JDK_FOUND=no
22378          else
22379            # We're done! :-)
22380            BOOT_JDK_FOUND=yes
22381
22382  # Only process if variable expands to non-empty
22383
22384  if test "x$BOOT_JDK" != x; then
22385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22386
22387  # Input might be given as Windows format, start by converting to
22388  # unix format.
22389  path="$BOOT_JDK"
22390  new_path=`$CYGPATH -u "$path"`
22391
22392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22395  # "foo.exe" is OK but "foo" is an error.
22396  #
22397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22398  # It is also a way to make sure we got the proper file name for the real test later on.
22399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22400  if test "x$test_shortpath" = x; then
22401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22403    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22404  fi
22405
22406  # Call helper function which possibly converts this using DOS-style short mode.
22407  # If so, the updated path is stored in $new_path.
22408
22409  input_path="$new_path"
22410  # Check if we need to convert this using DOS-style short mode. If the path
22411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22412  # take no chances and rewrite it.
22413  # Note: m4 eats our [], so we need to use [ and ] instead.
22414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22415  if test "x$has_forbidden_chars" != x; then
22416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22420      # Going to short mode and back again did indeed matter. Since short mode is
22421      # case insensitive, let's make it lowercase to improve readability.
22422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22423      # Now convert it back to Unix-style (cygpath)
22424      input_path=`$CYGPATH -u "$shortmode_path"`
22425      new_path="$input_path"
22426    fi
22427  fi
22428
22429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22430  if test "x$test_cygdrive_prefix" = x; then
22431    # As a simple fix, exclude /usr/bin since it's not a real path.
22432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22434      # a path prefixed by /cygdrive for fixpath to work.
22435      new_path="$CYGWIN_ROOT_PATH$input_path"
22436    fi
22437  fi
22438
22439
22440  if test "x$path" != "x$new_path"; then
22441    BOOT_JDK="$new_path"
22442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22444  fi
22445
22446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22447
22448  path="$BOOT_JDK"
22449  has_colon=`$ECHO $path | $GREP ^.:`
22450  new_path="$path"
22451  if test "x$has_colon" = x; then
22452    # Not in mixed or Windows style, start by that.
22453    new_path=`cmd //c echo $path`
22454  fi
22455
22456
22457  input_path="$new_path"
22458  # Check if we need to convert this using DOS-style short mode. If the path
22459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22460  # take no chances and rewrite it.
22461  # Note: m4 eats our [], so we need to use [ and ] instead.
22462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22463  if test "x$has_forbidden_chars" != x; then
22464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22466  fi
22467
22468
22469  windows_path="$new_path"
22470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22471    unix_path=`$CYGPATH -u "$windows_path"`
22472    new_path="$unix_path"
22473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22475    new_path="$unix_path"
22476  fi
22477
22478  if test "x$path" != "x$new_path"; then
22479    BOOT_JDK="$new_path"
22480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22482  fi
22483
22484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22486
22487    else
22488      # We're on a unix platform. Hooray! :)
22489      path="$BOOT_JDK"
22490      has_space=`$ECHO "$path" | $GREP " "`
22491      if test "x$has_space" != x; then
22492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22495      fi
22496
22497      # Use eval to expand a potential ~
22498      eval path="$path"
22499      if test ! -f "$path" && test ! -d "$path"; then
22500        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22501      fi
22502
22503      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22504    fi
22505  fi
22506
22507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22508$as_echo_n "checking for Boot JDK... " >&6; }
22509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22510$as_echo "$BOOT_JDK" >&6; }
22511            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22512$as_echo_n "checking Boot JDK version... " >&6; }
22513            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22515$as_echo "$BOOT_JDK_VERSION" >&6; }
22516          fi # end check jdk version
22517        fi # end check javac
22518      fi # end check java
22519    fi # end check boot jdk found
22520  fi
22521
22522
22523  # Test: Is there a JDK installed in default, well-known locations?
22524
22525  if test "x$BOOT_JDK_FOUND" = xno; then
22526    # Now execute the test
22527
22528  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22529
22530  if test "x$BOOT_JDK_FOUND" = xno; then
22531    # Now execute the test
22532
22533  if test "x$ProgramW6432" != x; then
22534    VIRTUAL_DIR="$ProgramW6432/Java"
22535
22536  windows_path="$VIRTUAL_DIR"
22537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22538    unix_path=`$CYGPATH -u "$windows_path"`
22539    VIRTUAL_DIR="$unix_path"
22540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22542    VIRTUAL_DIR="$unix_path"
22543  fi
22544
22545
22546  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22547  BOOT_JDK_SUFFIX=""
22548  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22549  if test "x$ALL_JDKS_FOUND" != x; then
22550    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22551
22552  if test "x$BOOT_JDK_FOUND" = xno; then
22553    # Now execute the test
22554
22555        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22556        if test -d "$BOOT_JDK"; then
22557          BOOT_JDK_FOUND=maybe
22558          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22559$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22560        fi
22561
22562
22563    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22564    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22565      # Do we have a bin/java?
22566      if test ! -x "$BOOT_JDK/bin/java"; then
22567        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22569        BOOT_JDK_FOUND=no
22570      else
22571        # Do we have a bin/javac?
22572        if test ! -x "$BOOT_JDK/bin/javac"; then
22573          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22575          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22576$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22577          BOOT_JDK_FOUND=no
22578        else
22579          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22580          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22581
22582          # Extra M4 quote needed to protect [] in grep expression.
22583          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22584          if test "x$FOUND_CORRECT_VERSION" = x; then
22585            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22587            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22588$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22589            BOOT_JDK_FOUND=no
22590          else
22591            # We're done! :-)
22592            BOOT_JDK_FOUND=yes
22593
22594  # Only process if variable expands to non-empty
22595
22596  if test "x$BOOT_JDK" != x; then
22597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22598
22599  # Input might be given as Windows format, start by converting to
22600  # unix format.
22601  path="$BOOT_JDK"
22602  new_path=`$CYGPATH -u "$path"`
22603
22604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22607  # "foo.exe" is OK but "foo" is an error.
22608  #
22609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22610  # It is also a way to make sure we got the proper file name for the real test later on.
22611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22612  if test "x$test_shortpath" = x; then
22613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22615    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22616  fi
22617
22618  # Call helper function which possibly converts this using DOS-style short mode.
22619  # If so, the updated path is stored in $new_path.
22620
22621  input_path="$new_path"
22622  # Check if we need to convert this using DOS-style short mode. If the path
22623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22624  # take no chances and rewrite it.
22625  # Note: m4 eats our [], so we need to use [ and ] instead.
22626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22627  if test "x$has_forbidden_chars" != x; then
22628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22632      # Going to short mode and back again did indeed matter. Since short mode is
22633      # case insensitive, let's make it lowercase to improve readability.
22634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22635      # Now convert it back to Unix-style (cygpath)
22636      input_path=`$CYGPATH -u "$shortmode_path"`
22637      new_path="$input_path"
22638    fi
22639  fi
22640
22641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22642  if test "x$test_cygdrive_prefix" = x; then
22643    # As a simple fix, exclude /usr/bin since it's not a real path.
22644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22646      # a path prefixed by /cygdrive for fixpath to work.
22647      new_path="$CYGWIN_ROOT_PATH$input_path"
22648    fi
22649  fi
22650
22651
22652  if test "x$path" != "x$new_path"; then
22653    BOOT_JDK="$new_path"
22654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22656  fi
22657
22658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22659
22660  path="$BOOT_JDK"
22661  has_colon=`$ECHO $path | $GREP ^.:`
22662  new_path="$path"
22663  if test "x$has_colon" = x; then
22664    # Not in mixed or Windows style, start by that.
22665    new_path=`cmd //c echo $path`
22666  fi
22667
22668
22669  input_path="$new_path"
22670  # Check if we need to convert this using DOS-style short mode. If the path
22671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22672  # take no chances and rewrite it.
22673  # Note: m4 eats our [], so we need to use [ and ] instead.
22674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22675  if test "x$has_forbidden_chars" != x; then
22676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22678  fi
22679
22680
22681  windows_path="$new_path"
22682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22683    unix_path=`$CYGPATH -u "$windows_path"`
22684    new_path="$unix_path"
22685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22687    new_path="$unix_path"
22688  fi
22689
22690  if test "x$path" != "x$new_path"; then
22691    BOOT_JDK="$new_path"
22692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22694  fi
22695
22696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22698
22699    else
22700      # We're on a unix platform. Hooray! :)
22701      path="$BOOT_JDK"
22702      has_space=`$ECHO "$path" | $GREP " "`
22703      if test "x$has_space" != x; then
22704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22706        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22707      fi
22708
22709      # Use eval to expand a potential ~
22710      eval path="$path"
22711      if test ! -f "$path" && test ! -d "$path"; then
22712        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22713      fi
22714
22715      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22716    fi
22717  fi
22718
22719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22720$as_echo_n "checking for Boot JDK... " >&6; }
22721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22722$as_echo "$BOOT_JDK" >&6; }
22723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22724$as_echo_n "checking Boot JDK version... " >&6; }
22725            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22727$as_echo "$BOOT_JDK_VERSION" >&6; }
22728          fi # end check jdk version
22729        fi # end check javac
22730      fi # end check java
22731    fi # end check boot jdk found
22732  fi
22733
22734    done
22735  fi
22736
22737  fi
22738
22739
22740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22742      # Do we have a bin/java?
22743      if test ! -x "$BOOT_JDK/bin/java"; then
22744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22746        BOOT_JDK_FOUND=no
22747      else
22748        # Do we have a bin/javac?
22749        if test ! -x "$BOOT_JDK/bin/javac"; then
22750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22754          BOOT_JDK_FOUND=no
22755        else
22756          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22757          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22758
22759          # Extra M4 quote needed to protect [] in grep expression.
22760          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22761          if test "x$FOUND_CORRECT_VERSION" = x; then
22762            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22764            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22765$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22766            BOOT_JDK_FOUND=no
22767          else
22768            # We're done! :-)
22769            BOOT_JDK_FOUND=yes
22770
22771  # Only process if variable expands to non-empty
22772
22773  if test "x$BOOT_JDK" != x; then
22774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22775
22776  # Input might be given as Windows format, start by converting to
22777  # unix format.
22778  path="$BOOT_JDK"
22779  new_path=`$CYGPATH -u "$path"`
22780
22781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22784  # "foo.exe" is OK but "foo" is an error.
22785  #
22786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22787  # It is also a way to make sure we got the proper file name for the real test later on.
22788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22789  if test "x$test_shortpath" = x; then
22790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22791$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22792    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22793  fi
22794
22795  # Call helper function which possibly converts this using DOS-style short mode.
22796  # If so, the updated path is stored in $new_path.
22797
22798  input_path="$new_path"
22799  # Check if we need to convert this using DOS-style short mode. If the path
22800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22801  # take no chances and rewrite it.
22802  # Note: m4 eats our [], so we need to use [ and ] instead.
22803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22804  if test "x$has_forbidden_chars" != x; then
22805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22809      # Going to short mode and back again did indeed matter. Since short mode is
22810      # case insensitive, let's make it lowercase to improve readability.
22811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22812      # Now convert it back to Unix-style (cygpath)
22813      input_path=`$CYGPATH -u "$shortmode_path"`
22814      new_path="$input_path"
22815    fi
22816  fi
22817
22818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22819  if test "x$test_cygdrive_prefix" = x; then
22820    # As a simple fix, exclude /usr/bin since it's not a real path.
22821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22823      # a path prefixed by /cygdrive for fixpath to work.
22824      new_path="$CYGWIN_ROOT_PATH$input_path"
22825    fi
22826  fi
22827
22828
22829  if test "x$path" != "x$new_path"; then
22830    BOOT_JDK="$new_path"
22831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22833  fi
22834
22835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22836
22837  path="$BOOT_JDK"
22838  has_colon=`$ECHO $path | $GREP ^.:`
22839  new_path="$path"
22840  if test "x$has_colon" = x; then
22841    # Not in mixed or Windows style, start by that.
22842    new_path=`cmd //c echo $path`
22843  fi
22844
22845
22846  input_path="$new_path"
22847  # Check if we need to convert this using DOS-style short mode. If the path
22848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22849  # take no chances and rewrite it.
22850  # Note: m4 eats our [], so we need to use [ and ] instead.
22851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22852  if test "x$has_forbidden_chars" != x; then
22853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22855  fi
22856
22857
22858  windows_path="$new_path"
22859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22860    unix_path=`$CYGPATH -u "$windows_path"`
22861    new_path="$unix_path"
22862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22864    new_path="$unix_path"
22865  fi
22866
22867  if test "x$path" != "x$new_path"; then
22868    BOOT_JDK="$new_path"
22869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22870$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22871  fi
22872
22873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22875
22876    else
22877      # We're on a unix platform. Hooray! :)
22878      path="$BOOT_JDK"
22879      has_space=`$ECHO "$path" | $GREP " "`
22880      if test "x$has_space" != x; then
22881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22884      fi
22885
22886      # Use eval to expand a potential ~
22887      eval path="$path"
22888      if test ! -f "$path" && test ! -d "$path"; then
22889        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22890      fi
22891
22892      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22893    fi
22894  fi
22895
22896            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22897$as_echo_n "checking for Boot JDK... " >&6; }
22898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22899$as_echo "$BOOT_JDK" >&6; }
22900            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22901$as_echo_n "checking Boot JDK version... " >&6; }
22902            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22904$as_echo "$BOOT_JDK_VERSION" >&6; }
22905          fi # end check jdk version
22906        fi # end check javac
22907      fi # end check java
22908    fi # end check boot jdk found
22909  fi
22910
22911
22912  if test "x$BOOT_JDK_FOUND" = xno; then
22913    # Now execute the test
22914
22915  if test "x$PROGRAMW6432" != x; then
22916    VIRTUAL_DIR="$PROGRAMW6432/Java"
22917
22918  windows_path="$VIRTUAL_DIR"
22919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22920    unix_path=`$CYGPATH -u "$windows_path"`
22921    VIRTUAL_DIR="$unix_path"
22922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22924    VIRTUAL_DIR="$unix_path"
22925  fi
22926
22927
22928  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22929  BOOT_JDK_SUFFIX=""
22930  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22931  if test "x$ALL_JDKS_FOUND" != x; then
22932    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22933
22934  if test "x$BOOT_JDK_FOUND" = xno; then
22935    # Now execute the test
22936
22937        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22938        if test -d "$BOOT_JDK"; then
22939          BOOT_JDK_FOUND=maybe
22940          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22941$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22942        fi
22943
22944
22945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22947      # Do we have a bin/java?
22948      if test ! -x "$BOOT_JDK/bin/java"; then
22949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22951        BOOT_JDK_FOUND=no
22952      else
22953        # Do we have a bin/javac?
22954        if test ! -x "$BOOT_JDK/bin/javac"; then
22955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22959          BOOT_JDK_FOUND=no
22960        else
22961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22963
22964          # Extra M4 quote needed to protect [] in grep expression.
22965          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22966          if test "x$FOUND_CORRECT_VERSION" = x; then
22967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22971            BOOT_JDK_FOUND=no
22972          else
22973            # We're done! :-)
22974            BOOT_JDK_FOUND=yes
22975
22976  # Only process if variable expands to non-empty
22977
22978  if test "x$BOOT_JDK" != x; then
22979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22980
22981  # Input might be given as Windows format, start by converting to
22982  # unix format.
22983  path="$BOOT_JDK"
22984  new_path=`$CYGPATH -u "$path"`
22985
22986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22989  # "foo.exe" is OK but "foo" is an error.
22990  #
22991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22992  # It is also a way to make sure we got the proper file name for the real test later on.
22993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22994  if test "x$test_shortpath" = x; then
22995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22998  fi
22999
23000  # Call helper function which possibly converts this using DOS-style short mode.
23001  # If so, the updated path is stored in $new_path.
23002
23003  input_path="$new_path"
23004  # Check if we need to convert this using DOS-style short mode. If the path
23005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23006  # take no chances and rewrite it.
23007  # Note: m4 eats our [], so we need to use [ and ] instead.
23008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23009  if test "x$has_forbidden_chars" != x; then
23010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23014      # Going to short mode and back again did indeed matter. Since short mode is
23015      # case insensitive, let's make it lowercase to improve readability.
23016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23017      # Now convert it back to Unix-style (cygpath)
23018      input_path=`$CYGPATH -u "$shortmode_path"`
23019      new_path="$input_path"
23020    fi
23021  fi
23022
23023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23024  if test "x$test_cygdrive_prefix" = x; then
23025    # As a simple fix, exclude /usr/bin since it's not a real path.
23026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23028      # a path prefixed by /cygdrive for fixpath to work.
23029      new_path="$CYGWIN_ROOT_PATH$input_path"
23030    fi
23031  fi
23032
23033
23034  if test "x$path" != "x$new_path"; then
23035    BOOT_JDK="$new_path"
23036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23038  fi
23039
23040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23041
23042  path="$BOOT_JDK"
23043  has_colon=`$ECHO $path | $GREP ^.:`
23044  new_path="$path"
23045  if test "x$has_colon" = x; then
23046    # Not in mixed or Windows style, start by that.
23047    new_path=`cmd //c echo $path`
23048  fi
23049
23050
23051  input_path="$new_path"
23052  # Check if we need to convert this using DOS-style short mode. If the path
23053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23054  # take no chances and rewrite it.
23055  # Note: m4 eats our [], so we need to use [ and ] instead.
23056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23057  if test "x$has_forbidden_chars" != x; then
23058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23060  fi
23061
23062
23063  windows_path="$new_path"
23064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23065    unix_path=`$CYGPATH -u "$windows_path"`
23066    new_path="$unix_path"
23067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23069    new_path="$unix_path"
23070  fi
23071
23072  if test "x$path" != "x$new_path"; then
23073    BOOT_JDK="$new_path"
23074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23076  fi
23077
23078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23080
23081    else
23082      # We're on a unix platform. Hooray! :)
23083      path="$BOOT_JDK"
23084      has_space=`$ECHO "$path" | $GREP " "`
23085      if test "x$has_space" != x; then
23086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23089      fi
23090
23091      # Use eval to expand a potential ~
23092      eval path="$path"
23093      if test ! -f "$path" && test ! -d "$path"; then
23094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23095      fi
23096
23097      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23098    fi
23099  fi
23100
23101            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23102$as_echo_n "checking for Boot JDK... " >&6; }
23103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23104$as_echo "$BOOT_JDK" >&6; }
23105            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23106$as_echo_n "checking Boot JDK version... " >&6; }
23107            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23109$as_echo "$BOOT_JDK_VERSION" >&6; }
23110          fi # end check jdk version
23111        fi # end check javac
23112      fi # end check java
23113    fi # end check boot jdk found
23114  fi
23115
23116    done
23117  fi
23118
23119  fi
23120
23121
23122    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23123    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23124      # Do we have a bin/java?
23125      if test ! -x "$BOOT_JDK/bin/java"; then
23126        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23128        BOOT_JDK_FOUND=no
23129      else
23130        # Do we have a bin/javac?
23131        if test ! -x "$BOOT_JDK/bin/javac"; then
23132          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23134          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23135$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23136          BOOT_JDK_FOUND=no
23137        else
23138          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23139          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23140
23141          # Extra M4 quote needed to protect [] in grep expression.
23142          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23143          if test "x$FOUND_CORRECT_VERSION" = x; then
23144            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23146            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23147$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23148            BOOT_JDK_FOUND=no
23149          else
23150            # We're done! :-)
23151            BOOT_JDK_FOUND=yes
23152
23153  # Only process if variable expands to non-empty
23154
23155  if test "x$BOOT_JDK" != x; then
23156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23157
23158  # Input might be given as Windows format, start by converting to
23159  # unix format.
23160  path="$BOOT_JDK"
23161  new_path=`$CYGPATH -u "$path"`
23162
23163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23166  # "foo.exe" is OK but "foo" is an error.
23167  #
23168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23169  # It is also a way to make sure we got the proper file name for the real test later on.
23170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23171  if test "x$test_shortpath" = x; then
23172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23174    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23175  fi
23176
23177  # Call helper function which possibly converts this using DOS-style short mode.
23178  # If so, the updated path is stored in $new_path.
23179
23180  input_path="$new_path"
23181  # Check if we need to convert this using DOS-style short mode. If the path
23182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23183  # take no chances and rewrite it.
23184  # Note: m4 eats our [], so we need to use [ and ] instead.
23185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23186  if test "x$has_forbidden_chars" != x; then
23187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23191      # Going to short mode and back again did indeed matter. Since short mode is
23192      # case insensitive, let's make it lowercase to improve readability.
23193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23194      # Now convert it back to Unix-style (cygpath)
23195      input_path=`$CYGPATH -u "$shortmode_path"`
23196      new_path="$input_path"
23197    fi
23198  fi
23199
23200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23201  if test "x$test_cygdrive_prefix" = x; then
23202    # As a simple fix, exclude /usr/bin since it's not a real path.
23203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23205      # a path prefixed by /cygdrive for fixpath to work.
23206      new_path="$CYGWIN_ROOT_PATH$input_path"
23207    fi
23208  fi
23209
23210
23211  if test "x$path" != "x$new_path"; then
23212    BOOT_JDK="$new_path"
23213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23215  fi
23216
23217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23218
23219  path="$BOOT_JDK"
23220  has_colon=`$ECHO $path | $GREP ^.:`
23221  new_path="$path"
23222  if test "x$has_colon" = x; then
23223    # Not in mixed or Windows style, start by that.
23224    new_path=`cmd //c echo $path`
23225  fi
23226
23227
23228  input_path="$new_path"
23229  # Check if we need to convert this using DOS-style short mode. If the path
23230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23231  # take no chances and rewrite it.
23232  # Note: m4 eats our [], so we need to use [ and ] instead.
23233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23234  if test "x$has_forbidden_chars" != x; then
23235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23237  fi
23238
23239
23240  windows_path="$new_path"
23241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23242    unix_path=`$CYGPATH -u "$windows_path"`
23243    new_path="$unix_path"
23244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23246    new_path="$unix_path"
23247  fi
23248
23249  if test "x$path" != "x$new_path"; then
23250    BOOT_JDK="$new_path"
23251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23253  fi
23254
23255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23257
23258    else
23259      # We're on a unix platform. Hooray! :)
23260      path="$BOOT_JDK"
23261      has_space=`$ECHO "$path" | $GREP " "`
23262      if test "x$has_space" != x; then
23263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23266      fi
23267
23268      # Use eval to expand a potential ~
23269      eval path="$path"
23270      if test ! -f "$path" && test ! -d "$path"; then
23271        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23272      fi
23273
23274      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23275    fi
23276  fi
23277
23278            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23279$as_echo_n "checking for Boot JDK... " >&6; }
23280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23281$as_echo "$BOOT_JDK" >&6; }
23282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23283$as_echo_n "checking Boot JDK version... " >&6; }
23284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23286$as_echo "$BOOT_JDK_VERSION" >&6; }
23287          fi # end check jdk version
23288        fi # end check javac
23289      fi # end check java
23290    fi # end check boot jdk found
23291  fi
23292
23293
23294  if test "x$BOOT_JDK_FOUND" = xno; then
23295    # Now execute the test
23296
23297  if test "x$PROGRAMFILES" != x; then
23298    VIRTUAL_DIR="$PROGRAMFILES/Java"
23299
23300  windows_path="$VIRTUAL_DIR"
23301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23302    unix_path=`$CYGPATH -u "$windows_path"`
23303    VIRTUAL_DIR="$unix_path"
23304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23306    VIRTUAL_DIR="$unix_path"
23307  fi
23308
23309
23310  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23311  BOOT_JDK_SUFFIX=""
23312  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23313  if test "x$ALL_JDKS_FOUND" != x; then
23314    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23315
23316  if test "x$BOOT_JDK_FOUND" = xno; then
23317    # Now execute the test
23318
23319        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23320        if test -d "$BOOT_JDK"; then
23321          BOOT_JDK_FOUND=maybe
23322          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23323$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23324        fi
23325
23326
23327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23329      # Do we have a bin/java?
23330      if test ! -x "$BOOT_JDK/bin/java"; then
23331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23333        BOOT_JDK_FOUND=no
23334      else
23335        # Do we have a bin/javac?
23336        if test ! -x "$BOOT_JDK/bin/javac"; then
23337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23341          BOOT_JDK_FOUND=no
23342        else
23343          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23344          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23345
23346          # Extra M4 quote needed to protect [] in grep expression.
23347          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23348          if test "x$FOUND_CORRECT_VERSION" = x; then
23349            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23351            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23352$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23353            BOOT_JDK_FOUND=no
23354          else
23355            # We're done! :-)
23356            BOOT_JDK_FOUND=yes
23357
23358  # Only process if variable expands to non-empty
23359
23360  if test "x$BOOT_JDK" != x; then
23361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23362
23363  # Input might be given as Windows format, start by converting to
23364  # unix format.
23365  path="$BOOT_JDK"
23366  new_path=`$CYGPATH -u "$path"`
23367
23368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23371  # "foo.exe" is OK but "foo" is an error.
23372  #
23373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23374  # It is also a way to make sure we got the proper file name for the real test later on.
23375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23376  if test "x$test_shortpath" = x; then
23377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23379    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23380  fi
23381
23382  # Call helper function which possibly converts this using DOS-style short mode.
23383  # If so, the updated path is stored in $new_path.
23384
23385  input_path="$new_path"
23386  # Check if we need to convert this using DOS-style short mode. If the path
23387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23388  # take no chances and rewrite it.
23389  # Note: m4 eats our [], so we need to use [ and ] instead.
23390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23391  if test "x$has_forbidden_chars" != x; then
23392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23396      # Going to short mode and back again did indeed matter. Since short mode is
23397      # case insensitive, let's make it lowercase to improve readability.
23398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23399      # Now convert it back to Unix-style (cygpath)
23400      input_path=`$CYGPATH -u "$shortmode_path"`
23401      new_path="$input_path"
23402    fi
23403  fi
23404
23405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23406  if test "x$test_cygdrive_prefix" = x; then
23407    # As a simple fix, exclude /usr/bin since it's not a real path.
23408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23410      # a path prefixed by /cygdrive for fixpath to work.
23411      new_path="$CYGWIN_ROOT_PATH$input_path"
23412    fi
23413  fi
23414
23415
23416  if test "x$path" != "x$new_path"; then
23417    BOOT_JDK="$new_path"
23418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23420  fi
23421
23422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23423
23424  path="$BOOT_JDK"
23425  has_colon=`$ECHO $path | $GREP ^.:`
23426  new_path="$path"
23427  if test "x$has_colon" = x; then
23428    # Not in mixed or Windows style, start by that.
23429    new_path=`cmd //c echo $path`
23430  fi
23431
23432
23433  input_path="$new_path"
23434  # Check if we need to convert this using DOS-style short mode. If the path
23435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23436  # take no chances and rewrite it.
23437  # Note: m4 eats our [], so we need to use [ and ] instead.
23438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23439  if test "x$has_forbidden_chars" != x; then
23440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23442  fi
23443
23444
23445  windows_path="$new_path"
23446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23447    unix_path=`$CYGPATH -u "$windows_path"`
23448    new_path="$unix_path"
23449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23451    new_path="$unix_path"
23452  fi
23453
23454  if test "x$path" != "x$new_path"; then
23455    BOOT_JDK="$new_path"
23456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23458  fi
23459
23460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23462
23463    else
23464      # We're on a unix platform. Hooray! :)
23465      path="$BOOT_JDK"
23466      has_space=`$ECHO "$path" | $GREP " "`
23467      if test "x$has_space" != x; then
23468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23469$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23471      fi
23472
23473      # Use eval to expand a potential ~
23474      eval path="$path"
23475      if test ! -f "$path" && test ! -d "$path"; then
23476        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23477      fi
23478
23479      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23480    fi
23481  fi
23482
23483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23484$as_echo_n "checking for Boot JDK... " >&6; }
23485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23486$as_echo "$BOOT_JDK" >&6; }
23487            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23488$as_echo_n "checking Boot JDK version... " >&6; }
23489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23491$as_echo "$BOOT_JDK_VERSION" >&6; }
23492          fi # end check jdk version
23493        fi # end check javac
23494      fi # end check java
23495    fi # end check boot jdk found
23496  fi
23497
23498    done
23499  fi
23500
23501  fi
23502
23503
23504    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23505    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23506      # Do we have a bin/java?
23507      if test ! -x "$BOOT_JDK/bin/java"; then
23508        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23510        BOOT_JDK_FOUND=no
23511      else
23512        # Do we have a bin/javac?
23513        if test ! -x "$BOOT_JDK/bin/javac"; then
23514          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23516          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23517$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23518          BOOT_JDK_FOUND=no
23519        else
23520          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23521          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23522
23523          # Extra M4 quote needed to protect [] in grep expression.
23524          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23525          if test "x$FOUND_CORRECT_VERSION" = x; then
23526            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23528            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23529$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23530            BOOT_JDK_FOUND=no
23531          else
23532            # We're done! :-)
23533            BOOT_JDK_FOUND=yes
23534
23535  # Only process if variable expands to non-empty
23536
23537  if test "x$BOOT_JDK" != x; then
23538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23539
23540  # Input might be given as Windows format, start by converting to
23541  # unix format.
23542  path="$BOOT_JDK"
23543  new_path=`$CYGPATH -u "$path"`
23544
23545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23548  # "foo.exe" is OK but "foo" is an error.
23549  #
23550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23551  # It is also a way to make sure we got the proper file name for the real test later on.
23552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23553  if test "x$test_shortpath" = x; then
23554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23556    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23557  fi
23558
23559  # Call helper function which possibly converts this using DOS-style short mode.
23560  # If so, the updated path is stored in $new_path.
23561
23562  input_path="$new_path"
23563  # Check if we need to convert this using DOS-style short mode. If the path
23564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23565  # take no chances and rewrite it.
23566  # Note: m4 eats our [], so we need to use [ and ] instead.
23567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23568  if test "x$has_forbidden_chars" != x; then
23569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23573      # Going to short mode and back again did indeed matter. Since short mode is
23574      # case insensitive, let's make it lowercase to improve readability.
23575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23576      # Now convert it back to Unix-style (cygpath)
23577      input_path=`$CYGPATH -u "$shortmode_path"`
23578      new_path="$input_path"
23579    fi
23580  fi
23581
23582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23583  if test "x$test_cygdrive_prefix" = x; then
23584    # As a simple fix, exclude /usr/bin since it's not a real path.
23585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23587      # a path prefixed by /cygdrive for fixpath to work.
23588      new_path="$CYGWIN_ROOT_PATH$input_path"
23589    fi
23590  fi
23591
23592
23593  if test "x$path" != "x$new_path"; then
23594    BOOT_JDK="$new_path"
23595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23597  fi
23598
23599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23600
23601  path="$BOOT_JDK"
23602  has_colon=`$ECHO $path | $GREP ^.:`
23603  new_path="$path"
23604  if test "x$has_colon" = x; then
23605    # Not in mixed or Windows style, start by that.
23606    new_path=`cmd //c echo $path`
23607  fi
23608
23609
23610  input_path="$new_path"
23611  # Check if we need to convert this using DOS-style short mode. If the path
23612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23613  # take no chances and rewrite it.
23614  # Note: m4 eats our [], so we need to use [ and ] instead.
23615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23616  if test "x$has_forbidden_chars" != x; then
23617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23619  fi
23620
23621
23622  windows_path="$new_path"
23623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23624    unix_path=`$CYGPATH -u "$windows_path"`
23625    new_path="$unix_path"
23626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23628    new_path="$unix_path"
23629  fi
23630
23631  if test "x$path" != "x$new_path"; then
23632    BOOT_JDK="$new_path"
23633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23635  fi
23636
23637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23639
23640    else
23641      # We're on a unix platform. Hooray! :)
23642      path="$BOOT_JDK"
23643      has_space=`$ECHO "$path" | $GREP " "`
23644      if test "x$has_space" != x; then
23645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23648      fi
23649
23650      # Use eval to expand a potential ~
23651      eval path="$path"
23652      if test ! -f "$path" && test ! -d "$path"; then
23653        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23654      fi
23655
23656      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23657    fi
23658  fi
23659
23660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23661$as_echo_n "checking for Boot JDK... " >&6; }
23662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23663$as_echo "$BOOT_JDK" >&6; }
23664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23665$as_echo_n "checking Boot JDK version... " >&6; }
23666            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23668$as_echo "$BOOT_JDK_VERSION" >&6; }
23669          fi # end check jdk version
23670        fi # end check javac
23671      fi # end check java
23672    fi # end check boot jdk found
23673  fi
23674
23675
23676  if test "x$BOOT_JDK_FOUND" = xno; then
23677    # Now execute the test
23678
23679  if test "x$ProgramFiles" != x; then
23680    VIRTUAL_DIR="$ProgramFiles/Java"
23681
23682  windows_path="$VIRTUAL_DIR"
23683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23684    unix_path=`$CYGPATH -u "$windows_path"`
23685    VIRTUAL_DIR="$unix_path"
23686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23688    VIRTUAL_DIR="$unix_path"
23689  fi
23690
23691
23692  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23693  BOOT_JDK_SUFFIX=""
23694  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23695  if test "x$ALL_JDKS_FOUND" != x; then
23696    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23697
23698  if test "x$BOOT_JDK_FOUND" = xno; then
23699    # Now execute the test
23700
23701        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23702        if test -d "$BOOT_JDK"; then
23703          BOOT_JDK_FOUND=maybe
23704          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23705$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23706        fi
23707
23708
23709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23711      # Do we have a bin/java?
23712      if test ! -x "$BOOT_JDK/bin/java"; then
23713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23715        BOOT_JDK_FOUND=no
23716      else
23717        # Do we have a bin/javac?
23718        if test ! -x "$BOOT_JDK/bin/javac"; then
23719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23723          BOOT_JDK_FOUND=no
23724        else
23725          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23726          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23727
23728          # Extra M4 quote needed to protect [] in grep expression.
23729          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23730          if test "x$FOUND_CORRECT_VERSION" = x; then
23731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23733            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23734$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23735            BOOT_JDK_FOUND=no
23736          else
23737            # We're done! :-)
23738            BOOT_JDK_FOUND=yes
23739
23740  # Only process if variable expands to non-empty
23741
23742  if test "x$BOOT_JDK" != x; then
23743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23744
23745  # Input might be given as Windows format, start by converting to
23746  # unix format.
23747  path="$BOOT_JDK"
23748  new_path=`$CYGPATH -u "$path"`
23749
23750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23753  # "foo.exe" is OK but "foo" is an error.
23754  #
23755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23756  # It is also a way to make sure we got the proper file name for the real test later on.
23757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23758  if test "x$test_shortpath" = x; then
23759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23762  fi
23763
23764  # Call helper function which possibly converts this using DOS-style short mode.
23765  # If so, the updated path is stored in $new_path.
23766
23767  input_path="$new_path"
23768  # Check if we need to convert this using DOS-style short mode. If the path
23769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23770  # take no chances and rewrite it.
23771  # Note: m4 eats our [], so we need to use [ and ] instead.
23772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23773  if test "x$has_forbidden_chars" != x; then
23774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23778      # Going to short mode and back again did indeed matter. Since short mode is
23779      # case insensitive, let's make it lowercase to improve readability.
23780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23781      # Now convert it back to Unix-style (cygpath)
23782      input_path=`$CYGPATH -u "$shortmode_path"`
23783      new_path="$input_path"
23784    fi
23785  fi
23786
23787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23788  if test "x$test_cygdrive_prefix" = x; then
23789    # As a simple fix, exclude /usr/bin since it's not a real path.
23790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23792      # a path prefixed by /cygdrive for fixpath to work.
23793      new_path="$CYGWIN_ROOT_PATH$input_path"
23794    fi
23795  fi
23796
23797
23798  if test "x$path" != "x$new_path"; then
23799    BOOT_JDK="$new_path"
23800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23802  fi
23803
23804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23805
23806  path="$BOOT_JDK"
23807  has_colon=`$ECHO $path | $GREP ^.:`
23808  new_path="$path"
23809  if test "x$has_colon" = x; then
23810    # Not in mixed or Windows style, start by that.
23811    new_path=`cmd //c echo $path`
23812  fi
23813
23814
23815  input_path="$new_path"
23816  # Check if we need to convert this using DOS-style short mode. If the path
23817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23818  # take no chances and rewrite it.
23819  # Note: m4 eats our [], so we need to use [ and ] instead.
23820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23821  if test "x$has_forbidden_chars" != x; then
23822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23824  fi
23825
23826
23827  windows_path="$new_path"
23828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23829    unix_path=`$CYGPATH -u "$windows_path"`
23830    new_path="$unix_path"
23831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23833    new_path="$unix_path"
23834  fi
23835
23836  if test "x$path" != "x$new_path"; then
23837    BOOT_JDK="$new_path"
23838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23840  fi
23841
23842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23844
23845    else
23846      # We're on a unix platform. Hooray! :)
23847      path="$BOOT_JDK"
23848      has_space=`$ECHO "$path" | $GREP " "`
23849      if test "x$has_space" != x; then
23850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23853      fi
23854
23855      # Use eval to expand a potential ~
23856      eval path="$path"
23857      if test ! -f "$path" && test ! -d "$path"; then
23858        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23859      fi
23860
23861      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23862    fi
23863  fi
23864
23865            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23866$as_echo_n "checking for Boot JDK... " >&6; }
23867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23868$as_echo "$BOOT_JDK" >&6; }
23869            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23870$as_echo_n "checking Boot JDK version... " >&6; }
23871            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23873$as_echo "$BOOT_JDK_VERSION" >&6; }
23874          fi # end check jdk version
23875        fi # end check javac
23876      fi # end check java
23877    fi # end check boot jdk found
23878  fi
23879
23880    done
23881  fi
23882
23883  fi
23884
23885
23886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23888      # Do we have a bin/java?
23889      if test ! -x "$BOOT_JDK/bin/java"; then
23890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23892        BOOT_JDK_FOUND=no
23893      else
23894        # Do we have a bin/javac?
23895        if test ! -x "$BOOT_JDK/bin/javac"; then
23896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23900          BOOT_JDK_FOUND=no
23901        else
23902          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23903          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23904
23905          # Extra M4 quote needed to protect [] in grep expression.
23906          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23907          if test "x$FOUND_CORRECT_VERSION" = x; then
23908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23910            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23911$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23912            BOOT_JDK_FOUND=no
23913          else
23914            # We're done! :-)
23915            BOOT_JDK_FOUND=yes
23916
23917  # Only process if variable expands to non-empty
23918
23919  if test "x$BOOT_JDK" != x; then
23920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23921
23922  # Input might be given as Windows format, start by converting to
23923  # unix format.
23924  path="$BOOT_JDK"
23925  new_path=`$CYGPATH -u "$path"`
23926
23927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23930  # "foo.exe" is OK but "foo" is an error.
23931  #
23932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23933  # It is also a way to make sure we got the proper file name for the real test later on.
23934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23935  if test "x$test_shortpath" = x; then
23936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23939  fi
23940
23941  # Call helper function which possibly converts this using DOS-style short mode.
23942  # If so, the updated path is stored in $new_path.
23943
23944  input_path="$new_path"
23945  # Check if we need to convert this using DOS-style short mode. If the path
23946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23947  # take no chances and rewrite it.
23948  # Note: m4 eats our [], so we need to use [ and ] instead.
23949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23950  if test "x$has_forbidden_chars" != x; then
23951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23955      # Going to short mode and back again did indeed matter. Since short mode is
23956      # case insensitive, let's make it lowercase to improve readability.
23957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23958      # Now convert it back to Unix-style (cygpath)
23959      input_path=`$CYGPATH -u "$shortmode_path"`
23960      new_path="$input_path"
23961    fi
23962  fi
23963
23964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23965  if test "x$test_cygdrive_prefix" = x; then
23966    # As a simple fix, exclude /usr/bin since it's not a real path.
23967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23969      # a path prefixed by /cygdrive for fixpath to work.
23970      new_path="$CYGWIN_ROOT_PATH$input_path"
23971    fi
23972  fi
23973
23974
23975  if test "x$path" != "x$new_path"; then
23976    BOOT_JDK="$new_path"
23977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23979  fi
23980
23981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23982
23983  path="$BOOT_JDK"
23984  has_colon=`$ECHO $path | $GREP ^.:`
23985  new_path="$path"
23986  if test "x$has_colon" = x; then
23987    # Not in mixed or Windows style, start by that.
23988    new_path=`cmd //c echo $path`
23989  fi
23990
23991
23992  input_path="$new_path"
23993  # Check if we need to convert this using DOS-style short mode. If the path
23994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23995  # take no chances and rewrite it.
23996  # Note: m4 eats our [], so we need to use [ and ] instead.
23997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23998  if test "x$has_forbidden_chars" != x; then
23999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24001  fi
24002
24003
24004  windows_path="$new_path"
24005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24006    unix_path=`$CYGPATH -u "$windows_path"`
24007    new_path="$unix_path"
24008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24010    new_path="$unix_path"
24011  fi
24012
24013  if test "x$path" != "x$new_path"; then
24014    BOOT_JDK="$new_path"
24015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24017  fi
24018
24019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24021
24022    else
24023      # We're on a unix platform. Hooray! :)
24024      path="$BOOT_JDK"
24025      has_space=`$ECHO "$path" | $GREP " "`
24026      if test "x$has_space" != x; then
24027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24030      fi
24031
24032      # Use eval to expand a potential ~
24033      eval path="$path"
24034      if test ! -f "$path" && test ! -d "$path"; then
24035        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24036      fi
24037
24038      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24039    fi
24040  fi
24041
24042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24043$as_echo_n "checking for Boot JDK... " >&6; }
24044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24045$as_echo "$BOOT_JDK" >&6; }
24046            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24047$as_echo_n "checking Boot JDK version... " >&6; }
24048            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24050$as_echo "$BOOT_JDK_VERSION" >&6; }
24051          fi # end check jdk version
24052        fi # end check javac
24053      fi # end check java
24054    fi # end check boot jdk found
24055  fi
24056
24057
24058  if test "x$BOOT_JDK_FOUND" = xno; then
24059    # Now execute the test
24060
24061  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24062  BOOT_JDK_SUFFIX=""
24063  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24064  if test "x$ALL_JDKS_FOUND" != x; then
24065    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24066
24067  if test "x$BOOT_JDK_FOUND" = xno; then
24068    # Now execute the test
24069
24070        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24071        if test -d "$BOOT_JDK"; then
24072          BOOT_JDK_FOUND=maybe
24073          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24074$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24075        fi
24076
24077
24078    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24079    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24080      # Do we have a bin/java?
24081      if test ! -x "$BOOT_JDK/bin/java"; then
24082        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24084        BOOT_JDK_FOUND=no
24085      else
24086        # Do we have a bin/javac?
24087        if test ! -x "$BOOT_JDK/bin/javac"; then
24088          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24090          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24091$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24092          BOOT_JDK_FOUND=no
24093        else
24094          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24095          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24096
24097          # Extra M4 quote needed to protect [] in grep expression.
24098          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24099          if test "x$FOUND_CORRECT_VERSION" = x; then
24100            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24102            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24103$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24104            BOOT_JDK_FOUND=no
24105          else
24106            # We're done! :-)
24107            BOOT_JDK_FOUND=yes
24108
24109  # Only process if variable expands to non-empty
24110
24111  if test "x$BOOT_JDK" != x; then
24112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24113
24114  # Input might be given as Windows format, start by converting to
24115  # unix format.
24116  path="$BOOT_JDK"
24117  new_path=`$CYGPATH -u "$path"`
24118
24119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24122  # "foo.exe" is OK but "foo" is an error.
24123  #
24124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24125  # It is also a way to make sure we got the proper file name for the real test later on.
24126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24127  if test "x$test_shortpath" = x; then
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24130    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24131  fi
24132
24133  # Call helper function which possibly converts this using DOS-style short mode.
24134  # If so, the updated path is stored in $new_path.
24135
24136  input_path="$new_path"
24137  # Check if we need to convert this using DOS-style short mode. If the path
24138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24139  # take no chances and rewrite it.
24140  # Note: m4 eats our [], so we need to use [ and ] instead.
24141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24142  if test "x$has_forbidden_chars" != x; then
24143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24147      # Going to short mode and back again did indeed matter. Since short mode is
24148      # case insensitive, let's make it lowercase to improve readability.
24149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24150      # Now convert it back to Unix-style (cygpath)
24151      input_path=`$CYGPATH -u "$shortmode_path"`
24152      new_path="$input_path"
24153    fi
24154  fi
24155
24156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24157  if test "x$test_cygdrive_prefix" = x; then
24158    # As a simple fix, exclude /usr/bin since it's not a real path.
24159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24161      # a path prefixed by /cygdrive for fixpath to work.
24162      new_path="$CYGWIN_ROOT_PATH$input_path"
24163    fi
24164  fi
24165
24166
24167  if test "x$path" != "x$new_path"; then
24168    BOOT_JDK="$new_path"
24169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24171  fi
24172
24173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174
24175  path="$BOOT_JDK"
24176  has_colon=`$ECHO $path | $GREP ^.:`
24177  new_path="$path"
24178  if test "x$has_colon" = x; then
24179    # Not in mixed or Windows style, start by that.
24180    new_path=`cmd //c echo $path`
24181  fi
24182
24183
24184  input_path="$new_path"
24185  # Check if we need to convert this using DOS-style short mode. If the path
24186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24187  # take no chances and rewrite it.
24188  # Note: m4 eats our [], so we need to use [ and ] instead.
24189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24190  if test "x$has_forbidden_chars" != x; then
24191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24193  fi
24194
24195
24196  windows_path="$new_path"
24197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24198    unix_path=`$CYGPATH -u "$windows_path"`
24199    new_path="$unix_path"
24200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24202    new_path="$unix_path"
24203  fi
24204
24205  if test "x$path" != "x$new_path"; then
24206    BOOT_JDK="$new_path"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24209  fi
24210
24211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24213
24214    else
24215      # We're on a unix platform. Hooray! :)
24216      path="$BOOT_JDK"
24217      has_space=`$ECHO "$path" | $GREP " "`
24218      if test "x$has_space" != x; then
24219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24220$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24222      fi
24223
24224      # Use eval to expand a potential ~
24225      eval path="$path"
24226      if test ! -f "$path" && test ! -d "$path"; then
24227        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24228      fi
24229
24230      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24231    fi
24232  fi
24233
24234            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24235$as_echo_n "checking for Boot JDK... " >&6; }
24236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24237$as_echo "$BOOT_JDK" >&6; }
24238            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24239$as_echo_n "checking Boot JDK version... " >&6; }
24240            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24242$as_echo "$BOOT_JDK_VERSION" >&6; }
24243          fi # end check jdk version
24244        fi # end check javac
24245      fi # end check java
24246    fi # end check boot jdk found
24247  fi
24248
24249    done
24250  fi
24251
24252
24253    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24254    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24255      # Do we have a bin/java?
24256      if test ! -x "$BOOT_JDK/bin/java"; then
24257        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24259        BOOT_JDK_FOUND=no
24260      else
24261        # Do we have a bin/javac?
24262        if test ! -x "$BOOT_JDK/bin/javac"; then
24263          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24265          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24266$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24267          BOOT_JDK_FOUND=no
24268        else
24269          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24270          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24271
24272          # Extra M4 quote needed to protect [] in grep expression.
24273          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24274          if test "x$FOUND_CORRECT_VERSION" = x; then
24275            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24278$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24279            BOOT_JDK_FOUND=no
24280          else
24281            # We're done! :-)
24282            BOOT_JDK_FOUND=yes
24283
24284  # Only process if variable expands to non-empty
24285
24286  if test "x$BOOT_JDK" != x; then
24287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24288
24289  # Input might be given as Windows format, start by converting to
24290  # unix format.
24291  path="$BOOT_JDK"
24292  new_path=`$CYGPATH -u "$path"`
24293
24294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24297  # "foo.exe" is OK but "foo" is an error.
24298  #
24299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24300  # It is also a way to make sure we got the proper file name for the real test later on.
24301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24302  if test "x$test_shortpath" = x; then
24303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24306  fi
24307
24308  # Call helper function which possibly converts this using DOS-style short mode.
24309  # If so, the updated path is stored in $new_path.
24310
24311  input_path="$new_path"
24312  # Check if we need to convert this using DOS-style short mode. If the path
24313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24314  # take no chances and rewrite it.
24315  # Note: m4 eats our [], so we need to use [ and ] instead.
24316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24317  if test "x$has_forbidden_chars" != x; then
24318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24322      # Going to short mode and back again did indeed matter. Since short mode is
24323      # case insensitive, let's make it lowercase to improve readability.
24324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24325      # Now convert it back to Unix-style (cygpath)
24326      input_path=`$CYGPATH -u "$shortmode_path"`
24327      new_path="$input_path"
24328    fi
24329  fi
24330
24331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24332  if test "x$test_cygdrive_prefix" = x; then
24333    # As a simple fix, exclude /usr/bin since it's not a real path.
24334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24336      # a path prefixed by /cygdrive for fixpath to work.
24337      new_path="$CYGWIN_ROOT_PATH$input_path"
24338    fi
24339  fi
24340
24341
24342  if test "x$path" != "x$new_path"; then
24343    BOOT_JDK="$new_path"
24344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24346  fi
24347
24348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24349
24350  path="$BOOT_JDK"
24351  has_colon=`$ECHO $path | $GREP ^.:`
24352  new_path="$path"
24353  if test "x$has_colon" = x; then
24354    # Not in mixed or Windows style, start by that.
24355    new_path=`cmd //c echo $path`
24356  fi
24357
24358
24359  input_path="$new_path"
24360  # Check if we need to convert this using DOS-style short mode. If the path
24361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24362  # take no chances and rewrite it.
24363  # Note: m4 eats our [], so we need to use [ and ] instead.
24364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24365  if test "x$has_forbidden_chars" != x; then
24366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24368  fi
24369
24370
24371  windows_path="$new_path"
24372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24373    unix_path=`$CYGPATH -u "$windows_path"`
24374    new_path="$unix_path"
24375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24377    new_path="$unix_path"
24378  fi
24379
24380  if test "x$path" != "x$new_path"; then
24381    BOOT_JDK="$new_path"
24382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24384  fi
24385
24386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24388
24389    else
24390      # We're on a unix platform. Hooray! :)
24391      path="$BOOT_JDK"
24392      has_space=`$ECHO "$path" | $GREP " "`
24393      if test "x$has_space" != x; then
24394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24397      fi
24398
24399      # Use eval to expand a potential ~
24400      eval path="$path"
24401      if test ! -f "$path" && test ! -d "$path"; then
24402        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24403      fi
24404
24405      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24406    fi
24407  fi
24408
24409            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24410$as_echo_n "checking for Boot JDK... " >&6; }
24411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24412$as_echo "$BOOT_JDK" >&6; }
24413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24414$as_echo_n "checking Boot JDK version... " >&6; }
24415            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24417$as_echo "$BOOT_JDK_VERSION" >&6; }
24418          fi # end check jdk version
24419        fi # end check javac
24420      fi # end check java
24421    fi # end check boot jdk found
24422  fi
24423
24424  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24425
24426  if test "x$BOOT_JDK_FOUND" = xno; then
24427    # Now execute the test
24428
24429  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24430  BOOT_JDK_SUFFIX="/Contents/Home"
24431  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24432  if test "x$ALL_JDKS_FOUND" != x; then
24433    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24434
24435  if test "x$BOOT_JDK_FOUND" = xno; then
24436    # Now execute the test
24437
24438        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24439        if test -d "$BOOT_JDK"; then
24440          BOOT_JDK_FOUND=maybe
24441          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24442$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24443        fi
24444
24445
24446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24448      # Do we have a bin/java?
24449      if test ! -x "$BOOT_JDK/bin/java"; then
24450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24452        BOOT_JDK_FOUND=no
24453      else
24454        # Do we have a bin/javac?
24455        if test ! -x "$BOOT_JDK/bin/javac"; then
24456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24460          BOOT_JDK_FOUND=no
24461        else
24462          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24463          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24464
24465          # Extra M4 quote needed to protect [] in grep expression.
24466          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24467          if test "x$FOUND_CORRECT_VERSION" = x; then
24468            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24470            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24471$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24472            BOOT_JDK_FOUND=no
24473          else
24474            # We're done! :-)
24475            BOOT_JDK_FOUND=yes
24476
24477  # Only process if variable expands to non-empty
24478
24479  if test "x$BOOT_JDK" != x; then
24480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24481
24482  # Input might be given as Windows format, start by converting to
24483  # unix format.
24484  path="$BOOT_JDK"
24485  new_path=`$CYGPATH -u "$path"`
24486
24487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24490  # "foo.exe" is OK but "foo" is an error.
24491  #
24492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24493  # It is also a way to make sure we got the proper file name for the real test later on.
24494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24495  if test "x$test_shortpath" = x; then
24496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24499  fi
24500
24501  # Call helper function which possibly converts this using DOS-style short mode.
24502  # If so, the updated path is stored in $new_path.
24503
24504  input_path="$new_path"
24505  # Check if we need to convert this using DOS-style short mode. If the path
24506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24507  # take no chances and rewrite it.
24508  # Note: m4 eats our [], so we need to use [ and ] instead.
24509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24510  if test "x$has_forbidden_chars" != x; then
24511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24515      # Going to short mode and back again did indeed matter. Since short mode is
24516      # case insensitive, let's make it lowercase to improve readability.
24517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24518      # Now convert it back to Unix-style (cygpath)
24519      input_path=`$CYGPATH -u "$shortmode_path"`
24520      new_path="$input_path"
24521    fi
24522  fi
24523
24524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24525  if test "x$test_cygdrive_prefix" = x; then
24526    # As a simple fix, exclude /usr/bin since it's not a real path.
24527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24529      # a path prefixed by /cygdrive for fixpath to work.
24530      new_path="$CYGWIN_ROOT_PATH$input_path"
24531    fi
24532  fi
24533
24534
24535  if test "x$path" != "x$new_path"; then
24536    BOOT_JDK="$new_path"
24537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24539  fi
24540
24541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24542
24543  path="$BOOT_JDK"
24544  has_colon=`$ECHO $path | $GREP ^.:`
24545  new_path="$path"
24546  if test "x$has_colon" = x; then
24547    # Not in mixed or Windows style, start by that.
24548    new_path=`cmd //c echo $path`
24549  fi
24550
24551
24552  input_path="$new_path"
24553  # Check if we need to convert this using DOS-style short mode. If the path
24554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24555  # take no chances and rewrite it.
24556  # Note: m4 eats our [], so we need to use [ and ] instead.
24557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24558  if test "x$has_forbidden_chars" != x; then
24559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24561  fi
24562
24563
24564  windows_path="$new_path"
24565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24566    unix_path=`$CYGPATH -u "$windows_path"`
24567    new_path="$unix_path"
24568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24570    new_path="$unix_path"
24571  fi
24572
24573  if test "x$path" != "x$new_path"; then
24574    BOOT_JDK="$new_path"
24575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24577  fi
24578
24579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24581
24582    else
24583      # We're on a unix platform. Hooray! :)
24584      path="$BOOT_JDK"
24585      has_space=`$ECHO "$path" | $GREP " "`
24586      if test "x$has_space" != x; then
24587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24590      fi
24591
24592      # Use eval to expand a potential ~
24593      eval path="$path"
24594      if test ! -f "$path" && test ! -d "$path"; then
24595        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24596      fi
24597
24598      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24599    fi
24600  fi
24601
24602            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24603$as_echo_n "checking for Boot JDK... " >&6; }
24604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24605$as_echo "$BOOT_JDK" >&6; }
24606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24607$as_echo_n "checking Boot JDK version... " >&6; }
24608            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24610$as_echo "$BOOT_JDK_VERSION" >&6; }
24611          fi # end check jdk version
24612        fi # end check javac
24613      fi # end check java
24614    fi # end check boot jdk found
24615  fi
24616
24617    done
24618  fi
24619
24620
24621    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24622    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24623      # Do we have a bin/java?
24624      if test ! -x "$BOOT_JDK/bin/java"; then
24625        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24627        BOOT_JDK_FOUND=no
24628      else
24629        # Do we have a bin/javac?
24630        if test ! -x "$BOOT_JDK/bin/javac"; then
24631          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24633          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24634$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24635          BOOT_JDK_FOUND=no
24636        else
24637          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24638          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24639
24640          # Extra M4 quote needed to protect [] in grep expression.
24641          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24642          if test "x$FOUND_CORRECT_VERSION" = x; then
24643            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24645            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24646$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24647            BOOT_JDK_FOUND=no
24648          else
24649            # We're done! :-)
24650            BOOT_JDK_FOUND=yes
24651
24652  # Only process if variable expands to non-empty
24653
24654  if test "x$BOOT_JDK" != x; then
24655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24656
24657  # Input might be given as Windows format, start by converting to
24658  # unix format.
24659  path="$BOOT_JDK"
24660  new_path=`$CYGPATH -u "$path"`
24661
24662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24665  # "foo.exe" is OK but "foo" is an error.
24666  #
24667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24668  # It is also a way to make sure we got the proper file name for the real test later on.
24669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24670  if test "x$test_shortpath" = x; then
24671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24673    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24674  fi
24675
24676  # Call helper function which possibly converts this using DOS-style short mode.
24677  # If so, the updated path is stored in $new_path.
24678
24679  input_path="$new_path"
24680  # Check if we need to convert this using DOS-style short mode. If the path
24681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24682  # take no chances and rewrite it.
24683  # Note: m4 eats our [], so we need to use [ and ] instead.
24684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24685  if test "x$has_forbidden_chars" != x; then
24686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24690      # Going to short mode and back again did indeed matter. Since short mode is
24691      # case insensitive, let's make it lowercase to improve readability.
24692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24693      # Now convert it back to Unix-style (cygpath)
24694      input_path=`$CYGPATH -u "$shortmode_path"`
24695      new_path="$input_path"
24696    fi
24697  fi
24698
24699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24700  if test "x$test_cygdrive_prefix" = x; then
24701    # As a simple fix, exclude /usr/bin since it's not a real path.
24702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24704      # a path prefixed by /cygdrive for fixpath to work.
24705      new_path="$CYGWIN_ROOT_PATH$input_path"
24706    fi
24707  fi
24708
24709
24710  if test "x$path" != "x$new_path"; then
24711    BOOT_JDK="$new_path"
24712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24714  fi
24715
24716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24717
24718  path="$BOOT_JDK"
24719  has_colon=`$ECHO $path | $GREP ^.:`
24720  new_path="$path"
24721  if test "x$has_colon" = x; then
24722    # Not in mixed or Windows style, start by that.
24723    new_path=`cmd //c echo $path`
24724  fi
24725
24726
24727  input_path="$new_path"
24728  # Check if we need to convert this using DOS-style short mode. If the path
24729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24730  # take no chances and rewrite it.
24731  # Note: m4 eats our [], so we need to use [ and ] instead.
24732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24733  if test "x$has_forbidden_chars" != x; then
24734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24736  fi
24737
24738
24739  windows_path="$new_path"
24740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24741    unix_path=`$CYGPATH -u "$windows_path"`
24742    new_path="$unix_path"
24743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24745    new_path="$unix_path"
24746  fi
24747
24748  if test "x$path" != "x$new_path"; then
24749    BOOT_JDK="$new_path"
24750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24752  fi
24753
24754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24756
24757    else
24758      # We're on a unix platform. Hooray! :)
24759      path="$BOOT_JDK"
24760      has_space=`$ECHO "$path" | $GREP " "`
24761      if test "x$has_space" != x; then
24762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24765      fi
24766
24767      # Use eval to expand a potential ~
24768      eval path="$path"
24769      if test ! -f "$path" && test ! -d "$path"; then
24770        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24771      fi
24772
24773      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24774    fi
24775  fi
24776
24777            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24778$as_echo_n "checking for Boot JDK... " >&6; }
24779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24780$as_echo "$BOOT_JDK" >&6; }
24781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24782$as_echo_n "checking Boot JDK version... " >&6; }
24783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24785$as_echo "$BOOT_JDK_VERSION" >&6; }
24786          fi # end check jdk version
24787        fi # end check javac
24788      fi # end check java
24789    fi # end check boot jdk found
24790  fi
24791
24792
24793  if test "x$BOOT_JDK_FOUND" = xno; then
24794    # Now execute the test
24795
24796  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24797  BOOT_JDK_SUFFIX="/Contents/Home"
24798  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24799  if test "x$ALL_JDKS_FOUND" != x; then
24800    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24801
24802  if test "x$BOOT_JDK_FOUND" = xno; then
24803    # Now execute the test
24804
24805        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24806        if test -d "$BOOT_JDK"; then
24807          BOOT_JDK_FOUND=maybe
24808          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24809$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24810        fi
24811
24812
24813    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24814    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24815      # Do we have a bin/java?
24816      if test ! -x "$BOOT_JDK/bin/java"; then
24817        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24819        BOOT_JDK_FOUND=no
24820      else
24821        # Do we have a bin/javac?
24822        if test ! -x "$BOOT_JDK/bin/javac"; then
24823          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24825          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24826$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24827          BOOT_JDK_FOUND=no
24828        else
24829          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24830          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24831
24832          # Extra M4 quote needed to protect [] in grep expression.
24833          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24834          if test "x$FOUND_CORRECT_VERSION" = x; then
24835            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24837            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24838$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24839            BOOT_JDK_FOUND=no
24840          else
24841            # We're done! :-)
24842            BOOT_JDK_FOUND=yes
24843
24844  # Only process if variable expands to non-empty
24845
24846  if test "x$BOOT_JDK" != x; then
24847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24848
24849  # Input might be given as Windows format, start by converting to
24850  # unix format.
24851  path="$BOOT_JDK"
24852  new_path=`$CYGPATH -u "$path"`
24853
24854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24857  # "foo.exe" is OK but "foo" is an error.
24858  #
24859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24860  # It is also a way to make sure we got the proper file name for the real test later on.
24861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24862  if test "x$test_shortpath" = x; then
24863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24865    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24866  fi
24867
24868  # Call helper function which possibly converts this using DOS-style short mode.
24869  # If so, the updated path is stored in $new_path.
24870
24871  input_path="$new_path"
24872  # Check if we need to convert this using DOS-style short mode. If the path
24873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24874  # take no chances and rewrite it.
24875  # Note: m4 eats our [], so we need to use [ and ] instead.
24876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24877  if test "x$has_forbidden_chars" != x; then
24878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24882      # Going to short mode and back again did indeed matter. Since short mode is
24883      # case insensitive, let's make it lowercase to improve readability.
24884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24885      # Now convert it back to Unix-style (cygpath)
24886      input_path=`$CYGPATH -u "$shortmode_path"`
24887      new_path="$input_path"
24888    fi
24889  fi
24890
24891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24892  if test "x$test_cygdrive_prefix" = x; then
24893    # As a simple fix, exclude /usr/bin since it's not a real path.
24894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24896      # a path prefixed by /cygdrive for fixpath to work.
24897      new_path="$CYGWIN_ROOT_PATH$input_path"
24898    fi
24899  fi
24900
24901
24902  if test "x$path" != "x$new_path"; then
24903    BOOT_JDK="$new_path"
24904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24906  fi
24907
24908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24909
24910  path="$BOOT_JDK"
24911  has_colon=`$ECHO $path | $GREP ^.:`
24912  new_path="$path"
24913  if test "x$has_colon" = x; then
24914    # Not in mixed or Windows style, start by that.
24915    new_path=`cmd //c echo $path`
24916  fi
24917
24918
24919  input_path="$new_path"
24920  # Check if we need to convert this using DOS-style short mode. If the path
24921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24922  # take no chances and rewrite it.
24923  # Note: m4 eats our [], so we need to use [ and ] instead.
24924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24925  if test "x$has_forbidden_chars" != x; then
24926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24928  fi
24929
24930
24931  windows_path="$new_path"
24932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24933    unix_path=`$CYGPATH -u "$windows_path"`
24934    new_path="$unix_path"
24935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24937    new_path="$unix_path"
24938  fi
24939
24940  if test "x$path" != "x$new_path"; then
24941    BOOT_JDK="$new_path"
24942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24943$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24944  fi
24945
24946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24948
24949    else
24950      # We're on a unix platform. Hooray! :)
24951      path="$BOOT_JDK"
24952      has_space=`$ECHO "$path" | $GREP " "`
24953      if test "x$has_space" != x; then
24954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24957      fi
24958
24959      # Use eval to expand a potential ~
24960      eval path="$path"
24961      if test ! -f "$path" && test ! -d "$path"; then
24962        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24963      fi
24964
24965      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24966    fi
24967  fi
24968
24969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24970$as_echo_n "checking for Boot JDK... " >&6; }
24971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24972$as_echo "$BOOT_JDK" >&6; }
24973            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24974$as_echo_n "checking Boot JDK version... " >&6; }
24975            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24977$as_echo "$BOOT_JDK_VERSION" >&6; }
24978          fi # end check jdk version
24979        fi # end check javac
24980      fi # end check java
24981    fi # end check boot jdk found
24982  fi
24983
24984    done
24985  fi
24986
24987
24988    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24989    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24990      # Do we have a bin/java?
24991      if test ! -x "$BOOT_JDK/bin/java"; then
24992        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24994        BOOT_JDK_FOUND=no
24995      else
24996        # Do we have a bin/javac?
24997        if test ! -x "$BOOT_JDK/bin/javac"; then
24998          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25000          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25001$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25002          BOOT_JDK_FOUND=no
25003        else
25004          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25005          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25006
25007          # Extra M4 quote needed to protect [] in grep expression.
25008          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25009          if test "x$FOUND_CORRECT_VERSION" = x; then
25010            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25013$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25014            BOOT_JDK_FOUND=no
25015          else
25016            # We're done! :-)
25017            BOOT_JDK_FOUND=yes
25018
25019  # Only process if variable expands to non-empty
25020
25021  if test "x$BOOT_JDK" != x; then
25022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25023
25024  # Input might be given as Windows format, start by converting to
25025  # unix format.
25026  path="$BOOT_JDK"
25027  new_path=`$CYGPATH -u "$path"`
25028
25029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25032  # "foo.exe" is OK but "foo" is an error.
25033  #
25034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25035  # It is also a way to make sure we got the proper file name for the real test later on.
25036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25037  if test "x$test_shortpath" = x; then
25038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25041  fi
25042
25043  # Call helper function which possibly converts this using DOS-style short mode.
25044  # If so, the updated path is stored in $new_path.
25045
25046  input_path="$new_path"
25047  # Check if we need to convert this using DOS-style short mode. If the path
25048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25049  # take no chances and rewrite it.
25050  # Note: m4 eats our [], so we need to use [ and ] instead.
25051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25052  if test "x$has_forbidden_chars" != x; then
25053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25057      # Going to short mode and back again did indeed matter. Since short mode is
25058      # case insensitive, let's make it lowercase to improve readability.
25059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25060      # Now convert it back to Unix-style (cygpath)
25061      input_path=`$CYGPATH -u "$shortmode_path"`
25062      new_path="$input_path"
25063    fi
25064  fi
25065
25066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25067  if test "x$test_cygdrive_prefix" = x; then
25068    # As a simple fix, exclude /usr/bin since it's not a real path.
25069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25071      # a path prefixed by /cygdrive for fixpath to work.
25072      new_path="$CYGWIN_ROOT_PATH$input_path"
25073    fi
25074  fi
25075
25076
25077  if test "x$path" != "x$new_path"; then
25078    BOOT_JDK="$new_path"
25079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25081  fi
25082
25083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25084
25085  path="$BOOT_JDK"
25086  has_colon=`$ECHO $path | $GREP ^.:`
25087  new_path="$path"
25088  if test "x$has_colon" = x; then
25089    # Not in mixed or Windows style, start by that.
25090    new_path=`cmd //c echo $path`
25091  fi
25092
25093
25094  input_path="$new_path"
25095  # Check if we need to convert this using DOS-style short mode. If the path
25096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25097  # take no chances and rewrite it.
25098  # Note: m4 eats our [], so we need to use [ and ] instead.
25099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25100  if test "x$has_forbidden_chars" != x; then
25101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25103  fi
25104
25105
25106  windows_path="$new_path"
25107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25108    unix_path=`$CYGPATH -u "$windows_path"`
25109    new_path="$unix_path"
25110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25112    new_path="$unix_path"
25113  fi
25114
25115  if test "x$path" != "x$new_path"; then
25116    BOOT_JDK="$new_path"
25117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25119  fi
25120
25121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25123
25124    else
25125      # We're on a unix platform. Hooray! :)
25126      path="$BOOT_JDK"
25127      has_space=`$ECHO "$path" | $GREP " "`
25128      if test "x$has_space" != x; then
25129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25132      fi
25133
25134      # Use eval to expand a potential ~
25135      eval path="$path"
25136      if test ! -f "$path" && test ! -d "$path"; then
25137        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25138      fi
25139
25140      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25141    fi
25142  fi
25143
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25145$as_echo_n "checking for Boot JDK... " >&6; }
25146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25147$as_echo "$BOOT_JDK" >&6; }
25148            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25149$as_echo_n "checking Boot JDK version... " >&6; }
25150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25152$as_echo "$BOOT_JDK_VERSION" >&6; }
25153          fi # end check jdk version
25154        fi # end check javac
25155      fi # end check java
25156    fi # end check boot jdk found
25157  fi
25158
25159  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25160
25161  if test "x$BOOT_JDK_FOUND" = xno; then
25162    # Now execute the test
25163
25164  BOOT_JDK_PREFIX="/usr/lib/jvm"
25165  BOOT_JDK_SUFFIX=""
25166  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25167  if test "x$ALL_JDKS_FOUND" != x; then
25168    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25169
25170  if test "x$BOOT_JDK_FOUND" = xno; then
25171    # Now execute the test
25172
25173        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25174        if test -d "$BOOT_JDK"; then
25175          BOOT_JDK_FOUND=maybe
25176          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25177$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25178        fi
25179
25180
25181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25183      # Do we have a bin/java?
25184      if test ! -x "$BOOT_JDK/bin/java"; then
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25187        BOOT_JDK_FOUND=no
25188      else
25189        # Do we have a bin/javac?
25190        if test ! -x "$BOOT_JDK/bin/javac"; then
25191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25195          BOOT_JDK_FOUND=no
25196        else
25197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25199
25200          # Extra M4 quote needed to protect [] in grep expression.
25201          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25202          if test "x$FOUND_CORRECT_VERSION" = x; then
25203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25207            BOOT_JDK_FOUND=no
25208          else
25209            # We're done! :-)
25210            BOOT_JDK_FOUND=yes
25211
25212  # Only process if variable expands to non-empty
25213
25214  if test "x$BOOT_JDK" != x; then
25215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25216
25217  # Input might be given as Windows format, start by converting to
25218  # unix format.
25219  path="$BOOT_JDK"
25220  new_path=`$CYGPATH -u "$path"`
25221
25222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25225  # "foo.exe" is OK but "foo" is an error.
25226  #
25227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25228  # It is also a way to make sure we got the proper file name for the real test later on.
25229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25230  if test "x$test_shortpath" = x; then
25231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25234  fi
25235
25236  # Call helper function which possibly converts this using DOS-style short mode.
25237  # If so, the updated path is stored in $new_path.
25238
25239  input_path="$new_path"
25240  # Check if we need to convert this using DOS-style short mode. If the path
25241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25242  # take no chances and rewrite it.
25243  # Note: m4 eats our [], so we need to use [ and ] instead.
25244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25245  if test "x$has_forbidden_chars" != x; then
25246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25250      # Going to short mode and back again did indeed matter. Since short mode is
25251      # case insensitive, let's make it lowercase to improve readability.
25252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25253      # Now convert it back to Unix-style (cygpath)
25254      input_path=`$CYGPATH -u "$shortmode_path"`
25255      new_path="$input_path"
25256    fi
25257  fi
25258
25259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25260  if test "x$test_cygdrive_prefix" = x; then
25261    # As a simple fix, exclude /usr/bin since it's not a real path.
25262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25264      # a path prefixed by /cygdrive for fixpath to work.
25265      new_path="$CYGWIN_ROOT_PATH$input_path"
25266    fi
25267  fi
25268
25269
25270  if test "x$path" != "x$new_path"; then
25271    BOOT_JDK="$new_path"
25272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25274  fi
25275
25276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277
25278  path="$BOOT_JDK"
25279  has_colon=`$ECHO $path | $GREP ^.:`
25280  new_path="$path"
25281  if test "x$has_colon" = x; then
25282    # Not in mixed or Windows style, start by that.
25283    new_path=`cmd //c echo $path`
25284  fi
25285
25286
25287  input_path="$new_path"
25288  # Check if we need to convert this using DOS-style short mode. If the path
25289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25290  # take no chances and rewrite it.
25291  # Note: m4 eats our [], so we need to use [ and ] instead.
25292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25293  if test "x$has_forbidden_chars" != x; then
25294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25296  fi
25297
25298
25299  windows_path="$new_path"
25300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25301    unix_path=`$CYGPATH -u "$windows_path"`
25302    new_path="$unix_path"
25303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25305    new_path="$unix_path"
25306  fi
25307
25308  if test "x$path" != "x$new_path"; then
25309    BOOT_JDK="$new_path"
25310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25312  fi
25313
25314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25316
25317    else
25318      # We're on a unix platform. Hooray! :)
25319      path="$BOOT_JDK"
25320      has_space=`$ECHO "$path" | $GREP " "`
25321      if test "x$has_space" != x; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25325      fi
25326
25327      # Use eval to expand a potential ~
25328      eval path="$path"
25329      if test ! -f "$path" && test ! -d "$path"; then
25330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25331      fi
25332
25333      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25334    fi
25335  fi
25336
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25338$as_echo_n "checking for Boot JDK... " >&6; }
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25340$as_echo "$BOOT_JDK" >&6; }
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25342$as_echo_n "checking Boot JDK version... " >&6; }
25343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25345$as_echo "$BOOT_JDK_VERSION" >&6; }
25346          fi # end check jdk version
25347        fi # end check javac
25348      fi # end check java
25349    fi # end check boot jdk found
25350  fi
25351
25352    done
25353  fi
25354
25355
25356    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25357    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25358      # Do we have a bin/java?
25359      if test ! -x "$BOOT_JDK/bin/java"; then
25360        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25362        BOOT_JDK_FOUND=no
25363      else
25364        # Do we have a bin/javac?
25365        if test ! -x "$BOOT_JDK/bin/javac"; then
25366          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25368          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25369$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25370          BOOT_JDK_FOUND=no
25371        else
25372          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25373          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25374
25375          # Extra M4 quote needed to protect [] in grep expression.
25376          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25377          if test "x$FOUND_CORRECT_VERSION" = x; then
25378            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25380            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25381$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25382            BOOT_JDK_FOUND=no
25383          else
25384            # We're done! :-)
25385            BOOT_JDK_FOUND=yes
25386
25387  # Only process if variable expands to non-empty
25388
25389  if test "x$BOOT_JDK" != x; then
25390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25391
25392  # Input might be given as Windows format, start by converting to
25393  # unix format.
25394  path="$BOOT_JDK"
25395  new_path=`$CYGPATH -u "$path"`
25396
25397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25400  # "foo.exe" is OK but "foo" is an error.
25401  #
25402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25403  # It is also a way to make sure we got the proper file name for the real test later on.
25404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25405  if test "x$test_shortpath" = x; then
25406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25408    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25409  fi
25410
25411  # Call helper function which possibly converts this using DOS-style short mode.
25412  # If so, the updated path is stored in $new_path.
25413
25414  input_path="$new_path"
25415  # Check if we need to convert this using DOS-style short mode. If the path
25416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25417  # take no chances and rewrite it.
25418  # Note: m4 eats our [], so we need to use [ and ] instead.
25419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25420  if test "x$has_forbidden_chars" != x; then
25421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25425      # Going to short mode and back again did indeed matter. Since short mode is
25426      # case insensitive, let's make it lowercase to improve readability.
25427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25428      # Now convert it back to Unix-style (cygpath)
25429      input_path=`$CYGPATH -u "$shortmode_path"`
25430      new_path="$input_path"
25431    fi
25432  fi
25433
25434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25435  if test "x$test_cygdrive_prefix" = x; then
25436    # As a simple fix, exclude /usr/bin since it's not a real path.
25437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25439      # a path prefixed by /cygdrive for fixpath to work.
25440      new_path="$CYGWIN_ROOT_PATH$input_path"
25441    fi
25442  fi
25443
25444
25445  if test "x$path" != "x$new_path"; then
25446    BOOT_JDK="$new_path"
25447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25449  fi
25450
25451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25452
25453  path="$BOOT_JDK"
25454  has_colon=`$ECHO $path | $GREP ^.:`
25455  new_path="$path"
25456  if test "x$has_colon" = x; then
25457    # Not in mixed or Windows style, start by that.
25458    new_path=`cmd //c echo $path`
25459  fi
25460
25461
25462  input_path="$new_path"
25463  # Check if we need to convert this using DOS-style short mode. If the path
25464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25465  # take no chances and rewrite it.
25466  # Note: m4 eats our [], so we need to use [ and ] instead.
25467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25468  if test "x$has_forbidden_chars" != x; then
25469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25471  fi
25472
25473
25474  windows_path="$new_path"
25475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25476    unix_path=`$CYGPATH -u "$windows_path"`
25477    new_path="$unix_path"
25478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25480    new_path="$unix_path"
25481  fi
25482
25483  if test "x$path" != "x$new_path"; then
25484    BOOT_JDK="$new_path"
25485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25487  fi
25488
25489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25491
25492    else
25493      # We're on a unix platform. Hooray! :)
25494      path="$BOOT_JDK"
25495      has_space=`$ECHO "$path" | $GREP " "`
25496      if test "x$has_space" != x; then
25497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25500      fi
25501
25502      # Use eval to expand a potential ~
25503      eval path="$path"
25504      if test ! -f "$path" && test ! -d "$path"; then
25505        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25506      fi
25507
25508      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25509    fi
25510  fi
25511
25512            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25513$as_echo_n "checking for Boot JDK... " >&6; }
25514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25515$as_echo "$BOOT_JDK" >&6; }
25516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25517$as_echo_n "checking Boot JDK version... " >&6; }
25518            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25520$as_echo "$BOOT_JDK_VERSION" >&6; }
25521          fi # end check jdk version
25522        fi # end check javac
25523      fi # end check java
25524    fi # end check boot jdk found
25525  fi
25526
25527  fi
25528
25529
25530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25532      # Do we have a bin/java?
25533      if test ! -x "$BOOT_JDK/bin/java"; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25536        BOOT_JDK_FOUND=no
25537      else
25538        # Do we have a bin/javac?
25539        if test ! -x "$BOOT_JDK/bin/javac"; then
25540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25544          BOOT_JDK_FOUND=no
25545        else
25546          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25547          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25548
25549          # Extra M4 quote needed to protect [] in grep expression.
25550          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25551          if test "x$FOUND_CORRECT_VERSION" = x; then
25552            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25554            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25555$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25556            BOOT_JDK_FOUND=no
25557          else
25558            # We're done! :-)
25559            BOOT_JDK_FOUND=yes
25560
25561  # Only process if variable expands to non-empty
25562
25563  if test "x$BOOT_JDK" != x; then
25564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25565
25566  # Input might be given as Windows format, start by converting to
25567  # unix format.
25568  path="$BOOT_JDK"
25569  new_path=`$CYGPATH -u "$path"`
25570
25571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25574  # "foo.exe" is OK but "foo" is an error.
25575  #
25576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25577  # It is also a way to make sure we got the proper file name for the real test later on.
25578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25579  if test "x$test_shortpath" = x; then
25580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25582    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25583  fi
25584
25585  # Call helper function which possibly converts this using DOS-style short mode.
25586  # If so, the updated path is stored in $new_path.
25587
25588  input_path="$new_path"
25589  # Check if we need to convert this using DOS-style short mode. If the path
25590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25591  # take no chances and rewrite it.
25592  # Note: m4 eats our [], so we need to use [ and ] instead.
25593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25594  if test "x$has_forbidden_chars" != x; then
25595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25599      # Going to short mode and back again did indeed matter. Since short mode is
25600      # case insensitive, let's make it lowercase to improve readability.
25601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25602      # Now convert it back to Unix-style (cygpath)
25603      input_path=`$CYGPATH -u "$shortmode_path"`
25604      new_path="$input_path"
25605    fi
25606  fi
25607
25608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25609  if test "x$test_cygdrive_prefix" = x; then
25610    # As a simple fix, exclude /usr/bin since it's not a real path.
25611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25613      # a path prefixed by /cygdrive for fixpath to work.
25614      new_path="$CYGWIN_ROOT_PATH$input_path"
25615    fi
25616  fi
25617
25618
25619  if test "x$path" != "x$new_path"; then
25620    BOOT_JDK="$new_path"
25621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25622$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25623  fi
25624
25625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25626
25627  path="$BOOT_JDK"
25628  has_colon=`$ECHO $path | $GREP ^.:`
25629  new_path="$path"
25630  if test "x$has_colon" = x; then
25631    # Not in mixed or Windows style, start by that.
25632    new_path=`cmd //c echo $path`
25633  fi
25634
25635
25636  input_path="$new_path"
25637  # Check if we need to convert this using DOS-style short mode. If the path
25638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25639  # take no chances and rewrite it.
25640  # Note: m4 eats our [], so we need to use [ and ] instead.
25641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25642  if test "x$has_forbidden_chars" != x; then
25643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25645  fi
25646
25647
25648  windows_path="$new_path"
25649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25650    unix_path=`$CYGPATH -u "$windows_path"`
25651    new_path="$unix_path"
25652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25654    new_path="$unix_path"
25655  fi
25656
25657  if test "x$path" != "x$new_path"; then
25658    BOOT_JDK="$new_path"
25659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25660$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25661  fi
25662
25663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25665
25666    else
25667      # We're on a unix platform. Hooray! :)
25668      path="$BOOT_JDK"
25669      has_space=`$ECHO "$path" | $GREP " "`
25670      if test "x$has_space" != x; then
25671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25674      fi
25675
25676      # Use eval to expand a potential ~
25677      eval path="$path"
25678      if test ! -f "$path" && test ! -d "$path"; then
25679        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25680      fi
25681
25682      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25683    fi
25684  fi
25685
25686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25687$as_echo_n "checking for Boot JDK... " >&6; }
25688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25689$as_echo "$BOOT_JDK" >&6; }
25690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25691$as_echo_n "checking Boot JDK version... " >&6; }
25692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25694$as_echo "$BOOT_JDK_VERSION" >&6; }
25695          fi # end check jdk version
25696        fi # end check javac
25697      fi # end check java
25698    fi # end check boot jdk found
25699  fi
25700
25701
25702  # If we haven't found anything yet, we've truly lost. Give up.
25703  if test "x$BOOT_JDK_FOUND" = xno; then
25704
25705  # Print a helpful message on how to acquire the necessary build dependency.
25706  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25707  MISSING_DEPENDENCY=openjdk
25708
25709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25710    cygwin_help $MISSING_DEPENDENCY
25711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25712    msys_help $MISSING_DEPENDENCY
25713  else
25714    PKGHANDLER_COMMAND=
25715
25716    case $PKGHANDLER in
25717      apt-get)
25718        apt_help     $MISSING_DEPENDENCY ;;
25719      yum)
25720        yum_help     $MISSING_DEPENDENCY ;;
25721      port)
25722        port_help    $MISSING_DEPENDENCY ;;
25723      pkgutil)
25724        pkgutil_help $MISSING_DEPENDENCY ;;
25725      pkgadd)
25726        pkgadd_help  $MISSING_DEPENDENCY ;;
25727    esac
25728
25729    if test "x$PKGHANDLER_COMMAND" != x; then
25730      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25731    fi
25732  fi
25733
25734    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25735$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25736    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25737$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25738    as_fn_error $? "Cannot continue" "$LINENO" 5
25739  fi
25740
25741
25742
25743  # Setup tools from the Boot JDK.
25744
25745  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25746
25747  # Publish this variable in the help.
25748
25749
25750  if test "x$JAVA" = x; then
25751    # The variable is not set by user, try to locate tool using the code snippet
25752
25753      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25754$as_echo_n "checking for java in Boot JDK... " >&6; }
25755      JAVA=$BOOT_JDK/bin/java
25756      if test ! -x $JAVA; then
25757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25758$as_echo "not found" >&6; }
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25760$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25761        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25762      fi
25763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25764$as_echo "ok" >&6; }
25765
25766
25767  else
25768    # The variable is set, but is it from the command line or the environment?
25769
25770    # Try to remove the string !JAVA! from our list.
25771    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25772    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25773      # If it failed, the variable was not from the command line. Ignore it,
25774      # but warn the user (except for BASH, which is always set by the calling BASH).
25775      if test "xJAVA" != xBASH; then
25776        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25777$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25778      fi
25779      # Try to locate tool using the code snippet
25780
25781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25782$as_echo_n "checking for java in Boot JDK... " >&6; }
25783      JAVA=$BOOT_JDK/bin/java
25784      if test ! -x $JAVA; then
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25786$as_echo "not found" >&6; }
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25788$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25789        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25790      fi
25791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25792$as_echo "ok" >&6; }
25793
25794
25795    else
25796      # If it succeeded, then it was overridden by the user. We will use it
25797      # for the tool.
25798
25799      # First remove it from the list of overridden variables, so we can test
25800      # for unknown variables in the end.
25801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25802
25803      # Check if the provided tool contains a complete path.
25804      tool_specified="$JAVA"
25805      tool_basename="${tool_specified##*/}"
25806      if test "x$tool_basename" = "x$tool_specified"; then
25807        # A command without a complete path is provided, search $PATH.
25808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25809$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25810        # Extract the first word of "$tool_basename", so it can be a program name with args.
25811set dummy $tool_basename; ac_word=$2
25812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25813$as_echo_n "checking for $ac_word... " >&6; }
25814if ${ac_cv_path_JAVA+:} false; then :
25815  $as_echo_n "(cached) " >&6
25816else
25817  case $JAVA in
25818  [\\/]* | ?:[\\/]*)
25819  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25820  ;;
25821  *)
25822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25823for as_dir in $PATH
25824do
25825  IFS=$as_save_IFS
25826  test -z "$as_dir" && as_dir=.
25827    for ac_exec_ext in '' $ac_executable_extensions; do
25828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25829    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25831    break 2
25832  fi
25833done
25834  done
25835IFS=$as_save_IFS
25836
25837  ;;
25838esac
25839fi
25840JAVA=$ac_cv_path_JAVA
25841if test -n "$JAVA"; then
25842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25843$as_echo "$JAVA" >&6; }
25844else
25845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25846$as_echo "no" >&6; }
25847fi
25848
25849
25850        if test "x$JAVA" = x; then
25851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25852        fi
25853      else
25854        # Otherwise we believe it is a complete path. Use it as it is.
25855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25856$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25858$as_echo_n "checking for JAVA... " >&6; }
25859        if test ! -x "$tool_specified"; then
25860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25861$as_echo "not found" >&6; }
25862          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25863        fi
25864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25865$as_echo "$tool_specified" >&6; }
25866      fi
25867    fi
25868  fi
25869
25870
25871
25872  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25873
25874  # Publish this variable in the help.
25875
25876
25877  if test "x$JAVAC" = x; then
25878    # The variable is not set by user, try to locate tool using the code snippet
25879
25880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25881$as_echo_n "checking for javac in Boot JDK... " >&6; }
25882      JAVAC=$BOOT_JDK/bin/javac
25883      if test ! -x $JAVAC; then
25884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25885$as_echo "not found" >&6; }
25886        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25887$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25888        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25889      fi
25890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25891$as_echo "ok" >&6; }
25892
25893
25894  else
25895    # The variable is set, but is it from the command line or the environment?
25896
25897    # Try to remove the string !JAVAC! from our list.
25898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25900      # If it failed, the variable was not from the command line. Ignore it,
25901      # but warn the user (except for BASH, which is always set by the calling BASH).
25902      if test "xJAVAC" != xBASH; then
25903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25904$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25905      fi
25906      # Try to locate tool using the code snippet
25907
25908      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25909$as_echo_n "checking for javac in Boot JDK... " >&6; }
25910      JAVAC=$BOOT_JDK/bin/javac
25911      if test ! -x $JAVAC; then
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25913$as_echo "not found" >&6; }
25914        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25915$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25916        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25917      fi
25918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25919$as_echo "ok" >&6; }
25920
25921
25922    else
25923      # If it succeeded, then it was overridden by the user. We will use it
25924      # for the tool.
25925
25926      # First remove it from the list of overridden variables, so we can test
25927      # for unknown variables in the end.
25928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25929
25930      # Check if the provided tool contains a complete path.
25931      tool_specified="$JAVAC"
25932      tool_basename="${tool_specified##*/}"
25933      if test "x$tool_basename" = "x$tool_specified"; then
25934        # A command without a complete path is provided, search $PATH.
25935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25936$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25937        # Extract the first word of "$tool_basename", so it can be a program name with args.
25938set dummy $tool_basename; ac_word=$2
25939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25940$as_echo_n "checking for $ac_word... " >&6; }
25941if ${ac_cv_path_JAVAC+:} false; then :
25942  $as_echo_n "(cached) " >&6
25943else
25944  case $JAVAC in
25945  [\\/]* | ?:[\\/]*)
25946  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25947  ;;
25948  *)
25949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25950for as_dir in $PATH
25951do
25952  IFS=$as_save_IFS
25953  test -z "$as_dir" && as_dir=.
25954    for ac_exec_ext in '' $ac_executable_extensions; do
25955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25956    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25958    break 2
25959  fi
25960done
25961  done
25962IFS=$as_save_IFS
25963
25964  ;;
25965esac
25966fi
25967JAVAC=$ac_cv_path_JAVAC
25968if test -n "$JAVAC"; then
25969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25970$as_echo "$JAVAC" >&6; }
25971else
25972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25973$as_echo "no" >&6; }
25974fi
25975
25976
25977        if test "x$JAVAC" = x; then
25978          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25979        fi
25980      else
25981        # Otherwise we believe it is a complete path. Use it as it is.
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25983$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25985$as_echo_n "checking for JAVAC... " >&6; }
25986        if test ! -x "$tool_specified"; then
25987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25988$as_echo "not found" >&6; }
25989          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25990        fi
25991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25992$as_echo "$tool_specified" >&6; }
25993      fi
25994    fi
25995  fi
25996
25997
25998
25999  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26000
26001  # Publish this variable in the help.
26002
26003
26004  if test "x$JAVAH" = x; then
26005    # The variable is not set by user, try to locate tool using the code snippet
26006
26007      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26008$as_echo_n "checking for javah in Boot JDK... " >&6; }
26009      JAVAH=$BOOT_JDK/bin/javah
26010      if test ! -x $JAVAH; then
26011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26012$as_echo "not found" >&6; }
26013        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26014$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26015        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26016      fi
26017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26018$as_echo "ok" >&6; }
26019
26020
26021  else
26022    # The variable is set, but is it from the command line or the environment?
26023
26024    # Try to remove the string !JAVAH! from our list.
26025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26027      # If it failed, the variable was not from the command line. Ignore it,
26028      # but warn the user (except for BASH, which is always set by the calling BASH).
26029      if test "xJAVAH" != xBASH; then
26030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26031$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26032      fi
26033      # Try to locate tool using the code snippet
26034
26035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26036$as_echo_n "checking for javah in Boot JDK... " >&6; }
26037      JAVAH=$BOOT_JDK/bin/javah
26038      if test ! -x $JAVAH; then
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26040$as_echo "not found" >&6; }
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26042$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26043        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26044      fi
26045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26046$as_echo "ok" >&6; }
26047
26048
26049    else
26050      # If it succeeded, then it was overridden by the user. We will use it
26051      # for the tool.
26052
26053      # First remove it from the list of overridden variables, so we can test
26054      # for unknown variables in the end.
26055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26056
26057      # Check if the provided tool contains a complete path.
26058      tool_specified="$JAVAH"
26059      tool_basename="${tool_specified##*/}"
26060      if test "x$tool_basename" = "x$tool_specified"; then
26061        # A command without a complete path is provided, search $PATH.
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26063$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26064        # Extract the first word of "$tool_basename", so it can be a program name with args.
26065set dummy $tool_basename; ac_word=$2
26066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26067$as_echo_n "checking for $ac_word... " >&6; }
26068if ${ac_cv_path_JAVAH+:} false; then :
26069  $as_echo_n "(cached) " >&6
26070else
26071  case $JAVAH in
26072  [\\/]* | ?:[\\/]*)
26073  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26074  ;;
26075  *)
26076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26077for as_dir in $PATH
26078do
26079  IFS=$as_save_IFS
26080  test -z "$as_dir" && as_dir=.
26081    for ac_exec_ext in '' $ac_executable_extensions; do
26082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26083    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26085    break 2
26086  fi
26087done
26088  done
26089IFS=$as_save_IFS
26090
26091  ;;
26092esac
26093fi
26094JAVAH=$ac_cv_path_JAVAH
26095if test -n "$JAVAH"; then
26096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26097$as_echo "$JAVAH" >&6; }
26098else
26099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26100$as_echo "no" >&6; }
26101fi
26102
26103
26104        if test "x$JAVAH" = x; then
26105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26106        fi
26107      else
26108        # Otherwise we believe it is a complete path. Use it as it is.
26109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26110$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26112$as_echo_n "checking for JAVAH... " >&6; }
26113        if test ! -x "$tool_specified"; then
26114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26115$as_echo "not found" >&6; }
26116          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26117        fi
26118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26119$as_echo "$tool_specified" >&6; }
26120      fi
26121    fi
26122  fi
26123
26124
26125
26126  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26127
26128  # Publish this variable in the help.
26129
26130
26131  if test "x$JAR" = x; then
26132    # The variable is not set by user, try to locate tool using the code snippet
26133
26134      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26135$as_echo_n "checking for jar in Boot JDK... " >&6; }
26136      JAR=$BOOT_JDK/bin/jar
26137      if test ! -x $JAR; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26139$as_echo "not found" >&6; }
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26141$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26142        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26143      fi
26144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26145$as_echo "ok" >&6; }
26146
26147
26148  else
26149    # The variable is set, but is it from the command line or the environment?
26150
26151    # Try to remove the string !JAR! from our list.
26152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26154      # If it failed, the variable was not from the command line. Ignore it,
26155      # but warn the user (except for BASH, which is always set by the calling BASH).
26156      if test "xJAR" != xBASH; then
26157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26158$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26159      fi
26160      # Try to locate tool using the code snippet
26161
26162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26163$as_echo_n "checking for jar in Boot JDK... " >&6; }
26164      JAR=$BOOT_JDK/bin/jar
26165      if test ! -x $JAR; then
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26167$as_echo "not found" >&6; }
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26169$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26170        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26171      fi
26172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26173$as_echo "ok" >&6; }
26174
26175
26176    else
26177      # If it succeeded, then it was overridden by the user. We will use it
26178      # for the tool.
26179
26180      # First remove it from the list of overridden variables, so we can test
26181      # for unknown variables in the end.
26182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26183
26184      # Check if the provided tool contains a complete path.
26185      tool_specified="$JAR"
26186      tool_basename="${tool_specified##*/}"
26187      if test "x$tool_basename" = "x$tool_specified"; then
26188        # A command without a complete path is provided, search $PATH.
26189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26190$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26191        # Extract the first word of "$tool_basename", so it can be a program name with args.
26192set dummy $tool_basename; ac_word=$2
26193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26194$as_echo_n "checking for $ac_word... " >&6; }
26195if ${ac_cv_path_JAR+:} false; then :
26196  $as_echo_n "(cached) " >&6
26197else
26198  case $JAR in
26199  [\\/]* | ?:[\\/]*)
26200  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26201  ;;
26202  *)
26203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26204for as_dir in $PATH
26205do
26206  IFS=$as_save_IFS
26207  test -z "$as_dir" && as_dir=.
26208    for ac_exec_ext in '' $ac_executable_extensions; do
26209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26210    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26212    break 2
26213  fi
26214done
26215  done
26216IFS=$as_save_IFS
26217
26218  ;;
26219esac
26220fi
26221JAR=$ac_cv_path_JAR
26222if test -n "$JAR"; then
26223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26224$as_echo "$JAR" >&6; }
26225else
26226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26227$as_echo "no" >&6; }
26228fi
26229
26230
26231        if test "x$JAR" = x; then
26232          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26233        fi
26234      else
26235        # Otherwise we believe it is a complete path. Use it as it is.
26236        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26237$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26239$as_echo_n "checking for JAR... " >&6; }
26240        if test ! -x "$tool_specified"; then
26241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26242$as_echo "not found" >&6; }
26243          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26244        fi
26245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26246$as_echo "$tool_specified" >&6; }
26247      fi
26248    fi
26249  fi
26250
26251
26252
26253  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26254
26255  # Publish this variable in the help.
26256
26257
26258  if test "x$JARSIGNER" = x; then
26259    # The variable is not set by user, try to locate tool using the code snippet
26260
26261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26262$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26263      JARSIGNER=$BOOT_JDK/bin/jarsigner
26264      if test ! -x $JARSIGNER; then
26265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26266$as_echo "not found" >&6; }
26267        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26268$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26269        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26270      fi
26271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26272$as_echo "ok" >&6; }
26273
26274
26275  else
26276    # The variable is set, but is it from the command line or the environment?
26277
26278    # Try to remove the string !JARSIGNER! from our list.
26279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26281      # If it failed, the variable was not from the command line. Ignore it,
26282      # but warn the user (except for BASH, which is always set by the calling BASH).
26283      if test "xJARSIGNER" != xBASH; then
26284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26285$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26286      fi
26287      # Try to locate tool using the code snippet
26288
26289      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26290$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26291      JARSIGNER=$BOOT_JDK/bin/jarsigner
26292      if test ! -x $JARSIGNER; then
26293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26294$as_echo "not found" >&6; }
26295        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26296$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26297        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26298      fi
26299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26300$as_echo "ok" >&6; }
26301
26302
26303    else
26304      # If it succeeded, then it was overridden by the user. We will use it
26305      # for the tool.
26306
26307      # First remove it from the list of overridden variables, so we can test
26308      # for unknown variables in the end.
26309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26310
26311      # Check if the provided tool contains a complete path.
26312      tool_specified="$JARSIGNER"
26313      tool_basename="${tool_specified##*/}"
26314      if test "x$tool_basename" = "x$tool_specified"; then
26315        # A command without a complete path is provided, search $PATH.
26316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26317$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26318        # Extract the first word of "$tool_basename", so it can be a program name with args.
26319set dummy $tool_basename; ac_word=$2
26320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26321$as_echo_n "checking for $ac_word... " >&6; }
26322if ${ac_cv_path_JARSIGNER+:} false; then :
26323  $as_echo_n "(cached) " >&6
26324else
26325  case $JARSIGNER in
26326  [\\/]* | ?:[\\/]*)
26327  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26328  ;;
26329  *)
26330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26331for as_dir in $PATH
26332do
26333  IFS=$as_save_IFS
26334  test -z "$as_dir" && as_dir=.
26335    for ac_exec_ext in '' $ac_executable_extensions; do
26336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26337    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26339    break 2
26340  fi
26341done
26342  done
26343IFS=$as_save_IFS
26344
26345  ;;
26346esac
26347fi
26348JARSIGNER=$ac_cv_path_JARSIGNER
26349if test -n "$JARSIGNER"; then
26350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26351$as_echo "$JARSIGNER" >&6; }
26352else
26353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26354$as_echo "no" >&6; }
26355fi
26356
26357
26358        if test "x$JARSIGNER" = x; then
26359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26360        fi
26361      else
26362        # Otherwise we believe it is a complete path. Use it as it is.
26363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26364$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26366$as_echo_n "checking for JARSIGNER... " >&6; }
26367        if test ! -x "$tool_specified"; then
26368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26369$as_echo "not found" >&6; }
26370          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26371        fi
26372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26373$as_echo "$tool_specified" >&6; }
26374      fi
26375    fi
26376  fi
26377
26378
26379
26380  # Finally, set some other options...
26381
26382  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26383  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26384
26385
26386
26387
26388###############################################################################
26389#
26390# Configure the sources to use. We can add or override individual directories.
26391#
26392###############################################################################
26393
26394
26395  # Where are the sources. Any of these can be overridden
26396  # using --with-override-corba and the likes.
26397  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26398  CORBA_TOPDIR="$SRC_ROOT/corba"
26399  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26400  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26401  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26402  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26403  JDK_TOPDIR="$SRC_ROOT/jdk"
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414  ###############################################################################
26415  #
26416  # Pickup additional source for a component from outside of the source root
26417  # or override source for a component.
26418  #
26419
26420# Check whether --with-add-source-root was given.
26421if test "${with_add_source_root+set}" = set; then :
26422  withval=$with_add_source_root;
26423fi
26424
26425
26426
26427# Check whether --with-override-source-root was given.
26428if test "${with_override_source_root+set}" = set; then :
26429  withval=$with_override_source_root;
26430fi
26431
26432
26433
26434# Check whether --with-adds-and-overrides was given.
26435if test "${with_adds_and_overrides+set}" = set; then :
26436  withval=$with_adds_and_overrides;
26437fi
26438
26439
26440  if test "x$with_adds_and_overrides" != x; then
26441    with_add_source_root="$with_adds_and_overrides/adds"
26442    with_override_source_root="$with_adds_and_overrides/overrides"
26443  fi
26444
26445  if test "x$with_add_source_root" != x; then
26446    if ! test -d $with_add_source_root; then
26447      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26448    fi
26449    CURDIR="$PWD"
26450    cd "$with_add_source_root"
26451    ADD_SRC_ROOT="`pwd`"
26452    cd "$CURDIR"
26453    # Verify that the addon source root does not have any root makefiles.
26454    # If it does, then it is usually an error, prevent this.
26455    if test -f $with_add_source_root/langtools/make/Makefile; then
26456      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26457    fi
26458    if test -f $with_add_source_root/corba/make/Makefile; then
26459      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26460    fi
26461    if test -f $with_add_source_root/jaxp/make/Makefile; then
26462      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26463    fi
26464    if test -f $with_add_source_root/jaxws/make/Makefile; then
26465      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26466    fi
26467    if test -f $with_add_source_root/hotspot/make/Makefile; then
26468      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26469    fi
26470    if test -f $with_add_source_root/nashorn/make/Makefile; then
26471      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26472    fi
26473    if test -f $with_add_source_root/jdk/make/Makefile; then
26474      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26475    fi
26476  fi
26477
26478
26479  if test "x$with_override_source_root" != x; then
26480    if ! test -d $with_override_source_root; then
26481      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26482    fi
26483    CURDIR="$PWD"
26484    cd "$with_override_source_root"
26485    OVERRIDE_SRC_ROOT="`pwd`"
26486    cd "$CURDIR"
26487    if test -f $with_override_source_root/langtools/make/Makefile; then
26488      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26489    fi
26490    if test -f $with_override_source_root/corba/make/Makefile; then
26491      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26492    fi
26493    if test -f $with_override_source_root/jaxp/make/Makefile; then
26494      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26495    fi
26496    if test -f $with_override_source_root/jaxws/make/Makefile; then
26497      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26498    fi
26499    if test -f $with_override_source_root/hotspot/make/Makefile; then
26500      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26501    fi
26502    if test -f $with_override_source_root/nashorn/make/Makefile; then
26503      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26504    fi
26505    if test -f $with_override_source_root/jdk/make/Makefile; then
26506      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26507    fi
26508  fi
26509
26510
26511  ###############################################################################
26512  #
26513  # Override a repo completely, this is used for example when you have 3 small
26514  # development sandboxes of the langtools sources and want to avoid having 3 full
26515  # OpenJDK sources checked out on disk.
26516  #
26517  # Assuming that the 3 langtools sandboxes are located here:
26518  # /home/fredrik/sandbox1/langtools
26519  # /home/fredrik/sandbox2/langtools
26520  # /home/fredrik/sandbox3/langtools
26521  #
26522  # From the source root you create build subdirs manually:
26523  #     mkdir -p build1 build2 build3
26524  # in each build directory run:
26525  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26526  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26527  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26528  #
26529
26530
26531# Check whether --with-override-langtools was given.
26532if test "${with_override_langtools+set}" = set; then :
26533  withval=$with_override_langtools;
26534fi
26535
26536
26537
26538# Check whether --with-override-corba was given.
26539if test "${with_override_corba+set}" = set; then :
26540  withval=$with_override_corba;
26541fi
26542
26543
26544
26545# Check whether --with-override-jaxp was given.
26546if test "${with_override_jaxp+set}" = set; then :
26547  withval=$with_override_jaxp;
26548fi
26549
26550
26551
26552# Check whether --with-override-jaxws was given.
26553if test "${with_override_jaxws+set}" = set; then :
26554  withval=$with_override_jaxws;
26555fi
26556
26557
26558
26559# Check whether --with-override-hotspot was given.
26560if test "${with_override_hotspot+set}" = set; then :
26561  withval=$with_override_hotspot;
26562fi
26563
26564
26565
26566# Check whether --with-override-nashorn was given.
26567if test "${with_override_nashorn+set}" = set; then :
26568  withval=$with_override_nashorn;
26569fi
26570
26571
26572
26573# Check whether --with-override-jdk was given.
26574if test "${with_override_jdk+set}" = set; then :
26575  withval=$with_override_jdk;
26576fi
26577
26578
26579  if test "x$with_override_langtools" != x; then
26580    CURDIR="$PWD"
26581    cd "$with_override_langtools"
26582    LANGTOOLS_TOPDIR="`pwd`"
26583    cd "$CURDIR"
26584    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26585      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26586    fi
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26588$as_echo_n "checking if langtools should be overridden... " >&6; }
26589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26590$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26591  fi
26592  if test "x$with_override_corba" != x; then
26593    CURDIR="$PWD"
26594    cd "$with_override_corba"
26595    CORBA_TOPDIR="`pwd`"
26596    cd "$CURDIR"
26597    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26598      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26599    fi
26600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26601$as_echo_n "checking if corba should be overridden... " >&6; }
26602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26603$as_echo "yes with $CORBA_TOPDIR" >&6; }
26604  fi
26605  if test "x$with_override_jaxp" != x; then
26606    CURDIR="$PWD"
26607    cd "$with_override_jaxp"
26608    JAXP_TOPDIR="`pwd`"
26609    cd "$CURDIR"
26610    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26611      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26612    fi
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26614$as_echo_n "checking if jaxp should be overridden... " >&6; }
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26616$as_echo "yes with $JAXP_TOPDIR" >&6; }
26617  fi
26618  if test "x$with_override_jaxws" != x; then
26619    CURDIR="$PWD"
26620    cd "$with_override_jaxws"
26621    JAXWS_TOPDIR="`pwd`"
26622    cd "$CURDIR"
26623    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26624      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26625    fi
26626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26627$as_echo_n "checking if jaxws should be overridden... " >&6; }
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26629$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26630  fi
26631  if test "x$with_override_hotspot" != x; then
26632    CURDIR="$PWD"
26633    cd "$with_override_hotspot"
26634    HOTSPOT_TOPDIR="`pwd`"
26635    cd "$CURDIR"
26636    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26637      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26638    fi
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26640$as_echo_n "checking if hotspot should be overridden... " >&6; }
26641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26642$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26643  fi
26644  if test "x$with_override_nashorn" != x; then
26645    CURDIR="$PWD"
26646    cd "$with_override_nashorn"
26647    NASHORN_TOPDIR="`pwd`"
26648    cd "$CURDIR"
26649    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26650      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26651    fi
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26653$as_echo_n "checking if nashorn should be overridden... " >&6; }
26654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26655$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26656  fi
26657  if test "x$with_override_jdk" != x; then
26658    CURDIR="$PWD"
26659    cd "$with_override_jdk"
26660    JDK_TOPDIR="`pwd`"
26661    cd "$CURDIR"
26662    if ! test -f $JDK_TOPDIR/make/Makefile; then
26663      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26664    fi
26665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26666$as_echo_n "checking if JDK should be overridden... " >&6; }
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26668$as_echo "yes with $JDK_TOPDIR" >&6; }
26669  fi
26670
26671
26672  BUILD_OUTPUT="$OUTPUT_ROOT"
26673
26674
26675  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26676  BUILD_HOTSPOT=true
26677
26678
26679
26680# Check whether --with-import-hotspot was given.
26681if test "${with_import_hotspot+set}" = set; then :
26682  withval=$with_import_hotspot;
26683fi
26684
26685  if test "x$with_import_hotspot" != x; then
26686    CURDIR="$PWD"
26687    cd "$with_import_hotspot"
26688    HOTSPOT_DIST="`pwd`"
26689    cd "$CURDIR"
26690    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26691      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26692    fi
26693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26694$as_echo_n "checking if hotspot should be imported... " >&6; }
26695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26696$as_echo "yes from $HOTSPOT_DIST" >&6; }
26697    BUILD_HOTSPOT=false
26698  fi
26699
26700  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26701
26702
26703###############################################################################
26704#
26705# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26706# native code.
26707#
26708###############################################################################
26709
26710# First determine the toolchain type (compiler family)
26711
26712
26713# Check whether --with-toolchain-type was given.
26714if test "${with_toolchain_type+set}" = set; then :
26715  withval=$with_toolchain_type;
26716fi
26717
26718
26719  # Use indirect variable referencing
26720  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26721  VALID_TOOLCHAINS=${!toolchain_var_name}
26722
26723  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26724    if test -n "$XCODEBUILD"; then
26725      # On Mac OS X, default toolchain to clang after Xcode 5
26726      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26727      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26728      if test $? -ne 0; then
26729        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26730      fi
26731      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26732          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26733          $CUT -f 1 -d .`
26734      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26735$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26736      if test $XCODE_MAJOR_VERSION -ge 5; then
26737          DEFAULT_TOOLCHAIN="clang"
26738      else
26739          DEFAULT_TOOLCHAIN="gcc"
26740      fi
26741    else
26742      # If Xcode is not installed, but the command line tools are
26743      # then we can't run xcodebuild. On these systems we should
26744      # default to clang
26745      DEFAULT_TOOLCHAIN="clang"
26746    fi
26747  else
26748    # First toolchain type in the list is the default
26749    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26750  fi
26751
26752  if test "x$with_toolchain_type" = xlist; then
26753    # List all toolchains
26754    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26755$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26756    for toolchain in $VALID_TOOLCHAINS; do
26757      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26758      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26759      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26760    done
26761
26762    exit 0
26763  elif test "x$with_toolchain_type" != x; then
26764    # User override; check that it is valid
26765    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26766      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26767$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26768      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26769$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26770      as_fn_error $? "Cannot continue." "$LINENO" 5
26771    fi
26772    TOOLCHAIN_TYPE=$with_toolchain_type
26773  else
26774    # No flag given, use default
26775    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26776  fi
26777
26778
26779  TOOLCHAIN_CC_BINARY_clang="clang"
26780  TOOLCHAIN_CC_BINARY_gcc="gcc"
26781  TOOLCHAIN_CC_BINARY_microsoft="cl"
26782  TOOLCHAIN_CC_BINARY_solstudio="cc"
26783  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26784
26785  TOOLCHAIN_CXX_BINARY_clang="clang++"
26786  TOOLCHAIN_CXX_BINARY_gcc="g++"
26787  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26788  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26789  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26790
26791  # Use indirect variable referencing
26792  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26793  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26794  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26795  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26796  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26797  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26798
26799
26800  # Define filename patterns
26801  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26802    LIBRARY_PREFIX=
26803    SHARED_LIBRARY_SUFFIX='.dll'
26804    STATIC_LIBRARY_SUFFIX='.lib'
26805    SHARED_LIBRARY='$1.dll'
26806    STATIC_LIBRARY='$1.lib'
26807    OBJ_SUFFIX='.obj'
26808    EXE_SUFFIX='.exe'
26809  else
26810    LIBRARY_PREFIX=lib
26811    SHARED_LIBRARY_SUFFIX='.so'
26812    STATIC_LIBRARY_SUFFIX='.a'
26813    SHARED_LIBRARY='lib$1.so'
26814    STATIC_LIBRARY='lib$1.a'
26815    OBJ_SUFFIX='.o'
26816    EXE_SUFFIX=''
26817    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26818      SHARED_LIBRARY='lib$1.dylib'
26819      SHARED_LIBRARY_SUFFIX='.dylib'
26820    fi
26821  fi
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26833    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26834$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26835  else
26836    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26837$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26838  fi
26839
26840
26841# User supplied flags should be used when configure detects compilers
26842
26843  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
26844    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
26845$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
26846  fi
26847
26848  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
26849    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
26850$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
26851  fi
26852
26853  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
26854    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
26855$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
26856  fi
26857
26858
26859# Check whether --with-extra-cflags was given.
26860if test "${with_extra_cflags+set}" = set; then :
26861  withval=$with_extra_cflags;
26862fi
26863
26864
26865
26866# Check whether --with-extra-cxxflags was given.
26867if test "${with_extra_cxxflags+set}" = set; then :
26868  withval=$with_extra_cxxflags;
26869fi
26870
26871
26872
26873# Check whether --with-extra-ldflags was given.
26874if test "${with_extra_ldflags+set}" = set; then :
26875  withval=$with_extra_ldflags;
26876fi
26877
26878
26879  EXTRA_CFLAGS="$with_extra_cflags"
26880  EXTRA_CXXFLAGS="$with_extra_cxxflags"
26881  EXTRA_LDFLAGS="$with_extra_ldflags"
26882
26883  # Hotspot needs these set in their legacy form
26884  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
26885  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
26886  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
26887
26888
26889
26890
26891
26892  # The global CFLAGS and LDLAGS variables are used by configure tests and
26893  # should include the extra parameters
26894  CFLAGS="$EXTRA_CFLAGS"
26895  CXXFLAGS="$EXTRA_CXXFLAGS"
26896  LDFLAGS="$EXTRA_LDFLAGS"
26897  CPPFLAGS=""
26898
26899# The sysroot cflags are needed for configure to be able to run the compilers
26900
26901  if test "x$SYSROOT" != "x"; then
26902    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
26903      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26904        # Solaris Studio does not have a concept of sysroot. Instead we must
26905        # make sure the default include and lib dirs are appended to each
26906        # compile and link command line.
26907        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
26908        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
26909            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
26910            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
26911      fi
26912    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
26913      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
26914      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
26915    elif test "x$TOOLCHAIN_TYPE" = xclang; then
26916      SYSROOT_CFLAGS="-isysroot $SYSROOT"
26917      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
26918    fi
26919    # Propagate the sysroot args to hotspot
26920    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
26921    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
26922    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
26923    # The global CFLAGS and LDFLAGS variables need these for configure to function
26924    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
26925    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
26926    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
26927    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
26928  fi
26929
26930  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26931    # We also need -iframework<path>/System/Library/Frameworks
26932    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
26933    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
26934    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
26935    # set this here so it doesn't have to be peppered throughout the forest
26936    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
26937    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
26938  fi
26939
26940
26941
26942
26943
26944# Then detect the actual binaries needed
26945
26946  # FIXME: Is this needed?
26947  ac_ext=cpp
26948ac_cpp='$CXXCPP $CPPFLAGS'
26949ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26950ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26951ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26952
26953
26954  # Store the CFLAGS etc passed to the configure script.
26955  ORG_CFLAGS="$CFLAGS"
26956  ORG_CXXFLAGS="$CXXFLAGS"
26957
26958  # autoconf magic only relies on PATH, so update it if tools dir is specified
26959  OLD_PATH="$PATH"
26960
26961  # On Windows, we need to detect the visual studio installation first.
26962  # This will change the PATH, but we need to keep that new PATH even
26963  # after toolchain detection is done, since the compiler (on x86) uses
26964  # it for DLL resolution in runtime.
26965  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26966      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26967
26968  # Store path to cygwin link.exe to help excluding it when searching for
26969  # VS linker. This must be done before changing the PATH when looking for VS.
26970  # Extract the first word of "link", so it can be a program name with args.
26971set dummy link; ac_word=$2
26972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26973$as_echo_n "checking for $ac_word... " >&6; }
26974if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26975  $as_echo_n "(cached) " >&6
26976else
26977  case $CYGWIN_LINK in
26978  [\\/]* | ?:[\\/]*)
26979  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26980  ;;
26981  *)
26982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26983for as_dir in $PATH
26984do
26985  IFS=$as_save_IFS
26986  test -z "$as_dir" && as_dir=.
26987    for ac_exec_ext in '' $ac_executable_extensions; do
26988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26989    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26991    break 2
26992  fi
26993done
26994  done
26995IFS=$as_save_IFS
26996
26997  ;;
26998esac
26999fi
27000CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27001if test -n "$CYGWIN_LINK"; then
27002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27003$as_echo "$CYGWIN_LINK" >&6; }
27004else
27005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27006$as_echo "no" >&6; }
27007fi
27008
27009
27010  if test "x$CYGWIN_LINK" != x; then
27011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27012$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27013    "$CYGWIN_LINK" --version > /dev/null
27014    if test $? -eq 0 ; then
27015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27016$as_echo "yes" >&6; }
27017    else
27018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27019$as_echo "no" >&6; }
27020      # This might be the VS linker. Don't exclude it later on.
27021      CYGWIN_LINK=""
27022    fi
27023  fi
27024
27025  # First-hand choice is to locate and run the vsvars bat file.
27026
27027
27028# Check whether --with-toolchain-version was given.
27029if test "${with_toolchain_version+set}" = set; then :
27030  withval=$with_toolchain_version;
27031fi
27032
27033
27034  if test "x$with_toolchain_version" = xlist; then
27035    # List all toolchains
27036    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27037$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27038    for version in $VALID_VS_VERSIONS; do
27039      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27040      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27041    done
27042
27043    exit 0
27044  elif test "x$DEVKIT_VS_VERSION" != x; then
27045    VS_VERSION=$DEVKIT_VS_VERSION
27046    TOOLCHAIN_VERSION=$VS_VERSION
27047    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27048    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27049    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27050    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27051    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27052    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27053
27054    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27055    # can still be exported as INCLUDE for compiler invocations without
27056    # SYSROOT_CFLAGS
27057    OLDIFS="$IFS"
27058    IFS=";"
27059    for i in $DEVKIT_VS_INCLUDE; do
27060      ipath=$i
27061
27062  unix_path="$ipath"
27063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27064    windows_path=`$CYGPATH -m "$unix_path"`
27065    ipath="$windows_path"
27066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27067    windows_path=`cmd //c echo $unix_path`
27068    ipath="$windows_path"
27069  fi
27070
27071      VS_INCLUDE="$VS_INCLUDE;$ipath"
27072    done
27073    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27074    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27075    for i in $DEVKIT_VS_LIB; do
27076      libpath=$i
27077
27078  unix_path="$libpath"
27079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080    windows_path=`$CYGPATH -m "$unix_path"`
27081    libpath="$windows_path"
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083    windows_path=`cmd //c echo $unix_path`
27084    libpath="$windows_path"
27085  fi
27086
27087      VS_LIB="$VS_LIB;$libpath"
27088    done
27089    IFS="$OLDIFS"
27090
27091    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27092$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27093
27094  elif test "x$with_toolchain_version" != x; then
27095    # User override; check that it is valid
27096    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27097      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27098$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27099      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27100$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27101      as_fn_error $? "Cannot continue." "$LINENO" 5
27102    fi
27103    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27104  else
27105    # No flag given, use default
27106    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27107  fi
27108
27109  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27110
27111  VS_VERSION="$VS_VERSION"
27112  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27113  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27114  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27115  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27116
27117  # When using --with-tools-dir, assume it points to the correct and default
27118  # version of Visual Studio or that --with-toolchain-version was also set.
27119  if test "x$with_tools_dir" != x; then
27120
27121  if test "x$VS_ENV_CMD" = x; then
27122    VS_VERSION="${VS_VERSION}"
27123    VS_BASE="$with_tools_dir/../.."
27124    METHOD="--with-tools-dir"
27125
27126    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27127      VCVARSFILE="vc/bin/vcvars32.bat"
27128    else
27129      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27130    fi
27131
27132
27133  windows_path="$VS_BASE"
27134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27135    unix_path=`$CYGPATH -u "$windows_path"`
27136    VS_BASE="$unix_path"
27137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27139    VS_BASE="$unix_path"
27140  fi
27141
27142    if test -d "$VS_BASE"; then
27143      if test -f "$VS_BASE/$VCVARSFILE"; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27145$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27146        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27147        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27148        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27149        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27150      else
27151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27152$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27153        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27154$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27155      fi
27156    fi
27157  fi
27158
27159
27160  if test "x$VS_ENV_CMD" = x; then
27161    VS_VERSION="${VS_VERSION}"
27162    VS_BASE="$with_tools_dir/../../.."
27163    METHOD="--with-tools-dir"
27164
27165    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27166      VCVARSFILE="vc/bin/vcvars32.bat"
27167    else
27168      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27169    fi
27170
27171
27172  windows_path="$VS_BASE"
27173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27174    unix_path=`$CYGPATH -u "$windows_path"`
27175    VS_BASE="$unix_path"
27176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27178    VS_BASE="$unix_path"
27179  fi
27180
27181    if test -d "$VS_BASE"; then
27182      if test -f "$VS_BASE/$VCVARSFILE"; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27184$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27185        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27186        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27187        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27188        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27189      else
27190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27191$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27192        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27193$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27194      fi
27195    fi
27196  fi
27197
27198    if test "x$VS_ENV_CMD" = x; then
27199      # Having specified an argument which is incorrect will produce an instant failure;
27200      # we should not go on looking
27201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27202$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27203      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27204$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27205      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27206$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27207      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27208    fi
27209  fi
27210
27211  VS_ENV_CMD=""
27212  VS_ENV_ARGS=""
27213
27214  if test "x$VS_COMNTOOLS" != x; then
27215
27216  if test "x$VS_ENV_CMD" = x; then
27217    VS_VERSION="${VS_VERSION}"
27218    VS_BASE="$VS_COMNTOOLS/../.."
27219    METHOD="$VS_COMNTOOLS_VAR variable"
27220
27221    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27222      VCVARSFILE="vc/bin/vcvars32.bat"
27223    else
27224      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27225    fi
27226
27227
27228  windows_path="$VS_BASE"
27229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27230    unix_path=`$CYGPATH -u "$windows_path"`
27231    VS_BASE="$unix_path"
27232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27234    VS_BASE="$unix_path"
27235  fi
27236
27237    if test -d "$VS_BASE"; then
27238      if test -f "$VS_BASE/$VCVARSFILE"; then
27239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27240$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27241        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27242        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27243        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27244        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27245      else
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27247$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27248        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27249$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27250      fi
27251    fi
27252  fi
27253
27254  fi
27255  if test "x$PROGRAMFILES" != x; then
27256
27257  if test "x$VS_ENV_CMD" = x; then
27258    VS_VERSION="${VS_VERSION}"
27259    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27260    METHOD="well-known name"
27261
27262    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27263      VCVARSFILE="vc/bin/vcvars32.bat"
27264    else
27265      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27266    fi
27267
27268
27269  windows_path="$VS_BASE"
27270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27271    unix_path=`$CYGPATH -u "$windows_path"`
27272    VS_BASE="$unix_path"
27273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27275    VS_BASE="$unix_path"
27276  fi
27277
27278    if test -d "$VS_BASE"; then
27279      if test -f "$VS_BASE/$VCVARSFILE"; then
27280        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27281$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27282        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27283        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27284        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27285        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27286      else
27287        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27288$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27289        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27290$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27291      fi
27292    fi
27293  fi
27294
27295  fi
27296  # Work around the insanely named ProgramFiles(x86) env variable
27297  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27298  if test "x$PROGRAMFILES_X86" != x; then
27299
27300  if test "x$VS_ENV_CMD" = x; then
27301    VS_VERSION="${VS_VERSION}"
27302    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27303    METHOD="well-known name"
27304
27305    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27306      VCVARSFILE="vc/bin/vcvars32.bat"
27307    else
27308      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27309    fi
27310
27311
27312  windows_path="$VS_BASE"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    VS_BASE="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    VS_BASE="$unix_path"
27319  fi
27320
27321    if test -d "$VS_BASE"; then
27322      if test -f "$VS_BASE/$VCVARSFILE"; then
27323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27324$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27325        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27326        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27327        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27328        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27329      else
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27331$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27333$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27334      fi
27335    fi
27336  fi
27337
27338  fi
27339
27340  if test "x$VS_ENV_CMD" = x; then
27341    VS_VERSION="${VS_VERSION}"
27342    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27343    METHOD="well-known name"
27344
27345    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27346      VCVARSFILE="vc/bin/vcvars32.bat"
27347    else
27348      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27349    fi
27350
27351
27352  windows_path="$VS_BASE"
27353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27354    unix_path=`$CYGPATH -u "$windows_path"`
27355    VS_BASE="$unix_path"
27356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27358    VS_BASE="$unix_path"
27359  fi
27360
27361    if test -d "$VS_BASE"; then
27362      if test -f "$VS_BASE/$VCVARSFILE"; then
27363        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27364$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27365        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27366        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27367        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27368        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27369      else
27370        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27371$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27372        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27373$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27374      fi
27375    fi
27376  fi
27377
27378
27379  if test "x$VS_ENV_CMD" = x; then
27380    VS_VERSION="${VS_VERSION}"
27381    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27382    METHOD="well-known name"
27383
27384    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27385      VCVARSFILE="vc/bin/vcvars32.bat"
27386    else
27387      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27388    fi
27389
27390
27391  windows_path="$VS_BASE"
27392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27393    unix_path=`$CYGPATH -u "$windows_path"`
27394    VS_BASE="$unix_path"
27395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27397    VS_BASE="$unix_path"
27398  fi
27399
27400    if test -d "$VS_BASE"; then
27401      if test -f "$VS_BASE/$VCVARSFILE"; then
27402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27403$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27404        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27405        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27406        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27407        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27408      else
27409        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27410$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27411        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27412$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27413      fi
27414    fi
27415  fi
27416
27417
27418  if test "x$SDK_INSTALL_DIR" != x; then
27419    if test "x$ProgramW6432" != x; then
27420
27421  if test "x$VS_ENV_CMD" = x; then
27422    VS_VERSION="${VS_VERSION}"
27423    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27424    METHOD="well-known name"
27425
27426  windows_path="$WIN_SDK_BASE"
27427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27428    unix_path=`$CYGPATH -u "$windows_path"`
27429    WIN_SDK_BASE="$unix_path"
27430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27432    WIN_SDK_BASE="$unix_path"
27433  fi
27434
27435    if test -d "$WIN_SDK_BASE"; then
27436      # There have been cases of partial or broken SDK installations. A missing
27437      # lib dir is not going to work.
27438      if test ! -d "$WIN_SDK_BASE/lib"; then
27439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27440$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27441        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27442$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27443      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27444        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27445$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27446        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27447        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27448          VS_ENV_ARGS="/x86"
27449        else
27450          VS_ENV_ARGS="/x64"
27451        fi
27452        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27453        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27454        # TODO: improve detection for other versions of SDK
27455        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27456      else
27457        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27458$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27459        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27460$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27461      fi
27462    fi
27463  fi
27464
27465    fi
27466    if test "x$PROGRAMW6432" != x; then
27467
27468  if test "x$VS_ENV_CMD" = x; then
27469    VS_VERSION="${VS_VERSION}"
27470    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27471    METHOD="well-known name"
27472
27473  windows_path="$WIN_SDK_BASE"
27474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27475    unix_path=`$CYGPATH -u "$windows_path"`
27476    WIN_SDK_BASE="$unix_path"
27477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27479    WIN_SDK_BASE="$unix_path"
27480  fi
27481
27482    if test -d "$WIN_SDK_BASE"; then
27483      # There have been cases of partial or broken SDK installations. A missing
27484      # lib dir is not going to work.
27485      if test ! -d "$WIN_SDK_BASE/lib"; then
27486        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27487$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27488        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27489$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27490      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27491        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27492$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27493        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27494        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27495          VS_ENV_ARGS="/x86"
27496        else
27497          VS_ENV_ARGS="/x64"
27498        fi
27499        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27500        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27501        # TODO: improve detection for other versions of SDK
27502        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27503      else
27504        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27505$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27506        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27507$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27508      fi
27509    fi
27510  fi
27511
27512    fi
27513    if test "x$PROGRAMFILES" != x; then
27514
27515  if test "x$VS_ENV_CMD" = x; then
27516    VS_VERSION="${VS_VERSION}"
27517    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27518    METHOD="well-known name"
27519
27520  windows_path="$WIN_SDK_BASE"
27521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27522    unix_path=`$CYGPATH -u "$windows_path"`
27523    WIN_SDK_BASE="$unix_path"
27524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27526    WIN_SDK_BASE="$unix_path"
27527  fi
27528
27529    if test -d "$WIN_SDK_BASE"; then
27530      # There have been cases of partial or broken SDK installations. A missing
27531      # lib dir is not going to work.
27532      if test ! -d "$WIN_SDK_BASE/lib"; then
27533        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27534$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27535        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27536$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27537      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27539$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27540        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27541        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27542          VS_ENV_ARGS="/x86"
27543        else
27544          VS_ENV_ARGS="/x64"
27545        fi
27546        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27547        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27548        # TODO: improve detection for other versions of SDK
27549        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27550      else
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27552$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27553        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27554$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27555      fi
27556    fi
27557  fi
27558
27559    fi
27560
27561  if test "x$VS_ENV_CMD" = x; then
27562    VS_VERSION="${VS_VERSION}"
27563    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27564    METHOD="well-known name"
27565
27566  windows_path="$WIN_SDK_BASE"
27567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27568    unix_path=`$CYGPATH -u "$windows_path"`
27569    WIN_SDK_BASE="$unix_path"
27570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27572    WIN_SDK_BASE="$unix_path"
27573  fi
27574
27575    if test -d "$WIN_SDK_BASE"; then
27576      # There have been cases of partial or broken SDK installations. A missing
27577      # lib dir is not going to work.
27578      if test ! -d "$WIN_SDK_BASE/lib"; then
27579        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27580$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27581        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27582$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27583      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27584        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27585$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27586        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27587        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27588          VS_ENV_ARGS="/x86"
27589        else
27590          VS_ENV_ARGS="/x64"
27591        fi
27592        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27593        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27594        # TODO: improve detection for other versions of SDK
27595        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27596      else
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27598$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27599        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27600$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27601      fi
27602    fi
27603  fi
27604
27605
27606  if test "x$VS_ENV_CMD" = x; then
27607    VS_VERSION="${VS_VERSION}"
27608    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27609    METHOD="well-known name"
27610
27611  windows_path="$WIN_SDK_BASE"
27612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27613    unix_path=`$CYGPATH -u "$windows_path"`
27614    WIN_SDK_BASE="$unix_path"
27615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27617    WIN_SDK_BASE="$unix_path"
27618  fi
27619
27620    if test -d "$WIN_SDK_BASE"; then
27621      # There have been cases of partial or broken SDK installations. A missing
27622      # lib dir is not going to work.
27623      if test ! -d "$WIN_SDK_BASE/lib"; then
27624        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27625$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27626        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27627$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27628      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27630$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27631        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27632        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27633          VS_ENV_ARGS="/x86"
27634        else
27635          VS_ENV_ARGS="/x64"
27636        fi
27637        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27638        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27639        # TODO: improve detection for other versions of SDK
27640        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27641      else
27642        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27643$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27644        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27645$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27646      fi
27647    fi
27648  fi
27649
27650  fi
27651
27652    if test "x$VS_ENV_CMD" != x; then
27653      TOOLCHAIN_VERSION=$VS_VERSION
27654      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27655      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27656      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27657      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27658      # The rest of the variables are already evaled while probing
27659      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27660$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27661      break
27662    fi
27663  done
27664
27665
27666  # If we have a devkit, skip all of the below.
27667  if test "x$DEVKIT_VS_VERSION" = x; then
27668    if test "x$VS_ENV_CMD" != x; then
27669      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27670
27671  # Only process if variable expands to non-empty
27672
27673  if test "x$VS_ENV_CMD" != x; then
27674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675
27676  # First separate the path from the arguments. This will split at the first
27677  # space.
27678  complete="$VS_ENV_CMD"
27679  path="${complete%% *}"
27680  tmp="$complete EOL"
27681  arguments="${tmp#* }"
27682
27683  # Input might be given as Windows format, start by converting to
27684  # unix format.
27685  new_path=`$CYGPATH -u "$path"`
27686
27687  # Now try to locate executable using which
27688  new_path=`$WHICH "$new_path" 2> /dev/null`
27689  # bat and cmd files are not always considered executable in cygwin causing which
27690  # to not find them
27691  if test "x$new_path" = x \
27692      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27693      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27694    new_path=`$CYGPATH -u "$path"`
27695  fi
27696  if test "x$new_path" = x; then
27697    # Oops. Which didn't find the executable.
27698    # The splitting of arguments from the executable at a space might have been incorrect,
27699    # since paths with space are more likely in Windows. Give it another try with the whole
27700    # argument.
27701    path="$complete"
27702    arguments="EOL"
27703    new_path=`$CYGPATH -u "$path"`
27704    new_path=`$WHICH "$new_path" 2> /dev/null`
27705    # bat and cmd files are not always considered executable in cygwin causing which
27706    # to not find them
27707    if test "x$new_path" = x \
27708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27710      new_path=`$CYGPATH -u "$path"`
27711    fi
27712    if test "x$new_path" = x; then
27713      # It's still not found. Now this is an unrecoverable error.
27714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27715$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27716      has_space=`$ECHO "$complete" | $GREP " "`
27717      if test "x$has_space" != x; then
27718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27720      fi
27721      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27722    fi
27723  fi
27724
27725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27728  # "foo.exe" is OK but "foo" is an error.
27729  #
27730  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27731  # It is also a way to make sure we got the proper file name for the real test later on.
27732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27733  if test "x$test_shortpath" = x; then
27734    # Short path failed, file does not exist as specified.
27735    # Try adding .exe or .cmd
27736    if test -f "${new_path}.exe"; then
27737      input_to_shortpath="${new_path}.exe"
27738    elif test -f "${new_path}.cmd"; then
27739      input_to_shortpath="${new_path}.cmd"
27740    else
27741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27742$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27745      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27746    fi
27747  else
27748    input_to_shortpath="$new_path"
27749  fi
27750
27751  # Call helper function which possibly converts this using DOS-style short mode.
27752  # If so, the updated path is stored in $new_path.
27753  new_path="$input_to_shortpath"
27754
27755  input_path="$input_to_shortpath"
27756  # Check if we need to convert this using DOS-style short mode. If the path
27757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27758  # take no chances and rewrite it.
27759  # Note: m4 eats our [], so we need to use [ and ] instead.
27760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27761  if test "x$has_forbidden_chars" != x; then
27762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27766      # Going to short mode and back again did indeed matter. Since short mode is
27767      # case insensitive, let's make it lowercase to improve readability.
27768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27769      # Now convert it back to Unix-style (cygpath)
27770      input_path=`$CYGPATH -u "$shortmode_path"`
27771      new_path="$input_path"
27772    fi
27773  fi
27774
27775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27776  if test "x$test_cygdrive_prefix" = x; then
27777    # As a simple fix, exclude /usr/bin since it's not a real path.
27778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27780      # a path prefixed by /cygdrive for fixpath to work.
27781      new_path="$CYGWIN_ROOT_PATH$input_path"
27782    fi
27783  fi
27784
27785  # remove trailing .exe if any
27786  new_path="${new_path/%.exe/}"
27787
27788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27789
27790  # First separate the path from the arguments. This will split at the first
27791  # space.
27792  complete="$VS_ENV_CMD"
27793  path="${complete%% *}"
27794  tmp="$complete EOL"
27795  arguments="${tmp#* }"
27796
27797  # Input might be given as Windows format, start by converting to
27798  # unix format.
27799  new_path="$path"
27800
27801  windows_path="$new_path"
27802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27803    unix_path=`$CYGPATH -u "$windows_path"`
27804    new_path="$unix_path"
27805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27807    new_path="$unix_path"
27808  fi
27809
27810
27811  # Now try to locate executable using which
27812  new_path=`$WHICH "$new_path" 2> /dev/null`
27813
27814  if test "x$new_path" = x; then
27815    # Oops. Which didn't find the executable.
27816    # The splitting of arguments from the executable at a space might have been incorrect,
27817    # since paths with space are more likely in Windows. Give it another try with the whole
27818    # argument.
27819    path="$complete"
27820    arguments="EOL"
27821    new_path="$path"
27822
27823  windows_path="$new_path"
27824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27825    unix_path=`$CYGPATH -u "$windows_path"`
27826    new_path="$unix_path"
27827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27829    new_path="$unix_path"
27830  fi
27831
27832
27833    new_path=`$WHICH "$new_path" 2> /dev/null`
27834    # bat and cmd files are not always considered executable in MSYS causing which
27835    # to not find them
27836    if test "x$new_path" = x \
27837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27839      new_path="$path"
27840
27841  windows_path="$new_path"
27842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27843    unix_path=`$CYGPATH -u "$windows_path"`
27844    new_path="$unix_path"
27845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27847    new_path="$unix_path"
27848  fi
27849
27850    fi
27851
27852    if test "x$new_path" = x; then
27853      # It's still not found. Now this is an unrecoverable error.
27854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27855$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27856      has_space=`$ECHO "$complete" | $GREP " "`
27857      if test "x$has_space" != x; then
27858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27860      fi
27861      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27862    fi
27863  fi
27864
27865  # Now new_path has a complete unix path to the binary
27866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27867    # Keep paths in /bin as-is, but remove trailing .exe if any
27868    new_path="${new_path/%.exe/}"
27869    # Do not save /bin paths to all_fixpath_prefixes!
27870  else
27871    # Not in mixed or Windows style, start by that.
27872    new_path=`cmd //c echo $new_path`
27873
27874  input_path="$new_path"
27875  # Check if we need to convert this using DOS-style short mode. If the path
27876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27877  # take no chances and rewrite it.
27878  # Note: m4 eats our [], so we need to use [ and ] instead.
27879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27880  if test "x$has_forbidden_chars" != x; then
27881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27883  fi
27884
27885    # Output is in $new_path
27886
27887  windows_path="$new_path"
27888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27889    unix_path=`$CYGPATH -u "$windows_path"`
27890    new_path="$unix_path"
27891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27893    new_path="$unix_path"
27894  fi
27895
27896    # remove trailing .exe if any
27897    new_path="${new_path/%.exe/}"
27898
27899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27901  fi
27902
27903    else
27904      # We're on a unix platform. Hooray! :)
27905      # First separate the path from the arguments. This will split at the first
27906      # space.
27907      complete="$VS_ENV_CMD"
27908      path="${complete%% *}"
27909      tmp="$complete EOL"
27910      arguments="${tmp#* }"
27911
27912      # Cannot rely on the command "which" here since it doesn't always work.
27913      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27914      if test -z "$is_absolute_path"; then
27915        # Path to executable is not absolute. Find it.
27916        IFS_save="$IFS"
27917        IFS=:
27918        for p in $PATH; do
27919          if test -f "$p/$path" && test -x "$p/$path"; then
27920            new_path="$p/$path"
27921            break
27922          fi
27923        done
27924        IFS="$IFS_save"
27925      else
27926        # This is an absolute path, we can use it without further modifications.
27927        new_path="$path"
27928      fi
27929
27930      if test "x$new_path" = x; then
27931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27932$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27933        has_space=`$ECHO "$complete" | $GREP " "`
27934        if test "x$has_space" != x; then
27935          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27937        fi
27938        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27939      fi
27940    fi
27941
27942    # Now join together the path and the arguments once again
27943    if test "x$arguments" != xEOL; then
27944      new_complete="$new_path ${arguments% *}"
27945    else
27946      new_complete="$new_path"
27947    fi
27948
27949    if test "x$complete" != "x$new_complete"; then
27950      VS_ENV_CMD="$new_complete"
27951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27952$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27953    fi
27954  fi
27955
27956
27957      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27958      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27959$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27960
27961      # We need to create a couple of temporary files.
27962      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27963      $MKDIR -p $VS_ENV_TMP_DIR
27964
27965      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27966      # Instead create a shell script which will set the relevant variables when run.
27967      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27968
27969  unix_path="$WINPATH_VS_ENV_CMD"
27970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27971    windows_path=`$CYGPATH -m "$unix_path"`
27972    WINPATH_VS_ENV_CMD="$windows_path"
27973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27974    windows_path=`cmd //c echo $unix_path`
27975    WINPATH_VS_ENV_CMD="$windows_path"
27976  fi
27977
27978      WINPATH_BASH="$BASH"
27979
27980  unix_path="$WINPATH_BASH"
27981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27982    windows_path=`$CYGPATH -m "$unix_path"`
27983    WINPATH_BASH="$windows_path"
27984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27985    windows_path=`cmd //c echo $unix_path`
27986    WINPATH_BASH="$windows_path"
27987  fi
27988
27989
27990      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27991      # script (executable by bash) that will setup the important variables.
27992      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27993      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27994      # This will end up something like:
27995      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27996      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27997      # These will end up something like:
27998      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27999      # The trailing space for everyone except PATH is no typo, but is needed due
28000      # to trailing \ in the Windows paths. These will be stripped later.
28001      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28002          >> $EXTRACT_VC_ENV_BAT_FILE
28003      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28004          >> $EXTRACT_VC_ENV_BAT_FILE
28005      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28006          >> $EXTRACT_VC_ENV_BAT_FILE
28007      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28008          >> $EXTRACT_VC_ENV_BAT_FILE
28009      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28010          >> $EXTRACT_VC_ENV_BAT_FILE
28011      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28012          >> $EXTRACT_VC_ENV_BAT_FILE
28013
28014      # Now execute the newly created bat file.
28015      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28016      # Change directory so we don't need to mess with Windows paths in redirects.
28017      cd $VS_ENV_TMP_DIR
28018      cmd /c extract-vs-env.bat | $CAT
28019      cd $CURDIR
28020
28021      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28022        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28023$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28024        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28025$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28026        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28027$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28028        as_fn_error $? "Cannot continue" "$LINENO" 5
28029      fi
28030
28031      # Now set all paths and other env variables. This will allow the rest of
28032      # the configure script to find and run the compiler in the proper way.
28033      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28034$as_echo "$as_me: Setting extracted environment variables" >&6;}
28035      . $VS_ENV_TMP_DIR/set-vs-env.sh
28036      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28037      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28038    else
28039      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28040      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28041$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28042    fi
28043  fi
28044
28045  # At this point, we should have correct variables in the environment, or we can't continue.
28046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28047$as_echo_n "checking for Visual Studio variables... " >&6; }
28048
28049  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28050      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28051    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28053$as_echo "present but broken" >&6; }
28054      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28055    else
28056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28057$as_echo "ok" >&6; }
28058      # Remove any trailing "\" ";" and " " from the variables.
28059      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28060      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28061      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28062      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28063      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28064      # Remove any paths containing # (typically F#) as that messes up make. This
28065      # is needed if visual studio was installed with F# support.
28066      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28067
28068
28069
28070
28071
28072      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28073      OLDIFS="$IFS"
28074      IFS=";"
28075      for i in $VS_INCLUDE; do
28076        ipath=$i
28077        # Only process non-empty elements
28078        if test "x$ipath" != x; then
28079          IFS="$OLDIFS"
28080          # Check that directory exists before calling fixup_path
28081          testpath=$ipath
28082
28083  windows_path="$testpath"
28084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28085    unix_path=`$CYGPATH -u "$windows_path"`
28086    testpath="$unix_path"
28087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28089    testpath="$unix_path"
28090  fi
28091
28092          if test -d "$testpath"; then
28093
28094  # Only process if variable expands to non-empty
28095
28096  if test "x$ipath" != x; then
28097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098
28099  # Input might be given as Windows format, start by converting to
28100  # unix format.
28101  path="$ipath"
28102  new_path=`$CYGPATH -u "$path"`
28103
28104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28107  # "foo.exe" is OK but "foo" is an error.
28108  #
28109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28110  # It is also a way to make sure we got the proper file name for the real test later on.
28111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28112  if test "x$test_shortpath" = x; then
28113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28114$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28115    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28116  fi
28117
28118  # Call helper function which possibly converts this using DOS-style short mode.
28119  # If so, the updated path is stored in $new_path.
28120
28121  input_path="$new_path"
28122  # Check if we need to convert this using DOS-style short mode. If the path
28123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28124  # take no chances and rewrite it.
28125  # Note: m4 eats our [], so we need to use [ and ] instead.
28126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28127  if test "x$has_forbidden_chars" != x; then
28128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28132      # Going to short mode and back again did indeed matter. Since short mode is
28133      # case insensitive, let's make it lowercase to improve readability.
28134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28135      # Now convert it back to Unix-style (cygpath)
28136      input_path=`$CYGPATH -u "$shortmode_path"`
28137      new_path="$input_path"
28138    fi
28139  fi
28140
28141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28142  if test "x$test_cygdrive_prefix" = x; then
28143    # As a simple fix, exclude /usr/bin since it's not a real path.
28144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28146      # a path prefixed by /cygdrive for fixpath to work.
28147      new_path="$CYGWIN_ROOT_PATH$input_path"
28148    fi
28149  fi
28150
28151
28152  if test "x$path" != "x$new_path"; then
28153    ipath="$new_path"
28154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28155$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28156  fi
28157
28158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28159
28160  path="$ipath"
28161  has_colon=`$ECHO $path | $GREP ^.:`
28162  new_path="$path"
28163  if test "x$has_colon" = x; then
28164    # Not in mixed or Windows style, start by that.
28165    new_path=`cmd //c echo $path`
28166  fi
28167
28168
28169  input_path="$new_path"
28170  # Check if we need to convert this using DOS-style short mode. If the path
28171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28172  # take no chances and rewrite it.
28173  # Note: m4 eats our [], so we need to use [ and ] instead.
28174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28175  if test "x$has_forbidden_chars" != x; then
28176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28178  fi
28179
28180
28181  windows_path="$new_path"
28182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28183    unix_path=`$CYGPATH -u "$windows_path"`
28184    new_path="$unix_path"
28185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28187    new_path="$unix_path"
28188  fi
28189
28190  if test "x$path" != "x$new_path"; then
28191    ipath="$new_path"
28192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28193$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28194  fi
28195
28196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28198
28199    else
28200      # We're on a unix platform. Hooray! :)
28201      path="$ipath"
28202      has_space=`$ECHO "$path" | $GREP " "`
28203      if test "x$has_space" != x; then
28204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28205$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28207      fi
28208
28209      # Use eval to expand a potential ~
28210      eval path="$path"
28211      if test ! -f "$path" && test ! -d "$path"; then
28212        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28213      fi
28214
28215      ipath="`cd "$path"; $THEPWDCMD -L`"
28216    fi
28217  fi
28218
28219            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28220          fi
28221          IFS=";"
28222        fi
28223      done
28224      # Convert VS_LIB into SYSROOT_LDFLAGS
28225      for i in $VS_LIB; do
28226        libpath=$i
28227        # Only process non-empty elements
28228        if test "x$libpath" != x; then
28229          IFS="$OLDIFS"
28230          # Check that directory exists before calling fixup_path
28231          testpath=$libpath
28232
28233  windows_path="$testpath"
28234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28235    unix_path=`$CYGPATH -u "$windows_path"`
28236    testpath="$unix_path"
28237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28239    testpath="$unix_path"
28240  fi
28241
28242          if test -d "$testpath"; then
28243
28244  # Only process if variable expands to non-empty
28245
28246  if test "x$libpath" != x; then
28247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28248
28249  # Input might be given as Windows format, start by converting to
28250  # unix format.
28251  path="$libpath"
28252  new_path=`$CYGPATH -u "$path"`
28253
28254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28257  # "foo.exe" is OK but "foo" is an error.
28258  #
28259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28260  # It is also a way to make sure we got the proper file name for the real test later on.
28261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28262  if test "x$test_shortpath" = x; then
28263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28264$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28265    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28266  fi
28267
28268  # Call helper function which possibly converts this using DOS-style short mode.
28269  # If so, the updated path is stored in $new_path.
28270
28271  input_path="$new_path"
28272  # Check if we need to convert this using DOS-style short mode. If the path
28273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28274  # take no chances and rewrite it.
28275  # Note: m4 eats our [], so we need to use [ and ] instead.
28276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28277  if test "x$has_forbidden_chars" != x; then
28278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28282      # Going to short mode and back again did indeed matter. Since short mode is
28283      # case insensitive, let's make it lowercase to improve readability.
28284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28285      # Now convert it back to Unix-style (cygpath)
28286      input_path=`$CYGPATH -u "$shortmode_path"`
28287      new_path="$input_path"
28288    fi
28289  fi
28290
28291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28292  if test "x$test_cygdrive_prefix" = x; then
28293    # As a simple fix, exclude /usr/bin since it's not a real path.
28294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28296      # a path prefixed by /cygdrive for fixpath to work.
28297      new_path="$CYGWIN_ROOT_PATH$input_path"
28298    fi
28299  fi
28300
28301
28302  if test "x$path" != "x$new_path"; then
28303    libpath="$new_path"
28304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28305$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28306  fi
28307
28308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28309
28310  path="$libpath"
28311  has_colon=`$ECHO $path | $GREP ^.:`
28312  new_path="$path"
28313  if test "x$has_colon" = x; then
28314    # Not in mixed or Windows style, start by that.
28315    new_path=`cmd //c echo $path`
28316  fi
28317
28318
28319  input_path="$new_path"
28320  # Check if we need to convert this using DOS-style short mode. If the path
28321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28322  # take no chances and rewrite it.
28323  # Note: m4 eats our [], so we need to use [ and ] instead.
28324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28325  if test "x$has_forbidden_chars" != x; then
28326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28328  fi
28329
28330
28331  windows_path="$new_path"
28332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28333    unix_path=`$CYGPATH -u "$windows_path"`
28334    new_path="$unix_path"
28335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28337    new_path="$unix_path"
28338  fi
28339
28340  if test "x$path" != "x$new_path"; then
28341    libpath="$new_path"
28342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28343$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28344  fi
28345
28346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28348
28349    else
28350      # We're on a unix platform. Hooray! :)
28351      path="$libpath"
28352      has_space=`$ECHO "$path" | $GREP " "`
28353      if test "x$has_space" != x; then
28354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28355$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28356        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28357      fi
28358
28359      # Use eval to expand a potential ~
28360      eval path="$path"
28361      if test ! -f "$path" && test ! -d "$path"; then
28362        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28363      fi
28364
28365      libpath="`cd "$path"; $THEPWDCMD -L`"
28366    fi
28367  fi
28368
28369            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28370          fi
28371          IFS=";"
28372        fi
28373      done
28374      IFS="$OLDIFS"
28375    fi
28376  else
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28378$as_echo "not found" >&6; }
28379
28380    if test "x$VS_ENV_CMD" = x; then
28381      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28382$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28383      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28384$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28385    else
28386      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28387$as_echo "$as_me: Running the extraction script failed." >&6;}
28388    fi
28389    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28390$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28391    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28392$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28393    as_fn_error $? "Cannot continue" "$LINENO" 5
28394  fi
28395
28396    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28397    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28398    PATH="$VS_PATH"
28399    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28400    export INCLUDE="$VS_INCLUDE"
28401    export LIB="$VS_LIB"
28402  fi
28403
28404  # For solaris we really need solaris tools, and not the GNU equivalent.
28405  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28406  # so add that to path before starting to probe.
28407  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28408  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28409    PATH="/usr/ccs/bin:$PATH"
28410  fi
28411
28412  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28413  # override all other locations.
28414  if test "x$TOOLCHAIN_PATH" != x; then
28415    PATH=$TOOLCHAIN_PATH:$PATH
28416  fi
28417
28418
28419  #
28420  # Setup the compilers (CC and CXX)
28421  #
28422
28423  COMPILER_NAME=C
28424  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28425
28426  if test "x$CC" != x; then
28427    # User has supplied compiler name already, always let that override.
28428    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28429$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28430    if test "x`basename $CC`" = "x$CC"; then
28431      # A command without a complete path is provided, search $PATH.
28432
28433      for ac_prog in $CC
28434do
28435  # Extract the first word of "$ac_prog", so it can be a program name with args.
28436set dummy $ac_prog; ac_word=$2
28437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28438$as_echo_n "checking for $ac_word... " >&6; }
28439if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28440  $as_echo_n "(cached) " >&6
28441else
28442  case $POTENTIAL_CC in
28443  [\\/]* | ?:[\\/]*)
28444  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28445  ;;
28446  *)
28447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28448for as_dir in $PATH
28449do
28450  IFS=$as_save_IFS
28451  test -z "$as_dir" && as_dir=.
28452    for ac_exec_ext in '' $ac_executable_extensions; do
28453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28454    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28456    break 2
28457  fi
28458done
28459  done
28460IFS=$as_save_IFS
28461
28462  ;;
28463esac
28464fi
28465POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28466if test -n "$POTENTIAL_CC"; then
28467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28468$as_echo "$POTENTIAL_CC" >&6; }
28469else
28470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28471$as_echo "no" >&6; }
28472fi
28473
28474
28475  test -n "$POTENTIAL_CC" && break
28476done
28477
28478      if test "x$POTENTIAL_CC" != x; then
28479        CC=$POTENTIAL_CC
28480      else
28481        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28482      fi
28483    else
28484      # Otherwise it might already be a complete path
28485      if test ! -x "$CC"; then
28486        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28487      fi
28488    fi
28489  else
28490    # No user supplied value. Locate compiler ourselves.
28491
28492    # If we are cross compiling, assume cross compilation tools follows the
28493    # cross compilation standard where they are prefixed with the autoconf
28494    # standard name for the target. For example the binary
28495    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28496    # If we are not cross compiling, then the default compiler name will be
28497    # used.
28498
28499    CC=
28500    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28501    # before checking the rest of the PATH.
28502    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28503    # step, this should not be necessary.
28504    if test -n "$TOOLCHAIN_PATH"; then
28505      PATH_save="$PATH"
28506      PATH="$TOOLCHAIN_PATH"
28507      for ac_prog in $SEARCH_LIST
28508do
28509  # Extract the first word of "$ac_prog", so it can be a program name with args.
28510set dummy $ac_prog; ac_word=$2
28511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28512$as_echo_n "checking for $ac_word... " >&6; }
28513if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28514  $as_echo_n "(cached) " >&6
28515else
28516  case $TOOLCHAIN_PATH_CC in
28517  [\\/]* | ?:[\\/]*)
28518  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28519  ;;
28520  *)
28521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28522for as_dir in $PATH
28523do
28524  IFS=$as_save_IFS
28525  test -z "$as_dir" && as_dir=.
28526    for ac_exec_ext in '' $ac_executable_extensions; do
28527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28528    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28530    break 2
28531  fi
28532done
28533  done
28534IFS=$as_save_IFS
28535
28536  ;;
28537esac
28538fi
28539TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28540if test -n "$TOOLCHAIN_PATH_CC"; then
28541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28542$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28543else
28544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28545$as_echo "no" >&6; }
28546fi
28547
28548
28549  test -n "$TOOLCHAIN_PATH_CC" && break
28550done
28551
28552      CC=$TOOLCHAIN_PATH_CC
28553      PATH="$PATH_save"
28554    fi
28555
28556    # AC_PATH_PROGS can't be run multiple times with the same variable,
28557    # so create a new name for this run.
28558    if test "x$CC" = x; then
28559      for ac_prog in $SEARCH_LIST
28560do
28561  # Extract the first word of "$ac_prog", so it can be a program name with args.
28562set dummy $ac_prog; ac_word=$2
28563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28564$as_echo_n "checking for $ac_word... " >&6; }
28565if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28566  $as_echo_n "(cached) " >&6
28567else
28568  case $POTENTIAL_CC in
28569  [\\/]* | ?:[\\/]*)
28570  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28571  ;;
28572  *)
28573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28574for as_dir in $PATH
28575do
28576  IFS=$as_save_IFS
28577  test -z "$as_dir" && as_dir=.
28578    for ac_exec_ext in '' $ac_executable_extensions; do
28579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28580    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28582    break 2
28583  fi
28584done
28585  done
28586IFS=$as_save_IFS
28587
28588  ;;
28589esac
28590fi
28591POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28592if test -n "$POTENTIAL_CC"; then
28593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28594$as_echo "$POTENTIAL_CC" >&6; }
28595else
28596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28597$as_echo "no" >&6; }
28598fi
28599
28600
28601  test -n "$POTENTIAL_CC" && break
28602done
28603
28604      CC=$POTENTIAL_CC
28605    fi
28606
28607    if test "x$CC" = x; then
28608
28609  # Print a helpful message on how to acquire the necessary build dependency.
28610  # devkit is the help tag: freetype, cups, pulse, alsa etc
28611  MISSING_DEPENDENCY=devkit
28612
28613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28614    cygwin_help $MISSING_DEPENDENCY
28615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28616    msys_help $MISSING_DEPENDENCY
28617  else
28618    PKGHANDLER_COMMAND=
28619
28620    case $PKGHANDLER in
28621      apt-get)
28622        apt_help     $MISSING_DEPENDENCY ;;
28623      yum)
28624        yum_help     $MISSING_DEPENDENCY ;;
28625      port)
28626        port_help    $MISSING_DEPENDENCY ;;
28627      pkgutil)
28628        pkgutil_help $MISSING_DEPENDENCY ;;
28629      pkgadd)
28630        pkgadd_help  $MISSING_DEPENDENCY ;;
28631    esac
28632
28633    if test "x$PKGHANDLER_COMMAND" != x; then
28634      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28635    fi
28636  fi
28637
28638      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28639    fi
28640  fi
28641
28642  # Now we have a compiler binary in CC. Make sure it's okay.
28643
28644  # Only process if variable expands to non-empty
28645
28646  if test "x$CC" != x; then
28647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28648
28649  # First separate the path from the arguments. This will split at the first
28650  # space.
28651  complete="$CC"
28652  path="${complete%% *}"
28653  tmp="$complete EOL"
28654  arguments="${tmp#* }"
28655
28656  # Input might be given as Windows format, start by converting to
28657  # unix format.
28658  new_path=`$CYGPATH -u "$path"`
28659
28660  # Now try to locate executable using which
28661  new_path=`$WHICH "$new_path" 2> /dev/null`
28662  # bat and cmd files are not always considered executable in cygwin causing which
28663  # to not find them
28664  if test "x$new_path" = x \
28665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28667    new_path=`$CYGPATH -u "$path"`
28668  fi
28669  if test "x$new_path" = x; then
28670    # Oops. Which didn't find the executable.
28671    # The splitting of arguments from the executable at a space might have been incorrect,
28672    # since paths with space are more likely in Windows. Give it another try with the whole
28673    # argument.
28674    path="$complete"
28675    arguments="EOL"
28676    new_path=`$CYGPATH -u "$path"`
28677    new_path=`$WHICH "$new_path" 2> /dev/null`
28678    # bat and cmd files are not always considered executable in cygwin causing which
28679    # to not find them
28680    if test "x$new_path" = x \
28681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28683      new_path=`$CYGPATH -u "$path"`
28684    fi
28685    if test "x$new_path" = x; then
28686      # It's still not found. Now this is an unrecoverable error.
28687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28688$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28689      has_space=`$ECHO "$complete" | $GREP " "`
28690      if test "x$has_space" != x; then
28691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28693      fi
28694      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28695    fi
28696  fi
28697
28698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28701  # "foo.exe" is OK but "foo" is an error.
28702  #
28703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28704  # It is also a way to make sure we got the proper file name for the real test later on.
28705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28706  if test "x$test_shortpath" = x; then
28707    # Short path failed, file does not exist as specified.
28708    # Try adding .exe or .cmd
28709    if test -f "${new_path}.exe"; then
28710      input_to_shortpath="${new_path}.exe"
28711    elif test -f "${new_path}.cmd"; then
28712      input_to_shortpath="${new_path}.cmd"
28713    else
28714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28715$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28718      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28719    fi
28720  else
28721    input_to_shortpath="$new_path"
28722  fi
28723
28724  # Call helper function which possibly converts this using DOS-style short mode.
28725  # If so, the updated path is stored in $new_path.
28726  new_path="$input_to_shortpath"
28727
28728  input_path="$input_to_shortpath"
28729  # Check if we need to convert this using DOS-style short mode. If the path
28730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28731  # take no chances and rewrite it.
28732  # Note: m4 eats our [], so we need to use [ and ] instead.
28733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28734  if test "x$has_forbidden_chars" != x; then
28735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28739      # Going to short mode and back again did indeed matter. Since short mode is
28740      # case insensitive, let's make it lowercase to improve readability.
28741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28742      # Now convert it back to Unix-style (cygpath)
28743      input_path=`$CYGPATH -u "$shortmode_path"`
28744      new_path="$input_path"
28745    fi
28746  fi
28747
28748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28749  if test "x$test_cygdrive_prefix" = x; then
28750    # As a simple fix, exclude /usr/bin since it's not a real path.
28751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28753      # a path prefixed by /cygdrive for fixpath to work.
28754      new_path="$CYGWIN_ROOT_PATH$input_path"
28755    fi
28756  fi
28757
28758  # remove trailing .exe if any
28759  new_path="${new_path/%.exe/}"
28760
28761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28762
28763  # First separate the path from the arguments. This will split at the first
28764  # space.
28765  complete="$CC"
28766  path="${complete%% *}"
28767  tmp="$complete EOL"
28768  arguments="${tmp#* }"
28769
28770  # Input might be given as Windows format, start by converting to
28771  # unix format.
28772  new_path="$path"
28773
28774  windows_path="$new_path"
28775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776    unix_path=`$CYGPATH -u "$windows_path"`
28777    new_path="$unix_path"
28778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28780    new_path="$unix_path"
28781  fi
28782
28783
28784  # Now try to locate executable using which
28785  new_path=`$WHICH "$new_path" 2> /dev/null`
28786
28787  if test "x$new_path" = x; then
28788    # Oops. Which didn't find the executable.
28789    # The splitting of arguments from the executable at a space might have been incorrect,
28790    # since paths with space are more likely in Windows. Give it another try with the whole
28791    # argument.
28792    path="$complete"
28793    arguments="EOL"
28794    new_path="$path"
28795
28796  windows_path="$new_path"
28797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28798    unix_path=`$CYGPATH -u "$windows_path"`
28799    new_path="$unix_path"
28800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28802    new_path="$unix_path"
28803  fi
28804
28805
28806    new_path=`$WHICH "$new_path" 2> /dev/null`
28807    # bat and cmd files are not always considered executable in MSYS causing which
28808    # to not find them
28809    if test "x$new_path" = x \
28810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28812      new_path="$path"
28813
28814  windows_path="$new_path"
28815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28816    unix_path=`$CYGPATH -u "$windows_path"`
28817    new_path="$unix_path"
28818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28820    new_path="$unix_path"
28821  fi
28822
28823    fi
28824
28825    if test "x$new_path" = x; then
28826      # It's still not found. Now this is an unrecoverable error.
28827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28828$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28829      has_space=`$ECHO "$complete" | $GREP " "`
28830      if test "x$has_space" != x; then
28831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28833      fi
28834      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28835    fi
28836  fi
28837
28838  # Now new_path has a complete unix path to the binary
28839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28840    # Keep paths in /bin as-is, but remove trailing .exe if any
28841    new_path="${new_path/%.exe/}"
28842    # Do not save /bin paths to all_fixpath_prefixes!
28843  else
28844    # Not in mixed or Windows style, start by that.
28845    new_path=`cmd //c echo $new_path`
28846
28847  input_path="$new_path"
28848  # Check if we need to convert this using DOS-style short mode. If the path
28849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850  # take no chances and rewrite it.
28851  # Note: m4 eats our [], so we need to use [ and ] instead.
28852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28853  if test "x$has_forbidden_chars" != x; then
28854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856  fi
28857
28858    # Output is in $new_path
28859
28860  windows_path="$new_path"
28861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28862    unix_path=`$CYGPATH -u "$windows_path"`
28863    new_path="$unix_path"
28864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28866    new_path="$unix_path"
28867  fi
28868
28869    # remove trailing .exe if any
28870    new_path="${new_path/%.exe/}"
28871
28872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28874  fi
28875
28876    else
28877      # We're on a unix platform. Hooray! :)
28878      # First separate the path from the arguments. This will split at the first
28879      # space.
28880      complete="$CC"
28881      path="${complete%% *}"
28882      tmp="$complete EOL"
28883      arguments="${tmp#* }"
28884
28885      # Cannot rely on the command "which" here since it doesn't always work.
28886      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28887      if test -z "$is_absolute_path"; then
28888        # Path to executable is not absolute. Find it.
28889        IFS_save="$IFS"
28890        IFS=:
28891        for p in $PATH; do
28892          if test -f "$p/$path" && test -x "$p/$path"; then
28893            new_path="$p/$path"
28894            break
28895          fi
28896        done
28897        IFS="$IFS_save"
28898      else
28899        # This is an absolute path, we can use it without further modifications.
28900        new_path="$path"
28901      fi
28902
28903      if test "x$new_path" = x; then
28904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28905$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28906        has_space=`$ECHO "$complete" | $GREP " "`
28907        if test "x$has_space" != x; then
28908          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28909$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28910        fi
28911        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28912      fi
28913    fi
28914
28915    # Now join together the path and the arguments once again
28916    if test "x$arguments" != xEOL; then
28917      new_complete="$new_path ${arguments% *}"
28918    else
28919      new_complete="$new_path"
28920    fi
28921
28922    if test "x$complete" != "x$new_complete"; then
28923      CC="$new_complete"
28924      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28925$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28926    fi
28927  fi
28928
28929  TEST_COMPILER="$CC"
28930  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28931  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28932  if test "x$OPENJDK_BUILD_OS" != xaix; then
28933    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28935$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28936
28937  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28938    # Follow a chain of symbolic links. Use readlink
28939    # where it exists, else fall back to horribly
28940    # complicated shell code.
28941    if test "x$READLINK_TESTED" != yes; then
28942      # On MacOSX there is a readlink tool with a different
28943      # purpose than the GNU readlink tool. Check the found readlink.
28944      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28945      if test "x$ISGNU" = x; then
28946        # A readlink that we do not know how to use.
28947        # Are there other non-GNU readlinks out there?
28948        READLINK_TESTED=yes
28949        READLINK=
28950      fi
28951    fi
28952
28953    if test "x$READLINK" != x; then
28954      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28955    else
28956      # Save the current directory for restoring afterwards
28957      STARTDIR=$PWD
28958      COUNTER=0
28959      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28960      sym_link_file=`$BASENAME $TEST_COMPILER`
28961      cd $sym_link_dir
28962      # Use -P flag to resolve symlinks in directories.
28963      cd `$THEPWDCMD -P`
28964      sym_link_dir=`$THEPWDCMD -P`
28965      # Resolve file symlinks
28966      while test $COUNTER -lt 20; do
28967        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28968        if test "x$ISLINK" == x; then
28969          # This is not a symbolic link! We are done!
28970          break
28971        fi
28972        # Again resolve directory symlinks since the target of the just found
28973        # link could be in a different directory
28974        cd `$DIRNAME $ISLINK`
28975        sym_link_dir=`$THEPWDCMD -P`
28976        sym_link_file=`$BASENAME $ISLINK`
28977        let COUNTER=COUNTER+1
28978      done
28979      cd $STARTDIR
28980      TEST_COMPILER=$sym_link_dir/$sym_link_file
28981    fi
28982  fi
28983
28984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28985$as_echo "$TEST_COMPILER" >&6; }
28986  fi
28987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28988$as_echo_n "checking if CC is disguised ccache... " >&6; }
28989
28990  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28991  if test "x$COMPILER_BASENAME" = "xccache"; then
28992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28993$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28994    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28995    # We want to control ccache invocation ourselves, so ignore this cc and try
28996    # searching again.
28997
28998    # Remove the path to the fake ccache cc from the PATH
28999    RETRY_COMPILER_SAVED_PATH="$PATH"
29000    COMPILER_DIRNAME=`$DIRNAME $CC`
29001    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29002
29003    # Try again looking for our compiler
29004    if test -n "$ac_tool_prefix"; then
29005  for ac_prog in $TOOLCHAIN_CC_BINARY
29006  do
29007    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29010$as_echo_n "checking for $ac_word... " >&6; }
29011if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29012  $as_echo_n "(cached) " >&6
29013else
29014  if test -n "$PROPER_COMPILER_CC"; then
29015  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29016else
29017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29018for as_dir in $PATH
29019do
29020  IFS=$as_save_IFS
29021  test -z "$as_dir" && as_dir=.
29022    for ac_exec_ext in '' $ac_executable_extensions; do
29023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29024    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29026    break 2
29027  fi
29028done
29029  done
29030IFS=$as_save_IFS
29031
29032fi
29033fi
29034PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29035if test -n "$PROPER_COMPILER_CC"; then
29036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29037$as_echo "$PROPER_COMPILER_CC" >&6; }
29038else
29039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29040$as_echo "no" >&6; }
29041fi
29042
29043
29044    test -n "$PROPER_COMPILER_CC" && break
29045  done
29046fi
29047if test -z "$PROPER_COMPILER_CC"; then
29048  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29049  for ac_prog in $TOOLCHAIN_CC_BINARY
29050do
29051  # Extract the first word of "$ac_prog", so it can be a program name with args.
29052set dummy $ac_prog; ac_word=$2
29053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29054$as_echo_n "checking for $ac_word... " >&6; }
29055if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29056  $as_echo_n "(cached) " >&6
29057else
29058  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29059  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29060else
29061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29062for as_dir in $PATH
29063do
29064  IFS=$as_save_IFS
29065  test -z "$as_dir" && as_dir=.
29066    for ac_exec_ext in '' $ac_executable_extensions; do
29067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29068    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29070    break 2
29071  fi
29072done
29073  done
29074IFS=$as_save_IFS
29075
29076fi
29077fi
29078ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29079if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29081$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29082else
29083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29084$as_echo "no" >&6; }
29085fi
29086
29087
29088  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29089done
29090
29091  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29092    PROPER_COMPILER_CC=""
29093  else
29094    case $cross_compiling:$ac_tool_warned in
29095yes:)
29096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29098ac_tool_warned=yes ;;
29099esac
29100    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29101  fi
29102fi
29103
29104
29105  # Only process if variable expands to non-empty
29106
29107  if test "x$PROPER_COMPILER_CC" != x; then
29108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29109
29110  # First separate the path from the arguments. This will split at the first
29111  # space.
29112  complete="$PROPER_COMPILER_CC"
29113  path="${complete%% *}"
29114  tmp="$complete EOL"
29115  arguments="${tmp#* }"
29116
29117  # Input might be given as Windows format, start by converting to
29118  # unix format.
29119  new_path=`$CYGPATH -u "$path"`
29120
29121  # Now try to locate executable using which
29122  new_path=`$WHICH "$new_path" 2> /dev/null`
29123  # bat and cmd files are not always considered executable in cygwin causing which
29124  # to not find them
29125  if test "x$new_path" = x \
29126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29128    new_path=`$CYGPATH -u "$path"`
29129  fi
29130  if test "x$new_path" = x; then
29131    # Oops. Which didn't find the executable.
29132    # The splitting of arguments from the executable at a space might have been incorrect,
29133    # since paths with space are more likely in Windows. Give it another try with the whole
29134    # argument.
29135    path="$complete"
29136    arguments="EOL"
29137    new_path=`$CYGPATH -u "$path"`
29138    new_path=`$WHICH "$new_path" 2> /dev/null`
29139    # bat and cmd files are not always considered executable in cygwin causing which
29140    # to not find them
29141    if test "x$new_path" = x \
29142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29144      new_path=`$CYGPATH -u "$path"`
29145    fi
29146    if test "x$new_path" = x; then
29147      # It's still not found. Now this is an unrecoverable error.
29148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29149$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29150      has_space=`$ECHO "$complete" | $GREP " "`
29151      if test "x$has_space" != x; then
29152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29154      fi
29155      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29156    fi
29157  fi
29158
29159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29162  # "foo.exe" is OK but "foo" is an error.
29163  #
29164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29165  # It is also a way to make sure we got the proper file name for the real test later on.
29166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29167  if test "x$test_shortpath" = x; then
29168    # Short path failed, file does not exist as specified.
29169    # Try adding .exe or .cmd
29170    if test -f "${new_path}.exe"; then
29171      input_to_shortpath="${new_path}.exe"
29172    elif test -f "${new_path}.cmd"; then
29173      input_to_shortpath="${new_path}.cmd"
29174    else
29175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29176$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29179      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29180    fi
29181  else
29182    input_to_shortpath="$new_path"
29183  fi
29184
29185  # Call helper function which possibly converts this using DOS-style short mode.
29186  # If so, the updated path is stored in $new_path.
29187  new_path="$input_to_shortpath"
29188
29189  input_path="$input_to_shortpath"
29190  # Check if we need to convert this using DOS-style short mode. If the path
29191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29192  # take no chances and rewrite it.
29193  # Note: m4 eats our [], so we need to use [ and ] instead.
29194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29195  if test "x$has_forbidden_chars" != x; then
29196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29200      # Going to short mode and back again did indeed matter. Since short mode is
29201      # case insensitive, let's make it lowercase to improve readability.
29202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29203      # Now convert it back to Unix-style (cygpath)
29204      input_path=`$CYGPATH -u "$shortmode_path"`
29205      new_path="$input_path"
29206    fi
29207  fi
29208
29209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29210  if test "x$test_cygdrive_prefix" = x; then
29211    # As a simple fix, exclude /usr/bin since it's not a real path.
29212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29214      # a path prefixed by /cygdrive for fixpath to work.
29215      new_path="$CYGWIN_ROOT_PATH$input_path"
29216    fi
29217  fi
29218
29219  # remove trailing .exe if any
29220  new_path="${new_path/%.exe/}"
29221
29222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29223
29224  # First separate the path from the arguments. This will split at the first
29225  # space.
29226  complete="$PROPER_COMPILER_CC"
29227  path="${complete%% *}"
29228  tmp="$complete EOL"
29229  arguments="${tmp#* }"
29230
29231  # Input might be given as Windows format, start by converting to
29232  # unix format.
29233  new_path="$path"
29234
29235  windows_path="$new_path"
29236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29237    unix_path=`$CYGPATH -u "$windows_path"`
29238    new_path="$unix_path"
29239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29241    new_path="$unix_path"
29242  fi
29243
29244
29245  # Now try to locate executable using which
29246  new_path=`$WHICH "$new_path" 2> /dev/null`
29247
29248  if test "x$new_path" = x; then
29249    # Oops. Which didn't find the executable.
29250    # The splitting of arguments from the executable at a space might have been incorrect,
29251    # since paths with space are more likely in Windows. Give it another try with the whole
29252    # argument.
29253    path="$complete"
29254    arguments="EOL"
29255    new_path="$path"
29256
29257  windows_path="$new_path"
29258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29259    unix_path=`$CYGPATH -u "$windows_path"`
29260    new_path="$unix_path"
29261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29263    new_path="$unix_path"
29264  fi
29265
29266
29267    new_path=`$WHICH "$new_path" 2> /dev/null`
29268    # bat and cmd files are not always considered executable in MSYS causing which
29269    # to not find them
29270    if test "x$new_path" = x \
29271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29273      new_path="$path"
29274
29275  windows_path="$new_path"
29276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29277    unix_path=`$CYGPATH -u "$windows_path"`
29278    new_path="$unix_path"
29279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29281    new_path="$unix_path"
29282  fi
29283
29284    fi
29285
29286    if test "x$new_path" = x; then
29287      # It's still not found. Now this is an unrecoverable error.
29288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29289$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29290      has_space=`$ECHO "$complete" | $GREP " "`
29291      if test "x$has_space" != x; then
29292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29294      fi
29295      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29296    fi
29297  fi
29298
29299  # Now new_path has a complete unix path to the binary
29300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29301    # Keep paths in /bin as-is, but remove trailing .exe if any
29302    new_path="${new_path/%.exe/}"
29303    # Do not save /bin paths to all_fixpath_prefixes!
29304  else
29305    # Not in mixed or Windows style, start by that.
29306    new_path=`cmd //c echo $new_path`
29307
29308  input_path="$new_path"
29309  # Check if we need to convert this using DOS-style short mode. If the path
29310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29311  # take no chances and rewrite it.
29312  # Note: m4 eats our [], so we need to use [ and ] instead.
29313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29314  if test "x$has_forbidden_chars" != x; then
29315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29317  fi
29318
29319    # Output is in $new_path
29320
29321  windows_path="$new_path"
29322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29323    unix_path=`$CYGPATH -u "$windows_path"`
29324    new_path="$unix_path"
29325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29327    new_path="$unix_path"
29328  fi
29329
29330    # remove trailing .exe if any
29331    new_path="${new_path/%.exe/}"
29332
29333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29335  fi
29336
29337    else
29338      # We're on a unix platform. Hooray! :)
29339      # First separate the path from the arguments. This will split at the first
29340      # space.
29341      complete="$PROPER_COMPILER_CC"
29342      path="${complete%% *}"
29343      tmp="$complete EOL"
29344      arguments="${tmp#* }"
29345
29346      # Cannot rely on the command "which" here since it doesn't always work.
29347      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29348      if test -z "$is_absolute_path"; then
29349        # Path to executable is not absolute. Find it.
29350        IFS_save="$IFS"
29351        IFS=:
29352        for p in $PATH; do
29353          if test -f "$p/$path" && test -x "$p/$path"; then
29354            new_path="$p/$path"
29355            break
29356          fi
29357        done
29358        IFS="$IFS_save"
29359      else
29360        # This is an absolute path, we can use it without further modifications.
29361        new_path="$path"
29362      fi
29363
29364      if test "x$new_path" = x; then
29365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29366$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29367        has_space=`$ECHO "$complete" | $GREP " "`
29368        if test "x$has_space" != x; then
29369          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29371        fi
29372        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29373      fi
29374    fi
29375
29376    # Now join together the path and the arguments once again
29377    if test "x$arguments" != xEOL; then
29378      new_complete="$new_path ${arguments% *}"
29379    else
29380      new_complete="$new_path"
29381    fi
29382
29383    if test "x$complete" != "x$new_complete"; then
29384      PROPER_COMPILER_CC="$new_complete"
29385      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29386$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29387    fi
29388  fi
29389
29390    PATH="$RETRY_COMPILER_SAVED_PATH"
29391
29392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29393$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29394
29395  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29396    # Follow a chain of symbolic links. Use readlink
29397    # where it exists, else fall back to horribly
29398    # complicated shell code.
29399    if test "x$READLINK_TESTED" != yes; then
29400      # On MacOSX there is a readlink tool with a different
29401      # purpose than the GNU readlink tool. Check the found readlink.
29402      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29403      if test "x$ISGNU" = x; then
29404        # A readlink that we do not know how to use.
29405        # Are there other non-GNU readlinks out there?
29406        READLINK_TESTED=yes
29407        READLINK=
29408      fi
29409    fi
29410
29411    if test "x$READLINK" != x; then
29412      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29413    else
29414      # Save the current directory for restoring afterwards
29415      STARTDIR=$PWD
29416      COUNTER=0
29417      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29418      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29419      cd $sym_link_dir
29420      # Use -P flag to resolve symlinks in directories.
29421      cd `$THEPWDCMD -P`
29422      sym_link_dir=`$THEPWDCMD -P`
29423      # Resolve file symlinks
29424      while test $COUNTER -lt 20; do
29425        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29426        if test "x$ISLINK" == x; then
29427          # This is not a symbolic link! We are done!
29428          break
29429        fi
29430        # Again resolve directory symlinks since the target of the just found
29431        # link could be in a different directory
29432        cd `$DIRNAME $ISLINK`
29433        sym_link_dir=`$THEPWDCMD -P`
29434        sym_link_file=`$BASENAME $ISLINK`
29435        let COUNTER=COUNTER+1
29436      done
29437      cd $STARTDIR
29438      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29439    fi
29440  fi
29441
29442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29443$as_echo "$PROPER_COMPILER_CC" >&6; }
29444    CC="$PROPER_COMPILER_CC"
29445  else
29446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29447$as_echo "no, keeping CC" >&6; }
29448  fi
29449
29450
29451  COMPILER=$CC
29452  COMPILER_NAME=$COMPILER_NAME
29453
29454  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29455    # cc -V output typically looks like
29456    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29457    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29458    # Check that this is likely to be the Solaris Studio cc.
29459    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29460    if test $? -ne 0; then
29461      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29462      { $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
29463$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29464      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29465$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29466      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29467$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29468      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29469    fi
29470    # Remove usage instructions (if present), and
29471    # collapse compiler output into a single line
29472    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29473        $SED -e 's/ *[Uu]sage:.*//'`
29474    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29475        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29476  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29477    # xlc -qversion output typically looks like
29478    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29479    #     Version: 11.01.0000.0015
29480    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29481    # Check that this is likely to be the IBM XL C compiler.
29482    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29483    if test $? -ne 0; then
29484      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29485      { $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
29486$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29487      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29488$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29489      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29490$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29491      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29492    fi
29493    # Collapse compiler output into a single line
29494    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29495    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29496        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29497  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29498    # There is no specific version flag, but all output starts with a version string.
29499    # First line typically looks something like:
29500    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29501    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29502    # Check that this is likely to be Microsoft CL.EXE.
29503    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29504    if test $? -ne 0; then
29505      { $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
29506$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29508$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29509      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29510    fi
29511    # Collapse compiler output into a single line
29512    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29513    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29514        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29515  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29516    # gcc --version output typically looks like
29517    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29518    #     Copyright (C) 2013 Free Software Foundation, Inc.
29519    #     This is free software; see the source for copying conditions.  There is NO
29520    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29521    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29522    # Check that this is likely to be GCC.
29523    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29524    if test $? -ne 0; then
29525      { $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
29526$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29527      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29528$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29529      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29530    fi
29531    # Remove Copyright and legalese from version string, and
29532    # collapse into a single line
29533    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29534        $SED -e 's/ *Copyright .*//'`
29535    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29536        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29537  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29538    # clang --version output typically looks like
29539    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29540    #    clang version 3.3 (tags/RELEASE_33/final)
29541    # or
29542    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29543    #    Target: x86_64-pc-linux-gnu
29544    #    Thread model: posix
29545    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29546    # Check that this is likely to be clang
29547    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29548    if test $? -ne 0; then
29549      { $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
29550$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29551      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29552$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29553      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29554    fi
29555    # Collapse compiler output into a single line
29556    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29557    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29558        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29559  else
29560      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29561  fi
29562  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29563  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29564  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29565  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29566
29567  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29568$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29569
29570
29571  # Now that we have resolved CC ourself, let autoconf have its go at it
29572  ac_ext=c
29573ac_cpp='$CPP $CPPFLAGS'
29574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29576ac_compiler_gnu=$ac_cv_c_compiler_gnu
29577if test -n "$ac_tool_prefix"; then
29578  for ac_prog in $CC
29579  do
29580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29583$as_echo_n "checking for $ac_word... " >&6; }
29584if ${ac_cv_prog_CC+:} false; then :
29585  $as_echo_n "(cached) " >&6
29586else
29587  if test -n "$CC"; then
29588  ac_cv_prog_CC="$CC" # Let the user override the test.
29589else
29590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29591for as_dir in $PATH
29592do
29593  IFS=$as_save_IFS
29594  test -z "$as_dir" && as_dir=.
29595    for ac_exec_ext in '' $ac_executable_extensions; do
29596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29597    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29599    break 2
29600  fi
29601done
29602  done
29603IFS=$as_save_IFS
29604
29605fi
29606fi
29607CC=$ac_cv_prog_CC
29608if test -n "$CC"; then
29609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29610$as_echo "$CC" >&6; }
29611else
29612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29613$as_echo "no" >&6; }
29614fi
29615
29616
29617    test -n "$CC" && break
29618  done
29619fi
29620if test -z "$CC"; then
29621  ac_ct_CC=$CC
29622  for ac_prog in $CC
29623do
29624  # Extract the first word of "$ac_prog", so it can be a program name with args.
29625set dummy $ac_prog; ac_word=$2
29626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29627$as_echo_n "checking for $ac_word... " >&6; }
29628if ${ac_cv_prog_ac_ct_CC+:} false; then :
29629  $as_echo_n "(cached) " >&6
29630else
29631  if test -n "$ac_ct_CC"; then
29632  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29633else
29634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29635for as_dir in $PATH
29636do
29637  IFS=$as_save_IFS
29638  test -z "$as_dir" && as_dir=.
29639    for ac_exec_ext in '' $ac_executable_extensions; do
29640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29641    ac_cv_prog_ac_ct_CC="$ac_prog"
29642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29643    break 2
29644  fi
29645done
29646  done
29647IFS=$as_save_IFS
29648
29649fi
29650fi
29651ac_ct_CC=$ac_cv_prog_ac_ct_CC
29652if test -n "$ac_ct_CC"; then
29653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29654$as_echo "$ac_ct_CC" >&6; }
29655else
29656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29657$as_echo "no" >&6; }
29658fi
29659
29660
29661  test -n "$ac_ct_CC" && break
29662done
29663
29664  if test "x$ac_ct_CC" = x; then
29665    CC=""
29666  else
29667    case $cross_compiling:$ac_tool_warned in
29668yes:)
29669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29671ac_tool_warned=yes ;;
29672esac
29673    CC=$ac_ct_CC
29674  fi
29675fi
29676
29677
29678test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29680as_fn_error $? "no acceptable C compiler found in \$PATH
29681See \`config.log' for more details" "$LINENO" 5; }
29682
29683# Provide some information about the compiler.
29684$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29685set X $ac_compile
29686ac_compiler=$2
29687for ac_option in --version -v -V -qversion; do
29688  { { ac_try="$ac_compiler $ac_option >&5"
29689case "(($ac_try" in
29690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29691  *) ac_try_echo=$ac_try;;
29692esac
29693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29694$as_echo "$ac_try_echo"; } >&5
29695  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29696  ac_status=$?
29697  if test -s conftest.err; then
29698    sed '10a\
29699... rest of stderr output deleted ...
29700         10q' conftest.err >conftest.er1
29701    cat conftest.er1 >&5
29702  fi
29703  rm -f conftest.er1 conftest.err
29704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29705  test $ac_status = 0; }
29706done
29707
29708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29709/* end confdefs.h.  */
29710
29711int
29712main ()
29713{
29714
29715  ;
29716  return 0;
29717}
29718_ACEOF
29719ac_clean_files_save=$ac_clean_files
29720ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29721# Try to create an executable without -o first, disregard a.out.
29722# It will help us diagnose broken compilers, and finding out an intuition
29723# of exeext.
29724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29725$as_echo_n "checking whether the C compiler works... " >&6; }
29726ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29727
29728# The possible output files:
29729ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29730
29731ac_rmfiles=
29732for ac_file in $ac_files
29733do
29734  case $ac_file in
29735    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29736    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29737  esac
29738done
29739rm -f $ac_rmfiles
29740
29741if { { ac_try="$ac_link_default"
29742case "(($ac_try" in
29743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29744  *) ac_try_echo=$ac_try;;
29745esac
29746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29747$as_echo "$ac_try_echo"; } >&5
29748  (eval "$ac_link_default") 2>&5
29749  ac_status=$?
29750  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29751  test $ac_status = 0; }; then :
29752  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29753# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29754# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29755# so that the user can short-circuit this test for compilers unknown to
29756# Autoconf.
29757for ac_file in $ac_files ''
29758do
29759  test -f "$ac_file" || continue
29760  case $ac_file in
29761    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29762	;;
29763    [ab].out )
29764	# We found the default executable, but exeext='' is most
29765	# certainly right.
29766	break;;
29767    *.* )
29768	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29769	then :; else
29770	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29771	fi
29772	# We set ac_cv_exeext here because the later test for it is not
29773	# safe: cross compilers may not add the suffix if given an `-o'
29774	# argument, so we may need to know it at that point already.
29775	# Even if this section looks crufty: it has the advantage of
29776	# actually working.
29777	break;;
29778    * )
29779	break;;
29780  esac
29781done
29782test "$ac_cv_exeext" = no && ac_cv_exeext=
29783
29784else
29785  ac_file=''
29786fi
29787if test -z "$ac_file"; then :
29788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29789$as_echo "no" >&6; }
29790$as_echo "$as_me: failed program was:" >&5
29791sed 's/^/| /' conftest.$ac_ext >&5
29792
29793{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29795as_fn_error 77 "C compiler cannot create executables
29796See \`config.log' for more details" "$LINENO" 5; }
29797else
29798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29799$as_echo "yes" >&6; }
29800fi
29801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29802$as_echo_n "checking for C compiler default output file name... " >&6; }
29803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29804$as_echo "$ac_file" >&6; }
29805ac_exeext=$ac_cv_exeext
29806
29807rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29808ac_clean_files=$ac_clean_files_save
29809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29810$as_echo_n "checking for suffix of executables... " >&6; }
29811if { { ac_try="$ac_link"
29812case "(($ac_try" in
29813  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29814  *) ac_try_echo=$ac_try;;
29815esac
29816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29817$as_echo "$ac_try_echo"; } >&5
29818  (eval "$ac_link") 2>&5
29819  ac_status=$?
29820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29821  test $ac_status = 0; }; then :
29822  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29823# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29824# work properly (i.e., refer to `conftest.exe'), while it won't with
29825# `rm'.
29826for ac_file in conftest.exe conftest conftest.*; do
29827  test -f "$ac_file" || continue
29828  case $ac_file in
29829    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29830    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29831	  break;;
29832    * ) break;;
29833  esac
29834done
29835else
29836  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29838as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29839See \`config.log' for more details" "$LINENO" 5; }
29840fi
29841rm -f conftest conftest$ac_cv_exeext
29842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29843$as_echo "$ac_cv_exeext" >&6; }
29844
29845rm -f conftest.$ac_ext
29846EXEEXT=$ac_cv_exeext
29847ac_exeext=$EXEEXT
29848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29849/* end confdefs.h.  */
29850#include <stdio.h>
29851int
29852main ()
29853{
29854FILE *f = fopen ("conftest.out", "w");
29855 return ferror (f) || fclose (f) != 0;
29856
29857  ;
29858  return 0;
29859}
29860_ACEOF
29861ac_clean_files="$ac_clean_files conftest.out"
29862# Check that the compiler produces executables we can run.  If not, either
29863# the compiler is broken, or we cross compile.
29864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29865$as_echo_n "checking whether we are cross compiling... " >&6; }
29866if test "$cross_compiling" != yes; then
29867  { { ac_try="$ac_link"
29868case "(($ac_try" in
29869  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29870  *) ac_try_echo=$ac_try;;
29871esac
29872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29873$as_echo "$ac_try_echo"; } >&5
29874  (eval "$ac_link") 2>&5
29875  ac_status=$?
29876  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29877  test $ac_status = 0; }
29878  if { ac_try='./conftest$ac_cv_exeext'
29879  { { case "(($ac_try" in
29880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29881  *) ac_try_echo=$ac_try;;
29882esac
29883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29884$as_echo "$ac_try_echo"; } >&5
29885  (eval "$ac_try") 2>&5
29886  ac_status=$?
29887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29888  test $ac_status = 0; }; }; then
29889    cross_compiling=no
29890  else
29891    if test "$cross_compiling" = maybe; then
29892	cross_compiling=yes
29893    else
29894	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29896as_fn_error $? "cannot run C compiled programs.
29897If you meant to cross compile, use \`--host'.
29898See \`config.log' for more details" "$LINENO" 5; }
29899    fi
29900  fi
29901fi
29902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29903$as_echo "$cross_compiling" >&6; }
29904
29905rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29906ac_clean_files=$ac_clean_files_save
29907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29908$as_echo_n "checking for suffix of object files... " >&6; }
29909if ${ac_cv_objext+:} false; then :
29910  $as_echo_n "(cached) " >&6
29911else
29912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29913/* end confdefs.h.  */
29914
29915int
29916main ()
29917{
29918
29919  ;
29920  return 0;
29921}
29922_ACEOF
29923rm -f conftest.o conftest.obj
29924if { { ac_try="$ac_compile"
29925case "(($ac_try" in
29926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29927  *) ac_try_echo=$ac_try;;
29928esac
29929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29930$as_echo "$ac_try_echo"; } >&5
29931  (eval "$ac_compile") 2>&5
29932  ac_status=$?
29933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29934  test $ac_status = 0; }; then :
29935  for ac_file in conftest.o conftest.obj conftest.*; do
29936  test -f "$ac_file" || continue;
29937  case $ac_file in
29938    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29939    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29940       break;;
29941  esac
29942done
29943else
29944  $as_echo "$as_me: failed program was:" >&5
29945sed 's/^/| /' conftest.$ac_ext >&5
29946
29947{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29949as_fn_error $? "cannot compute suffix of object files: cannot compile
29950See \`config.log' for more details" "$LINENO" 5; }
29951fi
29952rm -f conftest.$ac_cv_objext conftest.$ac_ext
29953fi
29954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29955$as_echo "$ac_cv_objext" >&6; }
29956OBJEXT=$ac_cv_objext
29957ac_objext=$OBJEXT
29958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29959$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29960if ${ac_cv_c_compiler_gnu+:} false; then :
29961  $as_echo_n "(cached) " >&6
29962else
29963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29964/* end confdefs.h.  */
29965
29966int
29967main ()
29968{
29969#ifndef __GNUC__
29970       choke me
29971#endif
29972
29973  ;
29974  return 0;
29975}
29976_ACEOF
29977if ac_fn_c_try_compile "$LINENO"; then :
29978  ac_compiler_gnu=yes
29979else
29980  ac_compiler_gnu=no
29981fi
29982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29983ac_cv_c_compiler_gnu=$ac_compiler_gnu
29984
29985fi
29986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29987$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29988if test $ac_compiler_gnu = yes; then
29989  GCC=yes
29990else
29991  GCC=
29992fi
29993ac_test_CFLAGS=${CFLAGS+set}
29994ac_save_CFLAGS=$CFLAGS
29995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29996$as_echo_n "checking whether $CC accepts -g... " >&6; }
29997if ${ac_cv_prog_cc_g+:} false; then :
29998  $as_echo_n "(cached) " >&6
29999else
30000  ac_save_c_werror_flag=$ac_c_werror_flag
30001   ac_c_werror_flag=yes
30002   ac_cv_prog_cc_g=no
30003   CFLAGS="-g"
30004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30005/* end confdefs.h.  */
30006
30007int
30008main ()
30009{
30010
30011  ;
30012  return 0;
30013}
30014_ACEOF
30015if ac_fn_c_try_compile "$LINENO"; then :
30016  ac_cv_prog_cc_g=yes
30017else
30018  CFLAGS=""
30019      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30020/* end confdefs.h.  */
30021
30022int
30023main ()
30024{
30025
30026  ;
30027  return 0;
30028}
30029_ACEOF
30030if ac_fn_c_try_compile "$LINENO"; then :
30031
30032else
30033  ac_c_werror_flag=$ac_save_c_werror_flag
30034	 CFLAGS="-g"
30035	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30036/* end confdefs.h.  */
30037
30038int
30039main ()
30040{
30041
30042  ;
30043  return 0;
30044}
30045_ACEOF
30046if ac_fn_c_try_compile "$LINENO"; then :
30047  ac_cv_prog_cc_g=yes
30048fi
30049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30050fi
30051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30052fi
30053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30054   ac_c_werror_flag=$ac_save_c_werror_flag
30055fi
30056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30057$as_echo "$ac_cv_prog_cc_g" >&6; }
30058if test "$ac_test_CFLAGS" = set; then
30059  CFLAGS=$ac_save_CFLAGS
30060elif test $ac_cv_prog_cc_g = yes; then
30061  if test "$GCC" = yes; then
30062    CFLAGS="-g -O2"
30063  else
30064    CFLAGS="-g"
30065  fi
30066else
30067  if test "$GCC" = yes; then
30068    CFLAGS="-O2"
30069  else
30070    CFLAGS=
30071  fi
30072fi
30073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30074$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30075if ${ac_cv_prog_cc_c89+:} false; then :
30076  $as_echo_n "(cached) " >&6
30077else
30078  ac_cv_prog_cc_c89=no
30079ac_save_CC=$CC
30080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30081/* end confdefs.h.  */
30082#include <stdarg.h>
30083#include <stdio.h>
30084struct stat;
30085/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30086struct buf { int x; };
30087FILE * (*rcsopen) (struct buf *, struct stat *, int);
30088static char *e (p, i)
30089     char **p;
30090     int i;
30091{
30092  return p[i];
30093}
30094static char *f (char * (*g) (char **, int), char **p, ...)
30095{
30096  char *s;
30097  va_list v;
30098  va_start (v,p);
30099  s = g (p, va_arg (v,int));
30100  va_end (v);
30101  return s;
30102}
30103
30104/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30105   function prototypes and stuff, but not '\xHH' hex character constants.
30106   These don't provoke an error unfortunately, instead are silently treated
30107   as 'x'.  The following induces an error, until -std is added to get
30108   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30109   array size at least.  It's necessary to write '\x00'==0 to get something
30110   that's true only with -std.  */
30111int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30112
30113/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30114   inside strings and character constants.  */
30115#define FOO(x) 'x'
30116int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30117
30118int test (int i, double x);
30119struct s1 {int (*f) (int a);};
30120struct s2 {int (*f) (double a);};
30121int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30122int argc;
30123char **argv;
30124int
30125main ()
30126{
30127return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30128  ;
30129  return 0;
30130}
30131_ACEOF
30132for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30133	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30134do
30135  CC="$ac_save_CC $ac_arg"
30136  if ac_fn_c_try_compile "$LINENO"; then :
30137  ac_cv_prog_cc_c89=$ac_arg
30138fi
30139rm -f core conftest.err conftest.$ac_objext
30140  test "x$ac_cv_prog_cc_c89" != "xno" && break
30141done
30142rm -f conftest.$ac_ext
30143CC=$ac_save_CC
30144
30145fi
30146# AC_CACHE_VAL
30147case "x$ac_cv_prog_cc_c89" in
30148  x)
30149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30150$as_echo "none needed" >&6; } ;;
30151  xno)
30152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30153$as_echo "unsupported" >&6; } ;;
30154  *)
30155    CC="$CC $ac_cv_prog_cc_c89"
30156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30157$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30158esac
30159if test "x$ac_cv_prog_cc_c89" != xno; then :
30160
30161fi
30162
30163ac_ext=cpp
30164ac_cpp='$CXXCPP $CPPFLAGS'
30165ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30166ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30167ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30168
30169
30170
30171  COMPILER_NAME=C++
30172  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30173
30174  if test "x$CXX" != x; then
30175    # User has supplied compiler name already, always let that override.
30176    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30177$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30178    if test "x`basename $CXX`" = "x$CXX"; then
30179      # A command without a complete path is provided, search $PATH.
30180
30181      for ac_prog in $CXX
30182do
30183  # Extract the first word of "$ac_prog", so it can be a program name with args.
30184set dummy $ac_prog; ac_word=$2
30185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30186$as_echo_n "checking for $ac_word... " >&6; }
30187if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30188  $as_echo_n "(cached) " >&6
30189else
30190  case $POTENTIAL_CXX in
30191  [\\/]* | ?:[\\/]*)
30192  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30193  ;;
30194  *)
30195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30196for as_dir in $PATH
30197do
30198  IFS=$as_save_IFS
30199  test -z "$as_dir" && as_dir=.
30200    for ac_exec_ext in '' $ac_executable_extensions; do
30201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30202    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30204    break 2
30205  fi
30206done
30207  done
30208IFS=$as_save_IFS
30209
30210  ;;
30211esac
30212fi
30213POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30214if test -n "$POTENTIAL_CXX"; then
30215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30216$as_echo "$POTENTIAL_CXX" >&6; }
30217else
30218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30219$as_echo "no" >&6; }
30220fi
30221
30222
30223  test -n "$POTENTIAL_CXX" && break
30224done
30225
30226      if test "x$POTENTIAL_CXX" != x; then
30227        CXX=$POTENTIAL_CXX
30228      else
30229        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30230      fi
30231    else
30232      # Otherwise it might already be a complete path
30233      if test ! -x "$CXX"; then
30234        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30235      fi
30236    fi
30237  else
30238    # No user supplied value. Locate compiler ourselves.
30239
30240    # If we are cross compiling, assume cross compilation tools follows the
30241    # cross compilation standard where they are prefixed with the autoconf
30242    # standard name for the target. For example the binary
30243    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30244    # If we are not cross compiling, then the default compiler name will be
30245    # used.
30246
30247    CXX=
30248    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30249    # before checking the rest of the PATH.
30250    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30251    # step, this should not be necessary.
30252    if test -n "$TOOLCHAIN_PATH"; then
30253      PATH_save="$PATH"
30254      PATH="$TOOLCHAIN_PATH"
30255      for ac_prog in $SEARCH_LIST
30256do
30257  # Extract the first word of "$ac_prog", so it can be a program name with args.
30258set dummy $ac_prog; ac_word=$2
30259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30260$as_echo_n "checking for $ac_word... " >&6; }
30261if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30262  $as_echo_n "(cached) " >&6
30263else
30264  case $TOOLCHAIN_PATH_CXX in
30265  [\\/]* | ?:[\\/]*)
30266  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30267  ;;
30268  *)
30269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30270for as_dir in $PATH
30271do
30272  IFS=$as_save_IFS
30273  test -z "$as_dir" && as_dir=.
30274    for ac_exec_ext in '' $ac_executable_extensions; do
30275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30276    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30278    break 2
30279  fi
30280done
30281  done
30282IFS=$as_save_IFS
30283
30284  ;;
30285esac
30286fi
30287TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30288if test -n "$TOOLCHAIN_PATH_CXX"; then
30289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30290$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30291else
30292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30293$as_echo "no" >&6; }
30294fi
30295
30296
30297  test -n "$TOOLCHAIN_PATH_CXX" && break
30298done
30299
30300      CXX=$TOOLCHAIN_PATH_CXX
30301      PATH="$PATH_save"
30302    fi
30303
30304    # AC_PATH_PROGS can't be run multiple times with the same variable,
30305    # so create a new name for this run.
30306    if test "x$CXX" = x; then
30307      for ac_prog in $SEARCH_LIST
30308do
30309  # Extract the first word of "$ac_prog", so it can be a program name with args.
30310set dummy $ac_prog; ac_word=$2
30311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30312$as_echo_n "checking for $ac_word... " >&6; }
30313if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30314  $as_echo_n "(cached) " >&6
30315else
30316  case $POTENTIAL_CXX in
30317  [\\/]* | ?:[\\/]*)
30318  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30319  ;;
30320  *)
30321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30322for as_dir in $PATH
30323do
30324  IFS=$as_save_IFS
30325  test -z "$as_dir" && as_dir=.
30326    for ac_exec_ext in '' $ac_executable_extensions; do
30327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30328    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30330    break 2
30331  fi
30332done
30333  done
30334IFS=$as_save_IFS
30335
30336  ;;
30337esac
30338fi
30339POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30340if test -n "$POTENTIAL_CXX"; then
30341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30342$as_echo "$POTENTIAL_CXX" >&6; }
30343else
30344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30345$as_echo "no" >&6; }
30346fi
30347
30348
30349  test -n "$POTENTIAL_CXX" && break
30350done
30351
30352      CXX=$POTENTIAL_CXX
30353    fi
30354
30355    if test "x$CXX" = x; then
30356
30357  # Print a helpful message on how to acquire the necessary build dependency.
30358  # devkit is the help tag: freetype, cups, pulse, alsa etc
30359  MISSING_DEPENDENCY=devkit
30360
30361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30362    cygwin_help $MISSING_DEPENDENCY
30363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30364    msys_help $MISSING_DEPENDENCY
30365  else
30366    PKGHANDLER_COMMAND=
30367
30368    case $PKGHANDLER in
30369      apt-get)
30370        apt_help     $MISSING_DEPENDENCY ;;
30371      yum)
30372        yum_help     $MISSING_DEPENDENCY ;;
30373      port)
30374        port_help    $MISSING_DEPENDENCY ;;
30375      pkgutil)
30376        pkgutil_help $MISSING_DEPENDENCY ;;
30377      pkgadd)
30378        pkgadd_help  $MISSING_DEPENDENCY ;;
30379    esac
30380
30381    if test "x$PKGHANDLER_COMMAND" != x; then
30382      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30383    fi
30384  fi
30385
30386      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30387    fi
30388  fi
30389
30390  # Now we have a compiler binary in CXX. Make sure it's okay.
30391
30392  # Only process if variable expands to non-empty
30393
30394  if test "x$CXX" != x; then
30395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30396
30397  # First separate the path from the arguments. This will split at the first
30398  # space.
30399  complete="$CXX"
30400  path="${complete%% *}"
30401  tmp="$complete EOL"
30402  arguments="${tmp#* }"
30403
30404  # Input might be given as Windows format, start by converting to
30405  # unix format.
30406  new_path=`$CYGPATH -u "$path"`
30407
30408  # Now try to locate executable using which
30409  new_path=`$WHICH "$new_path" 2> /dev/null`
30410  # bat and cmd files are not always considered executable in cygwin causing which
30411  # to not find them
30412  if test "x$new_path" = x \
30413      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30414      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30415    new_path=`$CYGPATH -u "$path"`
30416  fi
30417  if test "x$new_path" = x; then
30418    # Oops. Which didn't find the executable.
30419    # The splitting of arguments from the executable at a space might have been incorrect,
30420    # since paths with space are more likely in Windows. Give it another try with the whole
30421    # argument.
30422    path="$complete"
30423    arguments="EOL"
30424    new_path=`$CYGPATH -u "$path"`
30425    new_path=`$WHICH "$new_path" 2> /dev/null`
30426    # bat and cmd files are not always considered executable in cygwin causing which
30427    # to not find them
30428    if test "x$new_path" = x \
30429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30431      new_path=`$CYGPATH -u "$path"`
30432    fi
30433    if test "x$new_path" = x; then
30434      # It's still not found. Now this is an unrecoverable error.
30435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30436$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30437      has_space=`$ECHO "$complete" | $GREP " "`
30438      if test "x$has_space" != x; then
30439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30441      fi
30442      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30443    fi
30444  fi
30445
30446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30449  # "foo.exe" is OK but "foo" is an error.
30450  #
30451  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30452  # It is also a way to make sure we got the proper file name for the real test later on.
30453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30454  if test "x$test_shortpath" = x; then
30455    # Short path failed, file does not exist as specified.
30456    # Try adding .exe or .cmd
30457    if test -f "${new_path}.exe"; then
30458      input_to_shortpath="${new_path}.exe"
30459    elif test -f "${new_path}.cmd"; then
30460      input_to_shortpath="${new_path}.cmd"
30461    else
30462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30463$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30466      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30467    fi
30468  else
30469    input_to_shortpath="$new_path"
30470  fi
30471
30472  # Call helper function which possibly converts this using DOS-style short mode.
30473  # If so, the updated path is stored in $new_path.
30474  new_path="$input_to_shortpath"
30475
30476  input_path="$input_to_shortpath"
30477  # Check if we need to convert this using DOS-style short mode. If the path
30478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30479  # take no chances and rewrite it.
30480  # Note: m4 eats our [], so we need to use [ and ] instead.
30481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30482  if test "x$has_forbidden_chars" != x; then
30483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30487      # Going to short mode and back again did indeed matter. Since short mode is
30488      # case insensitive, let's make it lowercase to improve readability.
30489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30490      # Now convert it back to Unix-style (cygpath)
30491      input_path=`$CYGPATH -u "$shortmode_path"`
30492      new_path="$input_path"
30493    fi
30494  fi
30495
30496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30497  if test "x$test_cygdrive_prefix" = x; then
30498    # As a simple fix, exclude /usr/bin since it's not a real path.
30499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30501      # a path prefixed by /cygdrive for fixpath to work.
30502      new_path="$CYGWIN_ROOT_PATH$input_path"
30503    fi
30504  fi
30505
30506  # remove trailing .exe if any
30507  new_path="${new_path/%.exe/}"
30508
30509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30510
30511  # First separate the path from the arguments. This will split at the first
30512  # space.
30513  complete="$CXX"
30514  path="${complete%% *}"
30515  tmp="$complete EOL"
30516  arguments="${tmp#* }"
30517
30518  # Input might be given as Windows format, start by converting to
30519  # unix format.
30520  new_path="$path"
30521
30522  windows_path="$new_path"
30523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30524    unix_path=`$CYGPATH -u "$windows_path"`
30525    new_path="$unix_path"
30526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30528    new_path="$unix_path"
30529  fi
30530
30531
30532  # Now try to locate executable using which
30533  new_path=`$WHICH "$new_path" 2> /dev/null`
30534
30535  if test "x$new_path" = x; then
30536    # Oops. Which didn't find the executable.
30537    # The splitting of arguments from the executable at a space might have been incorrect,
30538    # since paths with space are more likely in Windows. Give it another try with the whole
30539    # argument.
30540    path="$complete"
30541    arguments="EOL"
30542    new_path="$path"
30543
30544  windows_path="$new_path"
30545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30546    unix_path=`$CYGPATH -u "$windows_path"`
30547    new_path="$unix_path"
30548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30550    new_path="$unix_path"
30551  fi
30552
30553
30554    new_path=`$WHICH "$new_path" 2> /dev/null`
30555    # bat and cmd files are not always considered executable in MSYS causing which
30556    # to not find them
30557    if test "x$new_path" = x \
30558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30560      new_path="$path"
30561
30562  windows_path="$new_path"
30563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30564    unix_path=`$CYGPATH -u "$windows_path"`
30565    new_path="$unix_path"
30566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30568    new_path="$unix_path"
30569  fi
30570
30571    fi
30572
30573    if test "x$new_path" = x; then
30574      # It's still not found. Now this is an unrecoverable error.
30575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30576$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30577      has_space=`$ECHO "$complete" | $GREP " "`
30578      if test "x$has_space" != x; then
30579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30581      fi
30582      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30583    fi
30584  fi
30585
30586  # Now new_path has a complete unix path to the binary
30587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30588    # Keep paths in /bin as-is, but remove trailing .exe if any
30589    new_path="${new_path/%.exe/}"
30590    # Do not save /bin paths to all_fixpath_prefixes!
30591  else
30592    # Not in mixed or Windows style, start by that.
30593    new_path=`cmd //c echo $new_path`
30594
30595  input_path="$new_path"
30596  # Check if we need to convert this using DOS-style short mode. If the path
30597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30598  # take no chances and rewrite it.
30599  # Note: m4 eats our [], so we need to use [ and ] instead.
30600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30601  if test "x$has_forbidden_chars" != x; then
30602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30604  fi
30605
30606    # Output is in $new_path
30607
30608  windows_path="$new_path"
30609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30610    unix_path=`$CYGPATH -u "$windows_path"`
30611    new_path="$unix_path"
30612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30614    new_path="$unix_path"
30615  fi
30616
30617    # remove trailing .exe if any
30618    new_path="${new_path/%.exe/}"
30619
30620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30622  fi
30623
30624    else
30625      # We're on a unix platform. Hooray! :)
30626      # First separate the path from the arguments. This will split at the first
30627      # space.
30628      complete="$CXX"
30629      path="${complete%% *}"
30630      tmp="$complete EOL"
30631      arguments="${tmp#* }"
30632
30633      # Cannot rely on the command "which" here since it doesn't always work.
30634      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30635      if test -z "$is_absolute_path"; then
30636        # Path to executable is not absolute. Find it.
30637        IFS_save="$IFS"
30638        IFS=:
30639        for p in $PATH; do
30640          if test -f "$p/$path" && test -x "$p/$path"; then
30641            new_path="$p/$path"
30642            break
30643          fi
30644        done
30645        IFS="$IFS_save"
30646      else
30647        # This is an absolute path, we can use it without further modifications.
30648        new_path="$path"
30649      fi
30650
30651      if test "x$new_path" = x; then
30652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30653$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30654        has_space=`$ECHO "$complete" | $GREP " "`
30655        if test "x$has_space" != x; then
30656          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30657$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30658        fi
30659        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30660      fi
30661    fi
30662
30663    # Now join together the path and the arguments once again
30664    if test "x$arguments" != xEOL; then
30665      new_complete="$new_path ${arguments% *}"
30666    else
30667      new_complete="$new_path"
30668    fi
30669
30670    if test "x$complete" != "x$new_complete"; then
30671      CXX="$new_complete"
30672      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30673$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30674    fi
30675  fi
30676
30677  TEST_COMPILER="$CXX"
30678  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30679  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30680  if test "x$OPENJDK_BUILD_OS" != xaix; then
30681    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30683$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30684
30685  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30686    # Follow a chain of symbolic links. Use readlink
30687    # where it exists, else fall back to horribly
30688    # complicated shell code.
30689    if test "x$READLINK_TESTED" != yes; then
30690      # On MacOSX there is a readlink tool with a different
30691      # purpose than the GNU readlink tool. Check the found readlink.
30692      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30693      if test "x$ISGNU" = x; then
30694        # A readlink that we do not know how to use.
30695        # Are there other non-GNU readlinks out there?
30696        READLINK_TESTED=yes
30697        READLINK=
30698      fi
30699    fi
30700
30701    if test "x$READLINK" != x; then
30702      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30703    else
30704      # Save the current directory for restoring afterwards
30705      STARTDIR=$PWD
30706      COUNTER=0
30707      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30708      sym_link_file=`$BASENAME $TEST_COMPILER`
30709      cd $sym_link_dir
30710      # Use -P flag to resolve symlinks in directories.
30711      cd `$THEPWDCMD -P`
30712      sym_link_dir=`$THEPWDCMD -P`
30713      # Resolve file symlinks
30714      while test $COUNTER -lt 20; do
30715        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30716        if test "x$ISLINK" == x; then
30717          # This is not a symbolic link! We are done!
30718          break
30719        fi
30720        # Again resolve directory symlinks since the target of the just found
30721        # link could be in a different directory
30722        cd `$DIRNAME $ISLINK`
30723        sym_link_dir=`$THEPWDCMD -P`
30724        sym_link_file=`$BASENAME $ISLINK`
30725        let COUNTER=COUNTER+1
30726      done
30727      cd $STARTDIR
30728      TEST_COMPILER=$sym_link_dir/$sym_link_file
30729    fi
30730  fi
30731
30732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30733$as_echo "$TEST_COMPILER" >&6; }
30734  fi
30735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30736$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30737
30738  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30739  if test "x$COMPILER_BASENAME" = "xccache"; then
30740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30741$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30742    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30743    # We want to control ccache invocation ourselves, so ignore this cc and try
30744    # searching again.
30745
30746    # Remove the path to the fake ccache cc from the PATH
30747    RETRY_COMPILER_SAVED_PATH="$PATH"
30748    COMPILER_DIRNAME=`$DIRNAME $CXX`
30749    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30750
30751    # Try again looking for our compiler
30752    if test -n "$ac_tool_prefix"; then
30753  for ac_prog in $TOOLCHAIN_CXX_BINARY
30754  do
30755    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30758$as_echo_n "checking for $ac_word... " >&6; }
30759if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30760  $as_echo_n "(cached) " >&6
30761else
30762  if test -n "$PROPER_COMPILER_CXX"; then
30763  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30764else
30765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30766for as_dir in $PATH
30767do
30768  IFS=$as_save_IFS
30769  test -z "$as_dir" && as_dir=.
30770    for ac_exec_ext in '' $ac_executable_extensions; do
30771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30772    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30774    break 2
30775  fi
30776done
30777  done
30778IFS=$as_save_IFS
30779
30780fi
30781fi
30782PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30783if test -n "$PROPER_COMPILER_CXX"; then
30784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30785$as_echo "$PROPER_COMPILER_CXX" >&6; }
30786else
30787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30788$as_echo "no" >&6; }
30789fi
30790
30791
30792    test -n "$PROPER_COMPILER_CXX" && break
30793  done
30794fi
30795if test -z "$PROPER_COMPILER_CXX"; then
30796  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30797  for ac_prog in $TOOLCHAIN_CXX_BINARY
30798do
30799  # Extract the first word of "$ac_prog", so it can be a program name with args.
30800set dummy $ac_prog; ac_word=$2
30801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30802$as_echo_n "checking for $ac_word... " >&6; }
30803if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30804  $as_echo_n "(cached) " >&6
30805else
30806  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30807  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30808else
30809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30810for as_dir in $PATH
30811do
30812  IFS=$as_save_IFS
30813  test -z "$as_dir" && as_dir=.
30814    for ac_exec_ext in '' $ac_executable_extensions; do
30815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30816    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30818    break 2
30819  fi
30820done
30821  done
30822IFS=$as_save_IFS
30823
30824fi
30825fi
30826ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30827if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30829$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30830else
30831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30832$as_echo "no" >&6; }
30833fi
30834
30835
30836  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30837done
30838
30839  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30840    PROPER_COMPILER_CXX=""
30841  else
30842    case $cross_compiling:$ac_tool_warned in
30843yes:)
30844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30846ac_tool_warned=yes ;;
30847esac
30848    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30849  fi
30850fi
30851
30852
30853  # Only process if variable expands to non-empty
30854
30855  if test "x$PROPER_COMPILER_CXX" != x; then
30856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30857
30858  # First separate the path from the arguments. This will split at the first
30859  # space.
30860  complete="$PROPER_COMPILER_CXX"
30861  path="${complete%% *}"
30862  tmp="$complete EOL"
30863  arguments="${tmp#* }"
30864
30865  # Input might be given as Windows format, start by converting to
30866  # unix format.
30867  new_path=`$CYGPATH -u "$path"`
30868
30869  # Now try to locate executable using which
30870  new_path=`$WHICH "$new_path" 2> /dev/null`
30871  # bat and cmd files are not always considered executable in cygwin causing which
30872  # to not find them
30873  if test "x$new_path" = x \
30874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30876    new_path=`$CYGPATH -u "$path"`
30877  fi
30878  if test "x$new_path" = x; then
30879    # Oops. Which didn't find the executable.
30880    # The splitting of arguments from the executable at a space might have been incorrect,
30881    # since paths with space are more likely in Windows. Give it another try with the whole
30882    # argument.
30883    path="$complete"
30884    arguments="EOL"
30885    new_path=`$CYGPATH -u "$path"`
30886    new_path=`$WHICH "$new_path" 2> /dev/null`
30887    # bat and cmd files are not always considered executable in cygwin causing which
30888    # to not find them
30889    if test "x$new_path" = x \
30890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30892      new_path=`$CYGPATH -u "$path"`
30893    fi
30894    if test "x$new_path" = x; then
30895      # It's still not found. Now this is an unrecoverable error.
30896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30897$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30898      has_space=`$ECHO "$complete" | $GREP " "`
30899      if test "x$has_space" != x; then
30900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30902      fi
30903      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30904    fi
30905  fi
30906
30907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30910  # "foo.exe" is OK but "foo" is an error.
30911  #
30912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30913  # It is also a way to make sure we got the proper file name for the real test later on.
30914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30915  if test "x$test_shortpath" = x; then
30916    # Short path failed, file does not exist as specified.
30917    # Try adding .exe or .cmd
30918    if test -f "${new_path}.exe"; then
30919      input_to_shortpath="${new_path}.exe"
30920    elif test -f "${new_path}.cmd"; then
30921      input_to_shortpath="${new_path}.cmd"
30922    else
30923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30924$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30927      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30928    fi
30929  else
30930    input_to_shortpath="$new_path"
30931  fi
30932
30933  # Call helper function which possibly converts this using DOS-style short mode.
30934  # If so, the updated path is stored in $new_path.
30935  new_path="$input_to_shortpath"
30936
30937  input_path="$input_to_shortpath"
30938  # Check if we need to convert this using DOS-style short mode. If the path
30939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30940  # take no chances and rewrite it.
30941  # Note: m4 eats our [], so we need to use [ and ] instead.
30942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30943  if test "x$has_forbidden_chars" != x; then
30944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30948      # Going to short mode and back again did indeed matter. Since short mode is
30949      # case insensitive, let's make it lowercase to improve readability.
30950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30951      # Now convert it back to Unix-style (cygpath)
30952      input_path=`$CYGPATH -u "$shortmode_path"`
30953      new_path="$input_path"
30954    fi
30955  fi
30956
30957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30958  if test "x$test_cygdrive_prefix" = x; then
30959    # As a simple fix, exclude /usr/bin since it's not a real path.
30960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30962      # a path prefixed by /cygdrive for fixpath to work.
30963      new_path="$CYGWIN_ROOT_PATH$input_path"
30964    fi
30965  fi
30966
30967  # remove trailing .exe if any
30968  new_path="${new_path/%.exe/}"
30969
30970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30971
30972  # First separate the path from the arguments. This will split at the first
30973  # space.
30974  complete="$PROPER_COMPILER_CXX"
30975  path="${complete%% *}"
30976  tmp="$complete EOL"
30977  arguments="${tmp#* }"
30978
30979  # Input might be given as Windows format, start by converting to
30980  # unix format.
30981  new_path="$path"
30982
30983  windows_path="$new_path"
30984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30985    unix_path=`$CYGPATH -u "$windows_path"`
30986    new_path="$unix_path"
30987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30989    new_path="$unix_path"
30990  fi
30991
30992
30993  # Now try to locate executable using which
30994  new_path=`$WHICH "$new_path" 2> /dev/null`
30995
30996  if test "x$new_path" = x; then
30997    # Oops. Which didn't find the executable.
30998    # The splitting of arguments from the executable at a space might have been incorrect,
30999    # since paths with space are more likely in Windows. Give it another try with the whole
31000    # argument.
31001    path="$complete"
31002    arguments="EOL"
31003    new_path="$path"
31004
31005  windows_path="$new_path"
31006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31007    unix_path=`$CYGPATH -u "$windows_path"`
31008    new_path="$unix_path"
31009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31011    new_path="$unix_path"
31012  fi
31013
31014
31015    new_path=`$WHICH "$new_path" 2> /dev/null`
31016    # bat and cmd files are not always considered executable in MSYS causing which
31017    # to not find them
31018    if test "x$new_path" = x \
31019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31021      new_path="$path"
31022
31023  windows_path="$new_path"
31024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31025    unix_path=`$CYGPATH -u "$windows_path"`
31026    new_path="$unix_path"
31027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31029    new_path="$unix_path"
31030  fi
31031
31032    fi
31033
31034    if test "x$new_path" = x; then
31035      # It's still not found. Now this is an unrecoverable error.
31036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31037$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31038      has_space=`$ECHO "$complete" | $GREP " "`
31039      if test "x$has_space" != x; then
31040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31042      fi
31043      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31044    fi
31045  fi
31046
31047  # Now new_path has a complete unix path to the binary
31048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31049    # Keep paths in /bin as-is, but remove trailing .exe if any
31050    new_path="${new_path/%.exe/}"
31051    # Do not save /bin paths to all_fixpath_prefixes!
31052  else
31053    # Not in mixed or Windows style, start by that.
31054    new_path=`cmd //c echo $new_path`
31055
31056  input_path="$new_path"
31057  # Check if we need to convert this using DOS-style short mode. If the path
31058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31059  # take no chances and rewrite it.
31060  # Note: m4 eats our [], so we need to use [ and ] instead.
31061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31062  if test "x$has_forbidden_chars" != x; then
31063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31065  fi
31066
31067    # Output is in $new_path
31068
31069  windows_path="$new_path"
31070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31071    unix_path=`$CYGPATH -u "$windows_path"`
31072    new_path="$unix_path"
31073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31075    new_path="$unix_path"
31076  fi
31077
31078    # remove trailing .exe if any
31079    new_path="${new_path/%.exe/}"
31080
31081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31083  fi
31084
31085    else
31086      # We're on a unix platform. Hooray! :)
31087      # First separate the path from the arguments. This will split at the first
31088      # space.
31089      complete="$PROPER_COMPILER_CXX"
31090      path="${complete%% *}"
31091      tmp="$complete EOL"
31092      arguments="${tmp#* }"
31093
31094      # Cannot rely on the command "which" here since it doesn't always work.
31095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31096      if test -z "$is_absolute_path"; then
31097        # Path to executable is not absolute. Find it.
31098        IFS_save="$IFS"
31099        IFS=:
31100        for p in $PATH; do
31101          if test -f "$p/$path" && test -x "$p/$path"; then
31102            new_path="$p/$path"
31103            break
31104          fi
31105        done
31106        IFS="$IFS_save"
31107      else
31108        # This is an absolute path, we can use it without further modifications.
31109        new_path="$path"
31110      fi
31111
31112      if test "x$new_path" = x; then
31113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31114$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31115        has_space=`$ECHO "$complete" | $GREP " "`
31116        if test "x$has_space" != x; then
31117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31119        fi
31120        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31121      fi
31122    fi
31123
31124    # Now join together the path and the arguments once again
31125    if test "x$arguments" != xEOL; then
31126      new_complete="$new_path ${arguments% *}"
31127    else
31128      new_complete="$new_path"
31129    fi
31130
31131    if test "x$complete" != "x$new_complete"; then
31132      PROPER_COMPILER_CXX="$new_complete"
31133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31134$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31135    fi
31136  fi
31137
31138    PATH="$RETRY_COMPILER_SAVED_PATH"
31139
31140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31141$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31142
31143  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31144    # Follow a chain of symbolic links. Use readlink
31145    # where it exists, else fall back to horribly
31146    # complicated shell code.
31147    if test "x$READLINK_TESTED" != yes; then
31148      # On MacOSX there is a readlink tool with a different
31149      # purpose than the GNU readlink tool. Check the found readlink.
31150      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31151      if test "x$ISGNU" = x; then
31152        # A readlink that we do not know how to use.
31153        # Are there other non-GNU readlinks out there?
31154        READLINK_TESTED=yes
31155        READLINK=
31156      fi
31157    fi
31158
31159    if test "x$READLINK" != x; then
31160      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31161    else
31162      # Save the current directory for restoring afterwards
31163      STARTDIR=$PWD
31164      COUNTER=0
31165      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31166      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31167      cd $sym_link_dir
31168      # Use -P flag to resolve symlinks in directories.
31169      cd `$THEPWDCMD -P`
31170      sym_link_dir=`$THEPWDCMD -P`
31171      # Resolve file symlinks
31172      while test $COUNTER -lt 20; do
31173        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31174        if test "x$ISLINK" == x; then
31175          # This is not a symbolic link! We are done!
31176          break
31177        fi
31178        # Again resolve directory symlinks since the target of the just found
31179        # link could be in a different directory
31180        cd `$DIRNAME $ISLINK`
31181        sym_link_dir=`$THEPWDCMD -P`
31182        sym_link_file=`$BASENAME $ISLINK`
31183        let COUNTER=COUNTER+1
31184      done
31185      cd $STARTDIR
31186      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31187    fi
31188  fi
31189
31190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31191$as_echo "$PROPER_COMPILER_CXX" >&6; }
31192    CXX="$PROPER_COMPILER_CXX"
31193  else
31194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31195$as_echo "no, keeping CXX" >&6; }
31196  fi
31197
31198
31199  COMPILER=$CXX
31200  COMPILER_NAME=$COMPILER_NAME
31201
31202  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31203    # cc -V output typically looks like
31204    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31205    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31206    # Check that this is likely to be the Solaris Studio cc.
31207    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31208    if test $? -ne 0; then
31209      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31210      { $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
31211$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31212      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31213$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31214      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31215$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31216      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31217    fi
31218    # Remove usage instructions (if present), and
31219    # collapse compiler output into a single line
31220    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31221        $SED -e 's/ *[Uu]sage:.*//'`
31222    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31223        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31224  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31225    # xlc -qversion output typically looks like
31226    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31227    #     Version: 11.01.0000.0015
31228    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31229    # Check that this is likely to be the IBM XL C compiler.
31230    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31231    if test $? -ne 0; then
31232      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31233      { $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
31234$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31235      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31236$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31237      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31238$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31239      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31240    fi
31241    # Collapse compiler output into a single line
31242    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31243    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31244        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31245  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31246    # There is no specific version flag, but all output starts with a version string.
31247    # First line typically looks something like:
31248    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31249    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31250    # Check that this is likely to be Microsoft CL.EXE.
31251    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31252    if test $? -ne 0; then
31253      { $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
31254$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31255      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31256$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31257      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31258    fi
31259    # Collapse compiler output into a single line
31260    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31261    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31262        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31263  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31264    # gcc --version output typically looks like
31265    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31266    #     Copyright (C) 2013 Free Software Foundation, Inc.
31267    #     This is free software; see the source for copying conditions.  There is NO
31268    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31269    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31270    # Check that this is likely to be GCC.
31271    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31272    if test $? -ne 0; then
31273      { $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
31274$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31275      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31276$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31277      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31278    fi
31279    # Remove Copyright and legalese from version string, and
31280    # collapse into a single line
31281    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31282        $SED -e 's/ *Copyright .*//'`
31283    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31284        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31285  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31286    # clang --version output typically looks like
31287    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31288    #    clang version 3.3 (tags/RELEASE_33/final)
31289    # or
31290    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31291    #    Target: x86_64-pc-linux-gnu
31292    #    Thread model: posix
31293    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31294    # Check that this is likely to be clang
31295    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31296    if test $? -ne 0; then
31297      { $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
31298$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31299      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31300$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31301      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31302    fi
31303    # Collapse compiler output into a single line
31304    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31305    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31306        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31307  else
31308      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31309  fi
31310  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31311  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31312  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31313  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31314
31315  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31316$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31317
31318
31319  # Now that we have resolved CXX ourself, let autoconf have its go at it
31320  ac_ext=cpp
31321ac_cpp='$CXXCPP $CPPFLAGS'
31322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31325if test -z "$CXX"; then
31326  if test -n "$CCC"; then
31327    CXX=$CCC
31328  else
31329    if test -n "$ac_tool_prefix"; then
31330  for ac_prog in $CXX
31331  do
31332    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31333set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31335$as_echo_n "checking for $ac_word... " >&6; }
31336if ${ac_cv_prog_CXX+:} false; then :
31337  $as_echo_n "(cached) " >&6
31338else
31339  if test -n "$CXX"; then
31340  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31341else
31342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31343for as_dir in $PATH
31344do
31345  IFS=$as_save_IFS
31346  test -z "$as_dir" && as_dir=.
31347    for ac_exec_ext in '' $ac_executable_extensions; do
31348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31349    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31351    break 2
31352  fi
31353done
31354  done
31355IFS=$as_save_IFS
31356
31357fi
31358fi
31359CXX=$ac_cv_prog_CXX
31360if test -n "$CXX"; then
31361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31362$as_echo "$CXX" >&6; }
31363else
31364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31365$as_echo "no" >&6; }
31366fi
31367
31368
31369    test -n "$CXX" && break
31370  done
31371fi
31372if test -z "$CXX"; then
31373  ac_ct_CXX=$CXX
31374  for ac_prog in $CXX
31375do
31376  # Extract the first word of "$ac_prog", so it can be a program name with args.
31377set dummy $ac_prog; ac_word=$2
31378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31379$as_echo_n "checking for $ac_word... " >&6; }
31380if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31381  $as_echo_n "(cached) " >&6
31382else
31383  if test -n "$ac_ct_CXX"; then
31384  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31385else
31386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31387for as_dir in $PATH
31388do
31389  IFS=$as_save_IFS
31390  test -z "$as_dir" && as_dir=.
31391    for ac_exec_ext in '' $ac_executable_extensions; do
31392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31393    ac_cv_prog_ac_ct_CXX="$ac_prog"
31394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31395    break 2
31396  fi
31397done
31398  done
31399IFS=$as_save_IFS
31400
31401fi
31402fi
31403ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31404if test -n "$ac_ct_CXX"; then
31405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31406$as_echo "$ac_ct_CXX" >&6; }
31407else
31408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31409$as_echo "no" >&6; }
31410fi
31411
31412
31413  test -n "$ac_ct_CXX" && break
31414done
31415
31416  if test "x$ac_ct_CXX" = x; then
31417    CXX="g++"
31418  else
31419    case $cross_compiling:$ac_tool_warned in
31420yes:)
31421{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31422$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31423ac_tool_warned=yes ;;
31424esac
31425    CXX=$ac_ct_CXX
31426  fi
31427fi
31428
31429  fi
31430fi
31431# Provide some information about the compiler.
31432$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31433set X $ac_compile
31434ac_compiler=$2
31435for ac_option in --version -v -V -qversion; do
31436  { { ac_try="$ac_compiler $ac_option >&5"
31437case "(($ac_try" in
31438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31439  *) ac_try_echo=$ac_try;;
31440esac
31441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31442$as_echo "$ac_try_echo"; } >&5
31443  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31444  ac_status=$?
31445  if test -s conftest.err; then
31446    sed '10a\
31447... rest of stderr output deleted ...
31448         10q' conftest.err >conftest.er1
31449    cat conftest.er1 >&5
31450  fi
31451  rm -f conftest.er1 conftest.err
31452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31453  test $ac_status = 0; }
31454done
31455
31456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31457$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31458if ${ac_cv_cxx_compiler_gnu+:} false; then :
31459  $as_echo_n "(cached) " >&6
31460else
31461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31462/* end confdefs.h.  */
31463
31464int
31465main ()
31466{
31467#ifndef __GNUC__
31468       choke me
31469#endif
31470
31471  ;
31472  return 0;
31473}
31474_ACEOF
31475if ac_fn_cxx_try_compile "$LINENO"; then :
31476  ac_compiler_gnu=yes
31477else
31478  ac_compiler_gnu=no
31479fi
31480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31481ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31482
31483fi
31484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31485$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31486if test $ac_compiler_gnu = yes; then
31487  GXX=yes
31488else
31489  GXX=
31490fi
31491ac_test_CXXFLAGS=${CXXFLAGS+set}
31492ac_save_CXXFLAGS=$CXXFLAGS
31493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31494$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31495if ${ac_cv_prog_cxx_g+:} false; then :
31496  $as_echo_n "(cached) " >&6
31497else
31498  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31499   ac_cxx_werror_flag=yes
31500   ac_cv_prog_cxx_g=no
31501   CXXFLAGS="-g"
31502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31503/* end confdefs.h.  */
31504
31505int
31506main ()
31507{
31508
31509  ;
31510  return 0;
31511}
31512_ACEOF
31513if ac_fn_cxx_try_compile "$LINENO"; then :
31514  ac_cv_prog_cxx_g=yes
31515else
31516  CXXFLAGS=""
31517      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31518/* end confdefs.h.  */
31519
31520int
31521main ()
31522{
31523
31524  ;
31525  return 0;
31526}
31527_ACEOF
31528if ac_fn_cxx_try_compile "$LINENO"; then :
31529
31530else
31531  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31532	 CXXFLAGS="-g"
31533	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31534/* end confdefs.h.  */
31535
31536int
31537main ()
31538{
31539
31540  ;
31541  return 0;
31542}
31543_ACEOF
31544if ac_fn_cxx_try_compile "$LINENO"; then :
31545  ac_cv_prog_cxx_g=yes
31546fi
31547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31548fi
31549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31550fi
31551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31552   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31553fi
31554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31555$as_echo "$ac_cv_prog_cxx_g" >&6; }
31556if test "$ac_test_CXXFLAGS" = set; then
31557  CXXFLAGS=$ac_save_CXXFLAGS
31558elif test $ac_cv_prog_cxx_g = yes; then
31559  if test "$GXX" = yes; then
31560    CXXFLAGS="-g -O2"
31561  else
31562    CXXFLAGS="-g"
31563  fi
31564else
31565  if test "$GXX" = yes; then
31566    CXXFLAGS="-O2"
31567  else
31568    CXXFLAGS=
31569  fi
31570fi
31571ac_ext=cpp
31572ac_cpp='$CXXCPP $CPPFLAGS'
31573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31576
31577
31578  #
31579  # Setup the preprocessor (CPP and CXXCPP)
31580  #
31581  ac_ext=c
31582ac_cpp='$CPP $CPPFLAGS'
31583ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31584ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31585ac_compiler_gnu=$ac_cv_c_compiler_gnu
31586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31587$as_echo_n "checking how to run the C preprocessor... " >&6; }
31588# On Suns, sometimes $CPP names a directory.
31589if test -n "$CPP" && test -d "$CPP"; then
31590  CPP=
31591fi
31592if test -z "$CPP"; then
31593  if ${ac_cv_prog_CPP+:} false; then :
31594  $as_echo_n "(cached) " >&6
31595else
31596      # Double quotes because CPP needs to be expanded
31597    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31598    do
31599      ac_preproc_ok=false
31600for ac_c_preproc_warn_flag in '' yes
31601do
31602  # Use a header file that comes with gcc, so configuring glibc
31603  # with a fresh cross-compiler works.
31604  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31605  # <limits.h> exists even on freestanding compilers.
31606  # On the NeXT, cc -E runs the code through the compiler's parser,
31607  # not just through cpp. "Syntax error" is here to catch this case.
31608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31609/* end confdefs.h.  */
31610#ifdef __STDC__
31611# include <limits.h>
31612#else
31613# include <assert.h>
31614#endif
31615		     Syntax error
31616_ACEOF
31617if ac_fn_c_try_cpp "$LINENO"; then :
31618
31619else
31620  # Broken: fails on valid input.
31621continue
31622fi
31623rm -f conftest.err conftest.i conftest.$ac_ext
31624
31625  # OK, works on sane cases.  Now check whether nonexistent headers
31626  # can be detected and how.
31627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31628/* end confdefs.h.  */
31629#include <ac_nonexistent.h>
31630_ACEOF
31631if ac_fn_c_try_cpp "$LINENO"; then :
31632  # Broken: success on invalid input.
31633continue
31634else
31635  # Passes both tests.
31636ac_preproc_ok=:
31637break
31638fi
31639rm -f conftest.err conftest.i conftest.$ac_ext
31640
31641done
31642# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31643rm -f conftest.i conftest.err conftest.$ac_ext
31644if $ac_preproc_ok; then :
31645  break
31646fi
31647
31648    done
31649    ac_cv_prog_CPP=$CPP
31650
31651fi
31652  CPP=$ac_cv_prog_CPP
31653else
31654  ac_cv_prog_CPP=$CPP
31655fi
31656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31657$as_echo "$CPP" >&6; }
31658ac_preproc_ok=false
31659for ac_c_preproc_warn_flag in '' yes
31660do
31661  # Use a header file that comes with gcc, so configuring glibc
31662  # with a fresh cross-compiler works.
31663  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31664  # <limits.h> exists even on freestanding compilers.
31665  # On the NeXT, cc -E runs the code through the compiler's parser,
31666  # not just through cpp. "Syntax error" is here to catch this case.
31667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31668/* end confdefs.h.  */
31669#ifdef __STDC__
31670# include <limits.h>
31671#else
31672# include <assert.h>
31673#endif
31674		     Syntax error
31675_ACEOF
31676if ac_fn_c_try_cpp "$LINENO"; then :
31677
31678else
31679  # Broken: fails on valid input.
31680continue
31681fi
31682rm -f conftest.err conftest.i conftest.$ac_ext
31683
31684  # OK, works on sane cases.  Now check whether nonexistent headers
31685  # can be detected and how.
31686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31687/* end confdefs.h.  */
31688#include <ac_nonexistent.h>
31689_ACEOF
31690if ac_fn_c_try_cpp "$LINENO"; then :
31691  # Broken: success on invalid input.
31692continue
31693else
31694  # Passes both tests.
31695ac_preproc_ok=:
31696break
31697fi
31698rm -f conftest.err conftest.i conftest.$ac_ext
31699
31700done
31701# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31702rm -f conftest.i conftest.err conftest.$ac_ext
31703if $ac_preproc_ok; then :
31704
31705else
31706  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31708as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31709See \`config.log' for more details" "$LINENO" 5; }
31710fi
31711
31712ac_ext=cpp
31713ac_cpp='$CXXCPP $CPPFLAGS'
31714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31717
31718
31719  # Only process if variable expands to non-empty
31720
31721  if test "x$CPP" != x; then
31722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31723
31724  # First separate the path from the arguments. This will split at the first
31725  # space.
31726  complete="$CPP"
31727  path="${complete%% *}"
31728  tmp="$complete EOL"
31729  arguments="${tmp#* }"
31730
31731  # Input might be given as Windows format, start by converting to
31732  # unix format.
31733  new_path=`$CYGPATH -u "$path"`
31734
31735  # Now try to locate executable using which
31736  new_path=`$WHICH "$new_path" 2> /dev/null`
31737  # bat and cmd files are not always considered executable in cygwin causing which
31738  # to not find them
31739  if test "x$new_path" = x \
31740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31742    new_path=`$CYGPATH -u "$path"`
31743  fi
31744  if test "x$new_path" = x; then
31745    # Oops. Which didn't find the executable.
31746    # The splitting of arguments from the executable at a space might have been incorrect,
31747    # since paths with space are more likely in Windows. Give it another try with the whole
31748    # argument.
31749    path="$complete"
31750    arguments="EOL"
31751    new_path=`$CYGPATH -u "$path"`
31752    new_path=`$WHICH "$new_path" 2> /dev/null`
31753    # bat and cmd files are not always considered executable in cygwin causing which
31754    # to not find them
31755    if test "x$new_path" = x \
31756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31758      new_path=`$CYGPATH -u "$path"`
31759    fi
31760    if test "x$new_path" = x; then
31761      # It's still not found. Now this is an unrecoverable error.
31762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31763$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31764      has_space=`$ECHO "$complete" | $GREP " "`
31765      if test "x$has_space" != x; then
31766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31768      fi
31769      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31770    fi
31771  fi
31772
31773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31776  # "foo.exe" is OK but "foo" is an error.
31777  #
31778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31779  # It is also a way to make sure we got the proper file name for the real test later on.
31780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31781  if test "x$test_shortpath" = x; then
31782    # Short path failed, file does not exist as specified.
31783    # Try adding .exe or .cmd
31784    if test -f "${new_path}.exe"; then
31785      input_to_shortpath="${new_path}.exe"
31786    elif test -f "${new_path}.cmd"; then
31787      input_to_shortpath="${new_path}.cmd"
31788    else
31789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31790$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31793      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31794    fi
31795  else
31796    input_to_shortpath="$new_path"
31797  fi
31798
31799  # Call helper function which possibly converts this using DOS-style short mode.
31800  # If so, the updated path is stored in $new_path.
31801  new_path="$input_to_shortpath"
31802
31803  input_path="$input_to_shortpath"
31804  # Check if we need to convert this using DOS-style short mode. If the path
31805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31806  # take no chances and rewrite it.
31807  # Note: m4 eats our [], so we need to use [ and ] instead.
31808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31809  if test "x$has_forbidden_chars" != x; then
31810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31814      # Going to short mode and back again did indeed matter. Since short mode is
31815      # case insensitive, let's make it lowercase to improve readability.
31816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31817      # Now convert it back to Unix-style (cygpath)
31818      input_path=`$CYGPATH -u "$shortmode_path"`
31819      new_path="$input_path"
31820    fi
31821  fi
31822
31823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31824  if test "x$test_cygdrive_prefix" = x; then
31825    # As a simple fix, exclude /usr/bin since it's not a real path.
31826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31828      # a path prefixed by /cygdrive for fixpath to work.
31829      new_path="$CYGWIN_ROOT_PATH$input_path"
31830    fi
31831  fi
31832
31833  # remove trailing .exe if any
31834  new_path="${new_path/%.exe/}"
31835
31836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31837
31838  # First separate the path from the arguments. This will split at the first
31839  # space.
31840  complete="$CPP"
31841  path="${complete%% *}"
31842  tmp="$complete EOL"
31843  arguments="${tmp#* }"
31844
31845  # Input might be given as Windows format, start by converting to
31846  # unix format.
31847  new_path="$path"
31848
31849  windows_path="$new_path"
31850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31851    unix_path=`$CYGPATH -u "$windows_path"`
31852    new_path="$unix_path"
31853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31855    new_path="$unix_path"
31856  fi
31857
31858
31859  # Now try to locate executable using which
31860  new_path=`$WHICH "$new_path" 2> /dev/null`
31861
31862  if test "x$new_path" = x; then
31863    # Oops. Which didn't find the executable.
31864    # The splitting of arguments from the executable at a space might have been incorrect,
31865    # since paths with space are more likely in Windows. Give it another try with the whole
31866    # argument.
31867    path="$complete"
31868    arguments="EOL"
31869    new_path="$path"
31870
31871  windows_path="$new_path"
31872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31873    unix_path=`$CYGPATH -u "$windows_path"`
31874    new_path="$unix_path"
31875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31877    new_path="$unix_path"
31878  fi
31879
31880
31881    new_path=`$WHICH "$new_path" 2> /dev/null`
31882    # bat and cmd files are not always considered executable in MSYS causing which
31883    # to not find them
31884    if test "x$new_path" = x \
31885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31887      new_path="$path"
31888
31889  windows_path="$new_path"
31890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31891    unix_path=`$CYGPATH -u "$windows_path"`
31892    new_path="$unix_path"
31893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31895    new_path="$unix_path"
31896  fi
31897
31898    fi
31899
31900    if test "x$new_path" = x; then
31901      # It's still not found. Now this is an unrecoverable error.
31902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31903$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31904      has_space=`$ECHO "$complete" | $GREP " "`
31905      if test "x$has_space" != x; then
31906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31908      fi
31909      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31910    fi
31911  fi
31912
31913  # Now new_path has a complete unix path to the binary
31914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31915    # Keep paths in /bin as-is, but remove trailing .exe if any
31916    new_path="${new_path/%.exe/}"
31917    # Do not save /bin paths to all_fixpath_prefixes!
31918  else
31919    # Not in mixed or Windows style, start by that.
31920    new_path=`cmd //c echo $new_path`
31921
31922  input_path="$new_path"
31923  # Check if we need to convert this using DOS-style short mode. If the path
31924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31925  # take no chances and rewrite it.
31926  # Note: m4 eats our [], so we need to use [ and ] instead.
31927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31928  if test "x$has_forbidden_chars" != x; then
31929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31931  fi
31932
31933    # Output is in $new_path
31934
31935  windows_path="$new_path"
31936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31937    unix_path=`$CYGPATH -u "$windows_path"`
31938    new_path="$unix_path"
31939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31941    new_path="$unix_path"
31942  fi
31943
31944    # remove trailing .exe if any
31945    new_path="${new_path/%.exe/}"
31946
31947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31949  fi
31950
31951    else
31952      # We're on a unix platform. Hooray! :)
31953      # First separate the path from the arguments. This will split at the first
31954      # space.
31955      complete="$CPP"
31956      path="${complete%% *}"
31957      tmp="$complete EOL"
31958      arguments="${tmp#* }"
31959
31960      # Cannot rely on the command "which" here since it doesn't always work.
31961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31962      if test -z "$is_absolute_path"; then
31963        # Path to executable is not absolute. Find it.
31964        IFS_save="$IFS"
31965        IFS=:
31966        for p in $PATH; do
31967          if test -f "$p/$path" && test -x "$p/$path"; then
31968            new_path="$p/$path"
31969            break
31970          fi
31971        done
31972        IFS="$IFS_save"
31973      else
31974        # This is an absolute path, we can use it without further modifications.
31975        new_path="$path"
31976      fi
31977
31978      if test "x$new_path" = x; then
31979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31980$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31981        has_space=`$ECHO "$complete" | $GREP " "`
31982        if test "x$has_space" != x; then
31983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31985        fi
31986        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31987      fi
31988    fi
31989
31990    # Now join together the path and the arguments once again
31991    if test "x$arguments" != xEOL; then
31992      new_complete="$new_path ${arguments% *}"
31993    else
31994      new_complete="$new_path"
31995    fi
31996
31997    if test "x$complete" != "x$new_complete"; then
31998      CPP="$new_complete"
31999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32000$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32001    fi
32002  fi
32003
32004  ac_ext=cpp
32005ac_cpp='$CXXCPP $CPPFLAGS'
32006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32010$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32011if test -z "$CXXCPP"; then
32012  if ${ac_cv_prog_CXXCPP+:} false; then :
32013  $as_echo_n "(cached) " >&6
32014else
32015      # Double quotes because CXXCPP needs to be expanded
32016    for CXXCPP in "$CXX -E" "/lib/cpp"
32017    do
32018      ac_preproc_ok=false
32019for ac_cxx_preproc_warn_flag in '' yes
32020do
32021  # Use a header file that comes with gcc, so configuring glibc
32022  # with a fresh cross-compiler works.
32023  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32024  # <limits.h> exists even on freestanding compilers.
32025  # On the NeXT, cc -E runs the code through the compiler's parser,
32026  # not just through cpp. "Syntax error" is here to catch this case.
32027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32028/* end confdefs.h.  */
32029#ifdef __STDC__
32030# include <limits.h>
32031#else
32032# include <assert.h>
32033#endif
32034		     Syntax error
32035_ACEOF
32036if ac_fn_cxx_try_cpp "$LINENO"; then :
32037
32038else
32039  # Broken: fails on valid input.
32040continue
32041fi
32042rm -f conftest.err conftest.i conftest.$ac_ext
32043
32044  # OK, works on sane cases.  Now check whether nonexistent headers
32045  # can be detected and how.
32046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32047/* end confdefs.h.  */
32048#include <ac_nonexistent.h>
32049_ACEOF
32050if ac_fn_cxx_try_cpp "$LINENO"; then :
32051  # Broken: success on invalid input.
32052continue
32053else
32054  # Passes both tests.
32055ac_preproc_ok=:
32056break
32057fi
32058rm -f conftest.err conftest.i conftest.$ac_ext
32059
32060done
32061# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32062rm -f conftest.i conftest.err conftest.$ac_ext
32063if $ac_preproc_ok; then :
32064  break
32065fi
32066
32067    done
32068    ac_cv_prog_CXXCPP=$CXXCPP
32069
32070fi
32071  CXXCPP=$ac_cv_prog_CXXCPP
32072else
32073  ac_cv_prog_CXXCPP=$CXXCPP
32074fi
32075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32076$as_echo "$CXXCPP" >&6; }
32077ac_preproc_ok=false
32078for ac_cxx_preproc_warn_flag in '' yes
32079do
32080  # Use a header file that comes with gcc, so configuring glibc
32081  # with a fresh cross-compiler works.
32082  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32083  # <limits.h> exists even on freestanding compilers.
32084  # On the NeXT, cc -E runs the code through the compiler's parser,
32085  # not just through cpp. "Syntax error" is here to catch this case.
32086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32087/* end confdefs.h.  */
32088#ifdef __STDC__
32089# include <limits.h>
32090#else
32091# include <assert.h>
32092#endif
32093		     Syntax error
32094_ACEOF
32095if ac_fn_cxx_try_cpp "$LINENO"; then :
32096
32097else
32098  # Broken: fails on valid input.
32099continue
32100fi
32101rm -f conftest.err conftest.i conftest.$ac_ext
32102
32103  # OK, works on sane cases.  Now check whether nonexistent headers
32104  # can be detected and how.
32105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32106/* end confdefs.h.  */
32107#include <ac_nonexistent.h>
32108_ACEOF
32109if ac_fn_cxx_try_cpp "$LINENO"; then :
32110  # Broken: success on invalid input.
32111continue
32112else
32113  # Passes both tests.
32114ac_preproc_ok=:
32115break
32116fi
32117rm -f conftest.err conftest.i conftest.$ac_ext
32118
32119done
32120# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32121rm -f conftest.i conftest.err conftest.$ac_ext
32122if $ac_preproc_ok; then :
32123
32124else
32125  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32127as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32128See \`config.log' for more details" "$LINENO" 5; }
32129fi
32130
32131ac_ext=cpp
32132ac_cpp='$CXXCPP $CPPFLAGS'
32133ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32134ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32135ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32136
32137
32138  # Only process if variable expands to non-empty
32139
32140  if test "x$CXXCPP" != x; then
32141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142
32143  # First separate the path from the arguments. This will split at the first
32144  # space.
32145  complete="$CXXCPP"
32146  path="${complete%% *}"
32147  tmp="$complete EOL"
32148  arguments="${tmp#* }"
32149
32150  # Input might be given as Windows format, start by converting to
32151  # unix format.
32152  new_path=`$CYGPATH -u "$path"`
32153
32154  # Now try to locate executable using which
32155  new_path=`$WHICH "$new_path" 2> /dev/null`
32156  # bat and cmd files are not always considered executable in cygwin causing which
32157  # to not find them
32158  if test "x$new_path" = x \
32159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32161    new_path=`$CYGPATH -u "$path"`
32162  fi
32163  if test "x$new_path" = x; then
32164    # Oops. Which didn't find the executable.
32165    # The splitting of arguments from the executable at a space might have been incorrect,
32166    # since paths with space are more likely in Windows. Give it another try with the whole
32167    # argument.
32168    path="$complete"
32169    arguments="EOL"
32170    new_path=`$CYGPATH -u "$path"`
32171    new_path=`$WHICH "$new_path" 2> /dev/null`
32172    # bat and cmd files are not always considered executable in cygwin causing which
32173    # to not find them
32174    if test "x$new_path" = x \
32175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32177      new_path=`$CYGPATH -u "$path"`
32178    fi
32179    if test "x$new_path" = x; then
32180      # It's still not found. Now this is an unrecoverable error.
32181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32182$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32183      has_space=`$ECHO "$complete" | $GREP " "`
32184      if test "x$has_space" != x; then
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32187      fi
32188      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32189    fi
32190  fi
32191
32192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32195  # "foo.exe" is OK but "foo" is an error.
32196  #
32197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32198  # It is also a way to make sure we got the proper file name for the real test later on.
32199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32200  if test "x$test_shortpath" = x; then
32201    # Short path failed, file does not exist as specified.
32202    # Try adding .exe or .cmd
32203    if test -f "${new_path}.exe"; then
32204      input_to_shortpath="${new_path}.exe"
32205    elif test -f "${new_path}.cmd"; then
32206      input_to_shortpath="${new_path}.cmd"
32207    else
32208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32209$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32212      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32213    fi
32214  else
32215    input_to_shortpath="$new_path"
32216  fi
32217
32218  # Call helper function which possibly converts this using DOS-style short mode.
32219  # If so, the updated path is stored in $new_path.
32220  new_path="$input_to_shortpath"
32221
32222  input_path="$input_to_shortpath"
32223  # Check if we need to convert this using DOS-style short mode. If the path
32224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32225  # take no chances and rewrite it.
32226  # Note: m4 eats our [], so we need to use [ and ] instead.
32227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32228  if test "x$has_forbidden_chars" != x; then
32229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32233      # Going to short mode and back again did indeed matter. Since short mode is
32234      # case insensitive, let's make it lowercase to improve readability.
32235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32236      # Now convert it back to Unix-style (cygpath)
32237      input_path=`$CYGPATH -u "$shortmode_path"`
32238      new_path="$input_path"
32239    fi
32240  fi
32241
32242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32243  if test "x$test_cygdrive_prefix" = x; then
32244    # As a simple fix, exclude /usr/bin since it's not a real path.
32245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32247      # a path prefixed by /cygdrive for fixpath to work.
32248      new_path="$CYGWIN_ROOT_PATH$input_path"
32249    fi
32250  fi
32251
32252  # remove trailing .exe if any
32253  new_path="${new_path/%.exe/}"
32254
32255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32256
32257  # First separate the path from the arguments. This will split at the first
32258  # space.
32259  complete="$CXXCPP"
32260  path="${complete%% *}"
32261  tmp="$complete EOL"
32262  arguments="${tmp#* }"
32263
32264  # Input might be given as Windows format, start by converting to
32265  # unix format.
32266  new_path="$path"
32267
32268  windows_path="$new_path"
32269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32270    unix_path=`$CYGPATH -u "$windows_path"`
32271    new_path="$unix_path"
32272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32274    new_path="$unix_path"
32275  fi
32276
32277
32278  # Now try to locate executable using which
32279  new_path=`$WHICH "$new_path" 2> /dev/null`
32280
32281  if test "x$new_path" = x; then
32282    # Oops. Which didn't find the executable.
32283    # The splitting of arguments from the executable at a space might have been incorrect,
32284    # since paths with space are more likely in Windows. Give it another try with the whole
32285    # argument.
32286    path="$complete"
32287    arguments="EOL"
32288    new_path="$path"
32289
32290  windows_path="$new_path"
32291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32292    unix_path=`$CYGPATH -u "$windows_path"`
32293    new_path="$unix_path"
32294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32296    new_path="$unix_path"
32297  fi
32298
32299
32300    new_path=`$WHICH "$new_path" 2> /dev/null`
32301    # bat and cmd files are not always considered executable in MSYS causing which
32302    # to not find them
32303    if test "x$new_path" = x \
32304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32306      new_path="$path"
32307
32308  windows_path="$new_path"
32309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32310    unix_path=`$CYGPATH -u "$windows_path"`
32311    new_path="$unix_path"
32312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32314    new_path="$unix_path"
32315  fi
32316
32317    fi
32318
32319    if test "x$new_path" = x; then
32320      # It's still not found. Now this is an unrecoverable error.
32321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32322$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32323      has_space=`$ECHO "$complete" | $GREP " "`
32324      if test "x$has_space" != x; then
32325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32327      fi
32328      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32329    fi
32330  fi
32331
32332  # Now new_path has a complete unix path to the binary
32333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32334    # Keep paths in /bin as-is, but remove trailing .exe if any
32335    new_path="${new_path/%.exe/}"
32336    # Do not save /bin paths to all_fixpath_prefixes!
32337  else
32338    # Not in mixed or Windows style, start by that.
32339    new_path=`cmd //c echo $new_path`
32340
32341  input_path="$new_path"
32342  # Check if we need to convert this using DOS-style short mode. If the path
32343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32344  # take no chances and rewrite it.
32345  # Note: m4 eats our [], so we need to use [ and ] instead.
32346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32347  if test "x$has_forbidden_chars" != x; then
32348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32350  fi
32351
32352    # Output is in $new_path
32353
32354  windows_path="$new_path"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    unix_path=`$CYGPATH -u "$windows_path"`
32357    new_path="$unix_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32360    new_path="$unix_path"
32361  fi
32362
32363    # remove trailing .exe if any
32364    new_path="${new_path/%.exe/}"
32365
32366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32368  fi
32369
32370    else
32371      # We're on a unix platform. Hooray! :)
32372      # First separate the path from the arguments. This will split at the first
32373      # space.
32374      complete="$CXXCPP"
32375      path="${complete%% *}"
32376      tmp="$complete EOL"
32377      arguments="${tmp#* }"
32378
32379      # Cannot rely on the command "which" here since it doesn't always work.
32380      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32381      if test -z "$is_absolute_path"; then
32382        # Path to executable is not absolute. Find it.
32383        IFS_save="$IFS"
32384        IFS=:
32385        for p in $PATH; do
32386          if test -f "$p/$path" && test -x "$p/$path"; then
32387            new_path="$p/$path"
32388            break
32389          fi
32390        done
32391        IFS="$IFS_save"
32392      else
32393        # This is an absolute path, we can use it without further modifications.
32394        new_path="$path"
32395      fi
32396
32397      if test "x$new_path" = x; then
32398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32399$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32400        has_space=`$ECHO "$complete" | $GREP " "`
32401        if test "x$has_space" != x; then
32402          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32404        fi
32405        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32406      fi
32407    fi
32408
32409    # Now join together the path and the arguments once again
32410    if test "x$arguments" != xEOL; then
32411      new_complete="$new_path ${arguments% *}"
32412    else
32413      new_complete="$new_path"
32414    fi
32415
32416    if test "x$complete" != "x$new_complete"; then
32417      CXXCPP="$new_complete"
32418      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32419$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32420    fi
32421  fi
32422
32423
32424  #
32425  # Setup the linker (LD)
32426  #
32427  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32428    # In the Microsoft toolchain we have a separate LD command "link".
32429    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32430    # a cygwin program for something completely different.
32431    # Extract the first word of "link", so it can be a program name with args.
32432set dummy link; ac_word=$2
32433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32434$as_echo_n "checking for $ac_word... " >&6; }
32435if ${ac_cv_prog_LD+:} false; then :
32436  $as_echo_n "(cached) " >&6
32437else
32438  if test -n "$LD"; then
32439  ac_cv_prog_LD="$LD" # Let the user override the test.
32440else
32441  ac_prog_rejected=no
32442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32443for as_dir in $PATH
32444do
32445  IFS=$as_save_IFS
32446  test -z "$as_dir" && as_dir=.
32447    for ac_exec_ext in '' $ac_executable_extensions; do
32448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32449    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32450       ac_prog_rejected=yes
32451       continue
32452     fi
32453    ac_cv_prog_LD="link"
32454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32455    break 2
32456  fi
32457done
32458  done
32459IFS=$as_save_IFS
32460
32461if test $ac_prog_rejected = yes; then
32462  # We found a bogon in the path, so make sure we never use it.
32463  set dummy $ac_cv_prog_LD
32464  shift
32465  if test $# != 0; then
32466    # We chose a different compiler from the bogus one.
32467    # However, it has the same basename, so the bogon will be chosen
32468    # first if we set LD to just the basename; use the full file name.
32469    shift
32470    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32471  fi
32472fi
32473fi
32474fi
32475LD=$ac_cv_prog_LD
32476if test -n "$LD"; then
32477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32478$as_echo "$LD" >&6; }
32479else
32480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32481$as_echo "no" >&6; }
32482fi
32483
32484
32485
32486  # Only process if variable expands to non-empty
32487
32488  if test "x$LD" != x; then
32489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32490
32491  # First separate the path from the arguments. This will split at the first
32492  # space.
32493  complete="$LD"
32494  path="${complete%% *}"
32495  tmp="$complete EOL"
32496  arguments="${tmp#* }"
32497
32498  # Input might be given as Windows format, start by converting to
32499  # unix format.
32500  new_path=`$CYGPATH -u "$path"`
32501
32502  # Now try to locate executable using which
32503  new_path=`$WHICH "$new_path" 2> /dev/null`
32504  # bat and cmd files are not always considered executable in cygwin causing which
32505  # to not find them
32506  if test "x$new_path" = x \
32507      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32508      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32509    new_path=`$CYGPATH -u "$path"`
32510  fi
32511  if test "x$new_path" = x; then
32512    # Oops. Which didn't find the executable.
32513    # The splitting of arguments from the executable at a space might have been incorrect,
32514    # since paths with space are more likely in Windows. Give it another try with the whole
32515    # argument.
32516    path="$complete"
32517    arguments="EOL"
32518    new_path=`$CYGPATH -u "$path"`
32519    new_path=`$WHICH "$new_path" 2> /dev/null`
32520    # bat and cmd files are not always considered executable in cygwin causing which
32521    # to not find them
32522    if test "x$new_path" = x \
32523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32525      new_path=`$CYGPATH -u "$path"`
32526    fi
32527    if test "x$new_path" = x; then
32528      # It's still not found. Now this is an unrecoverable error.
32529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32530$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32531      has_space=`$ECHO "$complete" | $GREP " "`
32532      if test "x$has_space" != x; then
32533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32535      fi
32536      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32537    fi
32538  fi
32539
32540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32543  # "foo.exe" is OK but "foo" is an error.
32544  #
32545  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32546  # It is also a way to make sure we got the proper file name for the real test later on.
32547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32548  if test "x$test_shortpath" = x; then
32549    # Short path failed, file does not exist as specified.
32550    # Try adding .exe or .cmd
32551    if test -f "${new_path}.exe"; then
32552      input_to_shortpath="${new_path}.exe"
32553    elif test -f "${new_path}.cmd"; then
32554      input_to_shortpath="${new_path}.cmd"
32555    else
32556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32557$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32558      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32559$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32560      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32561    fi
32562  else
32563    input_to_shortpath="$new_path"
32564  fi
32565
32566  # Call helper function which possibly converts this using DOS-style short mode.
32567  # If so, the updated path is stored in $new_path.
32568  new_path="$input_to_shortpath"
32569
32570  input_path="$input_to_shortpath"
32571  # Check if we need to convert this using DOS-style short mode. If the path
32572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32573  # take no chances and rewrite it.
32574  # Note: m4 eats our [], so we need to use [ and ] instead.
32575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32576  if test "x$has_forbidden_chars" != x; then
32577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32581      # Going to short mode and back again did indeed matter. Since short mode is
32582      # case insensitive, let's make it lowercase to improve readability.
32583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32584      # Now convert it back to Unix-style (cygpath)
32585      input_path=`$CYGPATH -u "$shortmode_path"`
32586      new_path="$input_path"
32587    fi
32588  fi
32589
32590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32591  if test "x$test_cygdrive_prefix" = x; then
32592    # As a simple fix, exclude /usr/bin since it's not a real path.
32593    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32595      # a path prefixed by /cygdrive for fixpath to work.
32596      new_path="$CYGWIN_ROOT_PATH$input_path"
32597    fi
32598  fi
32599
32600  # remove trailing .exe if any
32601  new_path="${new_path/%.exe/}"
32602
32603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32604
32605  # First separate the path from the arguments. This will split at the first
32606  # space.
32607  complete="$LD"
32608  path="${complete%% *}"
32609  tmp="$complete EOL"
32610  arguments="${tmp#* }"
32611
32612  # Input might be given as Windows format, start by converting to
32613  # unix format.
32614  new_path="$path"
32615
32616  windows_path="$new_path"
32617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32618    unix_path=`$CYGPATH -u "$windows_path"`
32619    new_path="$unix_path"
32620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32622    new_path="$unix_path"
32623  fi
32624
32625
32626  # Now try to locate executable using which
32627  new_path=`$WHICH "$new_path" 2> /dev/null`
32628
32629  if test "x$new_path" = x; then
32630    # Oops. Which didn't find the executable.
32631    # The splitting of arguments from the executable at a space might have been incorrect,
32632    # since paths with space are more likely in Windows. Give it another try with the whole
32633    # argument.
32634    path="$complete"
32635    arguments="EOL"
32636    new_path="$path"
32637
32638  windows_path="$new_path"
32639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32640    unix_path=`$CYGPATH -u "$windows_path"`
32641    new_path="$unix_path"
32642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32644    new_path="$unix_path"
32645  fi
32646
32647
32648    new_path=`$WHICH "$new_path" 2> /dev/null`
32649    # bat and cmd files are not always considered executable in MSYS causing which
32650    # to not find them
32651    if test "x$new_path" = x \
32652        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32653        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32654      new_path="$path"
32655
32656  windows_path="$new_path"
32657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32658    unix_path=`$CYGPATH -u "$windows_path"`
32659    new_path="$unix_path"
32660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32662    new_path="$unix_path"
32663  fi
32664
32665    fi
32666
32667    if test "x$new_path" = x; then
32668      # It's still not found. Now this is an unrecoverable error.
32669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32670$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32671      has_space=`$ECHO "$complete" | $GREP " "`
32672      if test "x$has_space" != x; then
32673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32675      fi
32676      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32677    fi
32678  fi
32679
32680  # Now new_path has a complete unix path to the binary
32681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32682    # Keep paths in /bin as-is, but remove trailing .exe if any
32683    new_path="${new_path/%.exe/}"
32684    # Do not save /bin paths to all_fixpath_prefixes!
32685  else
32686    # Not in mixed or Windows style, start by that.
32687    new_path=`cmd //c echo $new_path`
32688
32689  input_path="$new_path"
32690  # Check if we need to convert this using DOS-style short mode. If the path
32691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32692  # take no chances and rewrite it.
32693  # Note: m4 eats our [], so we need to use [ and ] instead.
32694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32695  if test "x$has_forbidden_chars" != x; then
32696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32698  fi
32699
32700    # Output is in $new_path
32701
32702  windows_path="$new_path"
32703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32704    unix_path=`$CYGPATH -u "$windows_path"`
32705    new_path="$unix_path"
32706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32708    new_path="$unix_path"
32709  fi
32710
32711    # remove trailing .exe if any
32712    new_path="${new_path/%.exe/}"
32713
32714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32716  fi
32717
32718    else
32719      # We're on a unix platform. Hooray! :)
32720      # First separate the path from the arguments. This will split at the first
32721      # space.
32722      complete="$LD"
32723      path="${complete%% *}"
32724      tmp="$complete EOL"
32725      arguments="${tmp#* }"
32726
32727      # Cannot rely on the command "which" here since it doesn't always work.
32728      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32729      if test -z "$is_absolute_path"; then
32730        # Path to executable is not absolute. Find it.
32731        IFS_save="$IFS"
32732        IFS=:
32733        for p in $PATH; do
32734          if test -f "$p/$path" && test -x "$p/$path"; then
32735            new_path="$p/$path"
32736            break
32737          fi
32738        done
32739        IFS="$IFS_save"
32740      else
32741        # This is an absolute path, we can use it without further modifications.
32742        new_path="$path"
32743      fi
32744
32745      if test "x$new_path" = x; then
32746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32747$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32748        has_space=`$ECHO "$complete" | $GREP " "`
32749        if test "x$has_space" != x; then
32750          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32751$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32752        fi
32753        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32754      fi
32755    fi
32756
32757    # Now join together the path and the arguments once again
32758    if test "x$arguments" != xEOL; then
32759      new_complete="$new_path ${arguments% *}"
32760    else
32761      new_complete="$new_path"
32762    fi
32763
32764    if test "x$complete" != "x$new_complete"; then
32765      LD="$new_complete"
32766      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32767$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32768    fi
32769  fi
32770
32771    # Verify that we indeed succeeded with this trick.
32772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32773$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32774    "$LD" --version > /dev/null
32775    if test $? -eq 0 ; then
32776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32777$as_echo "no" >&6; }
32778      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32779    else
32780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32781$as_echo "yes" >&6; }
32782    fi
32783    LDCXX="$LD"
32784  else
32785    # All other toolchains use the compiler to link.
32786    LD="$CC"
32787    LDCXX="$CXX"
32788  fi
32789
32790  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32791
32792
32793  #
32794  # Setup the assembler (AS)
32795  #
32796  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32797    # FIXME: should this really be solaris, or solstudio?
32798
32799
32800  # Publish this variable in the help.
32801
32802
32803  if test "x$AS" = x; then
32804    # The variable is not set by user, try to locate tool using the code snippet
32805    for ac_prog in as
32806do
32807  # Extract the first word of "$ac_prog", so it can be a program name with args.
32808set dummy $ac_prog; ac_word=$2
32809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32810$as_echo_n "checking for $ac_word... " >&6; }
32811if ${ac_cv_path_AS+:} false; then :
32812  $as_echo_n "(cached) " >&6
32813else
32814  case $AS in
32815  [\\/]* | ?:[\\/]*)
32816  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32817  ;;
32818  *)
32819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32820for as_dir in $PATH
32821do
32822  IFS=$as_save_IFS
32823  test -z "$as_dir" && as_dir=.
32824    for ac_exec_ext in '' $ac_executable_extensions; do
32825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32826    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32828    break 2
32829  fi
32830done
32831  done
32832IFS=$as_save_IFS
32833
32834  ;;
32835esac
32836fi
32837AS=$ac_cv_path_AS
32838if test -n "$AS"; then
32839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32840$as_echo "$AS" >&6; }
32841else
32842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32843$as_echo "no" >&6; }
32844fi
32845
32846
32847  test -n "$AS" && break
32848done
32849
32850  else
32851    # The variable is set, but is it from the command line or the environment?
32852
32853    # Try to remove the string !AS! from our list.
32854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32856      # If it failed, the variable was not from the command line. Ignore it,
32857      # but warn the user (except for BASH, which is always set by the calling BASH).
32858      if test "xAS" != xBASH; then
32859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32860$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32861      fi
32862      # Try to locate tool using the code snippet
32863      for ac_prog in as
32864do
32865  # Extract the first word of "$ac_prog", so it can be a program name with args.
32866set dummy $ac_prog; ac_word=$2
32867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32868$as_echo_n "checking for $ac_word... " >&6; }
32869if ${ac_cv_path_AS+:} false; then :
32870  $as_echo_n "(cached) " >&6
32871else
32872  case $AS in
32873  [\\/]* | ?:[\\/]*)
32874  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32875  ;;
32876  *)
32877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32878for as_dir in $PATH
32879do
32880  IFS=$as_save_IFS
32881  test -z "$as_dir" && as_dir=.
32882    for ac_exec_ext in '' $ac_executable_extensions; do
32883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32884    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32886    break 2
32887  fi
32888done
32889  done
32890IFS=$as_save_IFS
32891
32892  ;;
32893esac
32894fi
32895AS=$ac_cv_path_AS
32896if test -n "$AS"; then
32897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32898$as_echo "$AS" >&6; }
32899else
32900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32901$as_echo "no" >&6; }
32902fi
32903
32904
32905  test -n "$AS" && break
32906done
32907
32908    else
32909      # If it succeeded, then it was overridden by the user. We will use it
32910      # for the tool.
32911
32912      # First remove it from the list of overridden variables, so we can test
32913      # for unknown variables in the end.
32914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32915
32916      # Check if the provided tool contains a complete path.
32917      tool_specified="$AS"
32918      tool_basename="${tool_specified##*/}"
32919      if test "x$tool_basename" = "x$tool_specified"; then
32920        # A command without a complete path is provided, search $PATH.
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32922$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32923        # Extract the first word of "$tool_basename", so it can be a program name with args.
32924set dummy $tool_basename; ac_word=$2
32925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32926$as_echo_n "checking for $ac_word... " >&6; }
32927if ${ac_cv_path_AS+:} false; then :
32928  $as_echo_n "(cached) " >&6
32929else
32930  case $AS in
32931  [\\/]* | ?:[\\/]*)
32932  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32933  ;;
32934  *)
32935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32936for as_dir in $PATH
32937do
32938  IFS=$as_save_IFS
32939  test -z "$as_dir" && as_dir=.
32940    for ac_exec_ext in '' $ac_executable_extensions; do
32941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32942    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32944    break 2
32945  fi
32946done
32947  done
32948IFS=$as_save_IFS
32949
32950  ;;
32951esac
32952fi
32953AS=$ac_cv_path_AS
32954if test -n "$AS"; then
32955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32956$as_echo "$AS" >&6; }
32957else
32958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32959$as_echo "no" >&6; }
32960fi
32961
32962
32963        if test "x$AS" = x; then
32964          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32965        fi
32966      else
32967        # Otherwise we believe it is a complete path. Use it as it is.
32968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32969$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32971$as_echo_n "checking for AS... " >&6; }
32972        if test ! -x "$tool_specified"; then
32973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32974$as_echo "not found" >&6; }
32975          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32976        fi
32977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32978$as_echo "$tool_specified" >&6; }
32979      fi
32980    fi
32981  fi
32982
32983
32984
32985  # Only process if variable expands to non-empty
32986
32987  if test "x$AS" != x; then
32988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32989
32990  # First separate the path from the arguments. This will split at the first
32991  # space.
32992  complete="$AS"
32993  path="${complete%% *}"
32994  tmp="$complete EOL"
32995  arguments="${tmp#* }"
32996
32997  # Input might be given as Windows format, start by converting to
32998  # unix format.
32999  new_path=`$CYGPATH -u "$path"`
33000
33001  # Now try to locate executable using which
33002  new_path=`$WHICH "$new_path" 2> /dev/null`
33003  # bat and cmd files are not always considered executable in cygwin causing which
33004  # to not find them
33005  if test "x$new_path" = x \
33006      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33007      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33008    new_path=`$CYGPATH -u "$path"`
33009  fi
33010  if test "x$new_path" = x; then
33011    # Oops. Which didn't find the executable.
33012    # The splitting of arguments from the executable at a space might have been incorrect,
33013    # since paths with space are more likely in Windows. Give it another try with the whole
33014    # argument.
33015    path="$complete"
33016    arguments="EOL"
33017    new_path=`$CYGPATH -u "$path"`
33018    new_path=`$WHICH "$new_path" 2> /dev/null`
33019    # bat and cmd files are not always considered executable in cygwin causing which
33020    # to not find them
33021    if test "x$new_path" = x \
33022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33024      new_path=`$CYGPATH -u "$path"`
33025    fi
33026    if test "x$new_path" = x; then
33027      # It's still not found. Now this is an unrecoverable error.
33028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33029$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33030      has_space=`$ECHO "$complete" | $GREP " "`
33031      if test "x$has_space" != x; then
33032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33034      fi
33035      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33036    fi
33037  fi
33038
33039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33042  # "foo.exe" is OK but "foo" is an error.
33043  #
33044  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33045  # It is also a way to make sure we got the proper file name for the real test later on.
33046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33047  if test "x$test_shortpath" = x; then
33048    # Short path failed, file does not exist as specified.
33049    # Try adding .exe or .cmd
33050    if test -f "${new_path}.exe"; then
33051      input_to_shortpath="${new_path}.exe"
33052    elif test -f "${new_path}.cmd"; then
33053      input_to_shortpath="${new_path}.cmd"
33054    else
33055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33056$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33059      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33060    fi
33061  else
33062    input_to_shortpath="$new_path"
33063  fi
33064
33065  # Call helper function which possibly converts this using DOS-style short mode.
33066  # If so, the updated path is stored in $new_path.
33067  new_path="$input_to_shortpath"
33068
33069  input_path="$input_to_shortpath"
33070  # Check if we need to convert this using DOS-style short mode. If the path
33071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33072  # take no chances and rewrite it.
33073  # Note: m4 eats our [], so we need to use [ and ] instead.
33074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33075  if test "x$has_forbidden_chars" != x; then
33076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33080      # Going to short mode and back again did indeed matter. Since short mode is
33081      # case insensitive, let's make it lowercase to improve readability.
33082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33083      # Now convert it back to Unix-style (cygpath)
33084      input_path=`$CYGPATH -u "$shortmode_path"`
33085      new_path="$input_path"
33086    fi
33087  fi
33088
33089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33090  if test "x$test_cygdrive_prefix" = x; then
33091    # As a simple fix, exclude /usr/bin since it's not a real path.
33092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33094      # a path prefixed by /cygdrive for fixpath to work.
33095      new_path="$CYGWIN_ROOT_PATH$input_path"
33096    fi
33097  fi
33098
33099  # remove trailing .exe if any
33100  new_path="${new_path/%.exe/}"
33101
33102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33103
33104  # First separate the path from the arguments. This will split at the first
33105  # space.
33106  complete="$AS"
33107  path="${complete%% *}"
33108  tmp="$complete EOL"
33109  arguments="${tmp#* }"
33110
33111  # Input might be given as Windows format, start by converting to
33112  # unix format.
33113  new_path="$path"
33114
33115  windows_path="$new_path"
33116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33117    unix_path=`$CYGPATH -u "$windows_path"`
33118    new_path="$unix_path"
33119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33121    new_path="$unix_path"
33122  fi
33123
33124
33125  # Now try to locate executable using which
33126  new_path=`$WHICH "$new_path" 2> /dev/null`
33127
33128  if test "x$new_path" = x; then
33129    # Oops. Which didn't find the executable.
33130    # The splitting of arguments from the executable at a space might have been incorrect,
33131    # since paths with space are more likely in Windows. Give it another try with the whole
33132    # argument.
33133    path="$complete"
33134    arguments="EOL"
33135    new_path="$path"
33136
33137  windows_path="$new_path"
33138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33139    unix_path=`$CYGPATH -u "$windows_path"`
33140    new_path="$unix_path"
33141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33143    new_path="$unix_path"
33144  fi
33145
33146
33147    new_path=`$WHICH "$new_path" 2> /dev/null`
33148    # bat and cmd files are not always considered executable in MSYS causing which
33149    # to not find them
33150    if test "x$new_path" = x \
33151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33153      new_path="$path"
33154
33155  windows_path="$new_path"
33156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33157    unix_path=`$CYGPATH -u "$windows_path"`
33158    new_path="$unix_path"
33159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33161    new_path="$unix_path"
33162  fi
33163
33164    fi
33165
33166    if test "x$new_path" = x; then
33167      # It's still not found. Now this is an unrecoverable error.
33168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33169$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33170      has_space=`$ECHO "$complete" | $GREP " "`
33171      if test "x$has_space" != x; then
33172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33174      fi
33175      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33176    fi
33177  fi
33178
33179  # Now new_path has a complete unix path to the binary
33180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33181    # Keep paths in /bin as-is, but remove trailing .exe if any
33182    new_path="${new_path/%.exe/}"
33183    # Do not save /bin paths to all_fixpath_prefixes!
33184  else
33185    # Not in mixed or Windows style, start by that.
33186    new_path=`cmd //c echo $new_path`
33187
33188  input_path="$new_path"
33189  # Check if we need to convert this using DOS-style short mode. If the path
33190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33191  # take no chances and rewrite it.
33192  # Note: m4 eats our [], so we need to use [ and ] instead.
33193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33194  if test "x$has_forbidden_chars" != x; then
33195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33197  fi
33198
33199    # Output is in $new_path
33200
33201  windows_path="$new_path"
33202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33203    unix_path=`$CYGPATH -u "$windows_path"`
33204    new_path="$unix_path"
33205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33207    new_path="$unix_path"
33208  fi
33209
33210    # remove trailing .exe if any
33211    new_path="${new_path/%.exe/}"
33212
33213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33215  fi
33216
33217    else
33218      # We're on a unix platform. Hooray! :)
33219      # First separate the path from the arguments. This will split at the first
33220      # space.
33221      complete="$AS"
33222      path="${complete%% *}"
33223      tmp="$complete EOL"
33224      arguments="${tmp#* }"
33225
33226      # Cannot rely on the command "which" here since it doesn't always work.
33227      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33228      if test -z "$is_absolute_path"; then
33229        # Path to executable is not absolute. Find it.
33230        IFS_save="$IFS"
33231        IFS=:
33232        for p in $PATH; do
33233          if test -f "$p/$path" && test -x "$p/$path"; then
33234            new_path="$p/$path"
33235            break
33236          fi
33237        done
33238        IFS="$IFS_save"
33239      else
33240        # This is an absolute path, we can use it without further modifications.
33241        new_path="$path"
33242      fi
33243
33244      if test "x$new_path" = x; then
33245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33246$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33247        has_space=`$ECHO "$complete" | $GREP " "`
33248        if test "x$has_space" != x; then
33249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33251        fi
33252        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33253      fi
33254    fi
33255
33256    # Now join together the path and the arguments once again
33257    if test "x$arguments" != xEOL; then
33258      new_complete="$new_path ${arguments% *}"
33259    else
33260      new_complete="$new_path"
33261    fi
33262
33263    if test "x$complete" != "x$new_complete"; then
33264      AS="$new_complete"
33265      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33266$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33267    fi
33268  fi
33269
33270  else
33271    # FIXME: is this correct for microsoft?
33272    AS="$CC -c"
33273  fi
33274
33275
33276  #
33277  # Setup the archiver (AR)
33278  #
33279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33280    # The corresponding ar tool is lib.exe (used to create static libraries)
33281    # Extract the first word of "lib", so it can be a program name with args.
33282set dummy lib; ac_word=$2
33283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33284$as_echo_n "checking for $ac_word... " >&6; }
33285if ${ac_cv_prog_AR+:} false; then :
33286  $as_echo_n "(cached) " >&6
33287else
33288  if test -n "$AR"; then
33289  ac_cv_prog_AR="$AR" # Let the user override the test.
33290else
33291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33292for as_dir in $PATH
33293do
33294  IFS=$as_save_IFS
33295  test -z "$as_dir" && as_dir=.
33296    for ac_exec_ext in '' $ac_executable_extensions; do
33297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33298    ac_cv_prog_AR="lib"
33299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33300    break 2
33301  fi
33302done
33303  done
33304IFS=$as_save_IFS
33305
33306fi
33307fi
33308AR=$ac_cv_prog_AR
33309if test -n "$AR"; then
33310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33311$as_echo "$AR" >&6; }
33312else
33313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33314$as_echo "no" >&6; }
33315fi
33316
33317
33318  else
33319
33320
33321  # Publish this variable in the help.
33322
33323
33324  if test "x$AR" = x; then
33325    # The variable is not set by user, try to locate tool using the code snippet
33326    if test -n "$ac_tool_prefix"; then
33327  for ac_prog in ar
33328  do
33329    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33330set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33332$as_echo_n "checking for $ac_word... " >&6; }
33333if ${ac_cv_prog_AR+:} false; then :
33334  $as_echo_n "(cached) " >&6
33335else
33336  if test -n "$AR"; then
33337  ac_cv_prog_AR="$AR" # Let the user override the test.
33338else
33339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33340for as_dir in $PATH
33341do
33342  IFS=$as_save_IFS
33343  test -z "$as_dir" && as_dir=.
33344    for ac_exec_ext in '' $ac_executable_extensions; do
33345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33346    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33348    break 2
33349  fi
33350done
33351  done
33352IFS=$as_save_IFS
33353
33354fi
33355fi
33356AR=$ac_cv_prog_AR
33357if test -n "$AR"; then
33358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33359$as_echo "$AR" >&6; }
33360else
33361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33362$as_echo "no" >&6; }
33363fi
33364
33365
33366    test -n "$AR" && break
33367  done
33368fi
33369if test -z "$AR"; then
33370  ac_ct_AR=$AR
33371  for ac_prog in ar
33372do
33373  # Extract the first word of "$ac_prog", so it can be a program name with args.
33374set dummy $ac_prog; ac_word=$2
33375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33376$as_echo_n "checking for $ac_word... " >&6; }
33377if ${ac_cv_prog_ac_ct_AR+:} false; then :
33378  $as_echo_n "(cached) " >&6
33379else
33380  if test -n "$ac_ct_AR"; then
33381  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33382else
33383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33384for as_dir in $PATH
33385do
33386  IFS=$as_save_IFS
33387  test -z "$as_dir" && as_dir=.
33388    for ac_exec_ext in '' $ac_executable_extensions; do
33389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33390    ac_cv_prog_ac_ct_AR="$ac_prog"
33391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33392    break 2
33393  fi
33394done
33395  done
33396IFS=$as_save_IFS
33397
33398fi
33399fi
33400ac_ct_AR=$ac_cv_prog_ac_ct_AR
33401if test -n "$ac_ct_AR"; then
33402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33403$as_echo "$ac_ct_AR" >&6; }
33404else
33405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33406$as_echo "no" >&6; }
33407fi
33408
33409
33410  test -n "$ac_ct_AR" && break
33411done
33412
33413  if test "x$ac_ct_AR" = x; then
33414    AR=""
33415  else
33416    case $cross_compiling:$ac_tool_warned in
33417yes:)
33418{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33419$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33420ac_tool_warned=yes ;;
33421esac
33422    AR=$ac_ct_AR
33423  fi
33424fi
33425
33426  else
33427    # The variable is set, but is it from the command line or the environment?
33428
33429    # Try to remove the string !AR! from our list.
33430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33432      # If it failed, the variable was not from the command line. Ignore it,
33433      # but warn the user (except for BASH, which is always set by the calling BASH).
33434      if test "xAR" != xBASH; then
33435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33436$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33437      fi
33438      # Try to locate tool using the code snippet
33439      if test -n "$ac_tool_prefix"; then
33440  for ac_prog in ar
33441  do
33442    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33443set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33445$as_echo_n "checking for $ac_word... " >&6; }
33446if ${ac_cv_prog_AR+:} false; then :
33447  $as_echo_n "(cached) " >&6
33448else
33449  if test -n "$AR"; then
33450  ac_cv_prog_AR="$AR" # Let the user override the test.
33451else
33452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33453for as_dir in $PATH
33454do
33455  IFS=$as_save_IFS
33456  test -z "$as_dir" && as_dir=.
33457    for ac_exec_ext in '' $ac_executable_extensions; do
33458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33459    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33461    break 2
33462  fi
33463done
33464  done
33465IFS=$as_save_IFS
33466
33467fi
33468fi
33469AR=$ac_cv_prog_AR
33470if test -n "$AR"; then
33471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33472$as_echo "$AR" >&6; }
33473else
33474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33475$as_echo "no" >&6; }
33476fi
33477
33478
33479    test -n "$AR" && break
33480  done
33481fi
33482if test -z "$AR"; then
33483  ac_ct_AR=$AR
33484  for ac_prog in ar
33485do
33486  # Extract the first word of "$ac_prog", so it can be a program name with args.
33487set dummy $ac_prog; ac_word=$2
33488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33489$as_echo_n "checking for $ac_word... " >&6; }
33490if ${ac_cv_prog_ac_ct_AR+:} false; then :
33491  $as_echo_n "(cached) " >&6
33492else
33493  if test -n "$ac_ct_AR"; then
33494  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33495else
33496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33497for as_dir in $PATH
33498do
33499  IFS=$as_save_IFS
33500  test -z "$as_dir" && as_dir=.
33501    for ac_exec_ext in '' $ac_executable_extensions; do
33502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33503    ac_cv_prog_ac_ct_AR="$ac_prog"
33504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33505    break 2
33506  fi
33507done
33508  done
33509IFS=$as_save_IFS
33510
33511fi
33512fi
33513ac_ct_AR=$ac_cv_prog_ac_ct_AR
33514if test -n "$ac_ct_AR"; then
33515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33516$as_echo "$ac_ct_AR" >&6; }
33517else
33518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33519$as_echo "no" >&6; }
33520fi
33521
33522
33523  test -n "$ac_ct_AR" && break
33524done
33525
33526  if test "x$ac_ct_AR" = x; then
33527    AR=""
33528  else
33529    case $cross_compiling:$ac_tool_warned in
33530yes:)
33531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33533ac_tool_warned=yes ;;
33534esac
33535    AR=$ac_ct_AR
33536  fi
33537fi
33538
33539    else
33540      # If it succeeded, then it was overridden by the user. We will use it
33541      # for the tool.
33542
33543      # First remove it from the list of overridden variables, so we can test
33544      # for unknown variables in the end.
33545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33546
33547      # Check if the provided tool contains a complete path.
33548      tool_specified="$AR"
33549      tool_basename="${tool_specified##*/}"
33550      if test "x$tool_basename" = "x$tool_specified"; then
33551        # A command without a complete path is provided, search $PATH.
33552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33553$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33554        # Extract the first word of "$tool_basename", so it can be a program name with args.
33555set dummy $tool_basename; ac_word=$2
33556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33557$as_echo_n "checking for $ac_word... " >&6; }
33558if ${ac_cv_path_AR+:} false; then :
33559  $as_echo_n "(cached) " >&6
33560else
33561  case $AR in
33562  [\\/]* | ?:[\\/]*)
33563  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33564  ;;
33565  *)
33566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33567for as_dir in $PATH
33568do
33569  IFS=$as_save_IFS
33570  test -z "$as_dir" && as_dir=.
33571    for ac_exec_ext in '' $ac_executable_extensions; do
33572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33573    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33575    break 2
33576  fi
33577done
33578  done
33579IFS=$as_save_IFS
33580
33581  ;;
33582esac
33583fi
33584AR=$ac_cv_path_AR
33585if test -n "$AR"; then
33586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33587$as_echo "$AR" >&6; }
33588else
33589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33590$as_echo "no" >&6; }
33591fi
33592
33593
33594        if test "x$AR" = x; then
33595          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33596        fi
33597      else
33598        # Otherwise we believe it is a complete path. Use it as it is.
33599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33600$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33602$as_echo_n "checking for AR... " >&6; }
33603        if test ! -x "$tool_specified"; then
33604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33605$as_echo "not found" >&6; }
33606          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33607        fi
33608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33609$as_echo "$tool_specified" >&6; }
33610      fi
33611    fi
33612  fi
33613
33614
33615  fi
33616
33617  # Only process if variable expands to non-empty
33618
33619  if test "x$AR" != x; then
33620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33621
33622  # First separate the path from the arguments. This will split at the first
33623  # space.
33624  complete="$AR"
33625  path="${complete%% *}"
33626  tmp="$complete EOL"
33627  arguments="${tmp#* }"
33628
33629  # Input might be given as Windows format, start by converting to
33630  # unix format.
33631  new_path=`$CYGPATH -u "$path"`
33632
33633  # Now try to locate executable using which
33634  new_path=`$WHICH "$new_path" 2> /dev/null`
33635  # bat and cmd files are not always considered executable in cygwin causing which
33636  # to not find them
33637  if test "x$new_path" = x \
33638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33640    new_path=`$CYGPATH -u "$path"`
33641  fi
33642  if test "x$new_path" = x; then
33643    # Oops. Which didn't find the executable.
33644    # The splitting of arguments from the executable at a space might have been incorrect,
33645    # since paths with space are more likely in Windows. Give it another try with the whole
33646    # argument.
33647    path="$complete"
33648    arguments="EOL"
33649    new_path=`$CYGPATH -u "$path"`
33650    new_path=`$WHICH "$new_path" 2> /dev/null`
33651    # bat and cmd files are not always considered executable in cygwin causing which
33652    # to not find them
33653    if test "x$new_path" = x \
33654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33656      new_path=`$CYGPATH -u "$path"`
33657    fi
33658    if test "x$new_path" = x; then
33659      # It's still not found. Now this is an unrecoverable error.
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33661$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33662      has_space=`$ECHO "$complete" | $GREP " "`
33663      if test "x$has_space" != x; then
33664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33666      fi
33667      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33668    fi
33669  fi
33670
33671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33674  # "foo.exe" is OK but "foo" is an error.
33675  #
33676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33677  # It is also a way to make sure we got the proper file name for the real test later on.
33678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33679  if test "x$test_shortpath" = x; then
33680    # Short path failed, file does not exist as specified.
33681    # Try adding .exe or .cmd
33682    if test -f "${new_path}.exe"; then
33683      input_to_shortpath="${new_path}.exe"
33684    elif test -f "${new_path}.cmd"; then
33685      input_to_shortpath="${new_path}.cmd"
33686    else
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33688$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33691      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33692    fi
33693  else
33694    input_to_shortpath="$new_path"
33695  fi
33696
33697  # Call helper function which possibly converts this using DOS-style short mode.
33698  # If so, the updated path is stored in $new_path.
33699  new_path="$input_to_shortpath"
33700
33701  input_path="$input_to_shortpath"
33702  # Check if we need to convert this using DOS-style short mode. If the path
33703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33704  # take no chances and rewrite it.
33705  # Note: m4 eats our [], so we need to use [ and ] instead.
33706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33707  if test "x$has_forbidden_chars" != x; then
33708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33712      # Going to short mode and back again did indeed matter. Since short mode is
33713      # case insensitive, let's make it lowercase to improve readability.
33714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33715      # Now convert it back to Unix-style (cygpath)
33716      input_path=`$CYGPATH -u "$shortmode_path"`
33717      new_path="$input_path"
33718    fi
33719  fi
33720
33721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33722  if test "x$test_cygdrive_prefix" = x; then
33723    # As a simple fix, exclude /usr/bin since it's not a real path.
33724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33726      # a path prefixed by /cygdrive for fixpath to work.
33727      new_path="$CYGWIN_ROOT_PATH$input_path"
33728    fi
33729  fi
33730
33731  # remove trailing .exe if any
33732  new_path="${new_path/%.exe/}"
33733
33734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33735
33736  # First separate the path from the arguments. This will split at the first
33737  # space.
33738  complete="$AR"
33739  path="${complete%% *}"
33740  tmp="$complete EOL"
33741  arguments="${tmp#* }"
33742
33743  # Input might be given as Windows format, start by converting to
33744  # unix format.
33745  new_path="$path"
33746
33747  windows_path="$new_path"
33748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33749    unix_path=`$CYGPATH -u "$windows_path"`
33750    new_path="$unix_path"
33751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33753    new_path="$unix_path"
33754  fi
33755
33756
33757  # Now try to locate executable using which
33758  new_path=`$WHICH "$new_path" 2> /dev/null`
33759
33760  if test "x$new_path" = x; then
33761    # Oops. Which didn't find the executable.
33762    # The splitting of arguments from the executable at a space might have been incorrect,
33763    # since paths with space are more likely in Windows. Give it another try with the whole
33764    # argument.
33765    path="$complete"
33766    arguments="EOL"
33767    new_path="$path"
33768
33769  windows_path="$new_path"
33770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33771    unix_path=`$CYGPATH -u "$windows_path"`
33772    new_path="$unix_path"
33773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33775    new_path="$unix_path"
33776  fi
33777
33778
33779    new_path=`$WHICH "$new_path" 2> /dev/null`
33780    # bat and cmd files are not always considered executable in MSYS causing which
33781    # to not find them
33782    if test "x$new_path" = x \
33783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33785      new_path="$path"
33786
33787  windows_path="$new_path"
33788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33789    unix_path=`$CYGPATH -u "$windows_path"`
33790    new_path="$unix_path"
33791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33793    new_path="$unix_path"
33794  fi
33795
33796    fi
33797
33798    if test "x$new_path" = x; then
33799      # It's still not found. Now this is an unrecoverable error.
33800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33801$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33802      has_space=`$ECHO "$complete" | $GREP " "`
33803      if test "x$has_space" != x; then
33804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33806      fi
33807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33808    fi
33809  fi
33810
33811  # Now new_path has a complete unix path to the binary
33812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33813    # Keep paths in /bin as-is, but remove trailing .exe if any
33814    new_path="${new_path/%.exe/}"
33815    # Do not save /bin paths to all_fixpath_prefixes!
33816  else
33817    # Not in mixed or Windows style, start by that.
33818    new_path=`cmd //c echo $new_path`
33819
33820  input_path="$new_path"
33821  # Check if we need to convert this using DOS-style short mode. If the path
33822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33823  # take no chances and rewrite it.
33824  # Note: m4 eats our [], so we need to use [ and ] instead.
33825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33826  if test "x$has_forbidden_chars" != x; then
33827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33829  fi
33830
33831    # Output is in $new_path
33832
33833  windows_path="$new_path"
33834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33835    unix_path=`$CYGPATH -u "$windows_path"`
33836    new_path="$unix_path"
33837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33839    new_path="$unix_path"
33840  fi
33841
33842    # remove trailing .exe if any
33843    new_path="${new_path/%.exe/}"
33844
33845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33847  fi
33848
33849    else
33850      # We're on a unix platform. Hooray! :)
33851      # First separate the path from the arguments. This will split at the first
33852      # space.
33853      complete="$AR"
33854      path="${complete%% *}"
33855      tmp="$complete EOL"
33856      arguments="${tmp#* }"
33857
33858      # Cannot rely on the command "which" here since it doesn't always work.
33859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33860      if test -z "$is_absolute_path"; then
33861        # Path to executable is not absolute. Find it.
33862        IFS_save="$IFS"
33863        IFS=:
33864        for p in $PATH; do
33865          if test -f "$p/$path" && test -x "$p/$path"; then
33866            new_path="$p/$path"
33867            break
33868          fi
33869        done
33870        IFS="$IFS_save"
33871      else
33872        # This is an absolute path, we can use it without further modifications.
33873        new_path="$path"
33874      fi
33875
33876      if test "x$new_path" = x; then
33877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33878$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33879        has_space=`$ECHO "$complete" | $GREP " "`
33880        if test "x$has_space" != x; then
33881          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33883        fi
33884        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33885      fi
33886    fi
33887
33888    # Now join together the path and the arguments once again
33889    if test "x$arguments" != xEOL; then
33890      new_complete="$new_path ${arguments% *}"
33891    else
33892      new_complete="$new_path"
33893    fi
33894
33895    if test "x$complete" != "x$new_complete"; then
33896      AR="$new_complete"
33897      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33898$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33899    fi
33900  fi
33901
33902
33903
33904  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33905
33906
33907  # Publish this variable in the help.
33908
33909
33910  if test "x$LIPO" = x; then
33911    # The variable is not set by user, try to locate tool using the code snippet
33912    for ac_prog in lipo
33913do
33914  # Extract the first word of "$ac_prog", so it can be a program name with args.
33915set dummy $ac_prog; ac_word=$2
33916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33917$as_echo_n "checking for $ac_word... " >&6; }
33918if ${ac_cv_path_LIPO+:} false; then :
33919  $as_echo_n "(cached) " >&6
33920else
33921  case $LIPO in
33922  [\\/]* | ?:[\\/]*)
33923  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33924  ;;
33925  *)
33926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33927for as_dir in $PATH
33928do
33929  IFS=$as_save_IFS
33930  test -z "$as_dir" && as_dir=.
33931    for ac_exec_ext in '' $ac_executable_extensions; do
33932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33933    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33935    break 2
33936  fi
33937done
33938  done
33939IFS=$as_save_IFS
33940
33941  ;;
33942esac
33943fi
33944LIPO=$ac_cv_path_LIPO
33945if test -n "$LIPO"; then
33946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33947$as_echo "$LIPO" >&6; }
33948else
33949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33950$as_echo "no" >&6; }
33951fi
33952
33953
33954  test -n "$LIPO" && break
33955done
33956
33957  else
33958    # The variable is set, but is it from the command line or the environment?
33959
33960    # Try to remove the string !LIPO! from our list.
33961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33963      # If it failed, the variable was not from the command line. Ignore it,
33964      # but warn the user (except for BASH, which is always set by the calling BASH).
33965      if test "xLIPO" != xBASH; then
33966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33967$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33968      fi
33969      # Try to locate tool using the code snippet
33970      for ac_prog in lipo
33971do
33972  # Extract the first word of "$ac_prog", so it can be a program name with args.
33973set dummy $ac_prog; ac_word=$2
33974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33975$as_echo_n "checking for $ac_word... " >&6; }
33976if ${ac_cv_path_LIPO+:} false; then :
33977  $as_echo_n "(cached) " >&6
33978else
33979  case $LIPO in
33980  [\\/]* | ?:[\\/]*)
33981  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33982  ;;
33983  *)
33984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33985for as_dir in $PATH
33986do
33987  IFS=$as_save_IFS
33988  test -z "$as_dir" && as_dir=.
33989    for ac_exec_ext in '' $ac_executable_extensions; do
33990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33991    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33993    break 2
33994  fi
33995done
33996  done
33997IFS=$as_save_IFS
33998
33999  ;;
34000esac
34001fi
34002LIPO=$ac_cv_path_LIPO
34003if test -n "$LIPO"; then
34004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34005$as_echo "$LIPO" >&6; }
34006else
34007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34008$as_echo "no" >&6; }
34009fi
34010
34011
34012  test -n "$LIPO" && break
34013done
34014
34015    else
34016      # If it succeeded, then it was overridden by the user. We will use it
34017      # for the tool.
34018
34019      # First remove it from the list of overridden variables, so we can test
34020      # for unknown variables in the end.
34021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34022
34023      # Check if the provided tool contains a complete path.
34024      tool_specified="$LIPO"
34025      tool_basename="${tool_specified##*/}"
34026      if test "x$tool_basename" = "x$tool_specified"; then
34027        # A command without a complete path is provided, search $PATH.
34028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34029$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34030        # Extract the first word of "$tool_basename", so it can be a program name with args.
34031set dummy $tool_basename; ac_word=$2
34032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34033$as_echo_n "checking for $ac_word... " >&6; }
34034if ${ac_cv_path_LIPO+:} false; then :
34035  $as_echo_n "(cached) " >&6
34036else
34037  case $LIPO in
34038  [\\/]* | ?:[\\/]*)
34039  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34040  ;;
34041  *)
34042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34043for as_dir in $PATH
34044do
34045  IFS=$as_save_IFS
34046  test -z "$as_dir" && as_dir=.
34047    for ac_exec_ext in '' $ac_executable_extensions; do
34048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34049    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34051    break 2
34052  fi
34053done
34054  done
34055IFS=$as_save_IFS
34056
34057  ;;
34058esac
34059fi
34060LIPO=$ac_cv_path_LIPO
34061if test -n "$LIPO"; then
34062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34063$as_echo "$LIPO" >&6; }
34064else
34065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34066$as_echo "no" >&6; }
34067fi
34068
34069
34070        if test "x$LIPO" = x; then
34071          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34072        fi
34073      else
34074        # Otherwise we believe it is a complete path. Use it as it is.
34075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34076$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34078$as_echo_n "checking for LIPO... " >&6; }
34079        if test ! -x "$tool_specified"; then
34080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34081$as_echo "not found" >&6; }
34082          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34083        fi
34084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34085$as_echo "$tool_specified" >&6; }
34086      fi
34087    fi
34088  fi
34089
34090
34091
34092  # Only process if variable expands to non-empty
34093
34094  if test "x$LIPO" != x; then
34095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34096
34097  # First separate the path from the arguments. This will split at the first
34098  # space.
34099  complete="$LIPO"
34100  path="${complete%% *}"
34101  tmp="$complete EOL"
34102  arguments="${tmp#* }"
34103
34104  # Input might be given as Windows format, start by converting to
34105  # unix format.
34106  new_path=`$CYGPATH -u "$path"`
34107
34108  # Now try to locate executable using which
34109  new_path=`$WHICH "$new_path" 2> /dev/null`
34110  # bat and cmd files are not always considered executable in cygwin causing which
34111  # to not find them
34112  if test "x$new_path" = x \
34113      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34114      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34115    new_path=`$CYGPATH -u "$path"`
34116  fi
34117  if test "x$new_path" = x; then
34118    # Oops. Which didn't find the executable.
34119    # The splitting of arguments from the executable at a space might have been incorrect,
34120    # since paths with space are more likely in Windows. Give it another try with the whole
34121    # argument.
34122    path="$complete"
34123    arguments="EOL"
34124    new_path=`$CYGPATH -u "$path"`
34125    new_path=`$WHICH "$new_path" 2> /dev/null`
34126    # bat and cmd files are not always considered executable in cygwin causing which
34127    # to not find them
34128    if test "x$new_path" = x \
34129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34131      new_path=`$CYGPATH -u "$path"`
34132    fi
34133    if test "x$new_path" = x; then
34134      # It's still not found. Now this is an unrecoverable error.
34135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34136$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34137      has_space=`$ECHO "$complete" | $GREP " "`
34138      if test "x$has_space" != x; then
34139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34141      fi
34142      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34143    fi
34144  fi
34145
34146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34149  # "foo.exe" is OK but "foo" is an error.
34150  #
34151  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34152  # It is also a way to make sure we got the proper file name for the real test later on.
34153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34154  if test "x$test_shortpath" = x; then
34155    # Short path failed, file does not exist as specified.
34156    # Try adding .exe or .cmd
34157    if test -f "${new_path}.exe"; then
34158      input_to_shortpath="${new_path}.exe"
34159    elif test -f "${new_path}.cmd"; then
34160      input_to_shortpath="${new_path}.cmd"
34161    else
34162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34163$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34164      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34165$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34166      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34167    fi
34168  else
34169    input_to_shortpath="$new_path"
34170  fi
34171
34172  # Call helper function which possibly converts this using DOS-style short mode.
34173  # If so, the updated path is stored in $new_path.
34174  new_path="$input_to_shortpath"
34175
34176  input_path="$input_to_shortpath"
34177  # Check if we need to convert this using DOS-style short mode. If the path
34178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34179  # take no chances and rewrite it.
34180  # Note: m4 eats our [], so we need to use [ and ] instead.
34181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34182  if test "x$has_forbidden_chars" != x; then
34183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34187      # Going to short mode and back again did indeed matter. Since short mode is
34188      # case insensitive, let's make it lowercase to improve readability.
34189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34190      # Now convert it back to Unix-style (cygpath)
34191      input_path=`$CYGPATH -u "$shortmode_path"`
34192      new_path="$input_path"
34193    fi
34194  fi
34195
34196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34197  if test "x$test_cygdrive_prefix" = x; then
34198    # As a simple fix, exclude /usr/bin since it's not a real path.
34199    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34201      # a path prefixed by /cygdrive for fixpath to work.
34202      new_path="$CYGWIN_ROOT_PATH$input_path"
34203    fi
34204  fi
34205
34206  # remove trailing .exe if any
34207  new_path="${new_path/%.exe/}"
34208
34209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34210
34211  # First separate the path from the arguments. This will split at the first
34212  # space.
34213  complete="$LIPO"
34214  path="${complete%% *}"
34215  tmp="$complete EOL"
34216  arguments="${tmp#* }"
34217
34218  # Input might be given as Windows format, start by converting to
34219  # unix format.
34220  new_path="$path"
34221
34222  windows_path="$new_path"
34223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34224    unix_path=`$CYGPATH -u "$windows_path"`
34225    new_path="$unix_path"
34226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34228    new_path="$unix_path"
34229  fi
34230
34231
34232  # Now try to locate executable using which
34233  new_path=`$WHICH "$new_path" 2> /dev/null`
34234
34235  if test "x$new_path" = x; then
34236    # Oops. Which didn't find the executable.
34237    # The splitting of arguments from the executable at a space might have been incorrect,
34238    # since paths with space are more likely in Windows. Give it another try with the whole
34239    # argument.
34240    path="$complete"
34241    arguments="EOL"
34242    new_path="$path"
34243
34244  windows_path="$new_path"
34245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34246    unix_path=`$CYGPATH -u "$windows_path"`
34247    new_path="$unix_path"
34248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34250    new_path="$unix_path"
34251  fi
34252
34253
34254    new_path=`$WHICH "$new_path" 2> /dev/null`
34255    # bat and cmd files are not always considered executable in MSYS causing which
34256    # to not find them
34257    if test "x$new_path" = x \
34258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34260      new_path="$path"
34261
34262  windows_path="$new_path"
34263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34264    unix_path=`$CYGPATH -u "$windows_path"`
34265    new_path="$unix_path"
34266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34268    new_path="$unix_path"
34269  fi
34270
34271    fi
34272
34273    if test "x$new_path" = x; then
34274      # It's still not found. Now this is an unrecoverable error.
34275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34276$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34277      has_space=`$ECHO "$complete" | $GREP " "`
34278      if test "x$has_space" != x; then
34279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34281      fi
34282      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34283    fi
34284  fi
34285
34286  # Now new_path has a complete unix path to the binary
34287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34288    # Keep paths in /bin as-is, but remove trailing .exe if any
34289    new_path="${new_path/%.exe/}"
34290    # Do not save /bin paths to all_fixpath_prefixes!
34291  else
34292    # Not in mixed or Windows style, start by that.
34293    new_path=`cmd //c echo $new_path`
34294
34295  input_path="$new_path"
34296  # Check if we need to convert this using DOS-style short mode. If the path
34297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34298  # take no chances and rewrite it.
34299  # Note: m4 eats our [], so we need to use [ and ] instead.
34300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34301  if test "x$has_forbidden_chars" != x; then
34302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34304  fi
34305
34306    # Output is in $new_path
34307
34308  windows_path="$new_path"
34309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34310    unix_path=`$CYGPATH -u "$windows_path"`
34311    new_path="$unix_path"
34312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34314    new_path="$unix_path"
34315  fi
34316
34317    # remove trailing .exe if any
34318    new_path="${new_path/%.exe/}"
34319
34320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34322  fi
34323
34324    else
34325      # We're on a unix platform. Hooray! :)
34326      # First separate the path from the arguments. This will split at the first
34327      # space.
34328      complete="$LIPO"
34329      path="${complete%% *}"
34330      tmp="$complete EOL"
34331      arguments="${tmp#* }"
34332
34333      # Cannot rely on the command "which" here since it doesn't always work.
34334      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34335      if test -z "$is_absolute_path"; then
34336        # Path to executable is not absolute. Find it.
34337        IFS_save="$IFS"
34338        IFS=:
34339        for p in $PATH; do
34340          if test -f "$p/$path" && test -x "$p/$path"; then
34341            new_path="$p/$path"
34342            break
34343          fi
34344        done
34345        IFS="$IFS_save"
34346      else
34347        # This is an absolute path, we can use it without further modifications.
34348        new_path="$path"
34349      fi
34350
34351      if test "x$new_path" = x; then
34352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34353$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34354        has_space=`$ECHO "$complete" | $GREP " "`
34355        if test "x$has_space" != x; then
34356          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34357$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34358        fi
34359        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34360      fi
34361    fi
34362
34363    # Now join together the path and the arguments once again
34364    if test "x$arguments" != xEOL; then
34365      new_complete="$new_path ${arguments% *}"
34366    else
34367      new_complete="$new_path"
34368    fi
34369
34370    if test "x$complete" != "x$new_complete"; then
34371      LIPO="$new_complete"
34372      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34373$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34374    fi
34375  fi
34376
34377  fi
34378
34379  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34380    # Extract the first word of "mt", so it can be a program name with args.
34381set dummy mt; ac_word=$2
34382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34383$as_echo_n "checking for $ac_word... " >&6; }
34384if ${ac_cv_prog_MT+:} false; then :
34385  $as_echo_n "(cached) " >&6
34386else
34387  if test -n "$MT"; then
34388  ac_cv_prog_MT="$MT" # Let the user override the test.
34389else
34390  ac_prog_rejected=no
34391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34392for as_dir in $PATH
34393do
34394  IFS=$as_save_IFS
34395  test -z "$as_dir" && as_dir=.
34396    for ac_exec_ext in '' $ac_executable_extensions; do
34397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34398    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34399       ac_prog_rejected=yes
34400       continue
34401     fi
34402    ac_cv_prog_MT="mt"
34403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34404    break 2
34405  fi
34406done
34407  done
34408IFS=$as_save_IFS
34409
34410if test $ac_prog_rejected = yes; then
34411  # We found a bogon in the path, so make sure we never use it.
34412  set dummy $ac_cv_prog_MT
34413  shift
34414  if test $# != 0; then
34415    # We chose a different compiler from the bogus one.
34416    # However, it has the same basename, so the bogon will be chosen
34417    # first if we set MT to just the basename; use the full file name.
34418    shift
34419    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34420  fi
34421fi
34422fi
34423fi
34424MT=$ac_cv_prog_MT
34425if test -n "$MT"; then
34426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34427$as_echo "$MT" >&6; }
34428else
34429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34430$as_echo "no" >&6; }
34431fi
34432
34433
34434
34435  # Only process if variable expands to non-empty
34436
34437  if test "x$MT" != x; then
34438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34439
34440  # First separate the path from the arguments. This will split at the first
34441  # space.
34442  complete="$MT"
34443  path="${complete%% *}"
34444  tmp="$complete EOL"
34445  arguments="${tmp#* }"
34446
34447  # Input might be given as Windows format, start by converting to
34448  # unix format.
34449  new_path=`$CYGPATH -u "$path"`
34450
34451  # Now try to locate executable using which
34452  new_path=`$WHICH "$new_path" 2> /dev/null`
34453  # bat and cmd files are not always considered executable in cygwin causing which
34454  # to not find them
34455  if test "x$new_path" = x \
34456      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34457      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34458    new_path=`$CYGPATH -u "$path"`
34459  fi
34460  if test "x$new_path" = x; then
34461    # Oops. Which didn't find the executable.
34462    # The splitting of arguments from the executable at a space might have been incorrect,
34463    # since paths with space are more likely in Windows. Give it another try with the whole
34464    # argument.
34465    path="$complete"
34466    arguments="EOL"
34467    new_path=`$CYGPATH -u "$path"`
34468    new_path=`$WHICH "$new_path" 2> /dev/null`
34469    # bat and cmd files are not always considered executable in cygwin causing which
34470    # to not find them
34471    if test "x$new_path" = x \
34472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34474      new_path=`$CYGPATH -u "$path"`
34475    fi
34476    if test "x$new_path" = x; then
34477      # It's still not found. Now this is an unrecoverable error.
34478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34479$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34480      has_space=`$ECHO "$complete" | $GREP " "`
34481      if test "x$has_space" != x; then
34482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34484      fi
34485      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34486    fi
34487  fi
34488
34489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34492  # "foo.exe" is OK but "foo" is an error.
34493  #
34494  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34495  # It is also a way to make sure we got the proper file name for the real test later on.
34496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34497  if test "x$test_shortpath" = x; then
34498    # Short path failed, file does not exist as specified.
34499    # Try adding .exe or .cmd
34500    if test -f "${new_path}.exe"; then
34501      input_to_shortpath="${new_path}.exe"
34502    elif test -f "${new_path}.cmd"; then
34503      input_to_shortpath="${new_path}.cmd"
34504    else
34505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34506$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34509      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34510    fi
34511  else
34512    input_to_shortpath="$new_path"
34513  fi
34514
34515  # Call helper function which possibly converts this using DOS-style short mode.
34516  # If so, the updated path is stored in $new_path.
34517  new_path="$input_to_shortpath"
34518
34519  input_path="$input_to_shortpath"
34520  # Check if we need to convert this using DOS-style short mode. If the path
34521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34522  # take no chances and rewrite it.
34523  # Note: m4 eats our [], so we need to use [ and ] instead.
34524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34525  if test "x$has_forbidden_chars" != x; then
34526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34530      # Going to short mode and back again did indeed matter. Since short mode is
34531      # case insensitive, let's make it lowercase to improve readability.
34532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34533      # Now convert it back to Unix-style (cygpath)
34534      input_path=`$CYGPATH -u "$shortmode_path"`
34535      new_path="$input_path"
34536    fi
34537  fi
34538
34539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34540  if test "x$test_cygdrive_prefix" = x; then
34541    # As a simple fix, exclude /usr/bin since it's not a real path.
34542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34544      # a path prefixed by /cygdrive for fixpath to work.
34545      new_path="$CYGWIN_ROOT_PATH$input_path"
34546    fi
34547  fi
34548
34549  # remove trailing .exe if any
34550  new_path="${new_path/%.exe/}"
34551
34552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34553
34554  # First separate the path from the arguments. This will split at the first
34555  # space.
34556  complete="$MT"
34557  path="${complete%% *}"
34558  tmp="$complete EOL"
34559  arguments="${tmp#* }"
34560
34561  # Input might be given as Windows format, start by converting to
34562  # unix format.
34563  new_path="$path"
34564
34565  windows_path="$new_path"
34566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34567    unix_path=`$CYGPATH -u "$windows_path"`
34568    new_path="$unix_path"
34569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34571    new_path="$unix_path"
34572  fi
34573
34574
34575  # Now try to locate executable using which
34576  new_path=`$WHICH "$new_path" 2> /dev/null`
34577
34578  if test "x$new_path" = x; then
34579    # Oops. Which didn't find the executable.
34580    # The splitting of arguments from the executable at a space might have been incorrect,
34581    # since paths with space are more likely in Windows. Give it another try with the whole
34582    # argument.
34583    path="$complete"
34584    arguments="EOL"
34585    new_path="$path"
34586
34587  windows_path="$new_path"
34588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34589    unix_path=`$CYGPATH -u "$windows_path"`
34590    new_path="$unix_path"
34591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34593    new_path="$unix_path"
34594  fi
34595
34596
34597    new_path=`$WHICH "$new_path" 2> /dev/null`
34598    # bat and cmd files are not always considered executable in MSYS causing which
34599    # to not find them
34600    if test "x$new_path" = x \
34601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34603      new_path="$path"
34604
34605  windows_path="$new_path"
34606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34607    unix_path=`$CYGPATH -u "$windows_path"`
34608    new_path="$unix_path"
34609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34611    new_path="$unix_path"
34612  fi
34613
34614    fi
34615
34616    if test "x$new_path" = x; then
34617      # It's still not found. Now this is an unrecoverable error.
34618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34619$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34620      has_space=`$ECHO "$complete" | $GREP " "`
34621      if test "x$has_space" != x; then
34622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34624      fi
34625      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34626    fi
34627  fi
34628
34629  # Now new_path has a complete unix path to the binary
34630  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34631    # Keep paths in /bin as-is, but remove trailing .exe if any
34632    new_path="${new_path/%.exe/}"
34633    # Do not save /bin paths to all_fixpath_prefixes!
34634  else
34635    # Not in mixed or Windows style, start by that.
34636    new_path=`cmd //c echo $new_path`
34637
34638  input_path="$new_path"
34639  # Check if we need to convert this using DOS-style short mode. If the path
34640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34641  # take no chances and rewrite it.
34642  # Note: m4 eats our [], so we need to use [ and ] instead.
34643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34644  if test "x$has_forbidden_chars" != x; then
34645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34647  fi
34648
34649    # Output is in $new_path
34650
34651  windows_path="$new_path"
34652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34653    unix_path=`$CYGPATH -u "$windows_path"`
34654    new_path="$unix_path"
34655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34657    new_path="$unix_path"
34658  fi
34659
34660    # remove trailing .exe if any
34661    new_path="${new_path/%.exe/}"
34662
34663    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34664    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34665  fi
34666
34667    else
34668      # We're on a unix platform. Hooray! :)
34669      # First separate the path from the arguments. This will split at the first
34670      # space.
34671      complete="$MT"
34672      path="${complete%% *}"
34673      tmp="$complete EOL"
34674      arguments="${tmp#* }"
34675
34676      # Cannot rely on the command "which" here since it doesn't always work.
34677      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34678      if test -z "$is_absolute_path"; then
34679        # Path to executable is not absolute. Find it.
34680        IFS_save="$IFS"
34681        IFS=:
34682        for p in $PATH; do
34683          if test -f "$p/$path" && test -x "$p/$path"; then
34684            new_path="$p/$path"
34685            break
34686          fi
34687        done
34688        IFS="$IFS_save"
34689      else
34690        # This is an absolute path, we can use it without further modifications.
34691        new_path="$path"
34692      fi
34693
34694      if test "x$new_path" = x; then
34695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34696$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34697        has_space=`$ECHO "$complete" | $GREP " "`
34698        if test "x$has_space" != x; then
34699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34701        fi
34702        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34703      fi
34704    fi
34705
34706    # Now join together the path and the arguments once again
34707    if test "x$arguments" != xEOL; then
34708      new_complete="$new_path ${arguments% *}"
34709    else
34710      new_complete="$new_path"
34711    fi
34712
34713    if test "x$complete" != "x$new_complete"; then
34714      MT="$new_complete"
34715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34716$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34717    fi
34718  fi
34719
34720    # Setup the resource compiler (RC)
34721    # Extract the first word of "rc", so it can be a program name with args.
34722set dummy rc; ac_word=$2
34723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34724$as_echo_n "checking for $ac_word... " >&6; }
34725if ${ac_cv_prog_RC+:} false; then :
34726  $as_echo_n "(cached) " >&6
34727else
34728  if test -n "$RC"; then
34729  ac_cv_prog_RC="$RC" # Let the user override the test.
34730else
34731  ac_prog_rejected=no
34732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34733for as_dir in $PATH
34734do
34735  IFS=$as_save_IFS
34736  test -z "$as_dir" && as_dir=.
34737    for ac_exec_ext in '' $ac_executable_extensions; do
34738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34739    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34740       ac_prog_rejected=yes
34741       continue
34742     fi
34743    ac_cv_prog_RC="rc"
34744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34745    break 2
34746  fi
34747done
34748  done
34749IFS=$as_save_IFS
34750
34751if test $ac_prog_rejected = yes; then
34752  # We found a bogon in the path, so make sure we never use it.
34753  set dummy $ac_cv_prog_RC
34754  shift
34755  if test $# != 0; then
34756    # We chose a different compiler from the bogus one.
34757    # However, it has the same basename, so the bogon will be chosen
34758    # first if we set RC to just the basename; use the full file name.
34759    shift
34760    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34761  fi
34762fi
34763fi
34764fi
34765RC=$ac_cv_prog_RC
34766if test -n "$RC"; then
34767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34768$as_echo "$RC" >&6; }
34769else
34770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34771$as_echo "no" >&6; }
34772fi
34773
34774
34775
34776  # Only process if variable expands to non-empty
34777
34778  if test "x$RC" != x; then
34779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34780
34781  # First separate the path from the arguments. This will split at the first
34782  # space.
34783  complete="$RC"
34784  path="${complete%% *}"
34785  tmp="$complete EOL"
34786  arguments="${tmp#* }"
34787
34788  # Input might be given as Windows format, start by converting to
34789  # unix format.
34790  new_path=`$CYGPATH -u "$path"`
34791
34792  # Now try to locate executable using which
34793  new_path=`$WHICH "$new_path" 2> /dev/null`
34794  # bat and cmd files are not always considered executable in cygwin causing which
34795  # to not find them
34796  if test "x$new_path" = x \
34797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34799    new_path=`$CYGPATH -u "$path"`
34800  fi
34801  if test "x$new_path" = x; then
34802    # Oops. Which didn't find the executable.
34803    # The splitting of arguments from the executable at a space might have been incorrect,
34804    # since paths with space are more likely in Windows. Give it another try with the whole
34805    # argument.
34806    path="$complete"
34807    arguments="EOL"
34808    new_path=`$CYGPATH -u "$path"`
34809    new_path=`$WHICH "$new_path" 2> /dev/null`
34810    # bat and cmd files are not always considered executable in cygwin causing which
34811    # to not find them
34812    if test "x$new_path" = x \
34813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34815      new_path=`$CYGPATH -u "$path"`
34816    fi
34817    if test "x$new_path" = x; then
34818      # It's still not found. Now this is an unrecoverable error.
34819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34820$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34821      has_space=`$ECHO "$complete" | $GREP " "`
34822      if test "x$has_space" != x; then
34823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34825      fi
34826      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34827    fi
34828  fi
34829
34830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34833  # "foo.exe" is OK but "foo" is an error.
34834  #
34835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34836  # It is also a way to make sure we got the proper file name for the real test later on.
34837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34838  if test "x$test_shortpath" = x; then
34839    # Short path failed, file does not exist as specified.
34840    # Try adding .exe or .cmd
34841    if test -f "${new_path}.exe"; then
34842      input_to_shortpath="${new_path}.exe"
34843    elif test -f "${new_path}.cmd"; then
34844      input_to_shortpath="${new_path}.cmd"
34845    else
34846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34847$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34850      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34851    fi
34852  else
34853    input_to_shortpath="$new_path"
34854  fi
34855
34856  # Call helper function which possibly converts this using DOS-style short mode.
34857  # If so, the updated path is stored in $new_path.
34858  new_path="$input_to_shortpath"
34859
34860  input_path="$input_to_shortpath"
34861  # Check if we need to convert this using DOS-style short mode. If the path
34862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34863  # take no chances and rewrite it.
34864  # Note: m4 eats our [], so we need to use [ and ] instead.
34865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34866  if test "x$has_forbidden_chars" != x; then
34867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34871      # Going to short mode and back again did indeed matter. Since short mode is
34872      # case insensitive, let's make it lowercase to improve readability.
34873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34874      # Now convert it back to Unix-style (cygpath)
34875      input_path=`$CYGPATH -u "$shortmode_path"`
34876      new_path="$input_path"
34877    fi
34878  fi
34879
34880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34881  if test "x$test_cygdrive_prefix" = x; then
34882    # As a simple fix, exclude /usr/bin since it's not a real path.
34883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34885      # a path prefixed by /cygdrive for fixpath to work.
34886      new_path="$CYGWIN_ROOT_PATH$input_path"
34887    fi
34888  fi
34889
34890  # remove trailing .exe if any
34891  new_path="${new_path/%.exe/}"
34892
34893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34894
34895  # First separate the path from the arguments. This will split at the first
34896  # space.
34897  complete="$RC"
34898  path="${complete%% *}"
34899  tmp="$complete EOL"
34900  arguments="${tmp#* }"
34901
34902  # Input might be given as Windows format, start by converting to
34903  # unix format.
34904  new_path="$path"
34905
34906  windows_path="$new_path"
34907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34908    unix_path=`$CYGPATH -u "$windows_path"`
34909    new_path="$unix_path"
34910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34912    new_path="$unix_path"
34913  fi
34914
34915
34916  # Now try to locate executable using which
34917  new_path=`$WHICH "$new_path" 2> /dev/null`
34918
34919  if test "x$new_path" = x; then
34920    # Oops. Which didn't find the executable.
34921    # The splitting of arguments from the executable at a space might have been incorrect,
34922    # since paths with space are more likely in Windows. Give it another try with the whole
34923    # argument.
34924    path="$complete"
34925    arguments="EOL"
34926    new_path="$path"
34927
34928  windows_path="$new_path"
34929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34930    unix_path=`$CYGPATH -u "$windows_path"`
34931    new_path="$unix_path"
34932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34934    new_path="$unix_path"
34935  fi
34936
34937
34938    new_path=`$WHICH "$new_path" 2> /dev/null`
34939    # bat and cmd files are not always considered executable in MSYS causing which
34940    # to not find them
34941    if test "x$new_path" = x \
34942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34944      new_path="$path"
34945
34946  windows_path="$new_path"
34947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34948    unix_path=`$CYGPATH -u "$windows_path"`
34949    new_path="$unix_path"
34950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34952    new_path="$unix_path"
34953  fi
34954
34955    fi
34956
34957    if test "x$new_path" = x; then
34958      # It's still not found. Now this is an unrecoverable error.
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34960$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34961      has_space=`$ECHO "$complete" | $GREP " "`
34962      if test "x$has_space" != x; then
34963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34965      fi
34966      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34967    fi
34968  fi
34969
34970  # Now new_path has a complete unix path to the binary
34971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34972    # Keep paths in /bin as-is, but remove trailing .exe if any
34973    new_path="${new_path/%.exe/}"
34974    # Do not save /bin paths to all_fixpath_prefixes!
34975  else
34976    # Not in mixed or Windows style, start by that.
34977    new_path=`cmd //c echo $new_path`
34978
34979  input_path="$new_path"
34980  # Check if we need to convert this using DOS-style short mode. If the path
34981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34982  # take no chances and rewrite it.
34983  # Note: m4 eats our [], so we need to use [ and ] instead.
34984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34985  if test "x$has_forbidden_chars" != x; then
34986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34988  fi
34989
34990    # Output is in $new_path
34991
34992  windows_path="$new_path"
34993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34994    unix_path=`$CYGPATH -u "$windows_path"`
34995    new_path="$unix_path"
34996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34998    new_path="$unix_path"
34999  fi
35000
35001    # remove trailing .exe if any
35002    new_path="${new_path/%.exe/}"
35003
35004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35006  fi
35007
35008    else
35009      # We're on a unix platform. Hooray! :)
35010      # First separate the path from the arguments. This will split at the first
35011      # space.
35012      complete="$RC"
35013      path="${complete%% *}"
35014      tmp="$complete EOL"
35015      arguments="${tmp#* }"
35016
35017      # Cannot rely on the command "which" here since it doesn't always work.
35018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35019      if test -z "$is_absolute_path"; then
35020        # Path to executable is not absolute. Find it.
35021        IFS_save="$IFS"
35022        IFS=:
35023        for p in $PATH; do
35024          if test -f "$p/$path" && test -x "$p/$path"; then
35025            new_path="$p/$path"
35026            break
35027          fi
35028        done
35029        IFS="$IFS_save"
35030      else
35031        # This is an absolute path, we can use it without further modifications.
35032        new_path="$path"
35033      fi
35034
35035      if test "x$new_path" = x; then
35036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35037$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35038        has_space=`$ECHO "$complete" | $GREP " "`
35039        if test "x$has_space" != x; then
35040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35042        fi
35043        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35044      fi
35045    fi
35046
35047    # Now join together the path and the arguments once again
35048    if test "x$arguments" != xEOL; then
35049      new_complete="$new_path ${arguments% *}"
35050    else
35051      new_complete="$new_path"
35052    fi
35053
35054    if test "x$complete" != "x$new_complete"; then
35055      RC="$new_complete"
35056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35057$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35058    fi
35059  fi
35060
35061    # Extract the first word of "dumpbin", so it can be a program name with args.
35062set dummy dumpbin; ac_word=$2
35063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35064$as_echo_n "checking for $ac_word... " >&6; }
35065if ${ac_cv_prog_DUMPBIN+:} false; then :
35066  $as_echo_n "(cached) " >&6
35067else
35068  if test -n "$DUMPBIN"; then
35069  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35070else
35071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35072for as_dir in $PATH
35073do
35074  IFS=$as_save_IFS
35075  test -z "$as_dir" && as_dir=.
35076    for ac_exec_ext in '' $ac_executable_extensions; do
35077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35078    ac_cv_prog_DUMPBIN="dumpbin"
35079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35080    break 2
35081  fi
35082done
35083  done
35084IFS=$as_save_IFS
35085
35086fi
35087fi
35088DUMPBIN=$ac_cv_prog_DUMPBIN
35089if test -n "$DUMPBIN"; then
35090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35091$as_echo "$DUMPBIN" >&6; }
35092else
35093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35094$as_echo "no" >&6; }
35095fi
35096
35097
35098
35099  # Only process if variable expands to non-empty
35100
35101  if test "x$DUMPBIN" != x; then
35102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35103
35104  # First separate the path from the arguments. This will split at the first
35105  # space.
35106  complete="$DUMPBIN"
35107  path="${complete%% *}"
35108  tmp="$complete EOL"
35109  arguments="${tmp#* }"
35110
35111  # Input might be given as Windows format, start by converting to
35112  # unix format.
35113  new_path=`$CYGPATH -u "$path"`
35114
35115  # Now try to locate executable using which
35116  new_path=`$WHICH "$new_path" 2> /dev/null`
35117  # bat and cmd files are not always considered executable in cygwin causing which
35118  # to not find them
35119  if test "x$new_path" = x \
35120      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35121      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35122    new_path=`$CYGPATH -u "$path"`
35123  fi
35124  if test "x$new_path" = x; then
35125    # Oops. Which didn't find the executable.
35126    # The splitting of arguments from the executable at a space might have been incorrect,
35127    # since paths with space are more likely in Windows. Give it another try with the whole
35128    # argument.
35129    path="$complete"
35130    arguments="EOL"
35131    new_path=`$CYGPATH -u "$path"`
35132    new_path=`$WHICH "$new_path" 2> /dev/null`
35133    # bat and cmd files are not always considered executable in cygwin causing which
35134    # to not find them
35135    if test "x$new_path" = x \
35136        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35137        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35138      new_path=`$CYGPATH -u "$path"`
35139    fi
35140    if test "x$new_path" = x; then
35141      # It's still not found. Now this is an unrecoverable error.
35142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35143$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35144      has_space=`$ECHO "$complete" | $GREP " "`
35145      if test "x$has_space" != x; then
35146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35148      fi
35149      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35150    fi
35151  fi
35152
35153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35156  # "foo.exe" is OK but "foo" is an error.
35157  #
35158  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35159  # It is also a way to make sure we got the proper file name for the real test later on.
35160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35161  if test "x$test_shortpath" = x; then
35162    # Short path failed, file does not exist as specified.
35163    # Try adding .exe or .cmd
35164    if test -f "${new_path}.exe"; then
35165      input_to_shortpath="${new_path}.exe"
35166    elif test -f "${new_path}.cmd"; then
35167      input_to_shortpath="${new_path}.cmd"
35168    else
35169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35170$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35171      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35172$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35173      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35174    fi
35175  else
35176    input_to_shortpath="$new_path"
35177  fi
35178
35179  # Call helper function which possibly converts this using DOS-style short mode.
35180  # If so, the updated path is stored in $new_path.
35181  new_path="$input_to_shortpath"
35182
35183  input_path="$input_to_shortpath"
35184  # Check if we need to convert this using DOS-style short mode. If the path
35185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35186  # take no chances and rewrite it.
35187  # Note: m4 eats our [], so we need to use [ and ] instead.
35188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35189  if test "x$has_forbidden_chars" != x; then
35190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35194      # Going to short mode and back again did indeed matter. Since short mode is
35195      # case insensitive, let's make it lowercase to improve readability.
35196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35197      # Now convert it back to Unix-style (cygpath)
35198      input_path=`$CYGPATH -u "$shortmode_path"`
35199      new_path="$input_path"
35200    fi
35201  fi
35202
35203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35204  if test "x$test_cygdrive_prefix" = x; then
35205    # As a simple fix, exclude /usr/bin since it's not a real path.
35206    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35208      # a path prefixed by /cygdrive for fixpath to work.
35209      new_path="$CYGWIN_ROOT_PATH$input_path"
35210    fi
35211  fi
35212
35213  # remove trailing .exe if any
35214  new_path="${new_path/%.exe/}"
35215
35216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35217
35218  # First separate the path from the arguments. This will split at the first
35219  # space.
35220  complete="$DUMPBIN"
35221  path="${complete%% *}"
35222  tmp="$complete EOL"
35223  arguments="${tmp#* }"
35224
35225  # Input might be given as Windows format, start by converting to
35226  # unix format.
35227  new_path="$path"
35228
35229  windows_path="$new_path"
35230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35231    unix_path=`$CYGPATH -u "$windows_path"`
35232    new_path="$unix_path"
35233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35235    new_path="$unix_path"
35236  fi
35237
35238
35239  # Now try to locate executable using which
35240  new_path=`$WHICH "$new_path" 2> /dev/null`
35241
35242  if test "x$new_path" = x; then
35243    # Oops. Which didn't find the executable.
35244    # The splitting of arguments from the executable at a space might have been incorrect,
35245    # since paths with space are more likely in Windows. Give it another try with the whole
35246    # argument.
35247    path="$complete"
35248    arguments="EOL"
35249    new_path="$path"
35250
35251  windows_path="$new_path"
35252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35253    unix_path=`$CYGPATH -u "$windows_path"`
35254    new_path="$unix_path"
35255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35257    new_path="$unix_path"
35258  fi
35259
35260
35261    new_path=`$WHICH "$new_path" 2> /dev/null`
35262    # bat and cmd files are not always considered executable in MSYS causing which
35263    # to not find them
35264    if test "x$new_path" = x \
35265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35267      new_path="$path"
35268
35269  windows_path="$new_path"
35270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35271    unix_path=`$CYGPATH -u "$windows_path"`
35272    new_path="$unix_path"
35273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35275    new_path="$unix_path"
35276  fi
35277
35278    fi
35279
35280    if test "x$new_path" = x; then
35281      # It's still not found. Now this is an unrecoverable error.
35282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35283$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35284      has_space=`$ECHO "$complete" | $GREP " "`
35285      if test "x$has_space" != x; then
35286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35288      fi
35289      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35290    fi
35291  fi
35292
35293  # Now new_path has a complete unix path to the binary
35294  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35295    # Keep paths in /bin as-is, but remove trailing .exe if any
35296    new_path="${new_path/%.exe/}"
35297    # Do not save /bin paths to all_fixpath_prefixes!
35298  else
35299    # Not in mixed or Windows style, start by that.
35300    new_path=`cmd //c echo $new_path`
35301
35302  input_path="$new_path"
35303  # Check if we need to convert this using DOS-style short mode. If the path
35304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35305  # take no chances and rewrite it.
35306  # Note: m4 eats our [], so we need to use [ and ] instead.
35307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35308  if test "x$has_forbidden_chars" != x; then
35309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35311  fi
35312
35313    # Output is in $new_path
35314
35315  windows_path="$new_path"
35316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35317    unix_path=`$CYGPATH -u "$windows_path"`
35318    new_path="$unix_path"
35319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35321    new_path="$unix_path"
35322  fi
35323
35324    # remove trailing .exe if any
35325    new_path="${new_path/%.exe/}"
35326
35327    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35328    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35329  fi
35330
35331    else
35332      # We're on a unix platform. Hooray! :)
35333      # First separate the path from the arguments. This will split at the first
35334      # space.
35335      complete="$DUMPBIN"
35336      path="${complete%% *}"
35337      tmp="$complete EOL"
35338      arguments="${tmp#* }"
35339
35340      # Cannot rely on the command "which" here since it doesn't always work.
35341      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35342      if test -z "$is_absolute_path"; then
35343        # Path to executable is not absolute. Find it.
35344        IFS_save="$IFS"
35345        IFS=:
35346        for p in $PATH; do
35347          if test -f "$p/$path" && test -x "$p/$path"; then
35348            new_path="$p/$path"
35349            break
35350          fi
35351        done
35352        IFS="$IFS_save"
35353      else
35354        # This is an absolute path, we can use it without further modifications.
35355        new_path="$path"
35356      fi
35357
35358      if test "x$new_path" = x; then
35359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35360$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35361        has_space=`$ECHO "$complete" | $GREP " "`
35362        if test "x$has_space" != x; then
35363          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35364$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35365        fi
35366        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35367      fi
35368    fi
35369
35370    # Now join together the path and the arguments once again
35371    if test "x$arguments" != xEOL; then
35372      new_complete="$new_path ${arguments% *}"
35373    else
35374      new_complete="$new_path"
35375    fi
35376
35377    if test "x$complete" != "x$new_complete"; then
35378      DUMPBIN="$new_complete"
35379      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35380$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35381    fi
35382  fi
35383
35384    # We need to check for 'msbuild.exe' because at the place where we expect to
35385    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35386    # won't find the 'msbuild.exe' executable in that case (and the
35387    # 'ac_executable_extensions' is unusable due to performance reasons).
35388    # Notice that we intentionally don't fix up the path to MSBUILD because we
35389    # will call it in a DOS shell during freetype detection on Windows (see
35390    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35391    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35392set dummy msbuild.exe; ac_word=$2
35393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35394$as_echo_n "checking for $ac_word... " >&6; }
35395if ${ac_cv_prog_MSBUILD+:} false; then :
35396  $as_echo_n "(cached) " >&6
35397else
35398  if test -n "$MSBUILD"; then
35399  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35400else
35401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35402for as_dir in $PATH
35403do
35404  IFS=$as_save_IFS
35405  test -z "$as_dir" && as_dir=.
35406    for ac_exec_ext in '' $ac_executable_extensions; do
35407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35408    ac_cv_prog_MSBUILD="msbuild.exe"
35409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35410    break 2
35411  fi
35412done
35413  done
35414IFS=$as_save_IFS
35415
35416fi
35417fi
35418MSBUILD=$ac_cv_prog_MSBUILD
35419if test -n "$MSBUILD"; then
35420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35421$as_echo "$MSBUILD" >&6; }
35422else
35423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35424$as_echo "no" >&6; }
35425fi
35426
35427
35428  fi
35429
35430  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35431
35432
35433  # Publish this variable in the help.
35434
35435
35436  if test "x$STRIP" = x; then
35437    # The variable is not set by user, try to locate tool using the code snippet
35438    for ac_prog in strip
35439do
35440  # Extract the first word of "$ac_prog", so it can be a program name with args.
35441set dummy $ac_prog; ac_word=$2
35442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35443$as_echo_n "checking for $ac_word... " >&6; }
35444if ${ac_cv_path_STRIP+:} false; then :
35445  $as_echo_n "(cached) " >&6
35446else
35447  case $STRIP in
35448  [\\/]* | ?:[\\/]*)
35449  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35450  ;;
35451  *)
35452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35453for as_dir in $PATH
35454do
35455  IFS=$as_save_IFS
35456  test -z "$as_dir" && as_dir=.
35457    for ac_exec_ext in '' $ac_executable_extensions; do
35458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35459    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35461    break 2
35462  fi
35463done
35464  done
35465IFS=$as_save_IFS
35466
35467  ;;
35468esac
35469fi
35470STRIP=$ac_cv_path_STRIP
35471if test -n "$STRIP"; then
35472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35473$as_echo "$STRIP" >&6; }
35474else
35475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35476$as_echo "no" >&6; }
35477fi
35478
35479
35480  test -n "$STRIP" && break
35481done
35482
35483  else
35484    # The variable is set, but is it from the command line or the environment?
35485
35486    # Try to remove the string !STRIP! from our list.
35487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35489      # If it failed, the variable was not from the command line. Ignore it,
35490      # but warn the user (except for BASH, which is always set by the calling BASH).
35491      if test "xSTRIP" != xBASH; then
35492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35493$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35494      fi
35495      # Try to locate tool using the code snippet
35496      for ac_prog in strip
35497do
35498  # Extract the first word of "$ac_prog", so it can be a program name with args.
35499set dummy $ac_prog; ac_word=$2
35500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35501$as_echo_n "checking for $ac_word... " >&6; }
35502if ${ac_cv_path_STRIP+:} false; then :
35503  $as_echo_n "(cached) " >&6
35504else
35505  case $STRIP in
35506  [\\/]* | ?:[\\/]*)
35507  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35508  ;;
35509  *)
35510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35511for as_dir in $PATH
35512do
35513  IFS=$as_save_IFS
35514  test -z "$as_dir" && as_dir=.
35515    for ac_exec_ext in '' $ac_executable_extensions; do
35516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35517    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35519    break 2
35520  fi
35521done
35522  done
35523IFS=$as_save_IFS
35524
35525  ;;
35526esac
35527fi
35528STRIP=$ac_cv_path_STRIP
35529if test -n "$STRIP"; then
35530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35531$as_echo "$STRIP" >&6; }
35532else
35533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35534$as_echo "no" >&6; }
35535fi
35536
35537
35538  test -n "$STRIP" && break
35539done
35540
35541    else
35542      # If it succeeded, then it was overridden by the user. We will use it
35543      # for the tool.
35544
35545      # First remove it from the list of overridden variables, so we can test
35546      # for unknown variables in the end.
35547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35548
35549      # Check if the provided tool contains a complete path.
35550      tool_specified="$STRIP"
35551      tool_basename="${tool_specified##*/}"
35552      if test "x$tool_basename" = "x$tool_specified"; then
35553        # A command without a complete path is provided, search $PATH.
35554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35555$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35556        # Extract the first word of "$tool_basename", so it can be a program name with args.
35557set dummy $tool_basename; ac_word=$2
35558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35559$as_echo_n "checking for $ac_word... " >&6; }
35560if ${ac_cv_path_STRIP+:} false; then :
35561  $as_echo_n "(cached) " >&6
35562else
35563  case $STRIP in
35564  [\\/]* | ?:[\\/]*)
35565  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35566  ;;
35567  *)
35568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35569for as_dir in $PATH
35570do
35571  IFS=$as_save_IFS
35572  test -z "$as_dir" && as_dir=.
35573    for ac_exec_ext in '' $ac_executable_extensions; do
35574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35575    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35577    break 2
35578  fi
35579done
35580  done
35581IFS=$as_save_IFS
35582
35583  ;;
35584esac
35585fi
35586STRIP=$ac_cv_path_STRIP
35587if test -n "$STRIP"; then
35588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35589$as_echo "$STRIP" >&6; }
35590else
35591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35592$as_echo "no" >&6; }
35593fi
35594
35595
35596        if test "x$STRIP" = x; then
35597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35598        fi
35599      else
35600        # Otherwise we believe it is a complete path. Use it as it is.
35601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35602$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35604$as_echo_n "checking for STRIP... " >&6; }
35605        if test ! -x "$tool_specified"; then
35606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35607$as_echo "not found" >&6; }
35608          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35609        fi
35610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35611$as_echo "$tool_specified" >&6; }
35612      fi
35613    fi
35614  fi
35615
35616
35617
35618  # Only process if variable expands to non-empty
35619
35620  if test "x$STRIP" != x; then
35621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35622
35623  # First separate the path from the arguments. This will split at the first
35624  # space.
35625  complete="$STRIP"
35626  path="${complete%% *}"
35627  tmp="$complete EOL"
35628  arguments="${tmp#* }"
35629
35630  # Input might be given as Windows format, start by converting to
35631  # unix format.
35632  new_path=`$CYGPATH -u "$path"`
35633
35634  # Now try to locate executable using which
35635  new_path=`$WHICH "$new_path" 2> /dev/null`
35636  # bat and cmd files are not always considered executable in cygwin causing which
35637  # to not find them
35638  if test "x$new_path" = x \
35639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35641    new_path=`$CYGPATH -u "$path"`
35642  fi
35643  if test "x$new_path" = x; then
35644    # Oops. Which didn't find the executable.
35645    # The splitting of arguments from the executable at a space might have been incorrect,
35646    # since paths with space are more likely in Windows. Give it another try with the whole
35647    # argument.
35648    path="$complete"
35649    arguments="EOL"
35650    new_path=`$CYGPATH -u "$path"`
35651    new_path=`$WHICH "$new_path" 2> /dev/null`
35652    # bat and cmd files are not always considered executable in cygwin causing which
35653    # to not find them
35654    if test "x$new_path" = x \
35655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35657      new_path=`$CYGPATH -u "$path"`
35658    fi
35659    if test "x$new_path" = x; then
35660      # It's still not found. Now this is an unrecoverable error.
35661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35662$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35663      has_space=`$ECHO "$complete" | $GREP " "`
35664      if test "x$has_space" != x; then
35665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35667      fi
35668      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35669    fi
35670  fi
35671
35672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35675  # "foo.exe" is OK but "foo" is an error.
35676  #
35677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35678  # It is also a way to make sure we got the proper file name for the real test later on.
35679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35680  if test "x$test_shortpath" = x; then
35681    # Short path failed, file does not exist as specified.
35682    # Try adding .exe or .cmd
35683    if test -f "${new_path}.exe"; then
35684      input_to_shortpath="${new_path}.exe"
35685    elif test -f "${new_path}.cmd"; then
35686      input_to_shortpath="${new_path}.cmd"
35687    else
35688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35689$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35692      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35693    fi
35694  else
35695    input_to_shortpath="$new_path"
35696  fi
35697
35698  # Call helper function which possibly converts this using DOS-style short mode.
35699  # If so, the updated path is stored in $new_path.
35700  new_path="$input_to_shortpath"
35701
35702  input_path="$input_to_shortpath"
35703  # Check if we need to convert this using DOS-style short mode. If the path
35704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35705  # take no chances and rewrite it.
35706  # Note: m4 eats our [], so we need to use [ and ] instead.
35707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35708  if test "x$has_forbidden_chars" != x; then
35709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35713      # Going to short mode and back again did indeed matter. Since short mode is
35714      # case insensitive, let's make it lowercase to improve readability.
35715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35716      # Now convert it back to Unix-style (cygpath)
35717      input_path=`$CYGPATH -u "$shortmode_path"`
35718      new_path="$input_path"
35719    fi
35720  fi
35721
35722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35723  if test "x$test_cygdrive_prefix" = x; then
35724    # As a simple fix, exclude /usr/bin since it's not a real path.
35725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35727      # a path prefixed by /cygdrive for fixpath to work.
35728      new_path="$CYGWIN_ROOT_PATH$input_path"
35729    fi
35730  fi
35731
35732  # remove trailing .exe if any
35733  new_path="${new_path/%.exe/}"
35734
35735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35736
35737  # First separate the path from the arguments. This will split at the first
35738  # space.
35739  complete="$STRIP"
35740  path="${complete%% *}"
35741  tmp="$complete EOL"
35742  arguments="${tmp#* }"
35743
35744  # Input might be given as Windows format, start by converting to
35745  # unix format.
35746  new_path="$path"
35747
35748  windows_path="$new_path"
35749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35750    unix_path=`$CYGPATH -u "$windows_path"`
35751    new_path="$unix_path"
35752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35754    new_path="$unix_path"
35755  fi
35756
35757
35758  # Now try to locate executable using which
35759  new_path=`$WHICH "$new_path" 2> /dev/null`
35760
35761  if test "x$new_path" = x; then
35762    # Oops. Which didn't find the executable.
35763    # The splitting of arguments from the executable at a space might have been incorrect,
35764    # since paths with space are more likely in Windows. Give it another try with the whole
35765    # argument.
35766    path="$complete"
35767    arguments="EOL"
35768    new_path="$path"
35769
35770  windows_path="$new_path"
35771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35772    unix_path=`$CYGPATH -u "$windows_path"`
35773    new_path="$unix_path"
35774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35776    new_path="$unix_path"
35777  fi
35778
35779
35780    new_path=`$WHICH "$new_path" 2> /dev/null`
35781    # bat and cmd files are not always considered executable in MSYS causing which
35782    # to not find them
35783    if test "x$new_path" = x \
35784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35786      new_path="$path"
35787
35788  windows_path="$new_path"
35789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35790    unix_path=`$CYGPATH -u "$windows_path"`
35791    new_path="$unix_path"
35792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35794    new_path="$unix_path"
35795  fi
35796
35797    fi
35798
35799    if test "x$new_path" = x; then
35800      # It's still not found. Now this is an unrecoverable error.
35801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35802$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35803      has_space=`$ECHO "$complete" | $GREP " "`
35804      if test "x$has_space" != x; then
35805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35807      fi
35808      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35809    fi
35810  fi
35811
35812  # Now new_path has a complete unix path to the binary
35813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35814    # Keep paths in /bin as-is, but remove trailing .exe if any
35815    new_path="${new_path/%.exe/}"
35816    # Do not save /bin paths to all_fixpath_prefixes!
35817  else
35818    # Not in mixed or Windows style, start by that.
35819    new_path=`cmd //c echo $new_path`
35820
35821  input_path="$new_path"
35822  # Check if we need to convert this using DOS-style short mode. If the path
35823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35824  # take no chances and rewrite it.
35825  # Note: m4 eats our [], so we need to use [ and ] instead.
35826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35827  if test "x$has_forbidden_chars" != x; then
35828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35830  fi
35831
35832    # Output is in $new_path
35833
35834  windows_path="$new_path"
35835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35836    unix_path=`$CYGPATH -u "$windows_path"`
35837    new_path="$unix_path"
35838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35840    new_path="$unix_path"
35841  fi
35842
35843    # remove trailing .exe if any
35844    new_path="${new_path/%.exe/}"
35845
35846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35848  fi
35849
35850    else
35851      # We're on a unix platform. Hooray! :)
35852      # First separate the path from the arguments. This will split at the first
35853      # space.
35854      complete="$STRIP"
35855      path="${complete%% *}"
35856      tmp="$complete EOL"
35857      arguments="${tmp#* }"
35858
35859      # Cannot rely on the command "which" here since it doesn't always work.
35860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35861      if test -z "$is_absolute_path"; then
35862        # Path to executable is not absolute. Find it.
35863        IFS_save="$IFS"
35864        IFS=:
35865        for p in $PATH; do
35866          if test -f "$p/$path" && test -x "$p/$path"; then
35867            new_path="$p/$path"
35868            break
35869          fi
35870        done
35871        IFS="$IFS_save"
35872      else
35873        # This is an absolute path, we can use it without further modifications.
35874        new_path="$path"
35875      fi
35876
35877      if test "x$new_path" = x; then
35878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35879$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35880        has_space=`$ECHO "$complete" | $GREP " "`
35881        if test "x$has_space" != x; then
35882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35884        fi
35885        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35886      fi
35887    fi
35888
35889    # Now join together the path and the arguments once again
35890    if test "x$arguments" != xEOL; then
35891      new_complete="$new_path ${arguments% *}"
35892    else
35893      new_complete="$new_path"
35894    fi
35895
35896    if test "x$complete" != "x$new_complete"; then
35897      STRIP="$new_complete"
35898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35899$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35900    fi
35901  fi
35902
35903
35904
35905  # Publish this variable in the help.
35906
35907
35908  if test "x$NM" = x; then
35909    # The variable is not set by user, try to locate tool using the code snippet
35910    for ac_prog in nm
35911do
35912  # Extract the first word of "$ac_prog", so it can be a program name with args.
35913set dummy $ac_prog; ac_word=$2
35914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35915$as_echo_n "checking for $ac_word... " >&6; }
35916if ${ac_cv_path_NM+:} false; then :
35917  $as_echo_n "(cached) " >&6
35918else
35919  case $NM in
35920  [\\/]* | ?:[\\/]*)
35921  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35922  ;;
35923  *)
35924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35925for as_dir in $PATH
35926do
35927  IFS=$as_save_IFS
35928  test -z "$as_dir" && as_dir=.
35929    for ac_exec_ext in '' $ac_executable_extensions; do
35930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35931    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35933    break 2
35934  fi
35935done
35936  done
35937IFS=$as_save_IFS
35938
35939  ;;
35940esac
35941fi
35942NM=$ac_cv_path_NM
35943if test -n "$NM"; then
35944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35945$as_echo "$NM" >&6; }
35946else
35947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35948$as_echo "no" >&6; }
35949fi
35950
35951
35952  test -n "$NM" && break
35953done
35954
35955  else
35956    # The variable is set, but is it from the command line or the environment?
35957
35958    # Try to remove the string !NM! from our list.
35959    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35960    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35961      # If it failed, the variable was not from the command line. Ignore it,
35962      # but warn the user (except for BASH, which is always set by the calling BASH).
35963      if test "xNM" != xBASH; then
35964        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35965$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35966      fi
35967      # Try to locate tool using the code snippet
35968      for ac_prog in nm
35969do
35970  # Extract the first word of "$ac_prog", so it can be a program name with args.
35971set dummy $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_path_NM+:} false; then :
35975  $as_echo_n "(cached) " >&6
35976else
35977  case $NM in
35978  [\\/]* | ?:[\\/]*)
35979  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35980  ;;
35981  *)
35982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35983for as_dir in $PATH
35984do
35985  IFS=$as_save_IFS
35986  test -z "$as_dir" && as_dir=.
35987    for ac_exec_ext in '' $ac_executable_extensions; do
35988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35989    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35991    break 2
35992  fi
35993done
35994  done
35995IFS=$as_save_IFS
35996
35997  ;;
35998esac
35999fi
36000NM=$ac_cv_path_NM
36001if test -n "$NM"; then
36002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36003$as_echo "$NM" >&6; }
36004else
36005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36006$as_echo "no" >&6; }
36007fi
36008
36009
36010  test -n "$NM" && break
36011done
36012
36013    else
36014      # If it succeeded, then it was overridden by the user. We will use it
36015      # for the tool.
36016
36017      # First remove it from the list of overridden variables, so we can test
36018      # for unknown variables in the end.
36019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36020
36021      # Check if the provided tool contains a complete path.
36022      tool_specified="$NM"
36023      tool_basename="${tool_specified##*/}"
36024      if test "x$tool_basename" = "x$tool_specified"; then
36025        # A command without a complete path is provided, search $PATH.
36026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36027$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36028        # Extract the first word of "$tool_basename", so it can be a program name with args.
36029set dummy $tool_basename; ac_word=$2
36030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36031$as_echo_n "checking for $ac_word... " >&6; }
36032if ${ac_cv_path_NM+:} false; then :
36033  $as_echo_n "(cached) " >&6
36034else
36035  case $NM in
36036  [\\/]* | ?:[\\/]*)
36037  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36038  ;;
36039  *)
36040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36041for as_dir in $PATH
36042do
36043  IFS=$as_save_IFS
36044  test -z "$as_dir" && as_dir=.
36045    for ac_exec_ext in '' $ac_executable_extensions; do
36046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36047    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36049    break 2
36050  fi
36051done
36052  done
36053IFS=$as_save_IFS
36054
36055  ;;
36056esac
36057fi
36058NM=$ac_cv_path_NM
36059if test -n "$NM"; then
36060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36061$as_echo "$NM" >&6; }
36062else
36063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36064$as_echo "no" >&6; }
36065fi
36066
36067
36068        if test "x$NM" = x; then
36069          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36070        fi
36071      else
36072        # Otherwise we believe it is a complete path. Use it as it is.
36073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36074$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36076$as_echo_n "checking for NM... " >&6; }
36077        if test ! -x "$tool_specified"; then
36078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36079$as_echo "not found" >&6; }
36080          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36081        fi
36082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36083$as_echo "$tool_specified" >&6; }
36084      fi
36085    fi
36086  fi
36087
36088
36089
36090  # Only process if variable expands to non-empty
36091
36092  if test "x$NM" != x; then
36093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36094
36095  # First separate the path from the arguments. This will split at the first
36096  # space.
36097  complete="$NM"
36098  path="${complete%% *}"
36099  tmp="$complete EOL"
36100  arguments="${tmp#* }"
36101
36102  # Input might be given as Windows format, start by converting to
36103  # unix format.
36104  new_path=`$CYGPATH -u "$path"`
36105
36106  # Now try to locate executable using which
36107  new_path=`$WHICH "$new_path" 2> /dev/null`
36108  # bat and cmd files are not always considered executable in cygwin causing which
36109  # to not find them
36110  if test "x$new_path" = x \
36111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36113    new_path=`$CYGPATH -u "$path"`
36114  fi
36115  if test "x$new_path" = x; then
36116    # Oops. Which didn't find the executable.
36117    # The splitting of arguments from the executable at a space might have been incorrect,
36118    # since paths with space are more likely in Windows. Give it another try with the whole
36119    # argument.
36120    path="$complete"
36121    arguments="EOL"
36122    new_path=`$CYGPATH -u "$path"`
36123    new_path=`$WHICH "$new_path" 2> /dev/null`
36124    # bat and cmd files are not always considered executable in cygwin causing which
36125    # to not find them
36126    if test "x$new_path" = x \
36127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36129      new_path=`$CYGPATH -u "$path"`
36130    fi
36131    if test "x$new_path" = x; then
36132      # It's still not found. Now this is an unrecoverable error.
36133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36134$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36135      has_space=`$ECHO "$complete" | $GREP " "`
36136      if test "x$has_space" != x; then
36137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36139      fi
36140      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36141    fi
36142  fi
36143
36144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36147  # "foo.exe" is OK but "foo" is an error.
36148  #
36149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36150  # It is also a way to make sure we got the proper file name for the real test later on.
36151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36152  if test "x$test_shortpath" = x; then
36153    # Short path failed, file does not exist as specified.
36154    # Try adding .exe or .cmd
36155    if test -f "${new_path}.exe"; then
36156      input_to_shortpath="${new_path}.exe"
36157    elif test -f "${new_path}.cmd"; then
36158      input_to_shortpath="${new_path}.cmd"
36159    else
36160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36161$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36164      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36165    fi
36166  else
36167    input_to_shortpath="$new_path"
36168  fi
36169
36170  # Call helper function which possibly converts this using DOS-style short mode.
36171  # If so, the updated path is stored in $new_path.
36172  new_path="$input_to_shortpath"
36173
36174  input_path="$input_to_shortpath"
36175  # Check if we need to convert this using DOS-style short mode. If the path
36176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36177  # take no chances and rewrite it.
36178  # Note: m4 eats our [], so we need to use [ and ] instead.
36179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36180  if test "x$has_forbidden_chars" != x; then
36181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36185      # Going to short mode and back again did indeed matter. Since short mode is
36186      # case insensitive, let's make it lowercase to improve readability.
36187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36188      # Now convert it back to Unix-style (cygpath)
36189      input_path=`$CYGPATH -u "$shortmode_path"`
36190      new_path="$input_path"
36191    fi
36192  fi
36193
36194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36195  if test "x$test_cygdrive_prefix" = x; then
36196    # As a simple fix, exclude /usr/bin since it's not a real path.
36197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36199      # a path prefixed by /cygdrive for fixpath to work.
36200      new_path="$CYGWIN_ROOT_PATH$input_path"
36201    fi
36202  fi
36203
36204  # remove trailing .exe if any
36205  new_path="${new_path/%.exe/}"
36206
36207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36208
36209  # First separate the path from the arguments. This will split at the first
36210  # space.
36211  complete="$NM"
36212  path="${complete%% *}"
36213  tmp="$complete EOL"
36214  arguments="${tmp#* }"
36215
36216  # Input might be given as Windows format, start by converting to
36217  # unix format.
36218  new_path="$path"
36219
36220  windows_path="$new_path"
36221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36222    unix_path=`$CYGPATH -u "$windows_path"`
36223    new_path="$unix_path"
36224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36226    new_path="$unix_path"
36227  fi
36228
36229
36230  # Now try to locate executable using which
36231  new_path=`$WHICH "$new_path" 2> /dev/null`
36232
36233  if test "x$new_path" = x; then
36234    # Oops. Which didn't find the executable.
36235    # The splitting of arguments from the executable at a space might have been incorrect,
36236    # since paths with space are more likely in Windows. Give it another try with the whole
36237    # argument.
36238    path="$complete"
36239    arguments="EOL"
36240    new_path="$path"
36241
36242  windows_path="$new_path"
36243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36244    unix_path=`$CYGPATH -u "$windows_path"`
36245    new_path="$unix_path"
36246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36248    new_path="$unix_path"
36249  fi
36250
36251
36252    new_path=`$WHICH "$new_path" 2> /dev/null`
36253    # bat and cmd files are not always considered executable in MSYS causing which
36254    # to not find them
36255    if test "x$new_path" = x \
36256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36258      new_path="$path"
36259
36260  windows_path="$new_path"
36261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36262    unix_path=`$CYGPATH -u "$windows_path"`
36263    new_path="$unix_path"
36264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36266    new_path="$unix_path"
36267  fi
36268
36269    fi
36270
36271    if test "x$new_path" = x; then
36272      # It's still not found. Now this is an unrecoverable error.
36273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36274$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36275      has_space=`$ECHO "$complete" | $GREP " "`
36276      if test "x$has_space" != x; then
36277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36279      fi
36280      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36281    fi
36282  fi
36283
36284  # Now new_path has a complete unix path to the binary
36285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36286    # Keep paths in /bin as-is, but remove trailing .exe if any
36287    new_path="${new_path/%.exe/}"
36288    # Do not save /bin paths to all_fixpath_prefixes!
36289  else
36290    # Not in mixed or Windows style, start by that.
36291    new_path=`cmd //c echo $new_path`
36292
36293  input_path="$new_path"
36294  # Check if we need to convert this using DOS-style short mode. If the path
36295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36296  # take no chances and rewrite it.
36297  # Note: m4 eats our [], so we need to use [ and ] instead.
36298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36299  if test "x$has_forbidden_chars" != x; then
36300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36302  fi
36303
36304    # Output is in $new_path
36305
36306  windows_path="$new_path"
36307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36308    unix_path=`$CYGPATH -u "$windows_path"`
36309    new_path="$unix_path"
36310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36312    new_path="$unix_path"
36313  fi
36314
36315    # remove trailing .exe if any
36316    new_path="${new_path/%.exe/}"
36317
36318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36320  fi
36321
36322    else
36323      # We're on a unix platform. Hooray! :)
36324      # First separate the path from the arguments. This will split at the first
36325      # space.
36326      complete="$NM"
36327      path="${complete%% *}"
36328      tmp="$complete EOL"
36329      arguments="${tmp#* }"
36330
36331      # Cannot rely on the command "which" here since it doesn't always work.
36332      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36333      if test -z "$is_absolute_path"; then
36334        # Path to executable is not absolute. Find it.
36335        IFS_save="$IFS"
36336        IFS=:
36337        for p in $PATH; do
36338          if test -f "$p/$path" && test -x "$p/$path"; then
36339            new_path="$p/$path"
36340            break
36341          fi
36342        done
36343        IFS="$IFS_save"
36344      else
36345        # This is an absolute path, we can use it without further modifications.
36346        new_path="$path"
36347      fi
36348
36349      if test "x$new_path" = x; then
36350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36351$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36352        has_space=`$ECHO "$complete" | $GREP " "`
36353        if test "x$has_space" != x; then
36354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36356        fi
36357        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36358      fi
36359    fi
36360
36361    # Now join together the path and the arguments once again
36362    if test "x$arguments" != xEOL; then
36363      new_complete="$new_path ${arguments% *}"
36364    else
36365      new_complete="$new_path"
36366    fi
36367
36368    if test "x$complete" != "x$new_complete"; then
36369      NM="$new_complete"
36370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36371$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36372    fi
36373  fi
36374
36375
36376
36377  # Publish this variable in the help.
36378
36379
36380  if test "x$GNM" = x; then
36381    # The variable is not set by user, try to locate tool using the code snippet
36382    for ac_prog in gnm
36383do
36384  # Extract the first word of "$ac_prog", so it can be a program name with args.
36385set dummy $ac_prog; ac_word=$2
36386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36387$as_echo_n "checking for $ac_word... " >&6; }
36388if ${ac_cv_path_GNM+:} false; then :
36389  $as_echo_n "(cached) " >&6
36390else
36391  case $GNM in
36392  [\\/]* | ?:[\\/]*)
36393  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36394  ;;
36395  *)
36396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36397for as_dir in $PATH
36398do
36399  IFS=$as_save_IFS
36400  test -z "$as_dir" && as_dir=.
36401    for ac_exec_ext in '' $ac_executable_extensions; do
36402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36403    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36405    break 2
36406  fi
36407done
36408  done
36409IFS=$as_save_IFS
36410
36411  ;;
36412esac
36413fi
36414GNM=$ac_cv_path_GNM
36415if test -n "$GNM"; then
36416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36417$as_echo "$GNM" >&6; }
36418else
36419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36420$as_echo "no" >&6; }
36421fi
36422
36423
36424  test -n "$GNM" && break
36425done
36426
36427  else
36428    # The variable is set, but is it from the command line or the environment?
36429
36430    # Try to remove the string !GNM! from our list.
36431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36433      # If it failed, the variable was not from the command line. Ignore it,
36434      # but warn the user (except for BASH, which is always set by the calling BASH).
36435      if test "xGNM" != xBASH; then
36436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36437$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36438      fi
36439      # Try to locate tool using the code snippet
36440      for ac_prog in gnm
36441do
36442  # Extract the first word of "$ac_prog", so it can be a program name with args.
36443set dummy $ac_prog; ac_word=$2
36444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36445$as_echo_n "checking for $ac_word... " >&6; }
36446if ${ac_cv_path_GNM+:} false; then :
36447  $as_echo_n "(cached) " >&6
36448else
36449  case $GNM in
36450  [\\/]* | ?:[\\/]*)
36451  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36452  ;;
36453  *)
36454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36455for as_dir in $PATH
36456do
36457  IFS=$as_save_IFS
36458  test -z "$as_dir" && as_dir=.
36459    for ac_exec_ext in '' $ac_executable_extensions; do
36460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36461    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36463    break 2
36464  fi
36465done
36466  done
36467IFS=$as_save_IFS
36468
36469  ;;
36470esac
36471fi
36472GNM=$ac_cv_path_GNM
36473if test -n "$GNM"; then
36474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36475$as_echo "$GNM" >&6; }
36476else
36477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36478$as_echo "no" >&6; }
36479fi
36480
36481
36482  test -n "$GNM" && break
36483done
36484
36485    else
36486      # If it succeeded, then it was overridden by the user. We will use it
36487      # for the tool.
36488
36489      # First remove it from the list of overridden variables, so we can test
36490      # for unknown variables in the end.
36491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36492
36493      # Check if the provided tool contains a complete path.
36494      tool_specified="$GNM"
36495      tool_basename="${tool_specified##*/}"
36496      if test "x$tool_basename" = "x$tool_specified"; then
36497        # A command without a complete path is provided, search $PATH.
36498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36499$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36500        # Extract the first word of "$tool_basename", so it can be a program name with args.
36501set dummy $tool_basename; ac_word=$2
36502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36503$as_echo_n "checking for $ac_word... " >&6; }
36504if ${ac_cv_path_GNM+:} false; then :
36505  $as_echo_n "(cached) " >&6
36506else
36507  case $GNM in
36508  [\\/]* | ?:[\\/]*)
36509  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36510  ;;
36511  *)
36512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36513for as_dir in $PATH
36514do
36515  IFS=$as_save_IFS
36516  test -z "$as_dir" && as_dir=.
36517    for ac_exec_ext in '' $ac_executable_extensions; do
36518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36519    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36521    break 2
36522  fi
36523done
36524  done
36525IFS=$as_save_IFS
36526
36527  ;;
36528esac
36529fi
36530GNM=$ac_cv_path_GNM
36531if test -n "$GNM"; then
36532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36533$as_echo "$GNM" >&6; }
36534else
36535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36536$as_echo "no" >&6; }
36537fi
36538
36539
36540        if test "x$GNM" = x; then
36541          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36542        fi
36543      else
36544        # Otherwise we believe it is a complete path. Use it as it is.
36545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36546$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36548$as_echo_n "checking for GNM... " >&6; }
36549        if test ! -x "$tool_specified"; then
36550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36551$as_echo "not found" >&6; }
36552          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36553        fi
36554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36555$as_echo "$tool_specified" >&6; }
36556      fi
36557    fi
36558  fi
36559
36560
36561
36562  # Only process if variable expands to non-empty
36563
36564  if test "x$GNM" != x; then
36565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36566
36567  # First separate the path from the arguments. This will split at the first
36568  # space.
36569  complete="$GNM"
36570  path="${complete%% *}"
36571  tmp="$complete EOL"
36572  arguments="${tmp#* }"
36573
36574  # Input might be given as Windows format, start by converting to
36575  # unix format.
36576  new_path=`$CYGPATH -u "$path"`
36577
36578  # Now try to locate executable using which
36579  new_path=`$WHICH "$new_path" 2> /dev/null`
36580  # bat and cmd files are not always considered executable in cygwin causing which
36581  # to not find them
36582  if test "x$new_path" = x \
36583      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36584      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36585    new_path=`$CYGPATH -u "$path"`
36586  fi
36587  if test "x$new_path" = x; then
36588    # Oops. Which didn't find the executable.
36589    # The splitting of arguments from the executable at a space might have been incorrect,
36590    # since paths with space are more likely in Windows. Give it another try with the whole
36591    # argument.
36592    path="$complete"
36593    arguments="EOL"
36594    new_path=`$CYGPATH -u "$path"`
36595    new_path=`$WHICH "$new_path" 2> /dev/null`
36596    # bat and cmd files are not always considered executable in cygwin causing which
36597    # to not find them
36598    if test "x$new_path" = x \
36599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36601      new_path=`$CYGPATH -u "$path"`
36602    fi
36603    if test "x$new_path" = x; then
36604      # It's still not found. Now this is an unrecoverable error.
36605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36606$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36607      has_space=`$ECHO "$complete" | $GREP " "`
36608      if test "x$has_space" != x; then
36609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36611      fi
36612      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36613    fi
36614  fi
36615
36616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36619  # "foo.exe" is OK but "foo" is an error.
36620  #
36621  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36622  # It is also a way to make sure we got the proper file name for the real test later on.
36623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36624  if test "x$test_shortpath" = x; then
36625    # Short path failed, file does not exist as specified.
36626    # Try adding .exe or .cmd
36627    if test -f "${new_path}.exe"; then
36628      input_to_shortpath="${new_path}.exe"
36629    elif test -f "${new_path}.cmd"; then
36630      input_to_shortpath="${new_path}.cmd"
36631    else
36632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36633$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36636      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36637    fi
36638  else
36639    input_to_shortpath="$new_path"
36640  fi
36641
36642  # Call helper function which possibly converts this using DOS-style short mode.
36643  # If so, the updated path is stored in $new_path.
36644  new_path="$input_to_shortpath"
36645
36646  input_path="$input_to_shortpath"
36647  # Check if we need to convert this using DOS-style short mode. If the path
36648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36649  # take no chances and rewrite it.
36650  # Note: m4 eats our [], so we need to use [ and ] instead.
36651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36652  if test "x$has_forbidden_chars" != x; then
36653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36657      # Going to short mode and back again did indeed matter. Since short mode is
36658      # case insensitive, let's make it lowercase to improve readability.
36659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36660      # Now convert it back to Unix-style (cygpath)
36661      input_path=`$CYGPATH -u "$shortmode_path"`
36662      new_path="$input_path"
36663    fi
36664  fi
36665
36666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36667  if test "x$test_cygdrive_prefix" = x; then
36668    # As a simple fix, exclude /usr/bin since it's not a real path.
36669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36671      # a path prefixed by /cygdrive for fixpath to work.
36672      new_path="$CYGWIN_ROOT_PATH$input_path"
36673    fi
36674  fi
36675
36676  # remove trailing .exe if any
36677  new_path="${new_path/%.exe/}"
36678
36679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36680
36681  # First separate the path from the arguments. This will split at the first
36682  # space.
36683  complete="$GNM"
36684  path="${complete%% *}"
36685  tmp="$complete EOL"
36686  arguments="${tmp#* }"
36687
36688  # Input might be given as Windows format, start by converting to
36689  # unix format.
36690  new_path="$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
36702  # Now try to locate executable using which
36703  new_path=`$WHICH "$new_path" 2> /dev/null`
36704
36705  if test "x$new_path" = x; then
36706    # Oops. Which didn't find the executable.
36707    # The splitting of arguments from the executable at a space might have been incorrect,
36708    # since paths with space are more likely in Windows. Give it another try with the whole
36709    # argument.
36710    path="$complete"
36711    arguments="EOL"
36712    new_path="$path"
36713
36714  windows_path="$new_path"
36715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36716    unix_path=`$CYGPATH -u "$windows_path"`
36717    new_path="$unix_path"
36718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36720    new_path="$unix_path"
36721  fi
36722
36723
36724    new_path=`$WHICH "$new_path" 2> /dev/null`
36725    # bat and cmd files are not always considered executable in MSYS causing which
36726    # to not find them
36727    if test "x$new_path" = x \
36728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36730      new_path="$path"
36731
36732  windows_path="$new_path"
36733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36734    unix_path=`$CYGPATH -u "$windows_path"`
36735    new_path="$unix_path"
36736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36738    new_path="$unix_path"
36739  fi
36740
36741    fi
36742
36743    if test "x$new_path" = x; then
36744      # It's still not found. Now this is an unrecoverable error.
36745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36746$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36747      has_space=`$ECHO "$complete" | $GREP " "`
36748      if test "x$has_space" != x; then
36749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36751      fi
36752      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36753    fi
36754  fi
36755
36756  # Now new_path has a complete unix path to the binary
36757  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36758    # Keep paths in /bin as-is, but remove trailing .exe if any
36759    new_path="${new_path/%.exe/}"
36760    # Do not save /bin paths to all_fixpath_prefixes!
36761  else
36762    # Not in mixed or Windows style, start by that.
36763    new_path=`cmd //c echo $new_path`
36764
36765  input_path="$new_path"
36766  # Check if we need to convert this using DOS-style short mode. If the path
36767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36768  # take no chances and rewrite it.
36769  # Note: m4 eats our [], so we need to use [ and ] instead.
36770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36771  if test "x$has_forbidden_chars" != x; then
36772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36774  fi
36775
36776    # Output is in $new_path
36777
36778  windows_path="$new_path"
36779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36780    unix_path=`$CYGPATH -u "$windows_path"`
36781    new_path="$unix_path"
36782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36784    new_path="$unix_path"
36785  fi
36786
36787    # remove trailing .exe if any
36788    new_path="${new_path/%.exe/}"
36789
36790    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36791    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36792  fi
36793
36794    else
36795      # We're on a unix platform. Hooray! :)
36796      # First separate the path from the arguments. This will split at the first
36797      # space.
36798      complete="$GNM"
36799      path="${complete%% *}"
36800      tmp="$complete EOL"
36801      arguments="${tmp#* }"
36802
36803      # Cannot rely on the command "which" here since it doesn't always work.
36804      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36805      if test -z "$is_absolute_path"; then
36806        # Path to executable is not absolute. Find it.
36807        IFS_save="$IFS"
36808        IFS=:
36809        for p in $PATH; do
36810          if test -f "$p/$path" && test -x "$p/$path"; then
36811            new_path="$p/$path"
36812            break
36813          fi
36814        done
36815        IFS="$IFS_save"
36816      else
36817        # This is an absolute path, we can use it without further modifications.
36818        new_path="$path"
36819      fi
36820
36821      if test "x$new_path" = x; then
36822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36823$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36824        has_space=`$ECHO "$complete" | $GREP " "`
36825        if test "x$has_space" != x; then
36826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36828        fi
36829        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36830      fi
36831    fi
36832
36833    # Now join together the path and the arguments once again
36834    if test "x$arguments" != xEOL; then
36835      new_complete="$new_path ${arguments% *}"
36836    else
36837      new_complete="$new_path"
36838    fi
36839
36840    if test "x$complete" != "x$new_complete"; then
36841      GNM="$new_complete"
36842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36843$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36844    fi
36845  fi
36846
36847  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36848    # FIXME: we should unify this with the solaris case above.
36849
36850
36851  # Publish this variable in the help.
36852
36853
36854  if test "x$STRIP" = x; then
36855    # The variable is not set by user, try to locate tool using the code snippet
36856    if test -n "$ac_tool_prefix"; then
36857  for ac_prog in strip
36858  do
36859    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36860set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36862$as_echo_n "checking for $ac_word... " >&6; }
36863if ${ac_cv_prog_STRIP+:} false; then :
36864  $as_echo_n "(cached) " >&6
36865else
36866  if test -n "$STRIP"; then
36867  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36868else
36869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36870for as_dir in $PATH
36871do
36872  IFS=$as_save_IFS
36873  test -z "$as_dir" && as_dir=.
36874    for ac_exec_ext in '' $ac_executable_extensions; do
36875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36876    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36878    break 2
36879  fi
36880done
36881  done
36882IFS=$as_save_IFS
36883
36884fi
36885fi
36886STRIP=$ac_cv_prog_STRIP
36887if test -n "$STRIP"; then
36888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36889$as_echo "$STRIP" >&6; }
36890else
36891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36892$as_echo "no" >&6; }
36893fi
36894
36895
36896    test -n "$STRIP" && break
36897  done
36898fi
36899if test -z "$STRIP"; then
36900  ac_ct_STRIP=$STRIP
36901  for ac_prog in strip
36902do
36903  # Extract the first word of "$ac_prog", so it can be a program name with args.
36904set dummy $ac_prog; ac_word=$2
36905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36906$as_echo_n "checking for $ac_word... " >&6; }
36907if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36908  $as_echo_n "(cached) " >&6
36909else
36910  if test -n "$ac_ct_STRIP"; then
36911  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36912else
36913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36914for as_dir in $PATH
36915do
36916  IFS=$as_save_IFS
36917  test -z "$as_dir" && as_dir=.
36918    for ac_exec_ext in '' $ac_executable_extensions; do
36919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36920    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36922    break 2
36923  fi
36924done
36925  done
36926IFS=$as_save_IFS
36927
36928fi
36929fi
36930ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36931if test -n "$ac_ct_STRIP"; then
36932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36933$as_echo "$ac_ct_STRIP" >&6; }
36934else
36935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36936$as_echo "no" >&6; }
36937fi
36938
36939
36940  test -n "$ac_ct_STRIP" && break
36941done
36942
36943  if test "x$ac_ct_STRIP" = x; then
36944    STRIP=""
36945  else
36946    case $cross_compiling:$ac_tool_warned in
36947yes:)
36948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36950ac_tool_warned=yes ;;
36951esac
36952    STRIP=$ac_ct_STRIP
36953  fi
36954fi
36955
36956  else
36957    # The variable is set, but is it from the command line or the environment?
36958
36959    # Try to remove the string !STRIP! from our list.
36960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36962      # If it failed, the variable was not from the command line. Ignore it,
36963      # but warn the user (except for BASH, which is always set by the calling BASH).
36964      if test "xSTRIP" != xBASH; then
36965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36966$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36967      fi
36968      # Try to locate tool using the code snippet
36969      if test -n "$ac_tool_prefix"; then
36970  for ac_prog in strip
36971  do
36972    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36973set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36975$as_echo_n "checking for $ac_word... " >&6; }
36976if ${ac_cv_prog_STRIP+:} false; then :
36977  $as_echo_n "(cached) " >&6
36978else
36979  if test -n "$STRIP"; then
36980  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36981else
36982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36983for as_dir in $PATH
36984do
36985  IFS=$as_save_IFS
36986  test -z "$as_dir" && as_dir=.
36987    for ac_exec_ext in '' $ac_executable_extensions; do
36988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36989    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36991    break 2
36992  fi
36993done
36994  done
36995IFS=$as_save_IFS
36996
36997fi
36998fi
36999STRIP=$ac_cv_prog_STRIP
37000if test -n "$STRIP"; then
37001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37002$as_echo "$STRIP" >&6; }
37003else
37004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37005$as_echo "no" >&6; }
37006fi
37007
37008
37009    test -n "$STRIP" && break
37010  done
37011fi
37012if test -z "$STRIP"; then
37013  ac_ct_STRIP=$STRIP
37014  for ac_prog in strip
37015do
37016  # Extract the first word of "$ac_prog", so it can be a program name with args.
37017set dummy $ac_prog; ac_word=$2
37018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37019$as_echo_n "checking for $ac_word... " >&6; }
37020if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37021  $as_echo_n "(cached) " >&6
37022else
37023  if test -n "$ac_ct_STRIP"; then
37024  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37025else
37026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37027for as_dir in $PATH
37028do
37029  IFS=$as_save_IFS
37030  test -z "$as_dir" && as_dir=.
37031    for ac_exec_ext in '' $ac_executable_extensions; do
37032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37033    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37035    break 2
37036  fi
37037done
37038  done
37039IFS=$as_save_IFS
37040
37041fi
37042fi
37043ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37044if test -n "$ac_ct_STRIP"; then
37045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37046$as_echo "$ac_ct_STRIP" >&6; }
37047else
37048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37049$as_echo "no" >&6; }
37050fi
37051
37052
37053  test -n "$ac_ct_STRIP" && break
37054done
37055
37056  if test "x$ac_ct_STRIP" = x; then
37057    STRIP=""
37058  else
37059    case $cross_compiling:$ac_tool_warned in
37060yes:)
37061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37063ac_tool_warned=yes ;;
37064esac
37065    STRIP=$ac_ct_STRIP
37066  fi
37067fi
37068
37069    else
37070      # If it succeeded, then it was overridden by the user. We will use it
37071      # for the tool.
37072
37073      # First remove it from the list of overridden variables, so we can test
37074      # for unknown variables in the end.
37075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37076
37077      # Check if the provided tool contains a complete path.
37078      tool_specified="$STRIP"
37079      tool_basename="${tool_specified##*/}"
37080      if test "x$tool_basename" = "x$tool_specified"; then
37081        # A command without a complete path is provided, search $PATH.
37082        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37083$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37084        # Extract the first word of "$tool_basename", so it can be a program name with args.
37085set dummy $tool_basename; ac_word=$2
37086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37087$as_echo_n "checking for $ac_word... " >&6; }
37088if ${ac_cv_path_STRIP+:} false; then :
37089  $as_echo_n "(cached) " >&6
37090else
37091  case $STRIP in
37092  [\\/]* | ?:[\\/]*)
37093  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37094  ;;
37095  *)
37096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37097for as_dir in $PATH
37098do
37099  IFS=$as_save_IFS
37100  test -z "$as_dir" && as_dir=.
37101    for ac_exec_ext in '' $ac_executable_extensions; do
37102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37103    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37105    break 2
37106  fi
37107done
37108  done
37109IFS=$as_save_IFS
37110
37111  ;;
37112esac
37113fi
37114STRIP=$ac_cv_path_STRIP
37115if test -n "$STRIP"; then
37116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37117$as_echo "$STRIP" >&6; }
37118else
37119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37120$as_echo "no" >&6; }
37121fi
37122
37123
37124        if test "x$STRIP" = x; then
37125          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37126        fi
37127      else
37128        # Otherwise we believe it is a complete path. Use it as it is.
37129        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37130$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37132$as_echo_n "checking for STRIP... " >&6; }
37133        if test ! -x "$tool_specified"; then
37134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37135$as_echo "not found" >&6; }
37136          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37137        fi
37138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37139$as_echo "$tool_specified" >&6; }
37140      fi
37141    fi
37142  fi
37143
37144
37145
37146  # Only process if variable expands to non-empty
37147
37148  if test "x$STRIP" != x; then
37149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37150
37151  # First separate the path from the arguments. This will split at the first
37152  # space.
37153  complete="$STRIP"
37154  path="${complete%% *}"
37155  tmp="$complete EOL"
37156  arguments="${tmp#* }"
37157
37158  # Input might be given as Windows format, start by converting to
37159  # unix format.
37160  new_path=`$CYGPATH -u "$path"`
37161
37162  # Now try to locate executable using which
37163  new_path=`$WHICH "$new_path" 2> /dev/null`
37164  # bat and cmd files are not always considered executable in cygwin causing which
37165  # to not find them
37166  if test "x$new_path" = x \
37167      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37168      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37169    new_path=`$CYGPATH -u "$path"`
37170  fi
37171  if test "x$new_path" = x; then
37172    # Oops. Which didn't find the executable.
37173    # The splitting of arguments from the executable at a space might have been incorrect,
37174    # since paths with space are more likely in Windows. Give it another try with the whole
37175    # argument.
37176    path="$complete"
37177    arguments="EOL"
37178    new_path=`$CYGPATH -u "$path"`
37179    new_path=`$WHICH "$new_path" 2> /dev/null`
37180    # bat and cmd files are not always considered executable in cygwin causing which
37181    # to not find them
37182    if test "x$new_path" = x \
37183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37185      new_path=`$CYGPATH -u "$path"`
37186    fi
37187    if test "x$new_path" = x; then
37188      # It's still not found. Now this is an unrecoverable error.
37189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37190$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37191      has_space=`$ECHO "$complete" | $GREP " "`
37192      if test "x$has_space" != x; then
37193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37195      fi
37196      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37197    fi
37198  fi
37199
37200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37203  # "foo.exe" is OK but "foo" is an error.
37204  #
37205  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37206  # It is also a way to make sure we got the proper file name for the real test later on.
37207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37208  if test "x$test_shortpath" = x; then
37209    # Short path failed, file does not exist as specified.
37210    # Try adding .exe or .cmd
37211    if test -f "${new_path}.exe"; then
37212      input_to_shortpath="${new_path}.exe"
37213    elif test -f "${new_path}.cmd"; then
37214      input_to_shortpath="${new_path}.cmd"
37215    else
37216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37217$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37218      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37219$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37220      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37221    fi
37222  else
37223    input_to_shortpath="$new_path"
37224  fi
37225
37226  # Call helper function which possibly converts this using DOS-style short mode.
37227  # If so, the updated path is stored in $new_path.
37228  new_path="$input_to_shortpath"
37229
37230  input_path="$input_to_shortpath"
37231  # Check if we need to convert this using DOS-style short mode. If the path
37232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37233  # take no chances and rewrite it.
37234  # Note: m4 eats our [], so we need to use [ and ] instead.
37235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37236  if test "x$has_forbidden_chars" != x; then
37237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37241      # Going to short mode and back again did indeed matter. Since short mode is
37242      # case insensitive, let's make it lowercase to improve readability.
37243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37244      # Now convert it back to Unix-style (cygpath)
37245      input_path=`$CYGPATH -u "$shortmode_path"`
37246      new_path="$input_path"
37247    fi
37248  fi
37249
37250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37251  if test "x$test_cygdrive_prefix" = x; then
37252    # As a simple fix, exclude /usr/bin since it's not a real path.
37253    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37255      # a path prefixed by /cygdrive for fixpath to work.
37256      new_path="$CYGWIN_ROOT_PATH$input_path"
37257    fi
37258  fi
37259
37260  # remove trailing .exe if any
37261  new_path="${new_path/%.exe/}"
37262
37263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37264
37265  # First separate the path from the arguments. This will split at the first
37266  # space.
37267  complete="$STRIP"
37268  path="${complete%% *}"
37269  tmp="$complete EOL"
37270  arguments="${tmp#* }"
37271
37272  # Input might be given as Windows format, start by converting to
37273  # unix format.
37274  new_path="$path"
37275
37276  windows_path="$new_path"
37277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37278    unix_path=`$CYGPATH -u "$windows_path"`
37279    new_path="$unix_path"
37280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37282    new_path="$unix_path"
37283  fi
37284
37285
37286  # Now try to locate executable using which
37287  new_path=`$WHICH "$new_path" 2> /dev/null`
37288
37289  if test "x$new_path" = x; then
37290    # Oops. Which didn't find the executable.
37291    # The splitting of arguments from the executable at a space might have been incorrect,
37292    # since paths with space are more likely in Windows. Give it another try with the whole
37293    # argument.
37294    path="$complete"
37295    arguments="EOL"
37296    new_path="$path"
37297
37298  windows_path="$new_path"
37299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37300    unix_path=`$CYGPATH -u "$windows_path"`
37301    new_path="$unix_path"
37302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37304    new_path="$unix_path"
37305  fi
37306
37307
37308    new_path=`$WHICH "$new_path" 2> /dev/null`
37309    # bat and cmd files are not always considered executable in MSYS causing which
37310    # to not find them
37311    if test "x$new_path" = x \
37312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37314      new_path="$path"
37315
37316  windows_path="$new_path"
37317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37318    unix_path=`$CYGPATH -u "$windows_path"`
37319    new_path="$unix_path"
37320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37322    new_path="$unix_path"
37323  fi
37324
37325    fi
37326
37327    if test "x$new_path" = x; then
37328      # It's still not found. Now this is an unrecoverable error.
37329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37330$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37331      has_space=`$ECHO "$complete" | $GREP " "`
37332      if test "x$has_space" != x; then
37333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37335      fi
37336      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37337    fi
37338  fi
37339
37340  # Now new_path has a complete unix path to the binary
37341  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37342    # Keep paths in /bin as-is, but remove trailing .exe if any
37343    new_path="${new_path/%.exe/}"
37344    # Do not save /bin paths to all_fixpath_prefixes!
37345  else
37346    # Not in mixed or Windows style, start by that.
37347    new_path=`cmd //c echo $new_path`
37348
37349  input_path="$new_path"
37350  # Check if we need to convert this using DOS-style short mode. If the path
37351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37352  # take no chances and rewrite it.
37353  # Note: m4 eats our [], so we need to use [ and ] instead.
37354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37355  if test "x$has_forbidden_chars" != x; then
37356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37358  fi
37359
37360    # Output is in $new_path
37361
37362  windows_path="$new_path"
37363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37364    unix_path=`$CYGPATH -u "$windows_path"`
37365    new_path="$unix_path"
37366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37368    new_path="$unix_path"
37369  fi
37370
37371    # remove trailing .exe if any
37372    new_path="${new_path/%.exe/}"
37373
37374    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37375    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37376  fi
37377
37378    else
37379      # We're on a unix platform. Hooray! :)
37380      # First separate the path from the arguments. This will split at the first
37381      # space.
37382      complete="$STRIP"
37383      path="${complete%% *}"
37384      tmp="$complete EOL"
37385      arguments="${tmp#* }"
37386
37387      # Cannot rely on the command "which" here since it doesn't always work.
37388      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37389      if test -z "$is_absolute_path"; then
37390        # Path to executable is not absolute. Find it.
37391        IFS_save="$IFS"
37392        IFS=:
37393        for p in $PATH; do
37394          if test -f "$p/$path" && test -x "$p/$path"; then
37395            new_path="$p/$path"
37396            break
37397          fi
37398        done
37399        IFS="$IFS_save"
37400      else
37401        # This is an absolute path, we can use it without further modifications.
37402        new_path="$path"
37403      fi
37404
37405      if test "x$new_path" = x; then
37406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37407$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37408        has_space=`$ECHO "$complete" | $GREP " "`
37409        if test "x$has_space" != x; then
37410          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37411$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37412        fi
37413        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37414      fi
37415    fi
37416
37417    # Now join together the path and the arguments once again
37418    if test "x$arguments" != xEOL; then
37419      new_complete="$new_path ${arguments% *}"
37420    else
37421      new_complete="$new_path"
37422    fi
37423
37424    if test "x$complete" != "x$new_complete"; then
37425      STRIP="$new_complete"
37426      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37427$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37428    fi
37429  fi
37430
37431
37432
37433  # Publish this variable in the help.
37434
37435
37436  if test "x$NM" = x; then
37437    # The variable is not set by user, try to locate tool using the code snippet
37438    if test -n "$ac_tool_prefix"; then
37439  for ac_prog in nm
37440  do
37441    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37442set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37444$as_echo_n "checking for $ac_word... " >&6; }
37445if ${ac_cv_prog_NM+:} false; then :
37446  $as_echo_n "(cached) " >&6
37447else
37448  if test -n "$NM"; then
37449  ac_cv_prog_NM="$NM" # Let the user override the test.
37450else
37451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37452for as_dir in $PATH
37453do
37454  IFS=$as_save_IFS
37455  test -z "$as_dir" && as_dir=.
37456    for ac_exec_ext in '' $ac_executable_extensions; do
37457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37458    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37460    break 2
37461  fi
37462done
37463  done
37464IFS=$as_save_IFS
37465
37466fi
37467fi
37468NM=$ac_cv_prog_NM
37469if test -n "$NM"; then
37470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37471$as_echo "$NM" >&6; }
37472else
37473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37474$as_echo "no" >&6; }
37475fi
37476
37477
37478    test -n "$NM" && break
37479  done
37480fi
37481if test -z "$NM"; then
37482  ac_ct_NM=$NM
37483  for ac_prog in nm
37484do
37485  # Extract the first word of "$ac_prog", so it can be a program name with args.
37486set dummy $ac_prog; ac_word=$2
37487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37488$as_echo_n "checking for $ac_word... " >&6; }
37489if ${ac_cv_prog_ac_ct_NM+:} false; then :
37490  $as_echo_n "(cached) " >&6
37491else
37492  if test -n "$ac_ct_NM"; then
37493  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37494else
37495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37496for as_dir in $PATH
37497do
37498  IFS=$as_save_IFS
37499  test -z "$as_dir" && as_dir=.
37500    for ac_exec_ext in '' $ac_executable_extensions; do
37501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37502    ac_cv_prog_ac_ct_NM="$ac_prog"
37503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37504    break 2
37505  fi
37506done
37507  done
37508IFS=$as_save_IFS
37509
37510fi
37511fi
37512ac_ct_NM=$ac_cv_prog_ac_ct_NM
37513if test -n "$ac_ct_NM"; then
37514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37515$as_echo "$ac_ct_NM" >&6; }
37516else
37517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37518$as_echo "no" >&6; }
37519fi
37520
37521
37522  test -n "$ac_ct_NM" && break
37523done
37524
37525  if test "x$ac_ct_NM" = x; then
37526    NM=""
37527  else
37528    case $cross_compiling:$ac_tool_warned in
37529yes:)
37530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37532ac_tool_warned=yes ;;
37533esac
37534    NM=$ac_ct_NM
37535  fi
37536fi
37537
37538  else
37539    # The variable is set, but is it from the command line or the environment?
37540
37541    # Try to remove the string !NM! from our list.
37542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37544      # If it failed, the variable was not from the command line. Ignore it,
37545      # but warn the user (except for BASH, which is always set by the calling BASH).
37546      if test "xNM" != xBASH; then
37547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37548$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37549      fi
37550      # Try to locate tool using the code snippet
37551      if test -n "$ac_tool_prefix"; then
37552  for ac_prog in nm
37553  do
37554    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37555set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37557$as_echo_n "checking for $ac_word... " >&6; }
37558if ${ac_cv_prog_NM+:} false; then :
37559  $as_echo_n "(cached) " >&6
37560else
37561  if test -n "$NM"; then
37562  ac_cv_prog_NM="$NM" # Let the user override the test.
37563else
37564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37565for as_dir in $PATH
37566do
37567  IFS=$as_save_IFS
37568  test -z "$as_dir" && as_dir=.
37569    for ac_exec_ext in '' $ac_executable_extensions; do
37570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37571    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37573    break 2
37574  fi
37575done
37576  done
37577IFS=$as_save_IFS
37578
37579fi
37580fi
37581NM=$ac_cv_prog_NM
37582if test -n "$NM"; then
37583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37584$as_echo "$NM" >&6; }
37585else
37586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37587$as_echo "no" >&6; }
37588fi
37589
37590
37591    test -n "$NM" && break
37592  done
37593fi
37594if test -z "$NM"; then
37595  ac_ct_NM=$NM
37596  for ac_prog in nm
37597do
37598  # Extract the first word of "$ac_prog", so it can be a program name with args.
37599set dummy $ac_prog; ac_word=$2
37600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37601$as_echo_n "checking for $ac_word... " >&6; }
37602if ${ac_cv_prog_ac_ct_NM+:} false; then :
37603  $as_echo_n "(cached) " >&6
37604else
37605  if test -n "$ac_ct_NM"; then
37606  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37607else
37608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37609for as_dir in $PATH
37610do
37611  IFS=$as_save_IFS
37612  test -z "$as_dir" && as_dir=.
37613    for ac_exec_ext in '' $ac_executable_extensions; do
37614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37615    ac_cv_prog_ac_ct_NM="$ac_prog"
37616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37617    break 2
37618  fi
37619done
37620  done
37621IFS=$as_save_IFS
37622
37623fi
37624fi
37625ac_ct_NM=$ac_cv_prog_ac_ct_NM
37626if test -n "$ac_ct_NM"; then
37627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37628$as_echo "$ac_ct_NM" >&6; }
37629else
37630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37631$as_echo "no" >&6; }
37632fi
37633
37634
37635  test -n "$ac_ct_NM" && break
37636done
37637
37638  if test "x$ac_ct_NM" = x; then
37639    NM=""
37640  else
37641    case $cross_compiling:$ac_tool_warned in
37642yes:)
37643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37645ac_tool_warned=yes ;;
37646esac
37647    NM=$ac_ct_NM
37648  fi
37649fi
37650
37651    else
37652      # If it succeeded, then it was overridden by the user. We will use it
37653      # for the tool.
37654
37655      # First remove it from the list of overridden variables, so we can test
37656      # for unknown variables in the end.
37657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37658
37659      # Check if the provided tool contains a complete path.
37660      tool_specified="$NM"
37661      tool_basename="${tool_specified##*/}"
37662      if test "x$tool_basename" = "x$tool_specified"; then
37663        # A command without a complete path is provided, search $PATH.
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37665$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37666        # Extract the first word of "$tool_basename", so it can be a program name with args.
37667set dummy $tool_basename; ac_word=$2
37668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37669$as_echo_n "checking for $ac_word... " >&6; }
37670if ${ac_cv_path_NM+:} false; then :
37671  $as_echo_n "(cached) " >&6
37672else
37673  case $NM in
37674  [\\/]* | ?:[\\/]*)
37675  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37676  ;;
37677  *)
37678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37679for as_dir in $PATH
37680do
37681  IFS=$as_save_IFS
37682  test -z "$as_dir" && as_dir=.
37683    for ac_exec_ext in '' $ac_executable_extensions; do
37684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37685    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37687    break 2
37688  fi
37689done
37690  done
37691IFS=$as_save_IFS
37692
37693  ;;
37694esac
37695fi
37696NM=$ac_cv_path_NM
37697if test -n "$NM"; then
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37699$as_echo "$NM" >&6; }
37700else
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37702$as_echo "no" >&6; }
37703fi
37704
37705
37706        if test "x$NM" = x; then
37707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37708        fi
37709      else
37710        # Otherwise we believe it is a complete path. Use it as it is.
37711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37712$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37714$as_echo_n "checking for NM... " >&6; }
37715        if test ! -x "$tool_specified"; then
37716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37717$as_echo "not found" >&6; }
37718          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37719        fi
37720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37721$as_echo "$tool_specified" >&6; }
37722      fi
37723    fi
37724  fi
37725
37726
37727
37728  # Only process if variable expands to non-empty
37729
37730  if test "x$NM" != x; then
37731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37732
37733  # First separate the path from the arguments. This will split at the first
37734  # space.
37735  complete="$NM"
37736  path="${complete%% *}"
37737  tmp="$complete EOL"
37738  arguments="${tmp#* }"
37739
37740  # Input might be given as Windows format, start by converting to
37741  # unix format.
37742  new_path=`$CYGPATH -u "$path"`
37743
37744  # Now try to locate executable using which
37745  new_path=`$WHICH "$new_path" 2> /dev/null`
37746  # bat and cmd files are not always considered executable in cygwin causing which
37747  # to not find them
37748  if test "x$new_path" = x \
37749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37751    new_path=`$CYGPATH -u "$path"`
37752  fi
37753  if test "x$new_path" = x; then
37754    # Oops. Which didn't find the executable.
37755    # The splitting of arguments from the executable at a space might have been incorrect,
37756    # since paths with space are more likely in Windows. Give it another try with the whole
37757    # argument.
37758    path="$complete"
37759    arguments="EOL"
37760    new_path=`$CYGPATH -u "$path"`
37761    new_path=`$WHICH "$new_path" 2> /dev/null`
37762    # bat and cmd files are not always considered executable in cygwin causing which
37763    # to not find them
37764    if test "x$new_path" = x \
37765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37767      new_path=`$CYGPATH -u "$path"`
37768    fi
37769    if test "x$new_path" = x; then
37770      # It's still not found. Now this is an unrecoverable error.
37771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37772$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37773      has_space=`$ECHO "$complete" | $GREP " "`
37774      if test "x$has_space" != x; then
37775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37777      fi
37778      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37779    fi
37780  fi
37781
37782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37785  # "foo.exe" is OK but "foo" is an error.
37786  #
37787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37788  # It is also a way to make sure we got the proper file name for the real test later on.
37789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37790  if test "x$test_shortpath" = x; then
37791    # Short path failed, file does not exist as specified.
37792    # Try adding .exe or .cmd
37793    if test -f "${new_path}.exe"; then
37794      input_to_shortpath="${new_path}.exe"
37795    elif test -f "${new_path}.cmd"; then
37796      input_to_shortpath="${new_path}.cmd"
37797    else
37798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37799$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37802      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37803    fi
37804  else
37805    input_to_shortpath="$new_path"
37806  fi
37807
37808  # Call helper function which possibly converts this using DOS-style short mode.
37809  # If so, the updated path is stored in $new_path.
37810  new_path="$input_to_shortpath"
37811
37812  input_path="$input_to_shortpath"
37813  # Check if we need to convert this using DOS-style short mode. If the path
37814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37815  # take no chances and rewrite it.
37816  # Note: m4 eats our [], so we need to use [ and ] instead.
37817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37818  if test "x$has_forbidden_chars" != x; then
37819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37823      # Going to short mode and back again did indeed matter. Since short mode is
37824      # case insensitive, let's make it lowercase to improve readability.
37825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37826      # Now convert it back to Unix-style (cygpath)
37827      input_path=`$CYGPATH -u "$shortmode_path"`
37828      new_path="$input_path"
37829    fi
37830  fi
37831
37832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37833  if test "x$test_cygdrive_prefix" = x; then
37834    # As a simple fix, exclude /usr/bin since it's not a real path.
37835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37837      # a path prefixed by /cygdrive for fixpath to work.
37838      new_path="$CYGWIN_ROOT_PATH$input_path"
37839    fi
37840  fi
37841
37842  # remove trailing .exe if any
37843  new_path="${new_path/%.exe/}"
37844
37845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37846
37847  # First separate the path from the arguments. This will split at the first
37848  # space.
37849  complete="$NM"
37850  path="${complete%% *}"
37851  tmp="$complete EOL"
37852  arguments="${tmp#* }"
37853
37854  # Input might be given as Windows format, start by converting to
37855  # unix format.
37856  new_path="$path"
37857
37858  windows_path="$new_path"
37859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37860    unix_path=`$CYGPATH -u "$windows_path"`
37861    new_path="$unix_path"
37862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37864    new_path="$unix_path"
37865  fi
37866
37867
37868  # Now try to locate executable using which
37869  new_path=`$WHICH "$new_path" 2> /dev/null`
37870
37871  if test "x$new_path" = x; then
37872    # Oops. Which didn't find the executable.
37873    # The splitting of arguments from the executable at a space might have been incorrect,
37874    # since paths with space are more likely in Windows. Give it another try with the whole
37875    # argument.
37876    path="$complete"
37877    arguments="EOL"
37878    new_path="$path"
37879
37880  windows_path="$new_path"
37881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37882    unix_path=`$CYGPATH -u "$windows_path"`
37883    new_path="$unix_path"
37884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37886    new_path="$unix_path"
37887  fi
37888
37889
37890    new_path=`$WHICH "$new_path" 2> /dev/null`
37891    # bat and cmd files are not always considered executable in MSYS causing which
37892    # to not find them
37893    if test "x$new_path" = x \
37894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37896      new_path="$path"
37897
37898  windows_path="$new_path"
37899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37900    unix_path=`$CYGPATH -u "$windows_path"`
37901    new_path="$unix_path"
37902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37904    new_path="$unix_path"
37905  fi
37906
37907    fi
37908
37909    if test "x$new_path" = x; then
37910      # It's still not found. Now this is an unrecoverable error.
37911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37912$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37913      has_space=`$ECHO "$complete" | $GREP " "`
37914      if test "x$has_space" != x; then
37915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37917      fi
37918      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37919    fi
37920  fi
37921
37922  # Now new_path has a complete unix path to the binary
37923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37924    # Keep paths in /bin as-is, but remove trailing .exe if any
37925    new_path="${new_path/%.exe/}"
37926    # Do not save /bin paths to all_fixpath_prefixes!
37927  else
37928    # Not in mixed or Windows style, start by that.
37929    new_path=`cmd //c echo $new_path`
37930
37931  input_path="$new_path"
37932  # Check if we need to convert this using DOS-style short mode. If the path
37933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37934  # take no chances and rewrite it.
37935  # Note: m4 eats our [], so we need to use [ and ] instead.
37936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37937  if test "x$has_forbidden_chars" != x; then
37938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37940  fi
37941
37942    # Output is in $new_path
37943
37944  windows_path="$new_path"
37945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37946    unix_path=`$CYGPATH -u "$windows_path"`
37947    new_path="$unix_path"
37948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37950    new_path="$unix_path"
37951  fi
37952
37953    # remove trailing .exe if any
37954    new_path="${new_path/%.exe/}"
37955
37956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37958  fi
37959
37960    else
37961      # We're on a unix platform. Hooray! :)
37962      # First separate the path from the arguments. This will split at the first
37963      # space.
37964      complete="$NM"
37965      path="${complete%% *}"
37966      tmp="$complete EOL"
37967      arguments="${tmp#* }"
37968
37969      # Cannot rely on the command "which" here since it doesn't always work.
37970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37971      if test -z "$is_absolute_path"; then
37972        # Path to executable is not absolute. Find it.
37973        IFS_save="$IFS"
37974        IFS=:
37975        for p in $PATH; do
37976          if test -f "$p/$path" && test -x "$p/$path"; then
37977            new_path="$p/$path"
37978            break
37979          fi
37980        done
37981        IFS="$IFS_save"
37982      else
37983        # This is an absolute path, we can use it without further modifications.
37984        new_path="$path"
37985      fi
37986
37987      if test "x$new_path" = x; then
37988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37989$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37990        has_space=`$ECHO "$complete" | $GREP " "`
37991        if test "x$has_space" != x; then
37992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37994        fi
37995        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37996      fi
37997    fi
37998
37999    # Now join together the path and the arguments once again
38000    if test "x$arguments" != xEOL; then
38001      new_complete="$new_path ${arguments% *}"
38002    else
38003      new_complete="$new_path"
38004    fi
38005
38006    if test "x$complete" != "x$new_complete"; then
38007      NM="$new_complete"
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38009$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38010    fi
38011  fi
38012
38013    GNM="$NM"
38014
38015  fi
38016
38017  # objcopy is used for moving debug symbols to separate files when
38018  # full debug symbols are enabled.
38019  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38020
38021
38022  # Publish this variable in the help.
38023
38024
38025  if test "x$OBJCOPY" = x; then
38026    # The variable is not set by user, try to locate tool using the code snippet
38027    if test -n "$ac_tool_prefix"; then
38028  for ac_prog in gobjcopy objcopy
38029  do
38030    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38033$as_echo_n "checking for $ac_word... " >&6; }
38034if ${ac_cv_prog_OBJCOPY+:} false; then :
38035  $as_echo_n "(cached) " >&6
38036else
38037  if test -n "$OBJCOPY"; then
38038  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38039else
38040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38041for as_dir in $PATH
38042do
38043  IFS=$as_save_IFS
38044  test -z "$as_dir" && as_dir=.
38045    for ac_exec_ext in '' $ac_executable_extensions; do
38046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38047    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38049    break 2
38050  fi
38051done
38052  done
38053IFS=$as_save_IFS
38054
38055fi
38056fi
38057OBJCOPY=$ac_cv_prog_OBJCOPY
38058if test -n "$OBJCOPY"; then
38059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38060$as_echo "$OBJCOPY" >&6; }
38061else
38062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38063$as_echo "no" >&6; }
38064fi
38065
38066
38067    test -n "$OBJCOPY" && break
38068  done
38069fi
38070if test -z "$OBJCOPY"; then
38071  ac_ct_OBJCOPY=$OBJCOPY
38072  for ac_prog in gobjcopy objcopy
38073do
38074  # Extract the first word of "$ac_prog", so it can be a program name with args.
38075set dummy $ac_prog; ac_word=$2
38076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38077$as_echo_n "checking for $ac_word... " >&6; }
38078if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38079  $as_echo_n "(cached) " >&6
38080else
38081  if test -n "$ac_ct_OBJCOPY"; then
38082  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38083else
38084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38085for as_dir in $PATH
38086do
38087  IFS=$as_save_IFS
38088  test -z "$as_dir" && as_dir=.
38089    for ac_exec_ext in '' $ac_executable_extensions; do
38090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38091    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38093    break 2
38094  fi
38095done
38096  done
38097IFS=$as_save_IFS
38098
38099fi
38100fi
38101ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38102if test -n "$ac_ct_OBJCOPY"; then
38103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38104$as_echo "$ac_ct_OBJCOPY" >&6; }
38105else
38106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38107$as_echo "no" >&6; }
38108fi
38109
38110
38111  test -n "$ac_ct_OBJCOPY" && break
38112done
38113
38114  if test "x$ac_ct_OBJCOPY" = x; then
38115    OBJCOPY=""
38116  else
38117    case $cross_compiling:$ac_tool_warned in
38118yes:)
38119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38121ac_tool_warned=yes ;;
38122esac
38123    OBJCOPY=$ac_ct_OBJCOPY
38124  fi
38125fi
38126
38127  else
38128    # The variable is set, but is it from the command line or the environment?
38129
38130    # Try to remove the string !OBJCOPY! from our list.
38131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38133      # If it failed, the variable was not from the command line. Ignore it,
38134      # but warn the user (except for BASH, which is always set by the calling BASH).
38135      if test "xOBJCOPY" != xBASH; then
38136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38137$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38138      fi
38139      # Try to locate tool using the code snippet
38140      if test -n "$ac_tool_prefix"; then
38141  for ac_prog in gobjcopy objcopy
38142  do
38143    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38144set dummy $ac_tool_prefix$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_OBJCOPY+:} false; then :
38148  $as_echo_n "(cached) " >&6
38149else
38150  if test -n "$OBJCOPY"; then
38151  ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$ac_tool_prefix$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
38170OBJCOPY=$ac_cv_prog_OBJCOPY
38171if test -n "$OBJCOPY"; then
38172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38173$as_echo "$OBJCOPY" >&6; }
38174else
38175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38176$as_echo "no" >&6; }
38177fi
38178
38179
38180    test -n "$OBJCOPY" && break
38181  done
38182fi
38183if test -z "$OBJCOPY"; then
38184  ac_ct_OBJCOPY=$OBJCOPY
38185  for ac_prog in gobjcopy objcopy
38186do
38187  # Extract the first word of "$ac_prog", so it can be a program name with args.
38188set dummy $ac_prog; ac_word=$2
38189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38190$as_echo_n "checking for $ac_word... " >&6; }
38191if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38192  $as_echo_n "(cached) " >&6
38193else
38194  if test -n "$ac_ct_OBJCOPY"; then
38195  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38196else
38197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38198for as_dir in $PATH
38199do
38200  IFS=$as_save_IFS
38201  test -z "$as_dir" && as_dir=.
38202    for ac_exec_ext in '' $ac_executable_extensions; do
38203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38204    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38206    break 2
38207  fi
38208done
38209  done
38210IFS=$as_save_IFS
38211
38212fi
38213fi
38214ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38215if test -n "$ac_ct_OBJCOPY"; then
38216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38217$as_echo "$ac_ct_OBJCOPY" >&6; }
38218else
38219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38220$as_echo "no" >&6; }
38221fi
38222
38223
38224  test -n "$ac_ct_OBJCOPY" && break
38225done
38226
38227  if test "x$ac_ct_OBJCOPY" = x; then
38228    OBJCOPY=""
38229  else
38230    case $cross_compiling:$ac_tool_warned in
38231yes:)
38232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38234ac_tool_warned=yes ;;
38235esac
38236    OBJCOPY=$ac_ct_OBJCOPY
38237  fi
38238fi
38239
38240    else
38241      # If it succeeded, then it was overridden by the user. We will use it
38242      # for the tool.
38243
38244      # First remove it from the list of overridden variables, so we can test
38245      # for unknown variables in the end.
38246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38247
38248      # Check if the provided tool contains a complete path.
38249      tool_specified="$OBJCOPY"
38250      tool_basename="${tool_specified##*/}"
38251      if test "x$tool_basename" = "x$tool_specified"; then
38252        # A command without a complete path is provided, search $PATH.
38253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38254$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38255        # Extract the first word of "$tool_basename", so it can be a program name with args.
38256set dummy $tool_basename; ac_word=$2
38257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38258$as_echo_n "checking for $ac_word... " >&6; }
38259if ${ac_cv_path_OBJCOPY+:} false; then :
38260  $as_echo_n "(cached) " >&6
38261else
38262  case $OBJCOPY in
38263  [\\/]* | ?:[\\/]*)
38264  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38265  ;;
38266  *)
38267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38268for as_dir in $PATH
38269do
38270  IFS=$as_save_IFS
38271  test -z "$as_dir" && as_dir=.
38272    for ac_exec_ext in '' $ac_executable_extensions; do
38273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38274    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38276    break 2
38277  fi
38278done
38279  done
38280IFS=$as_save_IFS
38281
38282  ;;
38283esac
38284fi
38285OBJCOPY=$ac_cv_path_OBJCOPY
38286if test -n "$OBJCOPY"; then
38287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38288$as_echo "$OBJCOPY" >&6; }
38289else
38290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38291$as_echo "no" >&6; }
38292fi
38293
38294
38295        if test "x$OBJCOPY" = x; then
38296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38297        fi
38298      else
38299        # Otherwise we believe it is a complete path. Use it as it is.
38300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38301$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38303$as_echo_n "checking for OBJCOPY... " >&6; }
38304        if test ! -x "$tool_specified"; then
38305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38306$as_echo "not found" >&6; }
38307          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38308        fi
38309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38310$as_echo "$tool_specified" >&6; }
38311      fi
38312    fi
38313  fi
38314
38315
38316    # Only call fixup if objcopy was found.
38317    if test -n "$OBJCOPY"; then
38318
38319  # Only process if variable expands to non-empty
38320
38321  if test "x$OBJCOPY" != x; then
38322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38323
38324  # First separate the path from the arguments. This will split at the first
38325  # space.
38326  complete="$OBJCOPY"
38327  path="${complete%% *}"
38328  tmp="$complete EOL"
38329  arguments="${tmp#* }"
38330
38331  # Input might be given as Windows format, start by converting to
38332  # unix format.
38333  new_path=`$CYGPATH -u "$path"`
38334
38335  # Now try to locate executable using which
38336  new_path=`$WHICH "$new_path" 2> /dev/null`
38337  # bat and cmd files are not always considered executable in cygwin causing which
38338  # to not find them
38339  if test "x$new_path" = x \
38340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38342    new_path=`$CYGPATH -u "$path"`
38343  fi
38344  if test "x$new_path" = x; then
38345    # Oops. Which didn't find the executable.
38346    # The splitting of arguments from the executable at a space might have been incorrect,
38347    # since paths with space are more likely in Windows. Give it another try with the whole
38348    # argument.
38349    path="$complete"
38350    arguments="EOL"
38351    new_path=`$CYGPATH -u "$path"`
38352    new_path=`$WHICH "$new_path" 2> /dev/null`
38353    # bat and cmd files are not always considered executable in cygwin causing which
38354    # to not find them
38355    if test "x$new_path" = x \
38356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38358      new_path=`$CYGPATH -u "$path"`
38359    fi
38360    if test "x$new_path" = x; then
38361      # It's still not found. Now this is an unrecoverable error.
38362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38363$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38364      has_space=`$ECHO "$complete" | $GREP " "`
38365      if test "x$has_space" != x; then
38366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38368      fi
38369      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38370    fi
38371  fi
38372
38373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38376  # "foo.exe" is OK but "foo" is an error.
38377  #
38378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38379  # It is also a way to make sure we got the proper file name for the real test later on.
38380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38381  if test "x$test_shortpath" = x; then
38382    # Short path failed, file does not exist as specified.
38383    # Try adding .exe or .cmd
38384    if test -f "${new_path}.exe"; then
38385      input_to_shortpath="${new_path}.exe"
38386    elif test -f "${new_path}.cmd"; then
38387      input_to_shortpath="${new_path}.cmd"
38388    else
38389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38390$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38393      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38394    fi
38395  else
38396    input_to_shortpath="$new_path"
38397  fi
38398
38399  # Call helper function which possibly converts this using DOS-style short mode.
38400  # If so, the updated path is stored in $new_path.
38401  new_path="$input_to_shortpath"
38402
38403  input_path="$input_to_shortpath"
38404  # Check if we need to convert this using DOS-style short mode. If the path
38405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38406  # take no chances and rewrite it.
38407  # Note: m4 eats our [], so we need to use [ and ] instead.
38408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38409  if test "x$has_forbidden_chars" != x; then
38410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38414      # Going to short mode and back again did indeed matter. Since short mode is
38415      # case insensitive, let's make it lowercase to improve readability.
38416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38417      # Now convert it back to Unix-style (cygpath)
38418      input_path=`$CYGPATH -u "$shortmode_path"`
38419      new_path="$input_path"
38420    fi
38421  fi
38422
38423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38424  if test "x$test_cygdrive_prefix" = x; then
38425    # As a simple fix, exclude /usr/bin since it's not a real path.
38426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38428      # a path prefixed by /cygdrive for fixpath to work.
38429      new_path="$CYGWIN_ROOT_PATH$input_path"
38430    fi
38431  fi
38432
38433  # remove trailing .exe if any
38434  new_path="${new_path/%.exe/}"
38435
38436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38437
38438  # First separate the path from the arguments. This will split at the first
38439  # space.
38440  complete="$OBJCOPY"
38441  path="${complete%% *}"
38442  tmp="$complete EOL"
38443  arguments="${tmp#* }"
38444
38445  # Input might be given as Windows format, start by converting to
38446  # unix format.
38447  new_path="$path"
38448
38449  windows_path="$new_path"
38450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38451    unix_path=`$CYGPATH -u "$windows_path"`
38452    new_path="$unix_path"
38453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38455    new_path="$unix_path"
38456  fi
38457
38458
38459  # Now try to locate executable using which
38460  new_path=`$WHICH "$new_path" 2> /dev/null`
38461
38462  if test "x$new_path" = x; then
38463    # Oops. Which didn't find the executable.
38464    # The splitting of arguments from the executable at a space might have been incorrect,
38465    # since paths with space are more likely in Windows. Give it another try with the whole
38466    # argument.
38467    path="$complete"
38468    arguments="EOL"
38469    new_path="$path"
38470
38471  windows_path="$new_path"
38472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38473    unix_path=`$CYGPATH -u "$windows_path"`
38474    new_path="$unix_path"
38475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38477    new_path="$unix_path"
38478  fi
38479
38480
38481    new_path=`$WHICH "$new_path" 2> /dev/null`
38482    # bat and cmd files are not always considered executable in MSYS causing which
38483    # to not find them
38484    if test "x$new_path" = x \
38485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38487      new_path="$path"
38488
38489  windows_path="$new_path"
38490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38491    unix_path=`$CYGPATH -u "$windows_path"`
38492    new_path="$unix_path"
38493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38495    new_path="$unix_path"
38496  fi
38497
38498    fi
38499
38500    if test "x$new_path" = x; then
38501      # It's still not found. Now this is an unrecoverable error.
38502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38503$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38504      has_space=`$ECHO "$complete" | $GREP " "`
38505      if test "x$has_space" != x; then
38506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38508      fi
38509      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38510    fi
38511  fi
38512
38513  # Now new_path has a complete unix path to the binary
38514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38515    # Keep paths in /bin as-is, but remove trailing .exe if any
38516    new_path="${new_path/%.exe/}"
38517    # Do not save /bin paths to all_fixpath_prefixes!
38518  else
38519    # Not in mixed or Windows style, start by that.
38520    new_path=`cmd //c echo $new_path`
38521
38522  input_path="$new_path"
38523  # Check if we need to convert this using DOS-style short mode. If the path
38524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38525  # take no chances and rewrite it.
38526  # Note: m4 eats our [], so we need to use [ and ] instead.
38527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38528  if test "x$has_forbidden_chars" != x; then
38529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38531  fi
38532
38533    # Output is in $new_path
38534
38535  windows_path="$new_path"
38536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38537    unix_path=`$CYGPATH -u "$windows_path"`
38538    new_path="$unix_path"
38539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38541    new_path="$unix_path"
38542  fi
38543
38544    # remove trailing .exe if any
38545    new_path="${new_path/%.exe/}"
38546
38547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38549  fi
38550
38551    else
38552      # We're on a unix platform. Hooray! :)
38553      # First separate the path from the arguments. This will split at the first
38554      # space.
38555      complete="$OBJCOPY"
38556      path="${complete%% *}"
38557      tmp="$complete EOL"
38558      arguments="${tmp#* }"
38559
38560      # Cannot rely on the command "which" here since it doesn't always work.
38561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38562      if test -z "$is_absolute_path"; then
38563        # Path to executable is not absolute. Find it.
38564        IFS_save="$IFS"
38565        IFS=:
38566        for p in $PATH; do
38567          if test -f "$p/$path" && test -x "$p/$path"; then
38568            new_path="$p/$path"
38569            break
38570          fi
38571        done
38572        IFS="$IFS_save"
38573      else
38574        # This is an absolute path, we can use it without further modifications.
38575        new_path="$path"
38576      fi
38577
38578      if test "x$new_path" = x; then
38579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38580$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38581        has_space=`$ECHO "$complete" | $GREP " "`
38582        if test "x$has_space" != x; then
38583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38585        fi
38586        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38587      fi
38588    fi
38589
38590    # Now join together the path and the arguments once again
38591    if test "x$arguments" != xEOL; then
38592      new_complete="$new_path ${arguments% *}"
38593    else
38594      new_complete="$new_path"
38595    fi
38596
38597    if test "x$complete" != "x$new_complete"; then
38598      OBJCOPY="$new_complete"
38599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38600$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38601    fi
38602  fi
38603
38604      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38605        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38606        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38607        # - version number is last blank separate word on first line
38608        # - version number formats that have been seen:
38609        #   - <major>.<minor>
38610        #   - <major>.<minor>.<micro>
38611        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38612        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38613         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38614              -e 's/.* //' \
38615              -e '/^[01]\./b bad' \
38616              -e '/^2\./{' \
38617              -e '  s/^2\.//' \
38618              -e '  /^[0-9]$/b bad' \
38619              -e '  /^[0-9]\./b bad' \
38620              -e '  /^1[0-9]$/b bad' \
38621              -e '  /^1[0-9]\./b bad' \
38622              -e '  /^20\./b bad' \
38623              -e '  /^21\.0$/b bad' \
38624              -e '  /^21\.0\./b bad' \
38625              -e '}' \
38626              -e ':good' \
38627              -e 's/.*/VALID_VERSION/p' \
38628              -e 'q' \
38629              -e ':bad' \
38630              -e 's/.*/BAD_VERSION/p' \
38631              -e 'q'`
38632        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38633          OBJCOPY=
38634          { $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
38635$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38636          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38637$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38638          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38639$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38640          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38641$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38642          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38643$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38644        fi
38645      fi
38646    fi
38647  fi
38648
38649
38650
38651  # Publish this variable in the help.
38652
38653
38654  if test "x$OBJDUMP" = x; then
38655    # The variable is not set by user, try to locate tool using the code snippet
38656    if test -n "$ac_tool_prefix"; then
38657  for ac_prog in gobjdump objdump
38658  do
38659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38662$as_echo_n "checking for $ac_word... " >&6; }
38663if ${ac_cv_prog_OBJDUMP+:} false; then :
38664  $as_echo_n "(cached) " >&6
38665else
38666  if test -n "$OBJDUMP"; then
38667  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38668else
38669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38670for as_dir in $PATH
38671do
38672  IFS=$as_save_IFS
38673  test -z "$as_dir" && as_dir=.
38674    for ac_exec_ext in '' $ac_executable_extensions; do
38675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38676    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38678    break 2
38679  fi
38680done
38681  done
38682IFS=$as_save_IFS
38683
38684fi
38685fi
38686OBJDUMP=$ac_cv_prog_OBJDUMP
38687if test -n "$OBJDUMP"; then
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38689$as_echo "$OBJDUMP" >&6; }
38690else
38691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38692$as_echo "no" >&6; }
38693fi
38694
38695
38696    test -n "$OBJDUMP" && break
38697  done
38698fi
38699if test -z "$OBJDUMP"; then
38700  ac_ct_OBJDUMP=$OBJDUMP
38701  for ac_prog in gobjdump objdump
38702do
38703  # Extract the first word of "$ac_prog", so it can be a program name with args.
38704set dummy $ac_prog; ac_word=$2
38705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38706$as_echo_n "checking for $ac_word... " >&6; }
38707if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38708  $as_echo_n "(cached) " >&6
38709else
38710  if test -n "$ac_ct_OBJDUMP"; then
38711  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38712else
38713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38714for as_dir in $PATH
38715do
38716  IFS=$as_save_IFS
38717  test -z "$as_dir" && as_dir=.
38718    for ac_exec_ext in '' $ac_executable_extensions; do
38719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38720    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38722    break 2
38723  fi
38724done
38725  done
38726IFS=$as_save_IFS
38727
38728fi
38729fi
38730ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38731if test -n "$ac_ct_OBJDUMP"; then
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38733$as_echo "$ac_ct_OBJDUMP" >&6; }
38734else
38735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38736$as_echo "no" >&6; }
38737fi
38738
38739
38740  test -n "$ac_ct_OBJDUMP" && break
38741done
38742
38743  if test "x$ac_ct_OBJDUMP" = x; then
38744    OBJDUMP=""
38745  else
38746    case $cross_compiling:$ac_tool_warned in
38747yes:)
38748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38750ac_tool_warned=yes ;;
38751esac
38752    OBJDUMP=$ac_ct_OBJDUMP
38753  fi
38754fi
38755
38756  else
38757    # The variable is set, but is it from the command line or the environment?
38758
38759    # Try to remove the string !OBJDUMP! from our list.
38760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38762      # If it failed, the variable was not from the command line. Ignore it,
38763      # but warn the user (except for BASH, which is always set by the calling BASH).
38764      if test "xOBJDUMP" != xBASH; then
38765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38766$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38767      fi
38768      # Try to locate tool using the code snippet
38769      if test -n "$ac_tool_prefix"; then
38770  for ac_prog in gobjdump objdump
38771  do
38772    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38775$as_echo_n "checking for $ac_word... " >&6; }
38776if ${ac_cv_prog_OBJDUMP+:} false; then :
38777  $as_echo_n "(cached) " >&6
38778else
38779  if test -n "$OBJDUMP"; then
38780  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38781else
38782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38783for as_dir in $PATH
38784do
38785  IFS=$as_save_IFS
38786  test -z "$as_dir" && as_dir=.
38787    for ac_exec_ext in '' $ac_executable_extensions; do
38788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38789    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38791    break 2
38792  fi
38793done
38794  done
38795IFS=$as_save_IFS
38796
38797fi
38798fi
38799OBJDUMP=$ac_cv_prog_OBJDUMP
38800if test -n "$OBJDUMP"; then
38801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38802$as_echo "$OBJDUMP" >&6; }
38803else
38804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38805$as_echo "no" >&6; }
38806fi
38807
38808
38809    test -n "$OBJDUMP" && break
38810  done
38811fi
38812if test -z "$OBJDUMP"; then
38813  ac_ct_OBJDUMP=$OBJDUMP
38814  for ac_prog in gobjdump objdump
38815do
38816  # Extract the first word of "$ac_prog", so it can be a program name with args.
38817set dummy $ac_prog; ac_word=$2
38818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38819$as_echo_n "checking for $ac_word... " >&6; }
38820if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38821  $as_echo_n "(cached) " >&6
38822else
38823  if test -n "$ac_ct_OBJDUMP"; then
38824  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38825else
38826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38827for as_dir in $PATH
38828do
38829  IFS=$as_save_IFS
38830  test -z "$as_dir" && as_dir=.
38831    for ac_exec_ext in '' $ac_executable_extensions; do
38832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38833    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38835    break 2
38836  fi
38837done
38838  done
38839IFS=$as_save_IFS
38840
38841fi
38842fi
38843ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38844if test -n "$ac_ct_OBJDUMP"; then
38845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38846$as_echo "$ac_ct_OBJDUMP" >&6; }
38847else
38848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38849$as_echo "no" >&6; }
38850fi
38851
38852
38853  test -n "$ac_ct_OBJDUMP" && break
38854done
38855
38856  if test "x$ac_ct_OBJDUMP" = x; then
38857    OBJDUMP=""
38858  else
38859    case $cross_compiling:$ac_tool_warned in
38860yes:)
38861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38863ac_tool_warned=yes ;;
38864esac
38865    OBJDUMP=$ac_ct_OBJDUMP
38866  fi
38867fi
38868
38869    else
38870      # If it succeeded, then it was overridden by the user. We will use it
38871      # for the tool.
38872
38873      # First remove it from the list of overridden variables, so we can test
38874      # for unknown variables in the end.
38875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38876
38877      # Check if the provided tool contains a complete path.
38878      tool_specified="$OBJDUMP"
38879      tool_basename="${tool_specified##*/}"
38880      if test "x$tool_basename" = "x$tool_specified"; then
38881        # A command without a complete path is provided, search $PATH.
38882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38883$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38884        # Extract the first word of "$tool_basename", so it can be a program name with args.
38885set dummy $tool_basename; ac_word=$2
38886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38887$as_echo_n "checking for $ac_word... " >&6; }
38888if ${ac_cv_path_OBJDUMP+:} false; then :
38889  $as_echo_n "(cached) " >&6
38890else
38891  case $OBJDUMP in
38892  [\\/]* | ?:[\\/]*)
38893  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38894  ;;
38895  *)
38896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38897for as_dir in $PATH
38898do
38899  IFS=$as_save_IFS
38900  test -z "$as_dir" && as_dir=.
38901    for ac_exec_ext in '' $ac_executable_extensions; do
38902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38903    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38905    break 2
38906  fi
38907done
38908  done
38909IFS=$as_save_IFS
38910
38911  ;;
38912esac
38913fi
38914OBJDUMP=$ac_cv_path_OBJDUMP
38915if test -n "$OBJDUMP"; then
38916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38917$as_echo "$OBJDUMP" >&6; }
38918else
38919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38920$as_echo "no" >&6; }
38921fi
38922
38923
38924        if test "x$OBJDUMP" = x; then
38925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38926        fi
38927      else
38928        # Otherwise we believe it is a complete path. Use it as it is.
38929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38930$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38932$as_echo_n "checking for OBJDUMP... " >&6; }
38933        if test ! -x "$tool_specified"; then
38934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38935$as_echo "not found" >&6; }
38936          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38937        fi
38938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38939$as_echo "$tool_specified" >&6; }
38940      fi
38941    fi
38942  fi
38943
38944
38945  if test "x$OBJDUMP" != x; then
38946    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38947    # bails if argument is missing.
38948
38949  # Only process if variable expands to non-empty
38950
38951  if test "x$OBJDUMP" != x; then
38952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38953
38954  # First separate the path from the arguments. This will split at the first
38955  # space.
38956  complete="$OBJDUMP"
38957  path="${complete%% *}"
38958  tmp="$complete EOL"
38959  arguments="${tmp#* }"
38960
38961  # Input might be given as Windows format, start by converting to
38962  # unix format.
38963  new_path=`$CYGPATH -u "$path"`
38964
38965  # Now try to locate executable using which
38966  new_path=`$WHICH "$new_path" 2> /dev/null`
38967  # bat and cmd files are not always considered executable in cygwin causing which
38968  # to not find them
38969  if test "x$new_path" = x \
38970      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38971      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38972    new_path=`$CYGPATH -u "$path"`
38973  fi
38974  if test "x$new_path" = x; then
38975    # Oops. Which didn't find the executable.
38976    # The splitting of arguments from the executable at a space might have been incorrect,
38977    # since paths with space are more likely in Windows. Give it another try with the whole
38978    # argument.
38979    path="$complete"
38980    arguments="EOL"
38981    new_path=`$CYGPATH -u "$path"`
38982    new_path=`$WHICH "$new_path" 2> /dev/null`
38983    # bat and cmd files are not always considered executable in cygwin causing which
38984    # to not find them
38985    if test "x$new_path" = x \
38986        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38987        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38988      new_path=`$CYGPATH -u "$path"`
38989    fi
38990    if test "x$new_path" = x; then
38991      # It's still not found. Now this is an unrecoverable error.
38992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38993$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38994      has_space=`$ECHO "$complete" | $GREP " "`
38995      if test "x$has_space" != x; then
38996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38998      fi
38999      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39000    fi
39001  fi
39002
39003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39006  # "foo.exe" is OK but "foo" is an error.
39007  #
39008  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39009  # It is also a way to make sure we got the proper file name for the real test later on.
39010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39011  if test "x$test_shortpath" = x; then
39012    # Short path failed, file does not exist as specified.
39013    # Try adding .exe or .cmd
39014    if test -f "${new_path}.exe"; then
39015      input_to_shortpath="${new_path}.exe"
39016    elif test -f "${new_path}.cmd"; then
39017      input_to_shortpath="${new_path}.cmd"
39018    else
39019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39020$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39021      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39022$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39023      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39024    fi
39025  else
39026    input_to_shortpath="$new_path"
39027  fi
39028
39029  # Call helper function which possibly converts this using DOS-style short mode.
39030  # If so, the updated path is stored in $new_path.
39031  new_path="$input_to_shortpath"
39032
39033  input_path="$input_to_shortpath"
39034  # Check if we need to convert this using DOS-style short mode. If the path
39035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39036  # take no chances and rewrite it.
39037  # Note: m4 eats our [], so we need to use [ and ] instead.
39038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39039  if test "x$has_forbidden_chars" != x; then
39040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39044      # Going to short mode and back again did indeed matter. Since short mode is
39045      # case insensitive, let's make it lowercase to improve readability.
39046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39047      # Now convert it back to Unix-style (cygpath)
39048      input_path=`$CYGPATH -u "$shortmode_path"`
39049      new_path="$input_path"
39050    fi
39051  fi
39052
39053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39054  if test "x$test_cygdrive_prefix" = x; then
39055    # As a simple fix, exclude /usr/bin since it's not a real path.
39056    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39058      # a path prefixed by /cygdrive for fixpath to work.
39059      new_path="$CYGWIN_ROOT_PATH$input_path"
39060    fi
39061  fi
39062
39063  # remove trailing .exe if any
39064  new_path="${new_path/%.exe/}"
39065
39066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39067
39068  # First separate the path from the arguments. This will split at the first
39069  # space.
39070  complete="$OBJDUMP"
39071  path="${complete%% *}"
39072  tmp="$complete EOL"
39073  arguments="${tmp#* }"
39074
39075  # Input might be given as Windows format, start by converting to
39076  # unix format.
39077  new_path="$path"
39078
39079  windows_path="$new_path"
39080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39081    unix_path=`$CYGPATH -u "$windows_path"`
39082    new_path="$unix_path"
39083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39085    new_path="$unix_path"
39086  fi
39087
39088
39089  # Now try to locate executable using which
39090  new_path=`$WHICH "$new_path" 2> /dev/null`
39091
39092  if test "x$new_path" = x; then
39093    # Oops. Which didn't find the executable.
39094    # The splitting of arguments from the executable at a space might have been incorrect,
39095    # since paths with space are more likely in Windows. Give it another try with the whole
39096    # argument.
39097    path="$complete"
39098    arguments="EOL"
39099    new_path="$path"
39100
39101  windows_path="$new_path"
39102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39103    unix_path=`$CYGPATH -u "$windows_path"`
39104    new_path="$unix_path"
39105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39107    new_path="$unix_path"
39108  fi
39109
39110
39111    new_path=`$WHICH "$new_path" 2> /dev/null`
39112    # bat and cmd files are not always considered executable in MSYS causing which
39113    # to not find them
39114    if test "x$new_path" = x \
39115        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39116        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39117      new_path="$path"
39118
39119  windows_path="$new_path"
39120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39121    unix_path=`$CYGPATH -u "$windows_path"`
39122    new_path="$unix_path"
39123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39125    new_path="$unix_path"
39126  fi
39127
39128    fi
39129
39130    if test "x$new_path" = x; then
39131      # It's still not found. Now this is an unrecoverable error.
39132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39133$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39134      has_space=`$ECHO "$complete" | $GREP " "`
39135      if test "x$has_space" != x; then
39136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39138      fi
39139      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39140    fi
39141  fi
39142
39143  # Now new_path has a complete unix path to the binary
39144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39145    # Keep paths in /bin as-is, but remove trailing .exe if any
39146    new_path="${new_path/%.exe/}"
39147    # Do not save /bin paths to all_fixpath_prefixes!
39148  else
39149    # Not in mixed or Windows style, start by that.
39150    new_path=`cmd //c echo $new_path`
39151
39152  input_path="$new_path"
39153  # Check if we need to convert this using DOS-style short mode. If the path
39154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39155  # take no chances and rewrite it.
39156  # Note: m4 eats our [], so we need to use [ and ] instead.
39157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39158  if test "x$has_forbidden_chars" != x; then
39159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39161  fi
39162
39163    # Output is in $new_path
39164
39165  windows_path="$new_path"
39166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39167    unix_path=`$CYGPATH -u "$windows_path"`
39168    new_path="$unix_path"
39169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39171    new_path="$unix_path"
39172  fi
39173
39174    # remove trailing .exe if any
39175    new_path="${new_path/%.exe/}"
39176
39177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39179  fi
39180
39181    else
39182      # We're on a unix platform. Hooray! :)
39183      # First separate the path from the arguments. This will split at the first
39184      # space.
39185      complete="$OBJDUMP"
39186      path="${complete%% *}"
39187      tmp="$complete EOL"
39188      arguments="${tmp#* }"
39189
39190      # Cannot rely on the command "which" here since it doesn't always work.
39191      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39192      if test -z "$is_absolute_path"; then
39193        # Path to executable is not absolute. Find it.
39194        IFS_save="$IFS"
39195        IFS=:
39196        for p in $PATH; do
39197          if test -f "$p/$path" && test -x "$p/$path"; then
39198            new_path="$p/$path"
39199            break
39200          fi
39201        done
39202        IFS="$IFS_save"
39203      else
39204        # This is an absolute path, we can use it without further modifications.
39205        new_path="$path"
39206      fi
39207
39208      if test "x$new_path" = x; then
39209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39210$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39211        has_space=`$ECHO "$complete" | $GREP " "`
39212        if test "x$has_space" != x; then
39213          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39215        fi
39216        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39217      fi
39218    fi
39219
39220    # Now join together the path and the arguments once again
39221    if test "x$arguments" != xEOL; then
39222      new_complete="$new_path ${arguments% *}"
39223    else
39224      new_complete="$new_path"
39225    fi
39226
39227    if test "x$complete" != "x$new_complete"; then
39228      OBJDUMP="$new_complete"
39229      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39230$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39231    fi
39232  fi
39233
39234  fi
39235
39236
39237  # Restore old path.
39238  PATH="$OLD_PATH"
39239
39240  # Restore the flags to the user specified values.
39241  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39242  CFLAGS="$ORG_CFLAGS"
39243  CXXFLAGS="$ORG_CXXFLAGS"
39244
39245
39246# Finally do some processing after the detection phase
39247
39248  if test "x$COMPILE_TYPE" = "xcross"; then
39249    # Now we need to find a C/C++ compiler that can build executables for the
39250    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39251    # used once. Also, we need to do this without adding a tools dir to the
39252    # path, otherwise we might pick up cross-compilers which don't use standard
39253    # naming.
39254
39255    # FIXME: we should list the discovered compilers as an exclude pattern!
39256    # If we do that, we can do this detection before POST_DETECTION, and still
39257    # find the build compilers in the tools dir, if needed.
39258
39259
39260  # Publish this variable in the help.
39261
39262
39263  if test "x$BUILD_CC" = x; then
39264    # The variable is not set by user, try to locate tool using the code snippet
39265    for ac_prog in cl cc gcc
39266do
39267  # Extract the first word of "$ac_prog", so it can be a program name with args.
39268set dummy $ac_prog; ac_word=$2
39269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39270$as_echo_n "checking for $ac_word... " >&6; }
39271if ${ac_cv_path_BUILD_CC+:} false; then :
39272  $as_echo_n "(cached) " >&6
39273else
39274  case $BUILD_CC in
39275  [\\/]* | ?:[\\/]*)
39276  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39277  ;;
39278  *)
39279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39280for as_dir in $PATH
39281do
39282  IFS=$as_save_IFS
39283  test -z "$as_dir" && as_dir=.
39284    for ac_exec_ext in '' $ac_executable_extensions; do
39285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39286    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39288    break 2
39289  fi
39290done
39291  done
39292IFS=$as_save_IFS
39293
39294  ;;
39295esac
39296fi
39297BUILD_CC=$ac_cv_path_BUILD_CC
39298if test -n "$BUILD_CC"; then
39299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39300$as_echo "$BUILD_CC" >&6; }
39301else
39302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39303$as_echo "no" >&6; }
39304fi
39305
39306
39307  test -n "$BUILD_CC" && break
39308done
39309
39310  else
39311    # The variable is set, but is it from the command line or the environment?
39312
39313    # Try to remove the string !BUILD_CC! from our list.
39314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39316      # If it failed, the variable was not from the command line. Ignore it,
39317      # but warn the user (except for BASH, which is always set by the calling BASH).
39318      if test "xBUILD_CC" != xBASH; then
39319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39320$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39321      fi
39322      # Try to locate tool using the code snippet
39323      for ac_prog in cl cc gcc
39324do
39325  # Extract the first word of "$ac_prog", so it can be a program name with args.
39326set dummy $ac_prog; ac_word=$2
39327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39328$as_echo_n "checking for $ac_word... " >&6; }
39329if ${ac_cv_path_BUILD_CC+:} false; then :
39330  $as_echo_n "(cached) " >&6
39331else
39332  case $BUILD_CC in
39333  [\\/]* | ?:[\\/]*)
39334  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39335  ;;
39336  *)
39337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39338for as_dir in $PATH
39339do
39340  IFS=$as_save_IFS
39341  test -z "$as_dir" && as_dir=.
39342    for ac_exec_ext in '' $ac_executable_extensions; do
39343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39344    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39346    break 2
39347  fi
39348done
39349  done
39350IFS=$as_save_IFS
39351
39352  ;;
39353esac
39354fi
39355BUILD_CC=$ac_cv_path_BUILD_CC
39356if test -n "$BUILD_CC"; then
39357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39358$as_echo "$BUILD_CC" >&6; }
39359else
39360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39361$as_echo "no" >&6; }
39362fi
39363
39364
39365  test -n "$BUILD_CC" && break
39366done
39367
39368    else
39369      # If it succeeded, then it was overridden by the user. We will use it
39370      # for the tool.
39371
39372      # First remove it from the list of overridden variables, so we can test
39373      # for unknown variables in the end.
39374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39375
39376      # Check if the provided tool contains a complete path.
39377      tool_specified="$BUILD_CC"
39378      tool_basename="${tool_specified##*/}"
39379      if test "x$tool_basename" = "x$tool_specified"; then
39380        # A command without a complete path is provided, search $PATH.
39381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39382$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39383        # Extract the first word of "$tool_basename", so it can be a program name with args.
39384set dummy $tool_basename; ac_word=$2
39385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39386$as_echo_n "checking for $ac_word... " >&6; }
39387if ${ac_cv_path_BUILD_CC+:} false; then :
39388  $as_echo_n "(cached) " >&6
39389else
39390  case $BUILD_CC in
39391  [\\/]* | ?:[\\/]*)
39392  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39393  ;;
39394  *)
39395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39396for as_dir in $PATH
39397do
39398  IFS=$as_save_IFS
39399  test -z "$as_dir" && as_dir=.
39400    for ac_exec_ext in '' $ac_executable_extensions; do
39401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39402    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39404    break 2
39405  fi
39406done
39407  done
39408IFS=$as_save_IFS
39409
39410  ;;
39411esac
39412fi
39413BUILD_CC=$ac_cv_path_BUILD_CC
39414if test -n "$BUILD_CC"; then
39415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39416$as_echo "$BUILD_CC" >&6; }
39417else
39418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39419$as_echo "no" >&6; }
39420fi
39421
39422
39423        if test "x$BUILD_CC" = x; then
39424          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39425        fi
39426      else
39427        # Otherwise we believe it is a complete path. Use it as it is.
39428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39429$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39431$as_echo_n "checking for BUILD_CC... " >&6; }
39432        if test ! -x "$tool_specified"; then
39433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39434$as_echo "not found" >&6; }
39435          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39436        fi
39437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39438$as_echo "$tool_specified" >&6; }
39439      fi
39440    fi
39441  fi
39442
39443
39444
39445  # Only process if variable expands to non-empty
39446
39447  if test "x$BUILD_CC" != x; then
39448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39449
39450  # First separate the path from the arguments. This will split at the first
39451  # space.
39452  complete="$BUILD_CC"
39453  path="${complete%% *}"
39454  tmp="$complete EOL"
39455  arguments="${tmp#* }"
39456
39457  # Input might be given as Windows format, start by converting to
39458  # unix format.
39459  new_path=`$CYGPATH -u "$path"`
39460
39461  # Now try to locate executable using which
39462  new_path=`$WHICH "$new_path" 2> /dev/null`
39463  # bat and cmd files are not always considered executable in cygwin causing which
39464  # to not find them
39465  if test "x$new_path" = x \
39466      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39467      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39468    new_path=`$CYGPATH -u "$path"`
39469  fi
39470  if test "x$new_path" = x; then
39471    # Oops. Which didn't find the executable.
39472    # The splitting of arguments from the executable at a space might have been incorrect,
39473    # since paths with space are more likely in Windows. Give it another try with the whole
39474    # argument.
39475    path="$complete"
39476    arguments="EOL"
39477    new_path=`$CYGPATH -u "$path"`
39478    new_path=`$WHICH "$new_path" 2> /dev/null`
39479    # bat and cmd files are not always considered executable in cygwin causing which
39480    # to not find them
39481    if test "x$new_path" = x \
39482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39484      new_path=`$CYGPATH -u "$path"`
39485    fi
39486    if test "x$new_path" = x; then
39487      # It's still not found. Now this is an unrecoverable error.
39488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39489$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39490      has_space=`$ECHO "$complete" | $GREP " "`
39491      if test "x$has_space" != x; then
39492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39494      fi
39495      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39496    fi
39497  fi
39498
39499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39502  # "foo.exe" is OK but "foo" is an error.
39503  #
39504  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39505  # It is also a way to make sure we got the proper file name for the real test later on.
39506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39507  if test "x$test_shortpath" = x; then
39508    # Short path failed, file does not exist as specified.
39509    # Try adding .exe or .cmd
39510    if test -f "${new_path}.exe"; then
39511      input_to_shortpath="${new_path}.exe"
39512    elif test -f "${new_path}.cmd"; then
39513      input_to_shortpath="${new_path}.cmd"
39514    else
39515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39516$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39519      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39520    fi
39521  else
39522    input_to_shortpath="$new_path"
39523  fi
39524
39525  # Call helper function which possibly converts this using DOS-style short mode.
39526  # If so, the updated path is stored in $new_path.
39527  new_path="$input_to_shortpath"
39528
39529  input_path="$input_to_shortpath"
39530  # Check if we need to convert this using DOS-style short mode. If the path
39531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39532  # take no chances and rewrite it.
39533  # Note: m4 eats our [], so we need to use [ and ] instead.
39534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39535  if test "x$has_forbidden_chars" != x; then
39536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39540      # Going to short mode and back again did indeed matter. Since short mode is
39541      # case insensitive, let's make it lowercase to improve readability.
39542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39543      # Now convert it back to Unix-style (cygpath)
39544      input_path=`$CYGPATH -u "$shortmode_path"`
39545      new_path="$input_path"
39546    fi
39547  fi
39548
39549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39550  if test "x$test_cygdrive_prefix" = x; then
39551    # As a simple fix, exclude /usr/bin since it's not a real path.
39552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39554      # a path prefixed by /cygdrive for fixpath to work.
39555      new_path="$CYGWIN_ROOT_PATH$input_path"
39556    fi
39557  fi
39558
39559  # remove trailing .exe if any
39560  new_path="${new_path/%.exe/}"
39561
39562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39563
39564  # First separate the path from the arguments. This will split at the first
39565  # space.
39566  complete="$BUILD_CC"
39567  path="${complete%% *}"
39568  tmp="$complete EOL"
39569  arguments="${tmp#* }"
39570
39571  # Input might be given as Windows format, start by converting to
39572  # unix format.
39573  new_path="$path"
39574
39575  windows_path="$new_path"
39576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39577    unix_path=`$CYGPATH -u "$windows_path"`
39578    new_path="$unix_path"
39579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39581    new_path="$unix_path"
39582  fi
39583
39584
39585  # Now try to locate executable using which
39586  new_path=`$WHICH "$new_path" 2> /dev/null`
39587
39588  if test "x$new_path" = x; then
39589    # Oops. Which didn't find the executable.
39590    # The splitting of arguments from the executable at a space might have been incorrect,
39591    # since paths with space are more likely in Windows. Give it another try with the whole
39592    # argument.
39593    path="$complete"
39594    arguments="EOL"
39595    new_path="$path"
39596
39597  windows_path="$new_path"
39598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39599    unix_path=`$CYGPATH -u "$windows_path"`
39600    new_path="$unix_path"
39601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39603    new_path="$unix_path"
39604  fi
39605
39606
39607    new_path=`$WHICH "$new_path" 2> /dev/null`
39608    # bat and cmd files are not always considered executable in MSYS causing which
39609    # to not find them
39610    if test "x$new_path" = x \
39611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39613      new_path="$path"
39614
39615  windows_path="$new_path"
39616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39617    unix_path=`$CYGPATH -u "$windows_path"`
39618    new_path="$unix_path"
39619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39621    new_path="$unix_path"
39622  fi
39623
39624    fi
39625
39626    if test "x$new_path" = x; then
39627      # It's still not found. Now this is an unrecoverable error.
39628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39629$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39630      has_space=`$ECHO "$complete" | $GREP " "`
39631      if test "x$has_space" != x; then
39632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39634      fi
39635      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39636    fi
39637  fi
39638
39639  # Now new_path has a complete unix path to the binary
39640  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39641    # Keep paths in /bin as-is, but remove trailing .exe if any
39642    new_path="${new_path/%.exe/}"
39643    # Do not save /bin paths to all_fixpath_prefixes!
39644  else
39645    # Not in mixed or Windows style, start by that.
39646    new_path=`cmd //c echo $new_path`
39647
39648  input_path="$new_path"
39649  # Check if we need to convert this using DOS-style short mode. If the path
39650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39651  # take no chances and rewrite it.
39652  # Note: m4 eats our [], so we need to use [ and ] instead.
39653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39654  if test "x$has_forbidden_chars" != x; then
39655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39657  fi
39658
39659    # Output is in $new_path
39660
39661  windows_path="$new_path"
39662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39663    unix_path=`$CYGPATH -u "$windows_path"`
39664    new_path="$unix_path"
39665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39667    new_path="$unix_path"
39668  fi
39669
39670    # remove trailing .exe if any
39671    new_path="${new_path/%.exe/}"
39672
39673    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39674    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39675  fi
39676
39677    else
39678      # We're on a unix platform. Hooray! :)
39679      # First separate the path from the arguments. This will split at the first
39680      # space.
39681      complete="$BUILD_CC"
39682      path="${complete%% *}"
39683      tmp="$complete EOL"
39684      arguments="${tmp#* }"
39685
39686      # Cannot rely on the command "which" here since it doesn't always work.
39687      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39688      if test -z "$is_absolute_path"; then
39689        # Path to executable is not absolute. Find it.
39690        IFS_save="$IFS"
39691        IFS=:
39692        for p in $PATH; do
39693          if test -f "$p/$path" && test -x "$p/$path"; then
39694            new_path="$p/$path"
39695            break
39696          fi
39697        done
39698        IFS="$IFS_save"
39699      else
39700        # This is an absolute path, we can use it without further modifications.
39701        new_path="$path"
39702      fi
39703
39704      if test "x$new_path" = x; then
39705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39706$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39707        has_space=`$ECHO "$complete" | $GREP " "`
39708        if test "x$has_space" != x; then
39709          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39710$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39711        fi
39712        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39713      fi
39714    fi
39715
39716    # Now join together the path and the arguments once again
39717    if test "x$arguments" != xEOL; then
39718      new_complete="$new_path ${arguments% *}"
39719    else
39720      new_complete="$new_path"
39721    fi
39722
39723    if test "x$complete" != "x$new_complete"; then
39724      BUILD_CC="$new_complete"
39725      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39726$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39727    fi
39728  fi
39729
39730
39731
39732  # Publish this variable in the help.
39733
39734
39735  if test "x$BUILD_CXX" = x; then
39736    # The variable is not set by user, try to locate tool using the code snippet
39737    for ac_prog in cl CC g++
39738do
39739  # Extract the first word of "$ac_prog", so it can be a program name with args.
39740set dummy $ac_prog; ac_word=$2
39741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39742$as_echo_n "checking for $ac_word... " >&6; }
39743if ${ac_cv_path_BUILD_CXX+:} false; then :
39744  $as_echo_n "(cached) " >&6
39745else
39746  case $BUILD_CXX in
39747  [\\/]* | ?:[\\/]*)
39748  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39749  ;;
39750  *)
39751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39752for as_dir in $PATH
39753do
39754  IFS=$as_save_IFS
39755  test -z "$as_dir" && as_dir=.
39756    for ac_exec_ext in '' $ac_executable_extensions; do
39757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39758    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39760    break 2
39761  fi
39762done
39763  done
39764IFS=$as_save_IFS
39765
39766  ;;
39767esac
39768fi
39769BUILD_CXX=$ac_cv_path_BUILD_CXX
39770if test -n "$BUILD_CXX"; then
39771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39772$as_echo "$BUILD_CXX" >&6; }
39773else
39774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39775$as_echo "no" >&6; }
39776fi
39777
39778
39779  test -n "$BUILD_CXX" && break
39780done
39781
39782  else
39783    # The variable is set, but is it from the command line or the environment?
39784
39785    # Try to remove the string !BUILD_CXX! from our list.
39786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39788      # If it failed, the variable was not from the command line. Ignore it,
39789      # but warn the user (except for BASH, which is always set by the calling BASH).
39790      if test "xBUILD_CXX" != xBASH; then
39791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39792$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39793      fi
39794      # Try to locate tool using the code snippet
39795      for ac_prog in cl CC g++
39796do
39797  # Extract the first word of "$ac_prog", so it can be a program name with args.
39798set dummy $ac_prog; ac_word=$2
39799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39800$as_echo_n "checking for $ac_word... " >&6; }
39801if ${ac_cv_path_BUILD_CXX+:} false; then :
39802  $as_echo_n "(cached) " >&6
39803else
39804  case $BUILD_CXX in
39805  [\\/]* | ?:[\\/]*)
39806  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39807  ;;
39808  *)
39809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39810for as_dir in $PATH
39811do
39812  IFS=$as_save_IFS
39813  test -z "$as_dir" && as_dir=.
39814    for ac_exec_ext in '' $ac_executable_extensions; do
39815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39816    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39818    break 2
39819  fi
39820done
39821  done
39822IFS=$as_save_IFS
39823
39824  ;;
39825esac
39826fi
39827BUILD_CXX=$ac_cv_path_BUILD_CXX
39828if test -n "$BUILD_CXX"; then
39829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39830$as_echo "$BUILD_CXX" >&6; }
39831else
39832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39833$as_echo "no" >&6; }
39834fi
39835
39836
39837  test -n "$BUILD_CXX" && break
39838done
39839
39840    else
39841      # If it succeeded, then it was overridden by the user. We will use it
39842      # for the tool.
39843
39844      # First remove it from the list of overridden variables, so we can test
39845      # for unknown variables in the end.
39846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39847
39848      # Check if the provided tool contains a complete path.
39849      tool_specified="$BUILD_CXX"
39850      tool_basename="${tool_specified##*/}"
39851      if test "x$tool_basename" = "x$tool_specified"; then
39852        # A command without a complete path is provided, search $PATH.
39853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39854$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39855        # Extract the first word of "$tool_basename", so it can be a program name with args.
39856set dummy $tool_basename; ac_word=$2
39857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39858$as_echo_n "checking for $ac_word... " >&6; }
39859if ${ac_cv_path_BUILD_CXX+:} false; then :
39860  $as_echo_n "(cached) " >&6
39861else
39862  case $BUILD_CXX in
39863  [\\/]* | ?:[\\/]*)
39864  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39865  ;;
39866  *)
39867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39868for as_dir in $PATH
39869do
39870  IFS=$as_save_IFS
39871  test -z "$as_dir" && as_dir=.
39872    for ac_exec_ext in '' $ac_executable_extensions; do
39873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39874    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39876    break 2
39877  fi
39878done
39879  done
39880IFS=$as_save_IFS
39881
39882  ;;
39883esac
39884fi
39885BUILD_CXX=$ac_cv_path_BUILD_CXX
39886if test -n "$BUILD_CXX"; then
39887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39888$as_echo "$BUILD_CXX" >&6; }
39889else
39890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39891$as_echo "no" >&6; }
39892fi
39893
39894
39895        if test "x$BUILD_CXX" = x; then
39896          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39897        fi
39898      else
39899        # Otherwise we believe it is a complete path. Use it as it is.
39900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39901$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39903$as_echo_n "checking for BUILD_CXX... " >&6; }
39904        if test ! -x "$tool_specified"; then
39905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39906$as_echo "not found" >&6; }
39907          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39908        fi
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39910$as_echo "$tool_specified" >&6; }
39911      fi
39912    fi
39913  fi
39914
39915
39916
39917  # Only process if variable expands to non-empty
39918
39919  if test "x$BUILD_CXX" != x; then
39920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39921
39922  # First separate the path from the arguments. This will split at the first
39923  # space.
39924  complete="$BUILD_CXX"
39925  path="${complete%% *}"
39926  tmp="$complete EOL"
39927  arguments="${tmp#* }"
39928
39929  # Input might be given as Windows format, start by converting to
39930  # unix format.
39931  new_path=`$CYGPATH -u "$path"`
39932
39933  # Now try to locate executable using which
39934  new_path=`$WHICH "$new_path" 2> /dev/null`
39935  # bat and cmd files are not always considered executable in cygwin causing which
39936  # to not find them
39937  if test "x$new_path" = x \
39938      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39939      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39940    new_path=`$CYGPATH -u "$path"`
39941  fi
39942  if test "x$new_path" = x; then
39943    # Oops. Which didn't find the executable.
39944    # The splitting of arguments from the executable at a space might have been incorrect,
39945    # since paths with space are more likely in Windows. Give it another try with the whole
39946    # argument.
39947    path="$complete"
39948    arguments="EOL"
39949    new_path=`$CYGPATH -u "$path"`
39950    new_path=`$WHICH "$new_path" 2> /dev/null`
39951    # bat and cmd files are not always considered executable in cygwin causing which
39952    # to not find them
39953    if test "x$new_path" = x \
39954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39956      new_path=`$CYGPATH -u "$path"`
39957    fi
39958    if test "x$new_path" = x; then
39959      # It's still not found. Now this is an unrecoverable error.
39960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39961$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39962      has_space=`$ECHO "$complete" | $GREP " "`
39963      if test "x$has_space" != x; then
39964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39966      fi
39967      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39968    fi
39969  fi
39970
39971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39974  # "foo.exe" is OK but "foo" is an error.
39975  #
39976  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39977  # It is also a way to make sure we got the proper file name for the real test later on.
39978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39979  if test "x$test_shortpath" = x; then
39980    # Short path failed, file does not exist as specified.
39981    # Try adding .exe or .cmd
39982    if test -f "${new_path}.exe"; then
39983      input_to_shortpath="${new_path}.exe"
39984    elif test -f "${new_path}.cmd"; then
39985      input_to_shortpath="${new_path}.cmd"
39986    else
39987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39988$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39989      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39990$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39991      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39992    fi
39993  else
39994    input_to_shortpath="$new_path"
39995  fi
39996
39997  # Call helper function which possibly converts this using DOS-style short mode.
39998  # If so, the updated path is stored in $new_path.
39999  new_path="$input_to_shortpath"
40000
40001  input_path="$input_to_shortpath"
40002  # Check if we need to convert this using DOS-style short mode. If the path
40003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40004  # take no chances and rewrite it.
40005  # Note: m4 eats our [], so we need to use [ and ] instead.
40006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40007  if test "x$has_forbidden_chars" != x; then
40008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40012      # Going to short mode and back again did indeed matter. Since short mode is
40013      # case insensitive, let's make it lowercase to improve readability.
40014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40015      # Now convert it back to Unix-style (cygpath)
40016      input_path=`$CYGPATH -u "$shortmode_path"`
40017      new_path="$input_path"
40018    fi
40019  fi
40020
40021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40022  if test "x$test_cygdrive_prefix" = x; then
40023    # As a simple fix, exclude /usr/bin since it's not a real path.
40024    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40026      # a path prefixed by /cygdrive for fixpath to work.
40027      new_path="$CYGWIN_ROOT_PATH$input_path"
40028    fi
40029  fi
40030
40031  # remove trailing .exe if any
40032  new_path="${new_path/%.exe/}"
40033
40034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40035
40036  # First separate the path from the arguments. This will split at the first
40037  # space.
40038  complete="$BUILD_CXX"
40039  path="${complete%% *}"
40040  tmp="$complete EOL"
40041  arguments="${tmp#* }"
40042
40043  # Input might be given as Windows format, start by converting to
40044  # unix format.
40045  new_path="$path"
40046
40047  windows_path="$new_path"
40048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40049    unix_path=`$CYGPATH -u "$windows_path"`
40050    new_path="$unix_path"
40051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40053    new_path="$unix_path"
40054  fi
40055
40056
40057  # Now try to locate executable using which
40058  new_path=`$WHICH "$new_path" 2> /dev/null`
40059
40060  if test "x$new_path" = x; then
40061    # Oops. Which didn't find the executable.
40062    # The splitting of arguments from the executable at a space might have been incorrect,
40063    # since paths with space are more likely in Windows. Give it another try with the whole
40064    # argument.
40065    path="$complete"
40066    arguments="EOL"
40067    new_path="$path"
40068
40069  windows_path="$new_path"
40070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40071    unix_path=`$CYGPATH -u "$windows_path"`
40072    new_path="$unix_path"
40073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40075    new_path="$unix_path"
40076  fi
40077
40078
40079    new_path=`$WHICH "$new_path" 2> /dev/null`
40080    # bat and cmd files are not always considered executable in MSYS causing which
40081    # to not find them
40082    if test "x$new_path" = x \
40083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40085      new_path="$path"
40086
40087  windows_path="$new_path"
40088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40089    unix_path=`$CYGPATH -u "$windows_path"`
40090    new_path="$unix_path"
40091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40093    new_path="$unix_path"
40094  fi
40095
40096    fi
40097
40098    if test "x$new_path" = x; then
40099      # It's still not found. Now this is an unrecoverable error.
40100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40101$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40102      has_space=`$ECHO "$complete" | $GREP " "`
40103      if test "x$has_space" != x; then
40104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40106      fi
40107      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40108    fi
40109  fi
40110
40111  # Now new_path has a complete unix path to the binary
40112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40113    # Keep paths in /bin as-is, but remove trailing .exe if any
40114    new_path="${new_path/%.exe/}"
40115    # Do not save /bin paths to all_fixpath_prefixes!
40116  else
40117    # Not in mixed or Windows style, start by that.
40118    new_path=`cmd //c echo $new_path`
40119
40120  input_path="$new_path"
40121  # Check if we need to convert this using DOS-style short mode. If the path
40122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40123  # take no chances and rewrite it.
40124  # Note: m4 eats our [], so we need to use [ and ] instead.
40125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40126  if test "x$has_forbidden_chars" != x; then
40127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40129  fi
40130
40131    # Output is in $new_path
40132
40133  windows_path="$new_path"
40134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40135    unix_path=`$CYGPATH -u "$windows_path"`
40136    new_path="$unix_path"
40137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40139    new_path="$unix_path"
40140  fi
40141
40142    # remove trailing .exe if any
40143    new_path="${new_path/%.exe/}"
40144
40145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40147  fi
40148
40149    else
40150      # We're on a unix platform. Hooray! :)
40151      # First separate the path from the arguments. This will split at the first
40152      # space.
40153      complete="$BUILD_CXX"
40154      path="${complete%% *}"
40155      tmp="$complete EOL"
40156      arguments="${tmp#* }"
40157
40158      # Cannot rely on the command "which" here since it doesn't always work.
40159      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40160      if test -z "$is_absolute_path"; then
40161        # Path to executable is not absolute. Find it.
40162        IFS_save="$IFS"
40163        IFS=:
40164        for p in $PATH; do
40165          if test -f "$p/$path" && test -x "$p/$path"; then
40166            new_path="$p/$path"
40167            break
40168          fi
40169        done
40170        IFS="$IFS_save"
40171      else
40172        # This is an absolute path, we can use it without further modifications.
40173        new_path="$path"
40174      fi
40175
40176      if test "x$new_path" = x; then
40177        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40178$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40179        has_space=`$ECHO "$complete" | $GREP " "`
40180        if test "x$has_space" != x; then
40181          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40183        fi
40184        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40185      fi
40186    fi
40187
40188    # Now join together the path and the arguments once again
40189    if test "x$arguments" != xEOL; then
40190      new_complete="$new_path ${arguments% *}"
40191    else
40192      new_complete="$new_path"
40193    fi
40194
40195    if test "x$complete" != "x$new_complete"; then
40196      BUILD_CXX="$new_complete"
40197      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40198$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40199    fi
40200  fi
40201
40202
40203
40204  # Publish this variable in the help.
40205
40206
40207  if test "x$BUILD_LD" = x; then
40208    # The variable is not set by user, try to locate tool using the code snippet
40209    for ac_prog in ld
40210do
40211  # Extract the first word of "$ac_prog", so it can be a program name with args.
40212set dummy $ac_prog; ac_word=$2
40213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40214$as_echo_n "checking for $ac_word... " >&6; }
40215if ${ac_cv_path_BUILD_LD+:} false; then :
40216  $as_echo_n "(cached) " >&6
40217else
40218  case $BUILD_LD in
40219  [\\/]* | ?:[\\/]*)
40220  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40221  ;;
40222  *)
40223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40224for as_dir in $PATH
40225do
40226  IFS=$as_save_IFS
40227  test -z "$as_dir" && as_dir=.
40228    for ac_exec_ext in '' $ac_executable_extensions; do
40229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40230    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40232    break 2
40233  fi
40234done
40235  done
40236IFS=$as_save_IFS
40237
40238  ;;
40239esac
40240fi
40241BUILD_LD=$ac_cv_path_BUILD_LD
40242if test -n "$BUILD_LD"; then
40243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40244$as_echo "$BUILD_LD" >&6; }
40245else
40246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40247$as_echo "no" >&6; }
40248fi
40249
40250
40251  test -n "$BUILD_LD" && break
40252done
40253
40254  else
40255    # The variable is set, but is it from the command line or the environment?
40256
40257    # Try to remove the string !BUILD_LD! from our list.
40258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40260      # If it failed, the variable was not from the command line. Ignore it,
40261      # but warn the user (except for BASH, which is always set by the calling BASH).
40262      if test "xBUILD_LD" != xBASH; then
40263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40264$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40265      fi
40266      # Try to locate tool using the code snippet
40267      for ac_prog in ld
40268do
40269  # Extract the first word of "$ac_prog", so it can be a program name with args.
40270set dummy $ac_prog; ac_word=$2
40271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40272$as_echo_n "checking for $ac_word... " >&6; }
40273if ${ac_cv_path_BUILD_LD+:} false; then :
40274  $as_echo_n "(cached) " >&6
40275else
40276  case $BUILD_LD in
40277  [\\/]* | ?:[\\/]*)
40278  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40279  ;;
40280  *)
40281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40282for as_dir in $PATH
40283do
40284  IFS=$as_save_IFS
40285  test -z "$as_dir" && as_dir=.
40286    for ac_exec_ext in '' $ac_executable_extensions; do
40287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40288    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40290    break 2
40291  fi
40292done
40293  done
40294IFS=$as_save_IFS
40295
40296  ;;
40297esac
40298fi
40299BUILD_LD=$ac_cv_path_BUILD_LD
40300if test -n "$BUILD_LD"; then
40301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40302$as_echo "$BUILD_LD" >&6; }
40303else
40304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40305$as_echo "no" >&6; }
40306fi
40307
40308
40309  test -n "$BUILD_LD" && break
40310done
40311
40312    else
40313      # If it succeeded, then it was overridden by the user. We will use it
40314      # for the tool.
40315
40316      # First remove it from the list of overridden variables, so we can test
40317      # for unknown variables in the end.
40318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40319
40320      # Check if the provided tool contains a complete path.
40321      tool_specified="$BUILD_LD"
40322      tool_basename="${tool_specified##*/}"
40323      if test "x$tool_basename" = "x$tool_specified"; then
40324        # A command without a complete path is provided, search $PATH.
40325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40326$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40327        # Extract the first word of "$tool_basename", so it can be a program name with args.
40328set dummy $tool_basename; ac_word=$2
40329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40330$as_echo_n "checking for $ac_word... " >&6; }
40331if ${ac_cv_path_BUILD_LD+:} false; then :
40332  $as_echo_n "(cached) " >&6
40333else
40334  case $BUILD_LD in
40335  [\\/]* | ?:[\\/]*)
40336  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40337  ;;
40338  *)
40339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40340for as_dir in $PATH
40341do
40342  IFS=$as_save_IFS
40343  test -z "$as_dir" && as_dir=.
40344    for ac_exec_ext in '' $ac_executable_extensions; do
40345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40346    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40348    break 2
40349  fi
40350done
40351  done
40352IFS=$as_save_IFS
40353
40354  ;;
40355esac
40356fi
40357BUILD_LD=$ac_cv_path_BUILD_LD
40358if test -n "$BUILD_LD"; then
40359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40360$as_echo "$BUILD_LD" >&6; }
40361else
40362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40363$as_echo "no" >&6; }
40364fi
40365
40366
40367        if test "x$BUILD_LD" = x; then
40368          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40369        fi
40370      else
40371        # Otherwise we believe it is a complete path. Use it as it is.
40372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40373$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40375$as_echo_n "checking for BUILD_LD... " >&6; }
40376        if test ! -x "$tool_specified"; then
40377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40378$as_echo "not found" >&6; }
40379          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40380        fi
40381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40382$as_echo "$tool_specified" >&6; }
40383      fi
40384    fi
40385  fi
40386
40387
40388
40389  # Only process if variable expands to non-empty
40390
40391  if test "x$BUILD_LD" != x; then
40392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40393
40394  # First separate the path from the arguments. This will split at the first
40395  # space.
40396  complete="$BUILD_LD"
40397  path="${complete%% *}"
40398  tmp="$complete EOL"
40399  arguments="${tmp#* }"
40400
40401  # Input might be given as Windows format, start by converting to
40402  # unix format.
40403  new_path=`$CYGPATH -u "$path"`
40404
40405  # Now try to locate executable using which
40406  new_path=`$WHICH "$new_path" 2> /dev/null`
40407  # bat and cmd files are not always considered executable in cygwin causing which
40408  # to not find them
40409  if test "x$new_path" = x \
40410      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40411      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40412    new_path=`$CYGPATH -u "$path"`
40413  fi
40414  if test "x$new_path" = x; then
40415    # Oops. Which didn't find the executable.
40416    # The splitting of arguments from the executable at a space might have been incorrect,
40417    # since paths with space are more likely in Windows. Give it another try with the whole
40418    # argument.
40419    path="$complete"
40420    arguments="EOL"
40421    new_path=`$CYGPATH -u "$path"`
40422    new_path=`$WHICH "$new_path" 2> /dev/null`
40423    # bat and cmd files are not always considered executable in cygwin causing which
40424    # to not find them
40425    if test "x$new_path" = x \
40426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40428      new_path=`$CYGPATH -u "$path"`
40429    fi
40430    if test "x$new_path" = x; then
40431      # It's still not found. Now this is an unrecoverable error.
40432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40433$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40434      has_space=`$ECHO "$complete" | $GREP " "`
40435      if test "x$has_space" != x; then
40436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40438      fi
40439      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40440    fi
40441  fi
40442
40443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40446  # "foo.exe" is OK but "foo" is an error.
40447  #
40448  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40449  # It is also a way to make sure we got the proper file name for the real test later on.
40450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40451  if test "x$test_shortpath" = x; then
40452    # Short path failed, file does not exist as specified.
40453    # Try adding .exe or .cmd
40454    if test -f "${new_path}.exe"; then
40455      input_to_shortpath="${new_path}.exe"
40456    elif test -f "${new_path}.cmd"; then
40457      input_to_shortpath="${new_path}.cmd"
40458    else
40459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40460$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40463      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40464    fi
40465  else
40466    input_to_shortpath="$new_path"
40467  fi
40468
40469  # Call helper function which possibly converts this using DOS-style short mode.
40470  # If so, the updated path is stored in $new_path.
40471  new_path="$input_to_shortpath"
40472
40473  input_path="$input_to_shortpath"
40474  # Check if we need to convert this using DOS-style short mode. If the path
40475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40476  # take no chances and rewrite it.
40477  # Note: m4 eats our [], so we need to use [ and ] instead.
40478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40479  if test "x$has_forbidden_chars" != x; then
40480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40484      # Going to short mode and back again did indeed matter. Since short mode is
40485      # case insensitive, let's make it lowercase to improve readability.
40486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40487      # Now convert it back to Unix-style (cygpath)
40488      input_path=`$CYGPATH -u "$shortmode_path"`
40489      new_path="$input_path"
40490    fi
40491  fi
40492
40493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40494  if test "x$test_cygdrive_prefix" = x; then
40495    # As a simple fix, exclude /usr/bin since it's not a real path.
40496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40498      # a path prefixed by /cygdrive for fixpath to work.
40499      new_path="$CYGWIN_ROOT_PATH$input_path"
40500    fi
40501  fi
40502
40503  # remove trailing .exe if any
40504  new_path="${new_path/%.exe/}"
40505
40506    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40507
40508  # First separate the path from the arguments. This will split at the first
40509  # space.
40510  complete="$BUILD_LD"
40511  path="${complete%% *}"
40512  tmp="$complete EOL"
40513  arguments="${tmp#* }"
40514
40515  # Input might be given as Windows format, start by converting to
40516  # unix format.
40517  new_path="$path"
40518
40519  windows_path="$new_path"
40520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40521    unix_path=`$CYGPATH -u "$windows_path"`
40522    new_path="$unix_path"
40523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40525    new_path="$unix_path"
40526  fi
40527
40528
40529  # Now try to locate executable using which
40530  new_path=`$WHICH "$new_path" 2> /dev/null`
40531
40532  if test "x$new_path" = x; then
40533    # Oops. Which didn't find the executable.
40534    # The splitting of arguments from the executable at a space might have been incorrect,
40535    # since paths with space are more likely in Windows. Give it another try with the whole
40536    # argument.
40537    path="$complete"
40538    arguments="EOL"
40539    new_path="$path"
40540
40541  windows_path="$new_path"
40542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40543    unix_path=`$CYGPATH -u "$windows_path"`
40544    new_path="$unix_path"
40545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40547    new_path="$unix_path"
40548  fi
40549
40550
40551    new_path=`$WHICH "$new_path" 2> /dev/null`
40552    # bat and cmd files are not always considered executable in MSYS causing which
40553    # to not find them
40554    if test "x$new_path" = x \
40555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40557      new_path="$path"
40558
40559  windows_path="$new_path"
40560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40561    unix_path=`$CYGPATH -u "$windows_path"`
40562    new_path="$unix_path"
40563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40565    new_path="$unix_path"
40566  fi
40567
40568    fi
40569
40570    if test "x$new_path" = x; then
40571      # It's still not found. Now this is an unrecoverable error.
40572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40573$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40574      has_space=`$ECHO "$complete" | $GREP " "`
40575      if test "x$has_space" != x; then
40576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40578      fi
40579      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40580    fi
40581  fi
40582
40583  # Now new_path has a complete unix path to the binary
40584  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40585    # Keep paths in /bin as-is, but remove trailing .exe if any
40586    new_path="${new_path/%.exe/}"
40587    # Do not save /bin paths to all_fixpath_prefixes!
40588  else
40589    # Not in mixed or Windows style, start by that.
40590    new_path=`cmd //c echo $new_path`
40591
40592  input_path="$new_path"
40593  # Check if we need to convert this using DOS-style short mode. If the path
40594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40595  # take no chances and rewrite it.
40596  # Note: m4 eats our [], so we need to use [ and ] instead.
40597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40598  if test "x$has_forbidden_chars" != x; then
40599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40601  fi
40602
40603    # Output is in $new_path
40604
40605  windows_path="$new_path"
40606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40607    unix_path=`$CYGPATH -u "$windows_path"`
40608    new_path="$unix_path"
40609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40611    new_path="$unix_path"
40612  fi
40613
40614    # remove trailing .exe if any
40615    new_path="${new_path/%.exe/}"
40616
40617    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40618    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40619  fi
40620
40621    else
40622      # We're on a unix platform. Hooray! :)
40623      # First separate the path from the arguments. This will split at the first
40624      # space.
40625      complete="$BUILD_LD"
40626      path="${complete%% *}"
40627      tmp="$complete EOL"
40628      arguments="${tmp#* }"
40629
40630      # Cannot rely on the command "which" here since it doesn't always work.
40631      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40632      if test -z "$is_absolute_path"; then
40633        # Path to executable is not absolute. Find it.
40634        IFS_save="$IFS"
40635        IFS=:
40636        for p in $PATH; do
40637          if test -f "$p/$path" && test -x "$p/$path"; then
40638            new_path="$p/$path"
40639            break
40640          fi
40641        done
40642        IFS="$IFS_save"
40643      else
40644        # This is an absolute path, we can use it without further modifications.
40645        new_path="$path"
40646      fi
40647
40648      if test "x$new_path" = x; then
40649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40650$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40651        has_space=`$ECHO "$complete" | $GREP " "`
40652        if test "x$has_space" != x; then
40653          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40654$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40655        fi
40656        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40657      fi
40658    fi
40659
40660    # Now join together the path and the arguments once again
40661    if test "x$arguments" != xEOL; then
40662      new_complete="$new_path ${arguments% *}"
40663    else
40664      new_complete="$new_path"
40665    fi
40666
40667    if test "x$complete" != "x$new_complete"; then
40668      BUILD_LD="$new_complete"
40669      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40670$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40671    fi
40672  fi
40673
40674    BUILD_SYSROOT_CFLAGS=""
40675    BUILD_SYSROOT_LDFLAGS=""
40676  else
40677    # If we are not cross compiling, use the normal target compilers for
40678    # building the build platform executables.
40679    BUILD_CC="$CC"
40680    BUILD_CXX="$CXX"
40681    BUILD_LD="$LD"
40682    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
40683    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
40684  fi
40685
40686
40687
40688
40689
40690
40691
40692
40693  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40694    # For hotspot, we need these in Windows mixed path,
40695    # so rewrite them all. Need added .exe suffix.
40696    HOTSPOT_CXX="$CXX.exe"
40697    HOTSPOT_LD="$LD.exe"
40698    HOTSPOT_MT="$MT.exe"
40699    HOTSPOT_RC="$RC.exe"
40700
40701  unix_path="$HOTSPOT_CXX"
40702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40703    windows_path=`$CYGPATH -m "$unix_path"`
40704    HOTSPOT_CXX="$windows_path"
40705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40706    windows_path=`cmd //c echo $unix_path`
40707    HOTSPOT_CXX="$windows_path"
40708  fi
40709
40710
40711  unix_path="$HOTSPOT_LD"
40712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40713    windows_path=`$CYGPATH -m "$unix_path"`
40714    HOTSPOT_LD="$windows_path"
40715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40716    windows_path=`cmd //c echo $unix_path`
40717    HOTSPOT_LD="$windows_path"
40718  fi
40719
40720
40721  unix_path="$HOTSPOT_MT"
40722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40723    windows_path=`$CYGPATH -m "$unix_path"`
40724    HOTSPOT_MT="$windows_path"
40725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40726    windows_path=`cmd //c echo $unix_path`
40727    HOTSPOT_MT="$windows_path"
40728  fi
40729
40730
40731  unix_path="$HOTSPOT_RC"
40732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40733    windows_path=`$CYGPATH -m "$unix_path"`
40734    HOTSPOT_RC="$windows_path"
40735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40736    windows_path=`cmd //c echo $unix_path`
40737    HOTSPOT_RC="$windows_path"
40738  fi
40739
40740
40741
40742  else
40743    HOTSPOT_CXX="$CXX"
40744    HOTSPOT_LD="$LD"
40745  fi
40746
40747
40748
40749  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40750    USE_CLANG=true
40751  fi
40752
40753
40754
40755
40756
40757  # The package path is used only on macosx?
40758  # FIXME: clean this up, and/or move it elsewhere.
40759  PACKAGE_PATH=/opt/local
40760
40761
40762  # Check for extra potential brokenness.
40763  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40764    # On Windows, double-check that we got the right compiler.
40765    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40766    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40767    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40768      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40769        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
40770      fi
40771    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40772      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40773        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40774      fi
40775    fi
40776  fi
40777
40778  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40779    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40780    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40781    # This is later checked when setting flags.
40782
40783    # "-Og" suppported for GCC 4.8 and later
40784    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40785
40786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40787$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40788  supports=yes
40789
40790  saved_cflags="$CFLAGS"
40791  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40792  ac_ext=c
40793ac_cpp='$CPP $CPPFLAGS'
40794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40796ac_compiler_gnu=$ac_cv_c_compiler_gnu
40797
40798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40799/* end confdefs.h.  */
40800int i;
40801_ACEOF
40802if ac_fn_c_try_compile "$LINENO"; then :
40803
40804else
40805  supports=no
40806fi
40807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40808  ac_ext=cpp
40809ac_cpp='$CXXCPP $CPPFLAGS'
40810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40813
40814  CFLAGS="$saved_cflags"
40815
40816  saved_cxxflags="$CXXFLAGS"
40817  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40818  ac_ext=cpp
40819ac_cpp='$CXXCPP $CPPFLAGS'
40820ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40821ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40822ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40823
40824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40825/* end confdefs.h.  */
40826int i;
40827_ACEOF
40828if ac_fn_cxx_try_compile "$LINENO"; then :
40829
40830else
40831  supports=no
40832fi
40833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40834  ac_ext=cpp
40835ac_cpp='$CXXCPP $CPPFLAGS'
40836ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40837ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40838ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40839
40840  CXXFLAGS="$saved_cxxflags"
40841
40842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40843$as_echo "$supports" >&6; }
40844  if test "x$supports" = "xyes" ; then
40845    HAS_CFLAG_OPTIMIZE_DEBUG=true
40846  else
40847    HAS_CFLAG_OPTIMIZE_DEBUG=false
40848  fi
40849
40850
40851    # "-z relro" supported in GNU binutils 2.17 and later
40852    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40853
40854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40855$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40856  supports=yes
40857
40858  saved_ldflags="$LDFLAGS"
40859  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40860  ac_ext=c
40861ac_cpp='$CPP $CPPFLAGS'
40862ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40863ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40864ac_compiler_gnu=$ac_cv_c_compiler_gnu
40865
40866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40867/* end confdefs.h.  */
40868
40869int
40870main ()
40871{
40872
40873  ;
40874  return 0;
40875}
40876_ACEOF
40877if ac_fn_c_try_link "$LINENO"; then :
40878
40879else
40880  supports=no
40881fi
40882rm -f core conftest.err conftest.$ac_objext \
40883    conftest$ac_exeext conftest.$ac_ext
40884  ac_ext=cpp
40885ac_cpp='$CXXCPP $CPPFLAGS'
40886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40889
40890  LDFLAGS="$saved_ldflags"
40891
40892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40893$as_echo "$supports" >&6; }
40894  if test "x$supports" = "xyes" ; then
40895    HAS_LINKER_RELRO=true
40896  else
40897    HAS_LINKER_RELRO=false
40898  fi
40899
40900
40901    # "-z now" supported in GNU binutils 2.11 and later
40902    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40903
40904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40905$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40906  supports=yes
40907
40908  saved_ldflags="$LDFLAGS"
40909  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40910  ac_ext=c
40911ac_cpp='$CPP $CPPFLAGS'
40912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40914ac_compiler_gnu=$ac_cv_c_compiler_gnu
40915
40916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40917/* end confdefs.h.  */
40918
40919int
40920main ()
40921{
40922
40923  ;
40924  return 0;
40925}
40926_ACEOF
40927if ac_fn_c_try_link "$LINENO"; then :
40928
40929else
40930  supports=no
40931fi
40932rm -f core conftest.err conftest.$ac_objext \
40933    conftest$ac_exeext conftest.$ac_ext
40934  ac_ext=cpp
40935ac_cpp='$CXXCPP $CPPFLAGS'
40936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40939
40940  LDFLAGS="$saved_ldflags"
40941
40942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40943$as_echo "$supports" >&6; }
40944  if test "x$supports" = "xyes" ; then
40945    HAS_LINKER_NOW=true
40946  else
40947    HAS_LINKER_NOW=false
40948  fi
40949
40950  fi
40951
40952  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40953  # in executable.'
40954  USING_BROKEN_SUSE_LD=no
40955  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40957$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40958    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40959    $ECHO "int main() { }" > main.c
40960    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40962$as_echo "no" >&6; }
40963      USING_BROKEN_SUSE_LD=no
40964    else
40965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40966$as_echo "yes" >&6; }
40967      USING_BROKEN_SUSE_LD=yes
40968    fi
40969    rm -rf version-script.map main.c a.out
40970  fi
40971
40972
40973
40974# Setup the JTReg Regression Test Harness.
40975
40976
40977# Check whether --with-jtreg was given.
40978if test "${with_jtreg+set}" = set; then :
40979  withval=$with_jtreg;
40980else
40981  with_jtreg=no
40982fi
40983
40984
40985  if test "x$with_jtreg" = xno; then
40986    # jtreg disabled
40987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40988$as_echo_n "checking for jtreg... " >&6; }
40989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40990$as_echo "no" >&6; }
40991  else
40992    if test "x$with_jtreg" != xyes; then
40993      # with path specified.
40994      JT_HOME="$with_jtreg"
40995    fi
40996
40997    if test "x$JT_HOME" != x; then
40998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40999$as_echo_n "checking for jtreg... " >&6; }
41000
41001      # use JT_HOME enviroment var.
41002
41003  # Only process if variable expands to non-empty
41004
41005  if test "x$JT_HOME" != x; then
41006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41007
41008  # Input might be given as Windows format, start by converting to
41009  # unix format.
41010  path="$JT_HOME"
41011  new_path=`$CYGPATH -u "$path"`
41012
41013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41016  # "foo.exe" is OK but "foo" is an error.
41017  #
41018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41019  # It is also a way to make sure we got the proper file name for the real test later on.
41020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41021  if test "x$test_shortpath" = x; then
41022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41023$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41024    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41025  fi
41026
41027  # Call helper function which possibly converts this using DOS-style short mode.
41028  # If so, the updated path is stored in $new_path.
41029
41030  input_path="$new_path"
41031  # Check if we need to convert this using DOS-style short mode. If the path
41032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41033  # take no chances and rewrite it.
41034  # Note: m4 eats our [], so we need to use [ and ] instead.
41035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41036  if test "x$has_forbidden_chars" != x; then
41037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41041      # Going to short mode and back again did indeed matter. Since short mode is
41042      # case insensitive, let's make it lowercase to improve readability.
41043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41044      # Now convert it back to Unix-style (cygpath)
41045      input_path=`$CYGPATH -u "$shortmode_path"`
41046      new_path="$input_path"
41047    fi
41048  fi
41049
41050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41051  if test "x$test_cygdrive_prefix" = x; then
41052    # As a simple fix, exclude /usr/bin since it's not a real path.
41053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41055      # a path prefixed by /cygdrive for fixpath to work.
41056      new_path="$CYGWIN_ROOT_PATH$input_path"
41057    fi
41058  fi
41059
41060
41061  if test "x$path" != "x$new_path"; then
41062    JT_HOME="$new_path"
41063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41064$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41065  fi
41066
41067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41068
41069  path="$JT_HOME"
41070  has_colon=`$ECHO $path | $GREP ^.:`
41071  new_path="$path"
41072  if test "x$has_colon" = x; then
41073    # Not in mixed or Windows style, start by that.
41074    new_path=`cmd //c echo $path`
41075  fi
41076
41077
41078  input_path="$new_path"
41079  # Check if we need to convert this using DOS-style short mode. If the path
41080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41081  # take no chances and rewrite it.
41082  # Note: m4 eats our [], so we need to use [ and ] instead.
41083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41084  if test "x$has_forbidden_chars" != x; then
41085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41087  fi
41088
41089
41090  windows_path="$new_path"
41091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41092    unix_path=`$CYGPATH -u "$windows_path"`
41093    new_path="$unix_path"
41094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41096    new_path="$unix_path"
41097  fi
41098
41099  if test "x$path" != "x$new_path"; then
41100    JT_HOME="$new_path"
41101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41102$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41103  fi
41104
41105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41107
41108    else
41109      # We're on a unix platform. Hooray! :)
41110      path="$JT_HOME"
41111      has_space=`$ECHO "$path" | $GREP " "`
41112      if test "x$has_space" != x; then
41113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41114$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41116      fi
41117
41118      # Use eval to expand a potential ~
41119      eval path="$path"
41120      if test ! -f "$path" && test ! -d "$path"; then
41121        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41122      fi
41123
41124      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41125    fi
41126  fi
41127
41128
41129      # jtreg win32 script works for everybody
41130      JTREGEXE="$JT_HOME/bin/jtreg"
41131
41132      if test ! -f "$JTREGEXE"; then
41133        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41134      fi
41135
41136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41137$as_echo "$JTREGEXE" >&6; }
41138    else
41139      # try to find jtreg on path
41140
41141
41142
41143  # Publish this variable in the help.
41144
41145
41146  if test "x$JTREGEXE" = x; then
41147    # The variable is not set by user, try to locate tool using the code snippet
41148    for ac_prog in jtreg
41149do
41150  # Extract the first word of "$ac_prog", so it can be a program name with args.
41151set dummy $ac_prog; ac_word=$2
41152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41153$as_echo_n "checking for $ac_word... " >&6; }
41154if ${ac_cv_path_JTREGEXE+:} false; then :
41155  $as_echo_n "(cached) " >&6
41156else
41157  case $JTREGEXE in
41158  [\\/]* | ?:[\\/]*)
41159  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41160  ;;
41161  *)
41162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41163for as_dir in $PATH
41164do
41165  IFS=$as_save_IFS
41166  test -z "$as_dir" && as_dir=.
41167    for ac_exec_ext in '' $ac_executable_extensions; do
41168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41169    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41171    break 2
41172  fi
41173done
41174  done
41175IFS=$as_save_IFS
41176
41177  ;;
41178esac
41179fi
41180JTREGEXE=$ac_cv_path_JTREGEXE
41181if test -n "$JTREGEXE"; then
41182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41183$as_echo "$JTREGEXE" >&6; }
41184else
41185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41186$as_echo "no" >&6; }
41187fi
41188
41189
41190  test -n "$JTREGEXE" && break
41191done
41192
41193  else
41194    # The variable is set, but is it from the command line or the environment?
41195
41196    # Try to remove the string !JTREGEXE! from our list.
41197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41199      # If it failed, the variable was not from the command line. Ignore it,
41200      # but warn the user (except for BASH, which is always set by the calling BASH).
41201      if test "xJTREGEXE" != xBASH; then
41202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41203$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41204      fi
41205      # Try to locate tool using the code snippet
41206      for ac_prog in jtreg
41207do
41208  # Extract the first word of "$ac_prog", so it can be a program name with args.
41209set dummy $ac_prog; ac_word=$2
41210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41211$as_echo_n "checking for $ac_word... " >&6; }
41212if ${ac_cv_path_JTREGEXE+:} false; then :
41213  $as_echo_n "(cached) " >&6
41214else
41215  case $JTREGEXE in
41216  [\\/]* | ?:[\\/]*)
41217  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41218  ;;
41219  *)
41220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41221for as_dir in $PATH
41222do
41223  IFS=$as_save_IFS
41224  test -z "$as_dir" && as_dir=.
41225    for ac_exec_ext in '' $ac_executable_extensions; do
41226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41227    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41229    break 2
41230  fi
41231done
41232  done
41233IFS=$as_save_IFS
41234
41235  ;;
41236esac
41237fi
41238JTREGEXE=$ac_cv_path_JTREGEXE
41239if test -n "$JTREGEXE"; then
41240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41241$as_echo "$JTREGEXE" >&6; }
41242else
41243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41244$as_echo "no" >&6; }
41245fi
41246
41247
41248  test -n "$JTREGEXE" && break
41249done
41250
41251    else
41252      # If it succeeded, then it was overridden by the user. We will use it
41253      # for the tool.
41254
41255      # First remove it from the list of overridden variables, so we can test
41256      # for unknown variables in the end.
41257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41258
41259      # Check if the provided tool contains a complete path.
41260      tool_specified="$JTREGEXE"
41261      tool_basename="${tool_specified##*/}"
41262      if test "x$tool_basename" = "x$tool_specified"; then
41263        # A command without a complete path is provided, search $PATH.
41264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41265$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41266        # Extract the first word of "$tool_basename", so it can be a program name with args.
41267set dummy $tool_basename; ac_word=$2
41268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41269$as_echo_n "checking for $ac_word... " >&6; }
41270if ${ac_cv_path_JTREGEXE+:} false; then :
41271  $as_echo_n "(cached) " >&6
41272else
41273  case $JTREGEXE in
41274  [\\/]* | ?:[\\/]*)
41275  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41276  ;;
41277  *)
41278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41279for as_dir in $PATH
41280do
41281  IFS=$as_save_IFS
41282  test -z "$as_dir" && as_dir=.
41283    for ac_exec_ext in '' $ac_executable_extensions; do
41284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41285    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41287    break 2
41288  fi
41289done
41290  done
41291IFS=$as_save_IFS
41292
41293  ;;
41294esac
41295fi
41296JTREGEXE=$ac_cv_path_JTREGEXE
41297if test -n "$JTREGEXE"; then
41298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41299$as_echo "$JTREGEXE" >&6; }
41300else
41301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41302$as_echo "no" >&6; }
41303fi
41304
41305
41306        if test "x$JTREGEXE" = x; then
41307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41308        fi
41309      else
41310        # Otherwise we believe it is a complete path. Use it as it is.
41311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41312$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41314$as_echo_n "checking for JTREGEXE... " >&6; }
41315        if test ! -x "$tool_specified"; then
41316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41317$as_echo "not found" >&6; }
41318          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41319        fi
41320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41321$as_echo "$tool_specified" >&6; }
41322      fi
41323    fi
41324  fi
41325
41326
41327
41328  if test "x$JTREGEXE" = x; then
41329    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41330  fi
41331
41332
41333      JT_HOME="`$DIRNAME $JTREGEXE`"
41334    fi
41335  fi
41336
41337
41338
41339
41340
41341
41342  # Option used to tell the compiler whether to create 32- or 64-bit executables
41343  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41344    COMPILER_TARGET_BITS_FLAG="-q"
41345  else
41346    COMPILER_TARGET_BITS_FLAG="-m"
41347  fi
41348
41349
41350  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41351  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41352    ARFLAGS="-r"
41353  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41354    ARFLAGS="-X64"
41355  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41356    # lib.exe is used as AR to create static libraries.
41357    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41358  else
41359    ARFLAGS=""
41360  fi
41361
41362
41363  ## Setup strip.
41364  # FIXME: should this really be per platform, or should it be per toolchain type?
41365  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41366  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41367  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41368    STRIPFLAGS="-g"
41369  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41370    STRIPFLAGS="-x"
41371  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41372    STRIPFLAGS="-S"
41373  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41374    STRIPFLAGS="-X32_64"
41375  fi
41376
41377  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41378    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41379  fi
41380
41381
41382  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41383    CC_OUT_OPTION=-Fo
41384    EXE_OUT_OPTION=-out:
41385    LD_OUT_OPTION=-out:
41386    AR_OUT_OPTION=-out:
41387  else
41388    # The option used to specify the target .o,.a or .so file.
41389    # When compiling, how to specify the to be created object file.
41390    CC_OUT_OPTION='-o$(SPACE)'
41391    # When linking, how to specify the to be created executable.
41392    EXE_OUT_OPTION='-o$(SPACE)'
41393    # When linking, how to specify the to be created dynamically linkable library.
41394    LD_OUT_OPTION='-o$(SPACE)'
41395    # When archiving, how to specify the to be create static archive for object files.
41396    AR_OUT_OPTION='rcs$(SPACE)'
41397  fi
41398
41399
41400
41401
41402
41403  # On Windows, we need to set RC flags.
41404  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41405    RC_FLAGS="-nologo -l0x409"
41406    if test "x$VARIANT" = xOPT; then
41407      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41408    fi
41409
41410    # The version variables used to create RC_FLAGS may be overridden
41411    # in a custom configure script, or possibly the command line.
41412    # Let those variables be expanded at make time in spec.gmk.
41413    # The \$ are escaped to the shell, and the $(...) variables
41414    # are evaluated by make.
41415    RC_FLAGS="$RC_FLAGS \
41416        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41417        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41418        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41419        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41420        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41421        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41422        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41423  fi
41424
41425
41426  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41427    # silence copyright notice and other headers.
41428    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41429  fi
41430
41431
41432# FIXME: Currently we must test this after toolchain but before flags. Fix!
41433
41434# Now we can test some aspects on the target using configure macros.
41435
41436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41437$as_echo_n "checking for ANSI C header files... " >&6; }
41438if ${ac_cv_header_stdc+:} false; then :
41439  $as_echo_n "(cached) " >&6
41440else
41441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41442/* end confdefs.h.  */
41443#include <stdlib.h>
41444#include <stdarg.h>
41445#include <string.h>
41446#include <float.h>
41447
41448int
41449main ()
41450{
41451
41452  ;
41453  return 0;
41454}
41455_ACEOF
41456if ac_fn_cxx_try_compile "$LINENO"; then :
41457  ac_cv_header_stdc=yes
41458else
41459  ac_cv_header_stdc=no
41460fi
41461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41462
41463if test $ac_cv_header_stdc = yes; then
41464  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41466/* end confdefs.h.  */
41467#include <string.h>
41468
41469_ACEOF
41470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41471  $EGREP "memchr" >/dev/null 2>&1; then :
41472
41473else
41474  ac_cv_header_stdc=no
41475fi
41476rm -f conftest*
41477
41478fi
41479
41480if test $ac_cv_header_stdc = yes; then
41481  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41483/* end confdefs.h.  */
41484#include <stdlib.h>
41485
41486_ACEOF
41487if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41488  $EGREP "free" >/dev/null 2>&1; then :
41489
41490else
41491  ac_cv_header_stdc=no
41492fi
41493rm -f conftest*
41494
41495fi
41496
41497if test $ac_cv_header_stdc = yes; then
41498  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41499  if test "$cross_compiling" = yes; then :
41500  :
41501else
41502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41503/* end confdefs.h.  */
41504#include <ctype.h>
41505#include <stdlib.h>
41506#if ((' ' & 0x0FF) == 0x020)
41507# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41508# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41509#else
41510# define ISLOWER(c) \
41511		   (('a' <= (c) && (c) <= 'i') \
41512		     || ('j' <= (c) && (c) <= 'r') \
41513		     || ('s' <= (c) && (c) <= 'z'))
41514# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41515#endif
41516
41517#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41518int
41519main ()
41520{
41521  int i;
41522  for (i = 0; i < 256; i++)
41523    if (XOR (islower (i), ISLOWER (i))
41524	|| toupper (i) != TOUPPER (i))
41525      return 2;
41526  return 0;
41527}
41528_ACEOF
41529if ac_fn_cxx_try_run "$LINENO"; then :
41530
41531else
41532  ac_cv_header_stdc=no
41533fi
41534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41535  conftest.$ac_objext conftest.beam conftest.$ac_ext
41536fi
41537
41538fi
41539fi
41540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41541$as_echo "$ac_cv_header_stdc" >&6; }
41542if test $ac_cv_header_stdc = yes; then
41543
41544$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41545
41546fi
41547
41548# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41549for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41550		  inttypes.h stdint.h unistd.h
41551do :
41552  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41553ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41554"
41555if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41556  cat >>confdefs.h <<_ACEOF
41557#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41558_ACEOF
41559
41560fi
41561
41562done
41563
41564
41565
41566  ###############################################################################
41567  #
41568  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41569  # (The JVM can use 32 or 64 bit Java pointers but that decision
41570  # is made at runtime.)
41571  #
41572
41573  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41574    # Always specify -m flag on Solaris
41575    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41576
41577  # When we add flags to the "official" CFLAGS etc, we need to
41578  # keep track of these additions in ADDED_CFLAGS etc. These
41579  # will later be checked to make sure only controlled additions
41580  # have been made to CFLAGS etc.
41581  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41582  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41583  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41584
41585  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41586  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41587  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41588
41589  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41590  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41591  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41592
41593  elif test "x$COMPILE_TYPE" = xreduced; then
41594    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41595      # Specify -m if running reduced on unix platforms
41596
41597  # When we add flags to the "official" CFLAGS etc, we need to
41598  # keep track of these additions in ADDED_CFLAGS etc. These
41599  # will later be checked to make sure only controlled additions
41600  # have been made to CFLAGS etc.
41601  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41602  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41603  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41604
41605  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41606  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41607  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41608
41609  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41610  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41611  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41612
41613    fi
41614  fi
41615
41616  # Make compilation sanity check
41617  for ac_header in stdio.h
41618do :
41619  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41620if test "x$ac_cv_header_stdio_h" = xyes; then :
41621  cat >>confdefs.h <<_ACEOF
41622#define HAVE_STDIO_H 1
41623_ACEOF
41624
41625else
41626
41627    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41628$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41629    if test "x$COMPILE_TYPE" = xreduced; then
41630
41631  # Print a helpful message on how to acquire the necessary build dependency.
41632  # reduced is the help tag: freetype, cups, pulse, alsa etc
41633  MISSING_DEPENDENCY=reduced
41634
41635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41636    cygwin_help $MISSING_DEPENDENCY
41637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41638    msys_help $MISSING_DEPENDENCY
41639  else
41640    PKGHANDLER_COMMAND=
41641
41642    case $PKGHANDLER in
41643      apt-get)
41644        apt_help     $MISSING_DEPENDENCY ;;
41645      yum)
41646        yum_help     $MISSING_DEPENDENCY ;;
41647      port)
41648        port_help    $MISSING_DEPENDENCY ;;
41649      pkgutil)
41650        pkgutil_help $MISSING_DEPENDENCY ;;
41651      pkgadd)
41652        pkgadd_help  $MISSING_DEPENDENCY ;;
41653    esac
41654
41655    if test "x$PKGHANDLER_COMMAND" != x; then
41656      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41657    fi
41658  fi
41659
41660      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
41661$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
41662    elif test "x$COMPILE_TYPE" = xcross; then
41663      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41664$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41665    fi
41666    as_fn_error $? "Cannot continue." "$LINENO" 5
41667
41668fi
41669
41670done
41671
41672
41673  # The cast to long int works around a bug in the HP C Compiler
41674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41676# This bug is HP SR number 8606223364.
41677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41678$as_echo_n "checking size of int *... " >&6; }
41679if ${ac_cv_sizeof_int_p+:} false; then :
41680  $as_echo_n "(cached) " >&6
41681else
41682  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41683
41684else
41685  if test "$ac_cv_type_int_p" = yes; then
41686     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41688as_fn_error 77 "cannot compute sizeof (int *)
41689See \`config.log' for more details" "$LINENO" 5; }
41690   else
41691     ac_cv_sizeof_int_p=0
41692   fi
41693fi
41694
41695fi
41696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41697$as_echo "$ac_cv_sizeof_int_p" >&6; }
41698
41699
41700
41701cat >>confdefs.h <<_ACEOF
41702#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41703_ACEOF
41704
41705
41706
41707  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41708  if test "x$ac_cv_sizeof_int_p" = x; then
41709    # The test failed, lets stick to the assumed value.
41710    { $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
41711$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41712  else
41713    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41714
41715    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41716      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41717      # Let's try to implicitely set the compilers target architecture and retry the test
41718      { $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
41719$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;}
41720      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41721$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41722
41723  # When we add flags to the "official" CFLAGS etc, we need to
41724  # keep track of these additions in ADDED_CFLAGS etc. These
41725  # will later be checked to make sure only controlled additions
41726  # have been made to CFLAGS etc.
41727  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41728  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41729  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41730
41731  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41732  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41733  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41734
41735  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41736  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41737  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41738
41739
41740      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41741      unset ac_cv_sizeof_int_p
41742      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41743      cat >>confdefs.h <<_ACEOF
41744#undef SIZEOF_INT_P
41745_ACEOF
41746
41747      # The cast to long int works around a bug in the HP C Compiler
41748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41750# This bug is HP SR number 8606223364.
41751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41752$as_echo_n "checking size of int *... " >&6; }
41753if ${ac_cv_sizeof_int_p+:} false; then :
41754  $as_echo_n "(cached) " >&6
41755else
41756  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41757
41758else
41759  if test "$ac_cv_type_int_p" = yes; then
41760     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41762as_fn_error 77 "cannot compute sizeof (int *)
41763See \`config.log' for more details" "$LINENO" 5; }
41764   else
41765     ac_cv_sizeof_int_p=0
41766   fi
41767fi
41768
41769fi
41770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41771$as_echo "$ac_cv_sizeof_int_p" >&6; }
41772
41773
41774
41775cat >>confdefs.h <<_ACEOF
41776#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41777_ACEOF
41778
41779
41780
41781      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41782
41783      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41784        { $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
41785$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;}
41786        if test "x$COMPILE_TYPE" = xreduced; then
41787
41788  # Print a helpful message on how to acquire the necessary build dependency.
41789  # reduced is the help tag: freetype, cups, pulse, alsa etc
41790  MISSING_DEPENDENCY=reduced
41791
41792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41793    cygwin_help $MISSING_DEPENDENCY
41794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41795    msys_help $MISSING_DEPENDENCY
41796  else
41797    PKGHANDLER_COMMAND=
41798
41799    case $PKGHANDLER in
41800      apt-get)
41801        apt_help     $MISSING_DEPENDENCY ;;
41802      yum)
41803        yum_help     $MISSING_DEPENDENCY ;;
41804      port)
41805        port_help    $MISSING_DEPENDENCY ;;
41806      pkgutil)
41807        pkgutil_help $MISSING_DEPENDENCY ;;
41808      pkgadd)
41809        pkgadd_help  $MISSING_DEPENDENCY ;;
41810    esac
41811
41812    if test "x$PKGHANDLER_COMMAND" != x; then
41813      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41814    fi
41815  fi
41816
41817          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
41818$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
41819        elif test "x$COMPILE_TYPE" = xcross; then
41820          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41821$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41822        fi
41823        as_fn_error $? "Cannot continue." "$LINENO" 5
41824      fi
41825    fi
41826  fi
41827
41828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41829$as_echo_n "checking for target address size... " >&6; }
41830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41831$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41832
41833
41834  ###############################################################################
41835  #
41836  # Is the target little of big endian?
41837  #
41838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41839$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41840if ${ac_cv_c_bigendian+:} false; then :
41841  $as_echo_n "(cached) " >&6
41842else
41843  ac_cv_c_bigendian=unknown
41844    # See if we're dealing with a universal compiler.
41845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41846/* end confdefs.h.  */
41847#ifndef __APPLE_CC__
41848	       not a universal capable compiler
41849	     #endif
41850	     typedef int dummy;
41851
41852_ACEOF
41853if ac_fn_cxx_try_compile "$LINENO"; then :
41854
41855	# Check for potential -arch flags.  It is not universal unless
41856	# there are at least two -arch flags with different values.
41857	ac_arch=
41858	ac_prev=
41859	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41860	 if test -n "$ac_prev"; then
41861	   case $ac_word in
41862	     i?86 | x86_64 | ppc | ppc64)
41863	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41864		 ac_arch=$ac_word
41865	       else
41866		 ac_cv_c_bigendian=universal
41867		 break
41868	       fi
41869	       ;;
41870	   esac
41871	   ac_prev=
41872	 elif test "x$ac_word" = "x-arch"; then
41873	   ac_prev=arch
41874	 fi
41875       done
41876fi
41877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41878    if test $ac_cv_c_bigendian = unknown; then
41879      # See if sys/param.h defines the BYTE_ORDER macro.
41880      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41881/* end confdefs.h.  */
41882#include <sys/types.h>
41883	     #include <sys/param.h>
41884
41885int
41886main ()
41887{
41888#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41889		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41890		     && LITTLE_ENDIAN)
41891	      bogus endian macros
41892	     #endif
41893
41894  ;
41895  return 0;
41896}
41897_ACEOF
41898if ac_fn_cxx_try_compile "$LINENO"; then :
41899  # It does; now see whether it defined to BIG_ENDIAN or not.
41900	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41901/* end confdefs.h.  */
41902#include <sys/types.h>
41903		#include <sys/param.h>
41904
41905int
41906main ()
41907{
41908#if BYTE_ORDER != BIG_ENDIAN
41909		 not big endian
41910		#endif
41911
41912  ;
41913  return 0;
41914}
41915_ACEOF
41916if ac_fn_cxx_try_compile "$LINENO"; then :
41917  ac_cv_c_bigendian=yes
41918else
41919  ac_cv_c_bigendian=no
41920fi
41921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41922fi
41923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41924    fi
41925    if test $ac_cv_c_bigendian = unknown; then
41926      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41927      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41928/* end confdefs.h.  */
41929#include <limits.h>
41930
41931int
41932main ()
41933{
41934#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41935	      bogus endian macros
41936	     #endif
41937
41938  ;
41939  return 0;
41940}
41941_ACEOF
41942if ac_fn_cxx_try_compile "$LINENO"; then :
41943  # It does; now see whether it defined to _BIG_ENDIAN or not.
41944	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41945/* end confdefs.h.  */
41946#include <limits.h>
41947
41948int
41949main ()
41950{
41951#ifndef _BIG_ENDIAN
41952		 not big endian
41953		#endif
41954
41955  ;
41956  return 0;
41957}
41958_ACEOF
41959if ac_fn_cxx_try_compile "$LINENO"; then :
41960  ac_cv_c_bigendian=yes
41961else
41962  ac_cv_c_bigendian=no
41963fi
41964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41965fi
41966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41967    fi
41968    if test $ac_cv_c_bigendian = unknown; then
41969      # Compile a test program.
41970      if test "$cross_compiling" = yes; then :
41971  # Try to guess by grepping values from an object file.
41972	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41973/* end confdefs.h.  */
41974short int ascii_mm[] =
41975		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41976		short int ascii_ii[] =
41977		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41978		int use_ascii (int i) {
41979		  return ascii_mm[i] + ascii_ii[i];
41980		}
41981		short int ebcdic_ii[] =
41982		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41983		short int ebcdic_mm[] =
41984		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41985		int use_ebcdic (int i) {
41986		  return ebcdic_mm[i] + ebcdic_ii[i];
41987		}
41988		extern int foo;
41989
41990int
41991main ()
41992{
41993return use_ascii (foo) == use_ebcdic (foo);
41994  ;
41995  return 0;
41996}
41997_ACEOF
41998if ac_fn_cxx_try_compile "$LINENO"; then :
41999  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42000	      ac_cv_c_bigendian=yes
42001	    fi
42002	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42003	      if test "$ac_cv_c_bigendian" = unknown; then
42004		ac_cv_c_bigendian=no
42005	      else
42006		# finding both strings is unlikely to happen, but who knows?
42007		ac_cv_c_bigendian=unknown
42008	      fi
42009	    fi
42010fi
42011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42012else
42013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42014/* end confdefs.h.  */
42015$ac_includes_default
42016int
42017main ()
42018{
42019
42020	     /* Are we little or big endian?  From Harbison&Steele.  */
42021	     union
42022	     {
42023	       long int l;
42024	       char c[sizeof (long int)];
42025	     } u;
42026	     u.l = 1;
42027	     return u.c[sizeof (long int) - 1] == 1;
42028
42029  ;
42030  return 0;
42031}
42032_ACEOF
42033if ac_fn_cxx_try_run "$LINENO"; then :
42034  ac_cv_c_bigendian=no
42035else
42036  ac_cv_c_bigendian=yes
42037fi
42038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42039  conftest.$ac_objext conftest.beam conftest.$ac_ext
42040fi
42041
42042    fi
42043fi
42044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42045$as_echo "$ac_cv_c_bigendian" >&6; }
42046 case $ac_cv_c_bigendian in #(
42047   yes)
42048     ENDIAN="big";; #(
42049   no)
42050     ENDIAN="little" ;; #(
42051   universal)
42052     ENDIAN="universal_endianness"
42053     ;; #(
42054   *)
42055     ENDIAN="unknown" ;;
42056 esac
42057
42058
42059  if test "x$ENDIAN" = xuniversal_endianness; then
42060    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42061  fi
42062  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42063    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
42064  fi
42065
42066
42067# Configure flags for the tools
42068
42069  ###############################################################################
42070  #
42071  # How to compile shared libraries.
42072  #
42073
42074  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42075    PICFLAG="-fPIC"
42076    C_FLAG_REORDER=''
42077    CXX_FLAG_REORDER=''
42078
42079    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42080      # Linking is different on MacOSX
42081      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42082      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42083      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42084      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42085      SET_SHARED_LIBRARY_MAPFILE=''
42086    else
42087      # Default works for linux, might work on other platforms as well.
42088      SHARED_LIBRARY_FLAGS='-shared'
42089      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42090      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42091      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42092      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42093    fi
42094  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42095    PICFLAG=''
42096    C_FLAG_REORDER=''
42097    CXX_FLAG_REORDER=''
42098
42099    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42100      # Linking is different on MacOSX
42101      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42102      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42103      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42104      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42105      SET_SHARED_LIBRARY_MAPFILE=''
42106    else
42107      # Default works for linux, might work on other platforms as well.
42108      SHARED_LIBRARY_FLAGS='-shared'
42109      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42110      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42111      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42112      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42113    fi
42114  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42115    PICFLAG="-KPIC"
42116    C_FLAG_REORDER='-xF'
42117    CXX_FLAG_REORDER='-xF'
42118    SHARED_LIBRARY_FLAGS="-G"
42119    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42120    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42121    SET_SHARED_LIBRARY_NAME=''
42122    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42123  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42124    PICFLAG="-qpic=large"
42125    C_FLAG_REORDER=''
42126    CXX_FLAG_REORDER=''
42127    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42128    SET_EXECUTABLE_ORIGIN=""
42129    SET_SHARED_LIBRARY_ORIGIN=''
42130    SET_SHARED_LIBRARY_NAME=''
42131    SET_SHARED_LIBRARY_MAPFILE=''
42132  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42133    PICFLAG=""
42134    C_FLAG_REORDER=''
42135    CXX_FLAG_REORDER=''
42136    SHARED_LIBRARY_FLAGS="-LD"
42137    SET_EXECUTABLE_ORIGIN=''
42138    SET_SHARED_LIBRARY_ORIGIN=''
42139    SET_SHARED_LIBRARY_NAME=''
42140    SET_SHARED_LIBRARY_MAPFILE=''
42141  fi
42142
42143
42144
42145
42146
42147
42148
42149
42150  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42151    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42152    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42153    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42154  fi
42155  # The (cross) compiler is now configured, we can now test capabilities
42156  # of the target platform.
42157
42158
42159
42160  ###############################################################################
42161  #
42162  # Setup the opt flags for different compilers
42163  # and different operating systems.
42164  #
42165
42166  # FIXME: this was indirectly the old default, but just inherited.
42167  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42168  #   C_FLAG_DEPS="-MMD -MF"
42169  # fi
42170
42171  # Generate make dependency files
42172  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42173    C_FLAG_DEPS="-MMD -MF"
42174  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42175    C_FLAG_DEPS="-MMD -MF"
42176  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42177    C_FLAG_DEPS="-xMMD -xMF"
42178  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42179    C_FLAG_DEPS="-qmakedep=gcc -MF"
42180  fi
42181  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42182
42183
42184
42185  # Debug symbols
42186  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42187    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42188      # reduce from default "-g2" option to save space
42189      CFLAGS_DEBUG_SYMBOLS="-g1"
42190      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42191    else
42192      CFLAGS_DEBUG_SYMBOLS="-g"
42193      CXXFLAGS_DEBUG_SYMBOLS="-g"
42194    fi
42195  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42196    CFLAGS_DEBUG_SYMBOLS="-g"
42197    CXXFLAGS_DEBUG_SYMBOLS="-g"
42198  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42199    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42200    # FIXME: likely a bug, this disables debug symbols rather than enables them
42201    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42202  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42203    CFLAGS_DEBUG_SYMBOLS="-g"
42204    CXXFLAGS_DEBUG_SYMBOLS="-g"
42205  fi
42206
42207
42208
42209  # bounds, memory and behavior checking options
42210  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42211    case $DEBUG_LEVEL in
42212    release )
42213      # no adjustment
42214      ;;
42215    fastdebug )
42216      # no adjustment
42217      ;;
42218    slowdebug )
42219      # Add runtime stack smashing and undefined behavior checks.
42220      # Not all versions of gcc support -fstack-protector
42221      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42222
42223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42224$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42225  supports=yes
42226
42227  saved_cflags="$CFLAGS"
42228  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42229  ac_ext=c
42230ac_cpp='$CPP $CPPFLAGS'
42231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42233ac_compiler_gnu=$ac_cv_c_compiler_gnu
42234
42235  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42236/* end confdefs.h.  */
42237int i;
42238_ACEOF
42239if ac_fn_c_try_compile "$LINENO"; then :
42240
42241else
42242  supports=no
42243fi
42244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42245  ac_ext=cpp
42246ac_cpp='$CXXCPP $CPPFLAGS'
42247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42250
42251  CFLAGS="$saved_cflags"
42252
42253  saved_cxxflags="$CXXFLAGS"
42254  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42255  ac_ext=cpp
42256ac_cpp='$CXXCPP $CPPFLAGS'
42257ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42258ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42259ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42260
42261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42262/* end confdefs.h.  */
42263int i;
42264_ACEOF
42265if ac_fn_cxx_try_compile "$LINENO"; then :
42266
42267else
42268  supports=no
42269fi
42270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42271  ac_ext=cpp
42272ac_cpp='$CXXCPP $CPPFLAGS'
42273ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42274ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42275ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42276
42277  CXXFLAGS="$saved_cxxflags"
42278
42279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42280$as_echo "$supports" >&6; }
42281  if test "x$supports" = "xyes" ; then
42282    :
42283  else
42284    STACK_PROTECTOR_CFLAG=""
42285  fi
42286
42287
42288      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42289      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42290      ;;
42291    esac
42292  fi
42293
42294  # Optimization levels
42295  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42296    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42297
42298    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42299      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42300      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42301      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42302      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42303      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42304      C_O_FLAG_NONE="-xregs=no%frameptr"
42305      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42306      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42307      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42308      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42309      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42310      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42311        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42312        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42313      fi
42314    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42315      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42316      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42317      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42318      C_O_FLAG_DEBUG=""
42319      C_O_FLAG_NONE=""
42320      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42321      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42322      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42323      C_O_FLAG_DEBUG=""
42324      CXX_O_FLAG_NONE=""
42325    fi
42326  else
42327    # The remaining toolchains share opt flags between CC and CXX;
42328    # setup for C and duplicate afterwards.
42329    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42330      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42331        # On MacOSX we optimize for size, something
42332        # we should do for all platforms?
42333        C_O_FLAG_HIGHEST="-Os"
42334        C_O_FLAG_HI="-Os"
42335        C_O_FLAG_NORM="-Os"
42336      else
42337        C_O_FLAG_HIGHEST="-O3"
42338        C_O_FLAG_HI="-O3"
42339        C_O_FLAG_NORM="-O2"
42340      fi
42341      C_O_FLAG_DEBUG="-O0"
42342      C_O_FLAG_NONE="-O0"
42343    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42344      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42345        # On MacOSX we optimize for size, something
42346        # we should do for all platforms?
42347        C_O_FLAG_HIGHEST="-Os"
42348        C_O_FLAG_HI="-Os"
42349        C_O_FLAG_NORM="-Os"
42350      else
42351        C_O_FLAG_HIGHEST="-O3"
42352        C_O_FLAG_HI="-O3"
42353        C_O_FLAG_NORM="-O2"
42354      fi
42355      C_O_FLAG_DEBUG="-O0"
42356      C_O_FLAG_NONE="-O0"
42357    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42358      C_O_FLAG_HIGHEST="-O3"
42359      C_O_FLAG_HI="-O3 -qstrict"
42360      C_O_FLAG_NORM="-O2"
42361      C_O_FLAG_DEBUG="-qnoopt"
42362      C_O_FLAG_NONE="-qnoop"
42363    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42364      C_O_FLAG_HIGHEST="-O2"
42365      C_O_FLAG_HI="-O1"
42366      C_O_FLAG_NORM="-O1"
42367      C_O_FLAG_DEBUG="-Od"
42368      C_O_FLAG_NONE="-Od"
42369    fi
42370    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42371    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42372    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42373    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42374    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42375  fi
42376
42377  # Adjust optimization flags according to debug level.
42378  case $DEBUG_LEVEL in
42379    release )
42380      # no adjustment
42381      ;;
42382    fastdebug )
42383      # Not quite so much optimization
42384      C_O_FLAG_HI="$C_O_FLAG_NORM"
42385      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42386      ;;
42387    slowdebug )
42388      # Disable optimization
42389      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42390      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42391      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42392      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42393      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42394      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42395      ;;
42396  esac
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410  # Special extras...
42411  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42412    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42413      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42414      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42415    fi
42416    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42417    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42418  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42419    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42420    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42421  fi
42422
42423  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
42424  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
42425  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
42426
42427  ###############################################################################
42428  #
42429  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42430  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42431  #
42432
42433  # Setup compiler/platform specific flags into
42434  #    CFLAGS_JDK    - C Compiler flags
42435  #    CXXFLAGS_JDK  - C++ Compiler flags
42436  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42437  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42438    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42439      # Force compatibility with i586 on 32 bit intel platforms.
42440      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42441    fi
42442    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42443        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42444    case $OPENJDK_TARGET_CPU_ARCH in
42445      arm )
42446        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42447        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42448        ;;
42449      ppc )
42450        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42451        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42452        ;;
42453      * )
42454        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42455        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42456        ;;
42457    esac
42458  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42459    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42460    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42461      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42462    fi
42463
42464    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42465    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42466  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42467    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42468    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42469  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42470    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42471        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42472        -DWIN32_LEAN_AND_MEAN \
42473        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42474        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42475        -DWIN32 -DIAL"
42476    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42477      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42478    else
42479      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42480    fi
42481    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42482    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42483    # studio.
42484    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42485      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42486          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42487    fi
42488  fi
42489
42490  ###############################################################################
42491
42492  # Adjust flags according to debug level.
42493  case $DEBUG_LEVEL in
42494    fastdebug | slowdebug )
42495      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42496      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42497      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42498      ;;
42499    release )
42500      ;;
42501    * )
42502      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42503      ;;
42504  esac
42505
42506  # Setup LP64
42507  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42508
42509  # Set some common defines. These works for all compilers, but assume
42510  # -D is universally accepted.
42511
42512  # Setup endianness
42513  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42514    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42515    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42516    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42517    #   Note: -Dmacro         is the same as    #define macro 1
42518    #         -Dmacro=        is the same as    #define macro
42519    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42520      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42521    else
42522      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42523    fi
42524  else
42525    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42526    # are defined in the system?
42527    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42528      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42529    else
42530      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42531    fi
42532  fi
42533
42534  # Setup target OS define. Use OS target name but in upper case.
42535  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42536  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42537
42538  # Setup target CPU
42539  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42540
42541  # Setup debug/release defines
42542  if test "x$DEBUG_LEVEL" = xrelease; then
42543    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42544    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42545      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42546    fi
42547  else
42548    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42549  fi
42550
42551  # Setup release name
42552  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42553
42554
42555  # Set some additional per-OS defines.
42556  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42557    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42558  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42559    # FIXME: PPC64 should not be here.
42560    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42561  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42562    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42563  fi
42564
42565  # Additional macosx handling
42566  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42567    # Setting these parameters makes it an error to link to macosx APIs that are
42568    # newer than the given OS version and makes the linked binaries compatible
42569    # even if built on a newer version of the OS.
42570    # The expected format is X.Y.Z
42571    MACOSX_VERSION_MIN=10.7.0
42572
42573
42574    # The macro takes the version with no dots, ex: 1070
42575    # Let the flags variables get resolved in make for easier override on make
42576    # command line.
42577    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42578    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42579  fi
42580
42581  # Setup some hard coded includes
42582  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42583      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42584      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42585      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42586
42587  # The shared libraries are compiled using the picflag.
42588  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42589  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42590
42591  # Executable flags
42592  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42593  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42594
42595
42596
42597
42598
42599
42600  # Flags for compiling test libraries
42601  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42602  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42603
42604  # Flags for compiling test executables
42605  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42606  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42607
42608
42609
42610
42611
42612
42613  # Setup LDFLAGS et al.
42614  #
42615
42616  # Now this is odd. The JDK native libraries have to link against libjvm.so
42617  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42618  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42619  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42620  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42621  # libraries will link to whatever is in memory. Yuck.
42622  #
42623  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42624  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42625    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42626    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42627      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42628    fi
42629    # TODO: make -debug optional "--disable-full-debug-symbols"
42630    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42631  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42632    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42633    # We have previously set HAS_GNU_HASH if this is the case
42634    if test -n "$HAS_GNU_HASH"; then
42635      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42636    fi
42637    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42638      # And since we now know that the linker is gnu, then add -z defs, to forbid
42639      # undefined symbols in object files.
42640      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42641      case $DEBUG_LEVEL in
42642        release )
42643          # tell linker to optimize libraries.
42644          # Should this be supplied to the OSS linker as well?
42645          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42646          ;;
42647        slowdebug )
42648          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42649            # do relocations at load
42650            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42651            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42652          fi
42653          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42654            # mark relocations read only
42655            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42656            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42657          fi
42658          ;;
42659        fastdebug )
42660          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42661            # mark relocations read only
42662            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42663            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42664          fi
42665          ;;
42666        * )
42667          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42668          ;;
42669        esac
42670    fi
42671  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42672    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42673    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42674  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42675    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42676  fi
42677
42678  # Customize LDFLAGS for executables
42679
42680  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42681
42682  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42683    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42684      LDFLAGS_STACK_SIZE=1048576
42685    else
42686      LDFLAGS_STACK_SIZE=327680
42687    fi
42688    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42689  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42690    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42691  fi
42692
42693  # Customize LDFLAGS for libs
42694  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42695
42696  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42697    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42698    LDFLAGS_JDKLIB_SUFFIX=""
42699  else
42700    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42701        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42702
42703    # On some platforms (mac) the linker warns about non existing -L dirs.
42704    # Add server first if available. Linking aginst client does not always produce the same results.
42705    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42706    # Default to server for other variants.
42707    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42708      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42709    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42710      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42711    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42712      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42713    else
42714      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42715    fi
42716
42717    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42718    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42719      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42720    fi
42721  fi
42722
42723
42724
42725
42726
42727
42728
42729  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42730  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42731  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42732  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42733
42734
42735
42736
42737
42738
42739
42740  # Some Zero and Shark settings.
42741  # ZERO_ARCHFLAG tells the compiler which mode to build for
42742  case "${OPENJDK_TARGET_CPU}" in
42743    s390)
42744      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42745      ;;
42746    *)
42747      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42748  esac
42749
42750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42751$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42752  supports=yes
42753
42754  saved_cflags="$CFLAGS"
42755  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42756  ac_ext=c
42757ac_cpp='$CPP $CPPFLAGS'
42758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42760ac_compiler_gnu=$ac_cv_c_compiler_gnu
42761
42762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42763/* end confdefs.h.  */
42764int i;
42765_ACEOF
42766if ac_fn_c_try_compile "$LINENO"; then :
42767
42768else
42769  supports=no
42770fi
42771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42772  ac_ext=cpp
42773ac_cpp='$CXXCPP $CPPFLAGS'
42774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42777
42778  CFLAGS="$saved_cflags"
42779
42780  saved_cxxflags="$CXXFLAGS"
42781  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42782  ac_ext=cpp
42783ac_cpp='$CXXCPP $CPPFLAGS'
42784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42787
42788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42789/* end confdefs.h.  */
42790int i;
42791_ACEOF
42792if ac_fn_cxx_try_compile "$LINENO"; then :
42793
42794else
42795  supports=no
42796fi
42797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42798  ac_ext=cpp
42799ac_cpp='$CXXCPP $CPPFLAGS'
42800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42803
42804  CXXFLAGS="$saved_cxxflags"
42805
42806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42807$as_echo "$supports" >&6; }
42808  if test "x$supports" = "xyes" ; then
42809    :
42810  else
42811    ZERO_ARCHFLAG=""
42812  fi
42813
42814
42815
42816  # Check that the compiler supports -mX (or -qX on AIX) flags
42817  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42818
42819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42820$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42821  supports=yes
42822
42823  saved_cflags="$CFLAGS"
42824  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42825  ac_ext=c
42826ac_cpp='$CPP $CPPFLAGS'
42827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42829ac_compiler_gnu=$ac_cv_c_compiler_gnu
42830
42831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42832/* end confdefs.h.  */
42833int i;
42834_ACEOF
42835if ac_fn_c_try_compile "$LINENO"; then :
42836
42837else
42838  supports=no
42839fi
42840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42841  ac_ext=cpp
42842ac_cpp='$CXXCPP $CPPFLAGS'
42843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42846
42847  CFLAGS="$saved_cflags"
42848
42849  saved_cxxflags="$CXXFLAGS"
42850  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42851  ac_ext=cpp
42852ac_cpp='$CXXCPP $CPPFLAGS'
42853ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42854ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42855ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42856
42857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42858/* end confdefs.h.  */
42859int i;
42860_ACEOF
42861if ac_fn_cxx_try_compile "$LINENO"; then :
42862
42863else
42864  supports=no
42865fi
42866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42867  ac_ext=cpp
42868ac_cpp='$CXXCPP $CPPFLAGS'
42869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42872
42873  CXXFLAGS="$saved_cxxflags"
42874
42875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42876$as_echo "$supports" >&6; }
42877  if test "x$supports" = "xyes" ; then
42878    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42879  else
42880    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42881  fi
42882
42883
42884
42885  # Check whether --enable-warnings-as-errors was given.
42886if test "${enable_warnings_as_errors+set}" = set; then :
42887  enableval=$enable_warnings_as_errors;
42888fi
42889
42890
42891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42892$as_echo_n "checking if native warnings are errors... " >&6; }
42893  if test "x$enable_warnings_as_errors" = "xyes"; then
42894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42895$as_echo "yes (explicitely set)" >&6; }
42896    WARNINGS_AS_ERRORS=true
42897  elif test "x$enable_warnings_as_errors" = "xno"; then
42898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42899$as_echo "no" >&6; }
42900    WARNINGS_AS_ERRORS=false
42901  elif test "x$enable_warnings_as_errors" = "x"; then
42902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42903$as_echo "yes (default)" >&6; }
42904    WARNINGS_AS_ERRORS=true
42905  else
42906    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42907  fi
42908
42909
42910  case "${TOOLCHAIN_TYPE}" in
42911    microsoft)
42912      DISABLE_WARNING_PREFIX="-wd"
42913      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42914      ;;
42915    solstudio)
42916      DISABLE_WARNING_PREFIX="-erroff="
42917      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42918      ;;
42919    gcc)
42920      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42921
42922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42923$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42924  supports=yes
42925
42926  saved_cflags="$CFLAGS"
42927  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42928  ac_ext=c
42929ac_cpp='$CPP $CPPFLAGS'
42930ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42931ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42932ac_compiler_gnu=$ac_cv_c_compiler_gnu
42933
42934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42935/* end confdefs.h.  */
42936int i;
42937_ACEOF
42938if ac_fn_c_try_compile "$LINENO"; then :
42939
42940else
42941  supports=no
42942fi
42943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42944  ac_ext=cpp
42945ac_cpp='$CXXCPP $CPPFLAGS'
42946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42949
42950  CFLAGS="$saved_cflags"
42951
42952  saved_cxxflags="$CXXFLAGS"
42953  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42954  ac_ext=cpp
42955ac_cpp='$CXXCPP $CPPFLAGS'
42956ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42957ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42958ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42959
42960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42961/* end confdefs.h.  */
42962int i;
42963_ACEOF
42964if ac_fn_cxx_try_compile "$LINENO"; then :
42965
42966else
42967  supports=no
42968fi
42969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42970  ac_ext=cpp
42971ac_cpp='$CXXCPP $CPPFLAGS'
42972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42975
42976  CXXFLAGS="$saved_cxxflags"
42977
42978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42979$as_echo "$supports" >&6; }
42980  if test "x$supports" = "xyes" ; then
42981    GCC_CAN_DISABLE_WARNINGS=true
42982  else
42983    GCC_CAN_DISABLE_WARNINGS=false
42984
42985  fi
42986
42987      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42988        DISABLE_WARNING_PREFIX="-Wno-"
42989      else
42990        DISABLE_WARNING_PREFIX=
42991      fi
42992      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42993      ;;
42994    clang)
42995      DISABLE_WARNING_PREFIX="-Wno-"
42996      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42997      ;;
42998  esac
42999
43000
43001
43002
43003# Setup debug symbols (need objcopy from the toolchain for that)
43004
43005  #
43006  # ENABLE_DEBUG_SYMBOLS
43007  # This must be done after the toolchain is setup, since we're looking at objcopy.
43008  #
43009  # Check whether --enable-debug-symbols was given.
43010if test "${enable_debug_symbols+set}" = set; then :
43011  enableval=$enable_debug_symbols;
43012fi
43013
43014
43015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43016$as_echo_n "checking if we should generate debug symbols... " >&6; }
43017
43018  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43019    # explicit enabling of enable-debug-symbols and can't find objcopy
43020    #   this is an error
43021    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43022  fi
43023
43024  if test "x$enable_debug_symbols" = "xyes"; then
43025    ENABLE_DEBUG_SYMBOLS=true
43026  elif test "x$enable_debug_symbols" = "xno"; then
43027    ENABLE_DEBUG_SYMBOLS=false
43028  else
43029    # Default is on if objcopy is found
43030    if test "x$OBJCOPY" != x; then
43031      ENABLE_DEBUG_SYMBOLS=true
43032    # MacOS X and Windows don't use objcopy but default is on for those OSes
43033    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43034      ENABLE_DEBUG_SYMBOLS=true
43035    else
43036      ENABLE_DEBUG_SYMBOLS=false
43037    fi
43038  fi
43039
43040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43041$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43042
43043  #
43044  # ZIP_DEBUGINFO_FILES
43045  #
43046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43047$as_echo_n "checking if we should zip debug-info files... " >&6; }
43048  # Check whether --enable-zip-debug-info was given.
43049if test "${enable_zip_debug_info+set}" = set; then :
43050  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43051else
43052  enable_zip_debug_info="yes"
43053fi
43054
43055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43056$as_echo "${enable_zip_debug_info}" >&6; }
43057
43058  if test "x${enable_zip_debug_info}" = "xno"; then
43059    ZIP_DEBUGINFO_FILES=false
43060  else
43061    ZIP_DEBUGINFO_FILES=true
43062  fi
43063
43064
43065
43066
43067
43068  # Check whether --enable-native-coverage was given.
43069if test "${enable_native_coverage+set}" = set; then :
43070  enableval=$enable_native_coverage;
43071fi
43072
43073  GCOV_ENABLED="false"
43074  if test "x$enable_native_coverage" = "xyes"; then
43075    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43076      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43077$as_echo_n "checking if native coverage is enabled... " >&6; }
43078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43079$as_echo "yes" >&6; }
43080      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43081      GCOV_LDFLAGS="-fprofile-arcs"
43082      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43083      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43084      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43085      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43086      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43087      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43088      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43089      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43090      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43091      GCOV_ENABLED="true"
43092    else
43093      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43094    fi
43095  elif test "x$enable_native_coverage" = "xno"; then
43096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43097$as_echo_n "checking if native coverage is enabled... " >&6; }
43098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43099$as_echo "no" >&6; }
43100  elif test "x$enable_native_coverage" != "x"; then
43101    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43102  fi
43103
43104
43105
43106
43107###############################################################################
43108#
43109# Check dependencies for external and internal libraries.
43110#
43111###############################################################################
43112
43113# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43114
43115  # When using cygwin or msys, we need a wrapper binary that renames
43116  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43117  # @files and rewrites these too! This wrapper binary is
43118  # called fixpath.
43119  FIXPATH=
43120  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43122$as_echo_n "checking if fixpath can be created... " >&6; }
43123    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43124    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43125    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43126    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43127      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43128      FIXPATH="$FIXPATH_BIN -c"
43129    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43130      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43131      # @ was chosen as separator to minimize risk of other tools messing around with it
43132      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43133          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43134      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43135      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43136    fi
43137    FIXPATH_SRC_W="$FIXPATH_SRC"
43138    FIXPATH_BIN_W="$FIXPATH_BIN"
43139
43140  unix_path="$FIXPATH_SRC_W"
43141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43142    windows_path=`$CYGPATH -m "$unix_path"`
43143    FIXPATH_SRC_W="$windows_path"
43144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43145    windows_path=`cmd //c echo $unix_path`
43146    FIXPATH_SRC_W="$windows_path"
43147  fi
43148
43149
43150  unix_path="$FIXPATH_BIN_W"
43151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43152    windows_path=`$CYGPATH -m "$unix_path"`
43153    FIXPATH_BIN_W="$windows_path"
43154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43155    windows_path=`cmd //c echo $unix_path`
43156    FIXPATH_BIN_W="$windows_path"
43157  fi
43158
43159    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43160    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43161    cd $FIXPATH_DIR
43162    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43163    cd $CURDIR
43164
43165    if test ! -x $FIXPATH_BIN; then
43166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43167$as_echo "no" >&6; }
43168      cat $FIXPATH_DIR/fixpath1.log
43169      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43170    fi
43171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43172$as_echo "yes" >&6; }
43173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43174$as_echo_n "checking if fixpath.exe works... " >&6; }
43175    cd $FIXPATH_DIR
43176    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43177        > $FIXPATH_DIR/fixpath2.log 2>&1
43178    cd $CURDIR
43179    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43181$as_echo "no" >&6; }
43182      cat $FIXPATH_DIR/fixpath2.log
43183      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43184    fi
43185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43186$as_echo "yes" >&6; }
43187  fi
43188
43189
43190
43191
43192
43193
43194  ###############################################################################
43195  #
43196  # OS specific settings that we never will need to probe.
43197  #
43198  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43200$as_echo_n "checking what is not needed on Linux?... " >&6; }
43201    PULSE_NOT_NEEDED=yes
43202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43203$as_echo "pulse" >&6; }
43204  fi
43205
43206  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43208$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43209    ALSA_NOT_NEEDED=yes
43210    PULSE_NOT_NEEDED=yes
43211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43212$as_echo "alsa pulse" >&6; }
43213  fi
43214
43215  if test "x$OPENJDK_TARGET_OS" = xaix; then
43216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43217$as_echo_n "checking what is not needed on AIX?... " >&6; }
43218    ALSA_NOT_NEEDED=yes
43219    PULSE_NOT_NEEDED=yes
43220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43221$as_echo "alsa pulse" >&6; }
43222  fi
43223
43224
43225  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43227$as_echo_n "checking what is not needed on Windows?... " >&6; }
43228    CUPS_NOT_NEEDED=yes
43229    ALSA_NOT_NEEDED=yes
43230    PULSE_NOT_NEEDED=yes
43231    X11_NOT_NEEDED=yes
43232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43233$as_echo "alsa cups pulse x11" >&6; }
43234  fi
43235
43236  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43238$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43239    ALSA_NOT_NEEDED=yes
43240    PULSE_NOT_NEEDED=yes
43241    X11_NOT_NEEDED=yes
43242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43243$as_echo "alsa pulse x11" >&6; }
43244  fi
43245
43246  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43248$as_echo_n "checking what is not needed on bsd?... " >&6; }
43249    ALSA_NOT_NEEDED=yes
43250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43251$as_echo "alsa" >&6; }
43252  fi
43253
43254  if test "x$OPENJDK" = "xfalse"; then
43255    FREETYPE_NOT_NEEDED=yes
43256  fi
43257
43258  if test "x$SUPPORT_HEADFUL" = xno; then
43259    X11_NOT_NEEDED=yes
43260  fi
43261
43262
43263
43264  ###############################################################################
43265  #
43266  # Check for X Windows
43267  #
43268
43269  if test "x$X11_NOT_NEEDED" = xyes; then
43270    if test "x${with_x}" != x; then
43271      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43272$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43273    fi
43274    X_CFLAGS=
43275    X_LIBS=
43276  else
43277    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43278    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43279    # --x-libraries for the sysroot, if that seems to be correct.
43280    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43281      if test "x$SYSROOT" != "x"; then
43282        if test "x$x_includes" = xNONE; then
43283          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43284            x_includes="$SYSROOT/usr/X11R6/include"
43285          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43286            x_includes="$SYSROOT/usr/include"
43287          fi
43288        fi
43289        if test "x$x_libraries" = xNONE; then
43290          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43291            x_libraries="$SYSROOT/usr/X11R6/lib"
43292          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43293            x_libraries="$SYSROOT/usr/lib64"
43294          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43295            x_libraries="$SYSROOT/usr/lib"
43296          fi
43297        fi
43298      fi
43299    fi
43300
43301    # Now let autoconf do it's magic
43302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43303$as_echo_n "checking for X... " >&6; }
43304
43305
43306# Check whether --with-x was given.
43307if test "${with_x+set}" = set; then :
43308  withval=$with_x;
43309fi
43310
43311# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43312if test "x$with_x" = xno; then
43313  # The user explicitly disabled X.
43314  have_x=disabled
43315else
43316  case $x_includes,$x_libraries in #(
43317    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43318    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43319  $as_echo_n "(cached) " >&6
43320else
43321  # One or both of the vars are not set, and there is no cached value.
43322ac_x_includes=no ac_x_libraries=no
43323rm -f -r conftest.dir
43324if mkdir conftest.dir; then
43325  cd conftest.dir
43326  cat >Imakefile <<'_ACEOF'
43327incroot:
43328	@echo incroot='${INCROOT}'
43329usrlibdir:
43330	@echo usrlibdir='${USRLIBDIR}'
43331libdir:
43332	@echo libdir='${LIBDIR}'
43333_ACEOF
43334  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43335    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43336    for ac_var in incroot usrlibdir libdir; do
43337      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43338    done
43339    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43340    for ac_extension in a so sl dylib la dll; do
43341      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43342	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43343	ac_im_usrlibdir=$ac_im_libdir; break
43344      fi
43345    done
43346    # Screen out bogus values from the imake configuration.  They are
43347    # bogus both because they are the default anyway, and because
43348    # using them would break gcc on systems where it needs fixed includes.
43349    case $ac_im_incroot in
43350	/usr/include) ac_x_includes= ;;
43351	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43352    esac
43353    case $ac_im_usrlibdir in
43354	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43355	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43356    esac
43357  fi
43358  cd ..
43359  rm -f -r conftest.dir
43360fi
43361
43362# Standard set of common directories for X headers.
43363# Check X11 before X11Rn because it is often a symlink to the current release.
43364ac_x_header_dirs='
43365/usr/X11/include
43366/usr/X11R7/include
43367/usr/X11R6/include
43368/usr/X11R5/include
43369/usr/X11R4/include
43370
43371/usr/include/X11
43372/usr/include/X11R7
43373/usr/include/X11R6
43374/usr/include/X11R5
43375/usr/include/X11R4
43376
43377/usr/local/X11/include
43378/usr/local/X11R7/include
43379/usr/local/X11R6/include
43380/usr/local/X11R5/include
43381/usr/local/X11R4/include
43382
43383/usr/local/include/X11
43384/usr/local/include/X11R7
43385/usr/local/include/X11R6
43386/usr/local/include/X11R5
43387/usr/local/include/X11R4
43388
43389/usr/X386/include
43390/usr/x386/include
43391/usr/XFree86/include/X11
43392
43393/usr/include
43394/usr/local/include
43395/usr/unsupported/include
43396/usr/athena/include
43397/usr/local/x11r5/include
43398/usr/lpp/Xamples/include
43399
43400/usr/openwin/include
43401/usr/openwin/share/include'
43402
43403if test "$ac_x_includes" = no; then
43404  # Guess where to find include files, by looking for Xlib.h.
43405  # First, try using that file with no special directory specified.
43406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43407/* end confdefs.h.  */
43408#include <X11/Xlib.h>
43409_ACEOF
43410if ac_fn_cxx_try_cpp "$LINENO"; then :
43411  # We can compile using X headers with no special include directory.
43412ac_x_includes=
43413else
43414  for ac_dir in $ac_x_header_dirs; do
43415  if test -r "$ac_dir/X11/Xlib.h"; then
43416    ac_x_includes=$ac_dir
43417    break
43418  fi
43419done
43420fi
43421rm -f conftest.err conftest.i conftest.$ac_ext
43422fi # $ac_x_includes = no
43423
43424if test "$ac_x_libraries" = no; then
43425  # Check for the libraries.
43426  # See if we find them without any special options.
43427  # Don't add to $LIBS permanently.
43428  ac_save_LIBS=$LIBS
43429  LIBS="-lX11 $LIBS"
43430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43431/* end confdefs.h.  */
43432#include <X11/Xlib.h>
43433int
43434main ()
43435{
43436XrmInitialize ()
43437  ;
43438  return 0;
43439}
43440_ACEOF
43441if ac_fn_cxx_try_link "$LINENO"; then :
43442  LIBS=$ac_save_LIBS
43443# We can link X programs with no special library path.
43444ac_x_libraries=
43445else
43446  LIBS=$ac_save_LIBS
43447for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43448do
43449  # Don't even attempt the hair of trying to link an X program!
43450  for ac_extension in a so sl dylib la dll; do
43451    if test -r "$ac_dir/libX11.$ac_extension"; then
43452      ac_x_libraries=$ac_dir
43453      break 2
43454    fi
43455  done
43456done
43457fi
43458rm -f core conftest.err conftest.$ac_objext \
43459    conftest$ac_exeext conftest.$ac_ext
43460fi # $ac_x_libraries = no
43461
43462case $ac_x_includes,$ac_x_libraries in #(
43463  no,* | *,no | *\'*)
43464    # Didn't find X, or a directory has "'" in its name.
43465    ac_cv_have_x="have_x=no";; #(
43466  *)
43467    # Record where we found X for the cache.
43468    ac_cv_have_x="have_x=yes\
43469	ac_x_includes='$ac_x_includes'\
43470	ac_x_libraries='$ac_x_libraries'"
43471esac
43472fi
43473;; #(
43474    *) have_x=yes;;
43475  esac
43476  eval "$ac_cv_have_x"
43477fi # $with_x != no
43478
43479if test "$have_x" != yes; then
43480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43481$as_echo "$have_x" >&6; }
43482  no_x=yes
43483else
43484  # If each of the values was on the command line, it overrides each guess.
43485  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43486  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43487  # Update the cache value to reflect the command line values.
43488  ac_cv_have_x="have_x=yes\
43489	ac_x_includes='$x_includes'\
43490	ac_x_libraries='$x_libraries'"
43491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43492$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43493fi
43494
43495    if test "$no_x" = yes; then
43496  # Not all programs may use this symbol, but it does not hurt to define it.
43497
43498$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43499
43500  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43501else
43502  if test -n "$x_includes"; then
43503    X_CFLAGS="$X_CFLAGS -I$x_includes"
43504  fi
43505
43506  # It would also be nice to do this for all -L options, not just this one.
43507  if test -n "$x_libraries"; then
43508    X_LIBS="$X_LIBS -L$x_libraries"
43509    # For Solaris; some versions of Sun CC require a space after -R and
43510    # others require no space.  Words are not sufficient . . . .
43511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43512$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43513    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43514    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43515    ac_cxx_werror_flag=yes
43516    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43517/* end confdefs.h.  */
43518
43519int
43520main ()
43521{
43522
43523  ;
43524  return 0;
43525}
43526_ACEOF
43527if ac_fn_cxx_try_link "$LINENO"; then :
43528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43529$as_echo "no" >&6; }
43530       X_LIBS="$X_LIBS -R$x_libraries"
43531else
43532  LIBS="$ac_xsave_LIBS -R $x_libraries"
43533       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43534/* end confdefs.h.  */
43535
43536int
43537main ()
43538{
43539
43540  ;
43541  return 0;
43542}
43543_ACEOF
43544if ac_fn_cxx_try_link "$LINENO"; then :
43545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43546$as_echo "yes" >&6; }
43547	  X_LIBS="$X_LIBS -R $x_libraries"
43548else
43549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43550$as_echo "neither works" >&6; }
43551fi
43552rm -f core conftest.err conftest.$ac_objext \
43553    conftest$ac_exeext conftest.$ac_ext
43554fi
43555rm -f core conftest.err conftest.$ac_objext \
43556    conftest$ac_exeext conftest.$ac_ext
43557    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43558    LIBS=$ac_xsave_LIBS
43559  fi
43560
43561  # Check for system-dependent libraries X programs must link with.
43562  # Do this before checking for the system-independent R6 libraries
43563  # (-lICE), since we may need -lsocket or whatever for X linking.
43564
43565  if test "$ISC" = yes; then
43566    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43567  else
43568    # Martyn Johnson says this is needed for Ultrix, if the X
43569    # libraries were built with DECnet support.  And Karl Berry says
43570    # the Alpha needs dnet_stub (dnet does not exist).
43571    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43572    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43573/* end confdefs.h.  */
43574
43575/* Override any GCC internal prototype to avoid an error.
43576   Use char because int might match the return type of a GCC
43577   builtin and then its argument prototype would still apply.  */
43578#ifdef __cplusplus
43579extern "C"
43580#endif
43581char XOpenDisplay ();
43582int
43583main ()
43584{
43585return XOpenDisplay ();
43586  ;
43587  return 0;
43588}
43589_ACEOF
43590if ac_fn_cxx_try_link "$LINENO"; then :
43591
43592else
43593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43594$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43595if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43596  $as_echo_n "(cached) " >&6
43597else
43598  ac_check_lib_save_LIBS=$LIBS
43599LIBS="-ldnet  $LIBS"
43600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43601/* end confdefs.h.  */
43602
43603/* Override any GCC internal prototype to avoid an error.
43604   Use char because int might match the return type of a GCC
43605   builtin and then its argument prototype would still apply.  */
43606#ifdef __cplusplus
43607extern "C"
43608#endif
43609char dnet_ntoa ();
43610int
43611main ()
43612{
43613return dnet_ntoa ();
43614  ;
43615  return 0;
43616}
43617_ACEOF
43618if ac_fn_cxx_try_link "$LINENO"; then :
43619  ac_cv_lib_dnet_dnet_ntoa=yes
43620else
43621  ac_cv_lib_dnet_dnet_ntoa=no
43622fi
43623rm -f core conftest.err conftest.$ac_objext \
43624    conftest$ac_exeext conftest.$ac_ext
43625LIBS=$ac_check_lib_save_LIBS
43626fi
43627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43628$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43629if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43630  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43631fi
43632
43633    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43635$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43636if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43637  $as_echo_n "(cached) " >&6
43638else
43639  ac_check_lib_save_LIBS=$LIBS
43640LIBS="-ldnet_stub  $LIBS"
43641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43642/* end confdefs.h.  */
43643
43644/* Override any GCC internal prototype to avoid an error.
43645   Use char because int might match the return type of a GCC
43646   builtin and then its argument prototype would still apply.  */
43647#ifdef __cplusplus
43648extern "C"
43649#endif
43650char dnet_ntoa ();
43651int
43652main ()
43653{
43654return dnet_ntoa ();
43655  ;
43656  return 0;
43657}
43658_ACEOF
43659if ac_fn_cxx_try_link "$LINENO"; then :
43660  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43661else
43662  ac_cv_lib_dnet_stub_dnet_ntoa=no
43663fi
43664rm -f core conftest.err conftest.$ac_objext \
43665    conftest$ac_exeext conftest.$ac_ext
43666LIBS=$ac_check_lib_save_LIBS
43667fi
43668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43669$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43670if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43671  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43672fi
43673
43674    fi
43675fi
43676rm -f core conftest.err conftest.$ac_objext \
43677    conftest$ac_exeext conftest.$ac_ext
43678    LIBS="$ac_xsave_LIBS"
43679
43680    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43681    # to get the SysV transport functions.
43682    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43683    # needs -lnsl.
43684    # The nsl library prevents programs from opening the X display
43685    # on Irix 5.2, according to T.E. Dickey.
43686    # The functions gethostbyname, getservbyname, and inet_addr are
43687    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43688    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43689if test "x$ac_cv_func_gethostbyname" = xyes; then :
43690
43691fi
43692
43693    if test $ac_cv_func_gethostbyname = no; then
43694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43695$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43696if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43697  $as_echo_n "(cached) " >&6
43698else
43699  ac_check_lib_save_LIBS=$LIBS
43700LIBS="-lnsl  $LIBS"
43701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43702/* end confdefs.h.  */
43703
43704/* Override any GCC internal prototype to avoid an error.
43705   Use char because int might match the return type of a GCC
43706   builtin and then its argument prototype would still apply.  */
43707#ifdef __cplusplus
43708extern "C"
43709#endif
43710char gethostbyname ();
43711int
43712main ()
43713{
43714return gethostbyname ();
43715  ;
43716  return 0;
43717}
43718_ACEOF
43719if ac_fn_cxx_try_link "$LINENO"; then :
43720  ac_cv_lib_nsl_gethostbyname=yes
43721else
43722  ac_cv_lib_nsl_gethostbyname=no
43723fi
43724rm -f core conftest.err conftest.$ac_objext \
43725    conftest$ac_exeext conftest.$ac_ext
43726LIBS=$ac_check_lib_save_LIBS
43727fi
43728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43729$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43730if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43731  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43732fi
43733
43734      if test $ac_cv_lib_nsl_gethostbyname = no; then
43735	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43736$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43737if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43738  $as_echo_n "(cached) " >&6
43739else
43740  ac_check_lib_save_LIBS=$LIBS
43741LIBS="-lbsd  $LIBS"
43742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43743/* end confdefs.h.  */
43744
43745/* Override any GCC internal prototype to avoid an error.
43746   Use char because int might match the return type of a GCC
43747   builtin and then its argument prototype would still apply.  */
43748#ifdef __cplusplus
43749extern "C"
43750#endif
43751char gethostbyname ();
43752int
43753main ()
43754{
43755return gethostbyname ();
43756  ;
43757  return 0;
43758}
43759_ACEOF
43760if ac_fn_cxx_try_link "$LINENO"; then :
43761  ac_cv_lib_bsd_gethostbyname=yes
43762else
43763  ac_cv_lib_bsd_gethostbyname=no
43764fi
43765rm -f core conftest.err conftest.$ac_objext \
43766    conftest$ac_exeext conftest.$ac_ext
43767LIBS=$ac_check_lib_save_LIBS
43768fi
43769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43770$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43771if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43772  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43773fi
43774
43775      fi
43776    fi
43777
43778    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43779    # socket/setsockopt and other routines are undefined under SCO ODT
43780    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43781    # on later versions), says Simon Leinen: it contains gethostby*
43782    # variants that don't use the name server (or something).  -lsocket
43783    # must be given before -lnsl if both are needed.  We assume that
43784    # if connect needs -lnsl, so does gethostbyname.
43785    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43786if test "x$ac_cv_func_connect" = xyes; then :
43787
43788fi
43789
43790    if test $ac_cv_func_connect = no; then
43791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43792$as_echo_n "checking for connect in -lsocket... " >&6; }
43793if ${ac_cv_lib_socket_connect+:} false; then :
43794  $as_echo_n "(cached) " >&6
43795else
43796  ac_check_lib_save_LIBS=$LIBS
43797LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43799/* end confdefs.h.  */
43800
43801/* Override any GCC internal prototype to avoid an error.
43802   Use char because int might match the return type of a GCC
43803   builtin and then its argument prototype would still apply.  */
43804#ifdef __cplusplus
43805extern "C"
43806#endif
43807char connect ();
43808int
43809main ()
43810{
43811return connect ();
43812  ;
43813  return 0;
43814}
43815_ACEOF
43816if ac_fn_cxx_try_link "$LINENO"; then :
43817  ac_cv_lib_socket_connect=yes
43818else
43819  ac_cv_lib_socket_connect=no
43820fi
43821rm -f core conftest.err conftest.$ac_objext \
43822    conftest$ac_exeext conftest.$ac_ext
43823LIBS=$ac_check_lib_save_LIBS
43824fi
43825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43826$as_echo "$ac_cv_lib_socket_connect" >&6; }
43827if test "x$ac_cv_lib_socket_connect" = xyes; then :
43828  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43829fi
43830
43831    fi
43832
43833    # Guillermo Gomez says -lposix is necessary on A/UX.
43834    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43835if test "x$ac_cv_func_remove" = xyes; then :
43836
43837fi
43838
43839    if test $ac_cv_func_remove = no; then
43840      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43841$as_echo_n "checking for remove in -lposix... " >&6; }
43842if ${ac_cv_lib_posix_remove+:} false; then :
43843  $as_echo_n "(cached) " >&6
43844else
43845  ac_check_lib_save_LIBS=$LIBS
43846LIBS="-lposix  $LIBS"
43847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43848/* end confdefs.h.  */
43849
43850/* Override any GCC internal prototype to avoid an error.
43851   Use char because int might match the return type of a GCC
43852   builtin and then its argument prototype would still apply.  */
43853#ifdef __cplusplus
43854extern "C"
43855#endif
43856char remove ();
43857int
43858main ()
43859{
43860return remove ();
43861  ;
43862  return 0;
43863}
43864_ACEOF
43865if ac_fn_cxx_try_link "$LINENO"; then :
43866  ac_cv_lib_posix_remove=yes
43867else
43868  ac_cv_lib_posix_remove=no
43869fi
43870rm -f core conftest.err conftest.$ac_objext \
43871    conftest$ac_exeext conftest.$ac_ext
43872LIBS=$ac_check_lib_save_LIBS
43873fi
43874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43875$as_echo "$ac_cv_lib_posix_remove" >&6; }
43876if test "x$ac_cv_lib_posix_remove" = xyes; then :
43877  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43878fi
43879
43880    fi
43881
43882    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43883    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43884if test "x$ac_cv_func_shmat" = xyes; then :
43885
43886fi
43887
43888    if test $ac_cv_func_shmat = no; then
43889      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43890$as_echo_n "checking for shmat in -lipc... " >&6; }
43891if ${ac_cv_lib_ipc_shmat+:} false; then :
43892  $as_echo_n "(cached) " >&6
43893else
43894  ac_check_lib_save_LIBS=$LIBS
43895LIBS="-lipc  $LIBS"
43896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43897/* end confdefs.h.  */
43898
43899/* Override any GCC internal prototype to avoid an error.
43900   Use char because int might match the return type of a GCC
43901   builtin and then its argument prototype would still apply.  */
43902#ifdef __cplusplus
43903extern "C"
43904#endif
43905char shmat ();
43906int
43907main ()
43908{
43909return shmat ();
43910  ;
43911  return 0;
43912}
43913_ACEOF
43914if ac_fn_cxx_try_link "$LINENO"; then :
43915  ac_cv_lib_ipc_shmat=yes
43916else
43917  ac_cv_lib_ipc_shmat=no
43918fi
43919rm -f core conftest.err conftest.$ac_objext \
43920    conftest$ac_exeext conftest.$ac_ext
43921LIBS=$ac_check_lib_save_LIBS
43922fi
43923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43924$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43925if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43926  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43927fi
43928
43929    fi
43930  fi
43931
43932  # Check for libraries that X11R6 Xt/Xaw programs need.
43933  ac_save_LDFLAGS=$LDFLAGS
43934  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43935  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43936  # check for ICE first), but we must link in the order -lSM -lICE or
43937  # we get undefined symbols.  So assume we have SM if we have ICE.
43938  # These have to be linked with before -lX11, unlike the other
43939  # libraries we check for below, so use a different variable.
43940  # John Interrante, Karl Berry
43941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43942$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43943if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43944  $as_echo_n "(cached) " >&6
43945else
43946  ac_check_lib_save_LIBS=$LIBS
43947LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43949/* end confdefs.h.  */
43950
43951/* Override any GCC internal prototype to avoid an error.
43952   Use char because int might match the return type of a GCC
43953   builtin and then its argument prototype would still apply.  */
43954#ifdef __cplusplus
43955extern "C"
43956#endif
43957char IceConnectionNumber ();
43958int
43959main ()
43960{
43961return IceConnectionNumber ();
43962  ;
43963  return 0;
43964}
43965_ACEOF
43966if ac_fn_cxx_try_link "$LINENO"; then :
43967  ac_cv_lib_ICE_IceConnectionNumber=yes
43968else
43969  ac_cv_lib_ICE_IceConnectionNumber=no
43970fi
43971rm -f core conftest.err conftest.$ac_objext \
43972    conftest$ac_exeext conftest.$ac_ext
43973LIBS=$ac_check_lib_save_LIBS
43974fi
43975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43976$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43977if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43978  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43979fi
43980
43981  LDFLAGS=$ac_save_LDFLAGS
43982
43983fi
43984
43985
43986    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43987    # this doesn't make sense so we remove it.
43988    if test "x$COMPILE_TYPE" = xcross; then
43989      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43990    fi
43991
43992    if test "x$no_x" = xyes; then
43993
43994  # Print a helpful message on how to acquire the necessary build dependency.
43995  # x11 is the help tag: freetype, cups, pulse, alsa etc
43996  MISSING_DEPENDENCY=x11
43997
43998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43999    cygwin_help $MISSING_DEPENDENCY
44000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44001    msys_help $MISSING_DEPENDENCY
44002  else
44003    PKGHANDLER_COMMAND=
44004
44005    case $PKGHANDLER in
44006      apt-get)
44007        apt_help     $MISSING_DEPENDENCY ;;
44008      yum)
44009        yum_help     $MISSING_DEPENDENCY ;;
44010      port)
44011        port_help    $MISSING_DEPENDENCY ;;
44012      pkgutil)
44013        pkgutil_help $MISSING_DEPENDENCY ;;
44014      pkgadd)
44015        pkgadd_help  $MISSING_DEPENDENCY ;;
44016    esac
44017
44018    if test "x$PKGHANDLER_COMMAND" != x; then
44019      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44020    fi
44021  fi
44022
44023      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44024    fi
44025
44026    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44027      OPENWIN_HOME="/usr/openwin"
44028      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44029      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44030          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44031          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44032          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44033    fi
44034
44035    ac_ext=c
44036ac_cpp='$CPP $CPPFLAGS'
44037ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44038ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44039ac_compiler_gnu=$ac_cv_c_compiler_gnu
44040
44041    OLD_CFLAGS="$CFLAGS"
44042    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44043
44044    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44045    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44046do :
44047  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44048ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44049          # include <X11/Xlib.h>
44050          # include <X11/Xutil.h>
44051
44052
44053"
44054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44055  cat >>confdefs.h <<_ACEOF
44056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44057_ACEOF
44058 X11_HEADERS_OK=yes
44059else
44060  X11_HEADERS_OK=no; break
44061fi
44062
44063done
44064
44065
44066    if test "x$X11_HEADERS_OK" = xno; then
44067
44068  # Print a helpful message on how to acquire the necessary build dependency.
44069  # x11 is the help tag: freetype, cups, pulse, alsa etc
44070  MISSING_DEPENDENCY=x11
44071
44072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44073    cygwin_help $MISSING_DEPENDENCY
44074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44075    msys_help $MISSING_DEPENDENCY
44076  else
44077    PKGHANDLER_COMMAND=
44078
44079    case $PKGHANDLER in
44080      apt-get)
44081        apt_help     $MISSING_DEPENDENCY ;;
44082      yum)
44083        yum_help     $MISSING_DEPENDENCY ;;
44084      port)
44085        port_help    $MISSING_DEPENDENCY ;;
44086      pkgutil)
44087        pkgutil_help $MISSING_DEPENDENCY ;;
44088      pkgadd)
44089        pkgadd_help  $MISSING_DEPENDENCY ;;
44090    esac
44091
44092    if test "x$PKGHANDLER_COMMAND" != x; then
44093      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44094    fi
44095  fi
44096
44097      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44098    fi
44099
44100    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44101    # defined in libawt_xawt.
44102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44103$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44104    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44105/* end confdefs.h.  */
44106#include <X11/extensions/Xrender.h>
44107int
44108main ()
44109{
44110XLinearGradient x;
44111  ;
44112  return 0;
44113}
44114_ACEOF
44115if ac_fn_c_try_compile "$LINENO"; then :
44116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44117$as_echo "yes" >&6; }
44118else
44119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44120$as_echo "no" >&6; }
44121         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44122fi
44123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44124
44125    CFLAGS="$OLD_CFLAGS"
44126    ac_ext=cpp
44127ac_cpp='$CXXCPP $CPPFLAGS'
44128ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44129ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44130ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44131
44132  fi # X11_NOT_NEEDED
44133
44134
44135
44136
44137
44138
44139  ###############################################################################
44140  #
44141  # The common unix printing system cups is used to print from java.
44142  #
44143
44144# Check whether --with-cups was given.
44145if test "${with_cups+set}" = set; then :
44146  withval=$with_cups;
44147fi
44148
44149
44150# Check whether --with-cups-include was given.
44151if test "${with_cups_include+set}" = set; then :
44152  withval=$with_cups_include;
44153fi
44154
44155
44156  if test "x$CUPS_NOT_NEEDED" = xyes; then
44157    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44158      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44159$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44160    fi
44161    CUPS_CFLAGS=
44162  else
44163    CUPS_FOUND=no
44164
44165    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44166      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44167    fi
44168
44169    if test "x${with_cups}" != x; then
44170      CUPS_CFLAGS="-I${with_cups}/include"
44171      CUPS_FOUND=yes
44172    fi
44173    if test "x${with_cups_include}" != x; then
44174      CUPS_CFLAGS="-I${with_cups_include}"
44175      CUPS_FOUND=yes
44176    fi
44177    if test "x$CUPS_FOUND" = xno; then
44178
44179
44180  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44181    # Source the builddeps file again, to make sure it uses the latest variables!
44182    . $builddepsfile
44183    # Look for a target and build machine specific resource!
44184    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44185    if test "x$resource" = x; then
44186      # Ok, lets instead look for a target specific resource
44187      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44188    fi
44189    if test "x$resource" = x; then
44190      # Ok, lets instead look for a build specific resource
44191      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44192    fi
44193    if test "x$resource" = x; then
44194      # Ok, lets instead look for a generic resource
44195      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44196      resource=${builddep_cups}
44197    fi
44198    if test "x$resource" != x; then
44199      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44200$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44201      # If the resource in the builddeps.conf file is an existing directory,
44202      # for example /java/linux/cups
44203      if test -d ${resource}; then
44204        depdir=${resource}
44205      else
44206
44207  # cups is for example mymodule
44208  # $resource is for example libs/general/libmymod_1_2_3.zip
44209  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44210  # $with_builddeps_dir is for example /localhome/builddeps
44211  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44212  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44213  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44214  filename=`basename $resource`
44215  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44216  filebase=${filename%%.*}
44217  extension=${filename#*.}
44218  installdir=$with_builddeps_dir/$filebase
44219  if test ! -f $installdir/$filename.unpacked; then
44220    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44221$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44222    if test ! -d $installdir; then
44223      mkdir -p $installdir
44224    fi
44225    if test ! -d $installdir; then
44226      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44227    fi
44228    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44229    touch $tmpfile
44230    if test ! -f $tmpfile; then
44231      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44232    fi
44233
44234  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44235  # $tmpfile is the local file name for the downloaded file.
44236  VALID_TOOL=no
44237  if test "x$BDEPS_FTP" = xwget; then
44238    VALID_TOOL=yes
44239    wget -O $tmpfile $with_builddeps_server/$resource
44240  fi
44241  if test "x$BDEPS_FTP" = xlftp; then
44242    VALID_TOOL=yes
44243    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44244  fi
44245  if test "x$BDEPS_FTP" = xftp; then
44246    VALID_TOOL=yes
44247    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44248    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44249    FTPUSERPWD=${FTPSERVER%%@*}
44250    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44251      FTPUSER=${userpwd%%:*}
44252      FTPPWD=${userpwd#*@}
44253      FTPSERVER=${FTPSERVER#*@}
44254    else
44255      FTPUSER=ftp
44256      FTPPWD=ftp
44257    fi
44258    # the "pass" command does not work on some
44259    # ftp clients (read ftp.exe) but if it works,
44260    # passive mode is better!
44261    ( \
44262        echo "user $FTPUSER $FTPPWD"        ; \
44263        echo "pass"                         ; \
44264        echo "bin"                          ; \
44265        echo "get $FTPPATH $tmpfile"              ; \
44266    ) | ftp -in $FTPSERVER
44267  fi
44268  if test "x$VALID_TOOL" != xyes; then
44269    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44270  fi
44271
44272    mv $tmpfile $installdir/$filename
44273    if test ! -s $installdir/$filename; then
44274      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44275    fi
44276    case "$extension" in
44277      zip)  echo "Unzipping $installdir/$filename..."
44278        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44279        ;;
44280      tar.gz) echo "Untaring $installdir/$filename..."
44281        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44282        ;;
44283      tgz) echo "Untaring $installdir/$filename..."
44284        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44285        ;;
44286      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44287        ;;
44288    esac
44289  fi
44290  if test -f $installdir/$filename.unpacked; then
44291    depdir=$installdir
44292  fi
44293
44294      fi
44295      # Source the builddeps file again, because in the previous command, the depdir
44296      # was updated to point at the current build dependency install directory.
44297      . $builddepsfile
44298      # Now extract variables from the builddeps.conf files.
44299      theroot=${builddep_cups_ROOT}
44300      thecflags=${builddep_cups_CFLAGS}
44301      thelibs=${builddep_cups_LIBS}
44302      if test "x$depdir" = x; then
44303        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44304      fi
44305      CUPS=$depdir
44306      if test "x$theroot" != x; then
44307        CUPS="$theroot"
44308      fi
44309      if test "x$thecflags" != x; then
44310        CUPS_CFLAGS="$thecflags"
44311      fi
44312      if test "x$thelibs" != x; then
44313        CUPS_LIBS="$thelibs"
44314      fi
44315      CUPS_FOUND=yes
44316
44317    fi
44318
44319  fi
44320
44321    fi
44322    if test "x$CUPS_FOUND" = xno; then
44323      # Are the cups headers installed in the default /usr/include location?
44324      for ac_header in cups/cups.h cups/ppd.h
44325do :
44326  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44327ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44328if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44329  cat >>confdefs.h <<_ACEOF
44330#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44331_ACEOF
44332
44333            CUPS_FOUND=yes
44334            CUPS_CFLAGS=
44335            DEFAULT_CUPS=yes
44336
44337
44338fi
44339
44340done
44341
44342    fi
44343    if test "x$CUPS_FOUND" = xno; then
44344      # Getting nervous now? Lets poke around for standard Solaris third-party
44345      # package installation locations.
44346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44347$as_echo_n "checking for cups headers... " >&6; }
44348      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44349        # An SFW package seems to be installed!
44350        CUPS_FOUND=yes
44351        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44352      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44353        # A CSW package seems to be installed!
44354        CUPS_FOUND=yes
44355        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44356      fi
44357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44358$as_echo "$CUPS_FOUND" >&6; }
44359    fi
44360    if test "x$CUPS_FOUND" = xno; then
44361
44362  # Print a helpful message on how to acquire the necessary build dependency.
44363  # cups is the help tag: freetype, cups, pulse, alsa etc
44364  MISSING_DEPENDENCY=cups
44365
44366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44367    cygwin_help $MISSING_DEPENDENCY
44368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44369    msys_help $MISSING_DEPENDENCY
44370  else
44371    PKGHANDLER_COMMAND=
44372
44373    case $PKGHANDLER in
44374      apt-get)
44375        apt_help     $MISSING_DEPENDENCY ;;
44376      yum)
44377        yum_help     $MISSING_DEPENDENCY ;;
44378      port)
44379        port_help    $MISSING_DEPENDENCY ;;
44380      pkgutil)
44381        pkgutil_help $MISSING_DEPENDENCY ;;
44382      pkgadd)
44383        pkgadd_help  $MISSING_DEPENDENCY ;;
44384    esac
44385
44386    if test "x$PKGHANDLER_COMMAND" != x; then
44387      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44388    fi
44389  fi
44390
44391      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44392    fi
44393  fi
44394
44395
44396
44397
44398
44399
44400  ###############################################################################
44401  #
44402  # The ubiquitous freetype library is used to render fonts.
44403  #
44404
44405# Check whether --with-freetype was given.
44406if test "${with_freetype+set}" = set; then :
44407  withval=$with_freetype;
44408fi
44409
44410
44411# Check whether --with-freetype-include was given.
44412if test "${with_freetype_include+set}" = set; then :
44413  withval=$with_freetype_include;
44414fi
44415
44416
44417# Check whether --with-freetype-lib was given.
44418if test "${with_freetype_lib+set}" = set; then :
44419  withval=$with_freetype_lib;
44420fi
44421
44422
44423# Check whether --with-freetype-src was given.
44424if test "${with_freetype_src+set}" = set; then :
44425  withval=$with_freetype_src;
44426fi
44427
44428  # Check whether --enable-freetype-bundling was given.
44429if test "${enable_freetype_bundling+set}" = set; then :
44430  enableval=$enable_freetype_bundling;
44431fi
44432
44433
44434  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44435  FREETYPE_BASE_NAME=freetype
44436  FREETYPE_CFLAGS=
44437  FREETYPE_LIBS=
44438  FREETYPE_BUNDLE_LIB_PATH=
44439
44440  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44441    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44442      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44443$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44444    fi
44445    if test "x$enable_freetype_bundling" != x; then
44446      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44447$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44448    fi
44449  else
44450    # freetype is needed to build; go get it!
44451
44452    BUNDLE_FREETYPE="$enable_freetype_bundling"
44453
44454    if  test "x$with_freetype_src" != x; then
44455      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44456        # Try to build freetype if --with-freetype-src was given on Windows
44457
44458  FREETYPE_SRC_PATH="$with_freetype_src"
44459  BUILD_FREETYPE=yes
44460
44461  # Check if the freetype sources are acessible..
44462  if ! test -d $FREETYPE_SRC_PATH; then
44463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44464$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44465    BUILD_FREETYPE=no
44466  fi
44467  # ..and contain a vc2010 project file
44468  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44469  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44471$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44472    BUILD_FREETYPE=no
44473  fi
44474  # Now check if configure found a version of 'msbuild.exe'
44475  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44476    { $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
44477$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;}
44478    BUILD_FREETYPE=no
44479  fi
44480
44481  # Ready to go..
44482  if test "x$BUILD_FREETYPE" = xyes; then
44483
44484    # msbuild requires trailing slashes for output directories
44485    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44486    freetype_lib_path_unix="$freetype_lib_path"
44487    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44488
44489  unix_path="$vcxproj_path"
44490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44491    windows_path=`$CYGPATH -m "$unix_path"`
44492    vcxproj_path="$windows_path"
44493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44494    windows_path=`cmd //c echo $unix_path`
44495    vcxproj_path="$windows_path"
44496  fi
44497
44498
44499  unix_path="$freetype_lib_path"
44500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44501    windows_path=`$CYGPATH -m "$unix_path"`
44502    freetype_lib_path="$windows_path"
44503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44504    windows_path=`cmd //c echo $unix_path`
44505    freetype_lib_path="$windows_path"
44506  fi
44507
44508
44509  unix_path="$freetype_obj_path"
44510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44511    windows_path=`$CYGPATH -m "$unix_path"`
44512    freetype_obj_path="$windows_path"
44513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44514    windows_path=`cmd //c echo $unix_path`
44515    freetype_obj_path="$windows_path"
44516  fi
44517
44518    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44519      freetype_platform=x64
44520    else
44521      freetype_platform=win32
44522    fi
44523
44524    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44525    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44526    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44527    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44528    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44529$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44530
44531    # First we try to build the freetype.dll
44532    $ECHO -e "@echo off\n"\
44533	     "$MSBUILD $vcxproj_path "\
44534		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44535		       "/p:Configuration=\"Release Multithreaded\" "\
44536		       "/p:Platform=$freetype_platform "\
44537		       "/p:ConfigurationType=DynamicLibrary "\
44538		       "/p:TargetName=freetype "\
44539		       "/p:OutDir=\"$freetype_lib_path\" "\
44540		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44541    cmd /c freetype.bat
44542
44543    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44544      # If that succeeds we also build freetype.lib
44545      $ECHO -e "@echo off\n"\
44546	       "$MSBUILD $vcxproj_path "\
44547			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44548			 "/p:Configuration=\"Release Multithreaded\" "\
44549			 "/p:Platform=$freetype_platform "\
44550			 "/p:ConfigurationType=StaticLibrary "\
44551			 "/p:TargetName=freetype "\
44552			 "/p:OutDir=\"$freetype_lib_path\" "\
44553			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44554      cmd /c freetype.bat
44555
44556      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44557	# Once we build both, lib and dll, set freetype lib and include path appropriately
44558	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44559	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44560	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44561$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44562      else
44563	BUILD_FREETYPE=no
44564      fi
44565    else
44566      BUILD_FREETYPE=no
44567    fi
44568  fi
44569
44570        if test "x$BUILD_FREETYPE" = xyes; then
44571          # Okay, we built it. Check that it works.
44572
44573  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44574  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44575  METHOD="--with-freetype-src"
44576
44577  # Let's start with an optimistic view of the world :-)
44578  FOUND_FREETYPE=yes
44579
44580  # First look for the canonical freetype main include file ft2build.h.
44581  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44582    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44583    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44584    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44585      # Fail.
44586      FOUND_FREETYPE=no
44587    fi
44588  fi
44589
44590  if test "x$FOUND_FREETYPE" = xyes; then
44591    # Include file found, let's continue the sanity check.
44592    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44593$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44594
44595    # Reset to default value
44596    FREETYPE_BASE_NAME=freetype
44597    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44598    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44599      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44600          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44601        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44602        # for the .6 version explicitly.
44603        FREETYPE_BASE_NAME=freetype.6
44604        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44605        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44606$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44607      else
44608        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44609$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44610        FOUND_FREETYPE=no
44611      fi
44612    else
44613      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44614        # On Windows, we will need both .lib and .dll file.
44615        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44616          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44617$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44618          FOUND_FREETYPE=no
44619        fi
44620      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44621          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44622        # Found lib in isa dir, use that instead.
44623        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44624        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44625$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44626      fi
44627    fi
44628  fi
44629
44630  if test "x$FOUND_FREETYPE" = xyes; then
44631
44632  # Only process if variable expands to non-empty
44633
44634  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44636
44637  # Input might be given as Windows format, start by converting to
44638  # unix format.
44639  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44640  new_path=`$CYGPATH -u "$path"`
44641
44642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44645  # "foo.exe" is OK but "foo" is an error.
44646  #
44647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44648  # It is also a way to make sure we got the proper file name for the real test later on.
44649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44650  if test "x$test_shortpath" = x; then
44651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44654  fi
44655
44656  # Call helper function which possibly converts this using DOS-style short mode.
44657  # If so, the updated path is stored in $new_path.
44658
44659  input_path="$new_path"
44660  # Check if we need to convert this using DOS-style short mode. If the path
44661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44662  # take no chances and rewrite it.
44663  # Note: m4 eats our [], so we need to use [ and ] instead.
44664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44665  if test "x$has_forbidden_chars" != x; then
44666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44670      # Going to short mode and back again did indeed matter. Since short mode is
44671      # case insensitive, let's make it lowercase to improve readability.
44672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44673      # Now convert it back to Unix-style (cygpath)
44674      input_path=`$CYGPATH -u "$shortmode_path"`
44675      new_path="$input_path"
44676    fi
44677  fi
44678
44679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44680  if test "x$test_cygdrive_prefix" = x; then
44681    # As a simple fix, exclude /usr/bin since it's not a real path.
44682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44684      # a path prefixed by /cygdrive for fixpath to work.
44685      new_path="$CYGWIN_ROOT_PATH$input_path"
44686    fi
44687  fi
44688
44689
44690  if test "x$path" != "x$new_path"; then
44691    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44694  fi
44695
44696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44697
44698  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44699  has_colon=`$ECHO $path | $GREP ^.:`
44700  new_path="$path"
44701  if test "x$has_colon" = x; then
44702    # Not in mixed or Windows style, start by that.
44703    new_path=`cmd //c echo $path`
44704  fi
44705
44706
44707  input_path="$new_path"
44708  # Check if we need to convert this using DOS-style short mode. If the path
44709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44710  # take no chances and rewrite it.
44711  # Note: m4 eats our [], so we need to use [ and ] instead.
44712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44713  if test "x$has_forbidden_chars" != x; then
44714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44716  fi
44717
44718
44719  windows_path="$new_path"
44720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44721    unix_path=`$CYGPATH -u "$windows_path"`
44722    new_path="$unix_path"
44723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44725    new_path="$unix_path"
44726  fi
44727
44728  if test "x$path" != "x$new_path"; then
44729    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44732  fi
44733
44734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44736
44737    else
44738      # We're on a unix platform. Hooray! :)
44739      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44740      has_space=`$ECHO "$path" | $GREP " "`
44741      if test "x$has_space" != x; then
44742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44745      fi
44746
44747      # Use eval to expand a potential ~
44748      eval path="$path"
44749      if test ! -f "$path" && test ! -d "$path"; then
44750        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44751      fi
44752
44753      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44754    fi
44755  fi
44756
44757
44758  # Only process if variable expands to non-empty
44759
44760  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44762
44763  # Input might be given as Windows format, start by converting to
44764  # unix format.
44765  path="$POTENTIAL_FREETYPE_LIB_PATH"
44766  new_path=`$CYGPATH -u "$path"`
44767
44768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44771  # "foo.exe" is OK but "foo" is an error.
44772  #
44773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44774  # It is also a way to make sure we got the proper file name for the real test later on.
44775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44776  if test "x$test_shortpath" = x; then
44777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44779    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44780  fi
44781
44782  # Call helper function which possibly converts this using DOS-style short mode.
44783  # If so, the updated path is stored in $new_path.
44784
44785  input_path="$new_path"
44786  # Check if we need to convert this using DOS-style short mode. If the path
44787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44788  # take no chances and rewrite it.
44789  # Note: m4 eats our [], so we need to use [ and ] instead.
44790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44791  if test "x$has_forbidden_chars" != x; then
44792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44796      # Going to short mode and back again did indeed matter. Since short mode is
44797      # case insensitive, let's make it lowercase to improve readability.
44798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44799      # Now convert it back to Unix-style (cygpath)
44800      input_path=`$CYGPATH -u "$shortmode_path"`
44801      new_path="$input_path"
44802    fi
44803  fi
44804
44805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44806  if test "x$test_cygdrive_prefix" = x; then
44807    # As a simple fix, exclude /usr/bin since it's not a real path.
44808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44810      # a path prefixed by /cygdrive for fixpath to work.
44811      new_path="$CYGWIN_ROOT_PATH$input_path"
44812    fi
44813  fi
44814
44815
44816  if test "x$path" != "x$new_path"; then
44817    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44820  fi
44821
44822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44823
44824  path="$POTENTIAL_FREETYPE_LIB_PATH"
44825  has_colon=`$ECHO $path | $GREP ^.:`
44826  new_path="$path"
44827  if test "x$has_colon" = x; then
44828    # Not in mixed or Windows style, start by that.
44829    new_path=`cmd //c echo $path`
44830  fi
44831
44832
44833  input_path="$new_path"
44834  # Check if we need to convert this using DOS-style short mode. If the path
44835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44836  # take no chances and rewrite it.
44837  # Note: m4 eats our [], so we need to use [ and ] instead.
44838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44839  if test "x$has_forbidden_chars" != x; then
44840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44842  fi
44843
44844
44845  windows_path="$new_path"
44846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44847    unix_path=`$CYGPATH -u "$windows_path"`
44848    new_path="$unix_path"
44849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44851    new_path="$unix_path"
44852  fi
44853
44854  if test "x$path" != "x$new_path"; then
44855    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44857$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44858  fi
44859
44860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44862
44863    else
44864      # We're on a unix platform. Hooray! :)
44865      path="$POTENTIAL_FREETYPE_LIB_PATH"
44866      has_space=`$ECHO "$path" | $GREP " "`
44867      if test "x$has_space" != x; then
44868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44869$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44871      fi
44872
44873      # Use eval to expand a potential ~
44874      eval path="$path"
44875      if test ! -f "$path" && test ! -d "$path"; then
44876        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44877      fi
44878
44879      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44880    fi
44881  fi
44882
44883
44884    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44886$as_echo_n "checking for freetype includes... " >&6; }
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44888$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44889    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44891$as_echo_n "checking for freetype libraries... " >&6; }
44892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44893$as_echo "$FREETYPE_LIB_PATH" >&6; }
44894  fi
44895
44896          if test "x$FOUND_FREETYPE" != xyes; then
44897            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44898          fi
44899        else
44900          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44901$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44902          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44903        fi
44904      else
44905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44906$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44907      fi
44908    fi
44909
44910    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44911      # User has specified settings
44912
44913      if test "x$BUNDLE_FREETYPE" = x; then
44914        # If not specified, default is to bundle freetype
44915        BUNDLE_FREETYPE=yes
44916      fi
44917
44918      if test "x$with_freetype" != x; then
44919        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44920        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44921      fi
44922
44923      # Allow --with-freetype-lib and --with-freetype-include to override
44924      if test "x$with_freetype_include" != x; then
44925        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44926      fi
44927      if test "x$with_freetype_lib" != x; then
44928        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44929      fi
44930
44931      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44932        # Okay, we got it. Check that it works.
44933
44934  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44935  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44936  METHOD="--with-freetype"
44937
44938  # Let's start with an optimistic view of the world :-)
44939  FOUND_FREETYPE=yes
44940
44941  # First look for the canonical freetype main include file ft2build.h.
44942  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44943    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44944    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44945    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44946      # Fail.
44947      FOUND_FREETYPE=no
44948    fi
44949  fi
44950
44951  if test "x$FOUND_FREETYPE" = xyes; then
44952    # Include file found, let's continue the sanity check.
44953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44954$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44955
44956    # Reset to default value
44957    FREETYPE_BASE_NAME=freetype
44958    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44959    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44960      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44961          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44962        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44963        # for the .6 version explicitly.
44964        FREETYPE_BASE_NAME=freetype.6
44965        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44966        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44967$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44968      else
44969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44970$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44971        FOUND_FREETYPE=no
44972      fi
44973    else
44974      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44975        # On Windows, we will need both .lib and .dll file.
44976        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44977          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44979          FOUND_FREETYPE=no
44980        fi
44981      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44982          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44983        # Found lib in isa dir, use that instead.
44984        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44985        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44986$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44987      fi
44988    fi
44989  fi
44990
44991  if test "x$FOUND_FREETYPE" = xyes; then
44992
44993  # Only process if variable expands to non-empty
44994
44995  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44997
44998  # Input might be given as Windows format, start by converting to
44999  # unix format.
45000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45001  new_path=`$CYGPATH -u "$path"`
45002
45003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45006  # "foo.exe" is OK but "foo" is an error.
45007  #
45008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45009  # It is also a way to make sure we got the proper file name for the real test later on.
45010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45011  if test "x$test_shortpath" = x; then
45012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45014    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45015  fi
45016
45017  # Call helper function which possibly converts this using DOS-style short mode.
45018  # If so, the updated path is stored in $new_path.
45019
45020  input_path="$new_path"
45021  # Check if we need to convert this using DOS-style short mode. If the path
45022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45023  # take no chances and rewrite it.
45024  # Note: m4 eats our [], so we need to use [ and ] instead.
45025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45026  if test "x$has_forbidden_chars" != x; then
45027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45031      # Going to short mode and back again did indeed matter. Since short mode is
45032      # case insensitive, let's make it lowercase to improve readability.
45033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45034      # Now convert it back to Unix-style (cygpath)
45035      input_path=`$CYGPATH -u "$shortmode_path"`
45036      new_path="$input_path"
45037    fi
45038  fi
45039
45040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45041  if test "x$test_cygdrive_prefix" = x; then
45042    # As a simple fix, exclude /usr/bin since it's not a real path.
45043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45045      # a path prefixed by /cygdrive for fixpath to work.
45046      new_path="$CYGWIN_ROOT_PATH$input_path"
45047    fi
45048  fi
45049
45050
45051  if test "x$path" != "x$new_path"; then
45052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45055  fi
45056
45057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45058
45059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45060  has_colon=`$ECHO $path | $GREP ^.:`
45061  new_path="$path"
45062  if test "x$has_colon" = x; then
45063    # Not in mixed or Windows style, start by that.
45064    new_path=`cmd //c echo $path`
45065  fi
45066
45067
45068  input_path="$new_path"
45069  # Check if we need to convert this using DOS-style short mode. If the path
45070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45071  # take no chances and rewrite it.
45072  # Note: m4 eats our [], so we need to use [ and ] instead.
45073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45074  if test "x$has_forbidden_chars" != x; then
45075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45077  fi
45078
45079
45080  windows_path="$new_path"
45081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45082    unix_path=`$CYGPATH -u "$windows_path"`
45083    new_path="$unix_path"
45084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45086    new_path="$unix_path"
45087  fi
45088
45089  if test "x$path" != "x$new_path"; then
45090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45093  fi
45094
45095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45097
45098    else
45099      # We're on a unix platform. Hooray! :)
45100      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45101      has_space=`$ECHO "$path" | $GREP " "`
45102      if test "x$has_space" != x; then
45103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45106      fi
45107
45108      # Use eval to expand a potential ~
45109      eval path="$path"
45110      if test ! -f "$path" && test ! -d "$path"; then
45111        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45112      fi
45113
45114      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45115    fi
45116  fi
45117
45118
45119  # Only process if variable expands to non-empty
45120
45121  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45123
45124  # Input might be given as Windows format, start by converting to
45125  # unix format.
45126  path="$POTENTIAL_FREETYPE_LIB_PATH"
45127  new_path=`$CYGPATH -u "$path"`
45128
45129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45132  # "foo.exe" is OK but "foo" is an error.
45133  #
45134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45135  # It is also a way to make sure we got the proper file name for the real test later on.
45136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45137  if test "x$test_shortpath" = x; then
45138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45140    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45141  fi
45142
45143  # Call helper function which possibly converts this using DOS-style short mode.
45144  # If so, the updated path is stored in $new_path.
45145
45146  input_path="$new_path"
45147  # Check if we need to convert this using DOS-style short mode. If the path
45148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45149  # take no chances and rewrite it.
45150  # Note: m4 eats our [], so we need to use [ and ] instead.
45151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45152  if test "x$has_forbidden_chars" != x; then
45153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45157      # Going to short mode and back again did indeed matter. Since short mode is
45158      # case insensitive, let's make it lowercase to improve readability.
45159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45160      # Now convert it back to Unix-style (cygpath)
45161      input_path=`$CYGPATH -u "$shortmode_path"`
45162      new_path="$input_path"
45163    fi
45164  fi
45165
45166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45167  if test "x$test_cygdrive_prefix" = x; then
45168    # As a simple fix, exclude /usr/bin since it's not a real path.
45169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45171      # a path prefixed by /cygdrive for fixpath to work.
45172      new_path="$CYGWIN_ROOT_PATH$input_path"
45173    fi
45174  fi
45175
45176
45177  if test "x$path" != "x$new_path"; then
45178    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45181  fi
45182
45183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45184
45185  path="$POTENTIAL_FREETYPE_LIB_PATH"
45186  has_colon=`$ECHO $path | $GREP ^.:`
45187  new_path="$path"
45188  if test "x$has_colon" = x; then
45189    # Not in mixed or Windows style, start by that.
45190    new_path=`cmd //c echo $path`
45191  fi
45192
45193
45194  input_path="$new_path"
45195  # Check if we need to convert this using DOS-style short mode. If the path
45196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45197  # take no chances and rewrite it.
45198  # Note: m4 eats our [], so we need to use [ and ] instead.
45199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45200  if test "x$has_forbidden_chars" != x; then
45201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45203  fi
45204
45205
45206  windows_path="$new_path"
45207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45208    unix_path=`$CYGPATH -u "$windows_path"`
45209    new_path="$unix_path"
45210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45212    new_path="$unix_path"
45213  fi
45214
45215  if test "x$path" != "x$new_path"; then
45216    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45219  fi
45220
45221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45223
45224    else
45225      # We're on a unix platform. Hooray! :)
45226      path="$POTENTIAL_FREETYPE_LIB_PATH"
45227      has_space=`$ECHO "$path" | $GREP " "`
45228      if test "x$has_space" != x; then
45229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45232      fi
45233
45234      # Use eval to expand a potential ~
45235      eval path="$path"
45236      if test ! -f "$path" && test ! -d "$path"; then
45237        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45238      fi
45239
45240      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45241    fi
45242  fi
45243
45244
45245    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45247$as_echo_n "checking for freetype includes... " >&6; }
45248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45249$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45250    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45252$as_echo_n "checking for freetype libraries... " >&6; }
45253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45254$as_echo "$FREETYPE_LIB_PATH" >&6; }
45255  fi
45256
45257        if test "x$FOUND_FREETYPE" != xyes; then
45258          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45259        fi
45260      else
45261        # User specified only one of lib or include. This is an error.
45262        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45263          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45264$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45265          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45266        else
45267          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45268$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45269          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45270        fi
45271      fi
45272    else
45273      # User did not specify settings, but we need freetype. Try to locate it.
45274
45275      if test "x$BUNDLE_FREETYPE" = x; then
45276        # If not specified, default is to bundle freetype only on windows
45277        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45278          BUNDLE_FREETYPE=yes
45279        else
45280          BUNDLE_FREETYPE=no
45281        fi
45282      fi
45283
45284      if test "x$FOUND_FREETYPE" != xyes; then
45285        # Check builddeps
45286
45287
45288  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45289    # Source the builddeps file again, to make sure it uses the latest variables!
45290    . $builddepsfile
45291    # Look for a target and build machine specific resource!
45292    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45293    if test "x$resource" = x; then
45294      # Ok, lets instead look for a target specific resource
45295      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45296    fi
45297    if test "x$resource" = x; then
45298      # Ok, lets instead look for a build specific resource
45299      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45300    fi
45301    if test "x$resource" = x; then
45302      # Ok, lets instead look for a generic resource
45303      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45304      resource=${builddep_freetype2}
45305    fi
45306    if test "x$resource" != x; then
45307      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45308$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45309      # If the resource in the builddeps.conf file is an existing directory,
45310      # for example /java/linux/cups
45311      if test -d ${resource}; then
45312        depdir=${resource}
45313      else
45314
45315  # freetype2 is for example mymodule
45316  # $resource is for example libs/general/libmymod_1_2_3.zip
45317  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45318  # $with_builddeps_dir is for example /localhome/builddeps
45319  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45320  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45321  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45322  filename=`basename $resource`
45323  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45324  filebase=${filename%%.*}
45325  extension=${filename#*.}
45326  installdir=$with_builddeps_dir/$filebase
45327  if test ! -f $installdir/$filename.unpacked; then
45328    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45329$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45330    if test ! -d $installdir; then
45331      mkdir -p $installdir
45332    fi
45333    if test ! -d $installdir; then
45334      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45335    fi
45336    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45337    touch $tmpfile
45338    if test ! -f $tmpfile; then
45339      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45340    fi
45341
45342  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45343  # $tmpfile is the local file name for the downloaded file.
45344  VALID_TOOL=no
45345  if test "x$BDEPS_FTP" = xwget; then
45346    VALID_TOOL=yes
45347    wget -O $tmpfile $with_builddeps_server/$resource
45348  fi
45349  if test "x$BDEPS_FTP" = xlftp; then
45350    VALID_TOOL=yes
45351    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45352  fi
45353  if test "x$BDEPS_FTP" = xftp; then
45354    VALID_TOOL=yes
45355    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45356    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45357    FTPUSERPWD=${FTPSERVER%%@*}
45358    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45359      FTPUSER=${userpwd%%:*}
45360      FTPPWD=${userpwd#*@}
45361      FTPSERVER=${FTPSERVER#*@}
45362    else
45363      FTPUSER=ftp
45364      FTPPWD=ftp
45365    fi
45366    # the "pass" command does not work on some
45367    # ftp clients (read ftp.exe) but if it works,
45368    # passive mode is better!
45369    ( \
45370        echo "user $FTPUSER $FTPPWD"        ; \
45371        echo "pass"                         ; \
45372        echo "bin"                          ; \
45373        echo "get $FTPPATH $tmpfile"              ; \
45374    ) | ftp -in $FTPSERVER
45375  fi
45376  if test "x$VALID_TOOL" != xyes; then
45377    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45378  fi
45379
45380    mv $tmpfile $installdir/$filename
45381    if test ! -s $installdir/$filename; then
45382      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45383    fi
45384    case "$extension" in
45385      zip)  echo "Unzipping $installdir/$filename..."
45386        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45387        ;;
45388      tar.gz) echo "Untaring $installdir/$filename..."
45389        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45390        ;;
45391      tgz) echo "Untaring $installdir/$filename..."
45392        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45393        ;;
45394      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45395        ;;
45396    esac
45397  fi
45398  if test -f $installdir/$filename.unpacked; then
45399    depdir=$installdir
45400  fi
45401
45402      fi
45403      # Source the builddeps file again, because in the previous command, the depdir
45404      # was updated to point at the current build dependency install directory.
45405      . $builddepsfile
45406      # Now extract variables from the builddeps.conf files.
45407      theroot=${builddep_freetype2_ROOT}
45408      thecflags=${builddep_freetype2_CFLAGS}
45409      thelibs=${builddep_freetype2_LIBS}
45410      if test "x$depdir" = x; then
45411        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45412      fi
45413      FREETYPE=$depdir
45414      if test "x$theroot" != x; then
45415        FREETYPE="$theroot"
45416      fi
45417      if test "x$thecflags" != x; then
45418        FREETYPE_CFLAGS="$thecflags"
45419      fi
45420      if test "x$thelibs" != x; then
45421        FREETYPE_LIBS="$thelibs"
45422      fi
45423      FOUND_FREETYPE=yes
45424      else FOUND_FREETYPE=no
45425
45426    fi
45427    else FOUND_FREETYPE=no
45428
45429  fi
45430
45431        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45432        if test "x$FOUND_FREETYPE" = xyes; then
45433          if test "x$BUNDLE_FREETYPE" = xyes; then
45434            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45435$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45436            FOUND_FREETYPE=no
45437          else
45438            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45439$as_echo_n "checking for freetype... " >&6; }
45440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45441$as_echo "yes (using builddeps)" >&6; }
45442          fi
45443        fi
45444      fi
45445
45446      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45447      if test "x$SYSROOT" = x; then
45448        if test "x$FOUND_FREETYPE" != xyes; then
45449          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45450          if test "x$PKG_CONFIG" != x; then
45451
45452pkg_failed=no
45453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45454$as_echo_n "checking for FREETYPE... " >&6; }
45455
45456if test -n "$FREETYPE_CFLAGS"; then
45457    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45458 elif test -n "$PKG_CONFIG"; then
45459    if test -n "$PKG_CONFIG" && \
45460    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45461  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45462  ac_status=$?
45463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45464  test $ac_status = 0; }; then
45465  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45466else
45467  pkg_failed=yes
45468fi
45469 else
45470    pkg_failed=untried
45471fi
45472if test -n "$FREETYPE_LIBS"; then
45473    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45474 elif test -n "$PKG_CONFIG"; then
45475    if test -n "$PKG_CONFIG" && \
45476    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45477  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45478  ac_status=$?
45479  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45480  test $ac_status = 0; }; then
45481  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45482else
45483  pkg_failed=yes
45484fi
45485 else
45486    pkg_failed=untried
45487fi
45488
45489
45490
45491if test $pkg_failed = yes; then
45492
45493if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45494        _pkg_short_errors_supported=yes
45495else
45496        _pkg_short_errors_supported=no
45497fi
45498        if test $_pkg_short_errors_supported = yes; then
45499	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45500        else
45501	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45502        fi
45503	# Put the nasty error message in config.log where it belongs
45504	echo "$FREETYPE_PKG_ERRORS" >&5
45505
45506	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45507$as_echo "no" >&6; }
45508                FOUND_FREETYPE=no
45509elif test $pkg_failed = untried; then
45510	FOUND_FREETYPE=no
45511else
45512	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45513	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45515$as_echo "yes" >&6; }
45516	FOUND_FREETYPE=yes
45517fi
45518            if test "x$FOUND_FREETYPE" = xyes; then
45519              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45520              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45521              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45522              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45523                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45524              fi
45525              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45526              if test "x$BUNDLE_FREETYPE" = xyes; then
45527                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45528$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45529                FOUND_FREETYPE=no
45530              else
45531                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45532$as_echo_n "checking for freetype... " >&6; }
45533                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45534$as_echo "yes (using pkg-config)" >&6; }
45535              fi
45536            fi
45537          fi
45538        fi
45539      fi
45540
45541      if test "x$FOUND_FREETYPE" != xyes; then
45542        # Check in well-known locations
45543        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45544          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45545
45546  windows_path="$FREETYPE_BASE_DIR"
45547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45548    unix_path=`$CYGPATH -u "$windows_path"`
45549    FREETYPE_BASE_DIR="$unix_path"
45550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45552    FREETYPE_BASE_DIR="$unix_path"
45553  fi
45554
45555
45556  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45557  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45558  METHOD="well-known location"
45559
45560  # Let's start with an optimistic view of the world :-)
45561  FOUND_FREETYPE=yes
45562
45563  # First look for the canonical freetype main include file ft2build.h.
45564  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45565    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45566    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45567    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45568      # Fail.
45569      FOUND_FREETYPE=no
45570    fi
45571  fi
45572
45573  if test "x$FOUND_FREETYPE" = xyes; then
45574    # Include file found, let's continue the sanity check.
45575    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45576$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45577
45578    # Reset to default value
45579    FREETYPE_BASE_NAME=freetype
45580    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45581    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45582      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45583          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45584        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45585        # for the .6 version explicitly.
45586        FREETYPE_BASE_NAME=freetype.6
45587        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45588        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45589$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45590      else
45591        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45592$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45593        FOUND_FREETYPE=no
45594      fi
45595    else
45596      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45597        # On Windows, we will need both .lib and .dll file.
45598        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45599          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45601          FOUND_FREETYPE=no
45602        fi
45603      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45604          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45605        # Found lib in isa dir, use that instead.
45606        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45607        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45608$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45609      fi
45610    fi
45611  fi
45612
45613  if test "x$FOUND_FREETYPE" = xyes; then
45614
45615  # Only process if variable expands to non-empty
45616
45617  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45619
45620  # Input might be given as Windows format, start by converting to
45621  # unix format.
45622  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45623  new_path=`$CYGPATH -u "$path"`
45624
45625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45628  # "foo.exe" is OK but "foo" is an error.
45629  #
45630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45631  # It is also a way to make sure we got the proper file name for the real test later on.
45632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45633  if test "x$test_shortpath" = x; then
45634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45635$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45636    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45637  fi
45638
45639  # Call helper function which possibly converts this using DOS-style short mode.
45640  # If so, the updated path is stored in $new_path.
45641
45642  input_path="$new_path"
45643  # Check if we need to convert this using DOS-style short mode. If the path
45644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45645  # take no chances and rewrite it.
45646  # Note: m4 eats our [], so we need to use [ and ] instead.
45647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45648  if test "x$has_forbidden_chars" != x; then
45649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45653      # Going to short mode and back again did indeed matter. Since short mode is
45654      # case insensitive, let's make it lowercase to improve readability.
45655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45656      # Now convert it back to Unix-style (cygpath)
45657      input_path=`$CYGPATH -u "$shortmode_path"`
45658      new_path="$input_path"
45659    fi
45660  fi
45661
45662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45663  if test "x$test_cygdrive_prefix" = x; then
45664    # As a simple fix, exclude /usr/bin since it's not a real path.
45665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45667      # a path prefixed by /cygdrive for fixpath to work.
45668      new_path="$CYGWIN_ROOT_PATH$input_path"
45669    fi
45670  fi
45671
45672
45673  if test "x$path" != "x$new_path"; then
45674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45677  fi
45678
45679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45680
45681  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45682  has_colon=`$ECHO $path | $GREP ^.:`
45683  new_path="$path"
45684  if test "x$has_colon" = x; then
45685    # Not in mixed or Windows style, start by that.
45686    new_path=`cmd //c echo $path`
45687  fi
45688
45689
45690  input_path="$new_path"
45691  # Check if we need to convert this using DOS-style short mode. If the path
45692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45693  # take no chances and rewrite it.
45694  # Note: m4 eats our [], so we need to use [ and ] instead.
45695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45696  if test "x$has_forbidden_chars" != x; then
45697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45699  fi
45700
45701
45702  windows_path="$new_path"
45703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45704    unix_path=`$CYGPATH -u "$windows_path"`
45705    new_path="$unix_path"
45706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45708    new_path="$unix_path"
45709  fi
45710
45711  if test "x$path" != "x$new_path"; then
45712    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45715  fi
45716
45717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45719
45720    else
45721      # We're on a unix platform. Hooray! :)
45722      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45723      has_space=`$ECHO "$path" | $GREP " "`
45724      if test "x$has_space" != x; then
45725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45728      fi
45729
45730      # Use eval to expand a potential ~
45731      eval path="$path"
45732      if test ! -f "$path" && test ! -d "$path"; then
45733        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45734      fi
45735
45736      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45737    fi
45738  fi
45739
45740
45741  # Only process if variable expands to non-empty
45742
45743  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45745
45746  # Input might be given as Windows format, start by converting to
45747  # unix format.
45748  path="$POTENTIAL_FREETYPE_LIB_PATH"
45749  new_path=`$CYGPATH -u "$path"`
45750
45751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45754  # "foo.exe" is OK but "foo" is an error.
45755  #
45756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45757  # It is also a way to make sure we got the proper file name for the real test later on.
45758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45759  if test "x$test_shortpath" = x; then
45760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45762    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45763  fi
45764
45765  # Call helper function which possibly converts this using DOS-style short mode.
45766  # If so, the updated path is stored in $new_path.
45767
45768  input_path="$new_path"
45769  # Check if we need to convert this using DOS-style short mode. If the path
45770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45771  # take no chances and rewrite it.
45772  # Note: m4 eats our [], so we need to use [ and ] instead.
45773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45774  if test "x$has_forbidden_chars" != x; then
45775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45779      # Going to short mode and back again did indeed matter. Since short mode is
45780      # case insensitive, let's make it lowercase to improve readability.
45781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45782      # Now convert it back to Unix-style (cygpath)
45783      input_path=`$CYGPATH -u "$shortmode_path"`
45784      new_path="$input_path"
45785    fi
45786  fi
45787
45788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45789  if test "x$test_cygdrive_prefix" = x; then
45790    # As a simple fix, exclude /usr/bin since it's not a real path.
45791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45793      # a path prefixed by /cygdrive for fixpath to work.
45794      new_path="$CYGWIN_ROOT_PATH$input_path"
45795    fi
45796  fi
45797
45798
45799  if test "x$path" != "x$new_path"; then
45800    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45803  fi
45804
45805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45806
45807  path="$POTENTIAL_FREETYPE_LIB_PATH"
45808  has_colon=`$ECHO $path | $GREP ^.:`
45809  new_path="$path"
45810  if test "x$has_colon" = x; then
45811    # Not in mixed or Windows style, start by that.
45812    new_path=`cmd //c echo $path`
45813  fi
45814
45815
45816  input_path="$new_path"
45817  # Check if we need to convert this using DOS-style short mode. If the path
45818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45819  # take no chances and rewrite it.
45820  # Note: m4 eats our [], so we need to use [ and ] instead.
45821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45822  if test "x$has_forbidden_chars" != x; then
45823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45825  fi
45826
45827
45828  windows_path="$new_path"
45829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45830    unix_path=`$CYGPATH -u "$windows_path"`
45831    new_path="$unix_path"
45832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45834    new_path="$unix_path"
45835  fi
45836
45837  if test "x$path" != "x$new_path"; then
45838    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45840$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45841  fi
45842
45843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45845
45846    else
45847      # We're on a unix platform. Hooray! :)
45848      path="$POTENTIAL_FREETYPE_LIB_PATH"
45849      has_space=`$ECHO "$path" | $GREP " "`
45850      if test "x$has_space" != x; then
45851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45854      fi
45855
45856      # Use eval to expand a potential ~
45857      eval path="$path"
45858      if test ! -f "$path" && test ! -d "$path"; then
45859        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45860      fi
45861
45862      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45863    fi
45864  fi
45865
45866
45867    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45869$as_echo_n "checking for freetype includes... " >&6; }
45870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45871$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45872    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45874$as_echo_n "checking for freetype libraries... " >&6; }
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45876$as_echo "$FREETYPE_LIB_PATH" >&6; }
45877  fi
45878
45879          if test "x$FOUND_FREETYPE" != xyes; then
45880            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45881
45882  windows_path="$FREETYPE_BASE_DIR"
45883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45884    unix_path=`$CYGPATH -u "$windows_path"`
45885    FREETYPE_BASE_DIR="$unix_path"
45886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45888    FREETYPE_BASE_DIR="$unix_path"
45889  fi
45890
45891
45892  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45893  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45894  METHOD="well-known location"
45895
45896  # Let's start with an optimistic view of the world :-)
45897  FOUND_FREETYPE=yes
45898
45899  # First look for the canonical freetype main include file ft2build.h.
45900  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45901    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45902    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45903    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45904      # Fail.
45905      FOUND_FREETYPE=no
45906    fi
45907  fi
45908
45909  if test "x$FOUND_FREETYPE" = xyes; then
45910    # Include file found, let's continue the sanity check.
45911    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45912$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45913
45914    # Reset to default value
45915    FREETYPE_BASE_NAME=freetype
45916    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45917    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45918      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45919          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45920        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45921        # for the .6 version explicitly.
45922        FREETYPE_BASE_NAME=freetype.6
45923        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45924        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45925$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45926      else
45927        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45928$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45929        FOUND_FREETYPE=no
45930      fi
45931    else
45932      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45933        # On Windows, we will need both .lib and .dll file.
45934        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45935          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45936$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45937          FOUND_FREETYPE=no
45938        fi
45939      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45940          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45941        # Found lib in isa dir, use that instead.
45942        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45943        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45944$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45945      fi
45946    fi
45947  fi
45948
45949  if test "x$FOUND_FREETYPE" = xyes; then
45950
45951  # Only process if variable expands to non-empty
45952
45953  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45955
45956  # Input might be given as Windows format, start by converting to
45957  # unix format.
45958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45959  new_path=`$CYGPATH -u "$path"`
45960
45961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45964  # "foo.exe" is OK but "foo" is an error.
45965  #
45966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45967  # It is also a way to make sure we got the proper file name for the real test later on.
45968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45969  if test "x$test_shortpath" = x; then
45970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45973  fi
45974
45975  # Call helper function which possibly converts this using DOS-style short mode.
45976  # If so, the updated path is stored in $new_path.
45977
45978  input_path="$new_path"
45979  # Check if we need to convert this using DOS-style short mode. If the path
45980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45981  # take no chances and rewrite it.
45982  # Note: m4 eats our [], so we need to use [ and ] instead.
45983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45984  if test "x$has_forbidden_chars" != x; then
45985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45989      # Going to short mode and back again did indeed matter. Since short mode is
45990      # case insensitive, let's make it lowercase to improve readability.
45991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45992      # Now convert it back to Unix-style (cygpath)
45993      input_path=`$CYGPATH -u "$shortmode_path"`
45994      new_path="$input_path"
45995    fi
45996  fi
45997
45998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45999  if test "x$test_cygdrive_prefix" = x; then
46000    # As a simple fix, exclude /usr/bin since it's not a real path.
46001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46003      # a path prefixed by /cygdrive for fixpath to work.
46004      new_path="$CYGWIN_ROOT_PATH$input_path"
46005    fi
46006  fi
46007
46008
46009  if test "x$path" != "x$new_path"; then
46010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46013  fi
46014
46015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46016
46017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46018  has_colon=`$ECHO $path | $GREP ^.:`
46019  new_path="$path"
46020  if test "x$has_colon" = x; then
46021    # Not in mixed or Windows style, start by that.
46022    new_path=`cmd //c echo $path`
46023  fi
46024
46025
46026  input_path="$new_path"
46027  # Check if we need to convert this using DOS-style short mode. If the path
46028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46029  # take no chances and rewrite it.
46030  # Note: m4 eats our [], so we need to use [ and ] instead.
46031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46032  if test "x$has_forbidden_chars" != x; then
46033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46035  fi
46036
46037
46038  windows_path="$new_path"
46039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46040    unix_path=`$CYGPATH -u "$windows_path"`
46041    new_path="$unix_path"
46042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46044    new_path="$unix_path"
46045  fi
46046
46047  if test "x$path" != "x$new_path"; then
46048    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46051  fi
46052
46053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46055
46056    else
46057      # We're on a unix platform. Hooray! :)
46058      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46059      has_space=`$ECHO "$path" | $GREP " "`
46060      if test "x$has_space" != x; then
46061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46064      fi
46065
46066      # Use eval to expand a potential ~
46067      eval path="$path"
46068      if test ! -f "$path" && test ! -d "$path"; then
46069        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46070      fi
46071
46072      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46073    fi
46074  fi
46075
46076
46077  # Only process if variable expands to non-empty
46078
46079  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46081
46082  # Input might be given as Windows format, start by converting to
46083  # unix format.
46084  path="$POTENTIAL_FREETYPE_LIB_PATH"
46085  new_path=`$CYGPATH -u "$path"`
46086
46087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46090  # "foo.exe" is OK but "foo" is an error.
46091  #
46092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46093  # It is also a way to make sure we got the proper file name for the real test later on.
46094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46095  if test "x$test_shortpath" = x; then
46096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46097$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46098    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46099  fi
46100
46101  # Call helper function which possibly converts this using DOS-style short mode.
46102  # If so, the updated path is stored in $new_path.
46103
46104  input_path="$new_path"
46105  # Check if we need to convert this using DOS-style short mode. If the path
46106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46107  # take no chances and rewrite it.
46108  # Note: m4 eats our [], so we need to use [ and ] instead.
46109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46110  if test "x$has_forbidden_chars" != x; then
46111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46115      # Going to short mode and back again did indeed matter. Since short mode is
46116      # case insensitive, let's make it lowercase to improve readability.
46117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46118      # Now convert it back to Unix-style (cygpath)
46119      input_path=`$CYGPATH -u "$shortmode_path"`
46120      new_path="$input_path"
46121    fi
46122  fi
46123
46124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46125  if test "x$test_cygdrive_prefix" = x; then
46126    # As a simple fix, exclude /usr/bin since it's not a real path.
46127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46129      # a path prefixed by /cygdrive for fixpath to work.
46130      new_path="$CYGWIN_ROOT_PATH$input_path"
46131    fi
46132  fi
46133
46134
46135  if test "x$path" != "x$new_path"; then
46136    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46138$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46139  fi
46140
46141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46142
46143  path="$POTENTIAL_FREETYPE_LIB_PATH"
46144  has_colon=`$ECHO $path | $GREP ^.:`
46145  new_path="$path"
46146  if test "x$has_colon" = x; then
46147    # Not in mixed or Windows style, start by that.
46148    new_path=`cmd //c echo $path`
46149  fi
46150
46151
46152  input_path="$new_path"
46153  # Check if we need to convert this using DOS-style short mode. If the path
46154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46155  # take no chances and rewrite it.
46156  # Note: m4 eats our [], so we need to use [ and ] instead.
46157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46158  if test "x$has_forbidden_chars" != x; then
46159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46161  fi
46162
46163
46164  windows_path="$new_path"
46165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46166    unix_path=`$CYGPATH -u "$windows_path"`
46167    new_path="$unix_path"
46168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46170    new_path="$unix_path"
46171  fi
46172
46173  if test "x$path" != "x$new_path"; then
46174    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46176$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46177  fi
46178
46179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46181
46182    else
46183      # We're on a unix platform. Hooray! :)
46184      path="$POTENTIAL_FREETYPE_LIB_PATH"
46185      has_space=`$ECHO "$path" | $GREP " "`
46186      if test "x$has_space" != x; then
46187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46188$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46190      fi
46191
46192      # Use eval to expand a potential ~
46193      eval path="$path"
46194      if test ! -f "$path" && test ! -d "$path"; then
46195        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46196      fi
46197
46198      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46199    fi
46200  fi
46201
46202
46203    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46205$as_echo_n "checking for freetype includes... " >&6; }
46206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46207$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46208    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46210$as_echo_n "checking for freetype libraries... " >&6; }
46211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46212$as_echo "$FREETYPE_LIB_PATH" >&6; }
46213  fi
46214
46215          fi
46216        else
46217          FREETYPE_BASE_DIR="$SYSROOT/usr"
46218
46219  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46220  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46221  METHOD="well-known location"
46222
46223  # Let's start with an optimistic view of the world :-)
46224  FOUND_FREETYPE=yes
46225
46226  # First look for the canonical freetype main include file ft2build.h.
46227  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46228    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46229    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46230    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46231      # Fail.
46232      FOUND_FREETYPE=no
46233    fi
46234  fi
46235
46236  if test "x$FOUND_FREETYPE" = xyes; then
46237    # Include file found, let's continue the sanity check.
46238    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46239$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46240
46241    # Reset to default value
46242    FREETYPE_BASE_NAME=freetype
46243    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46244    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46245      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46246          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46247        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46248        # for the .6 version explicitly.
46249        FREETYPE_BASE_NAME=freetype.6
46250        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46251        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46252$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46253      else
46254        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46255$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46256        FOUND_FREETYPE=no
46257      fi
46258    else
46259      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46260        # On Windows, we will need both .lib and .dll file.
46261        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46262          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46263$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46264          FOUND_FREETYPE=no
46265        fi
46266      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46267          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46268        # Found lib in isa dir, use that instead.
46269        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46270        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46271$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46272      fi
46273    fi
46274  fi
46275
46276  if test "x$FOUND_FREETYPE" = xyes; then
46277
46278  # Only process if variable expands to non-empty
46279
46280  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46282
46283  # Input might be given as Windows format, start by converting to
46284  # unix format.
46285  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46286  new_path=`$CYGPATH -u "$path"`
46287
46288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46291  # "foo.exe" is OK but "foo" is an error.
46292  #
46293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46294  # It is also a way to make sure we got the proper file name for the real test later on.
46295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46296  if test "x$test_shortpath" = x; then
46297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46298$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46299    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46300  fi
46301
46302  # Call helper function which possibly converts this using DOS-style short mode.
46303  # If so, the updated path is stored in $new_path.
46304
46305  input_path="$new_path"
46306  # Check if we need to convert this using DOS-style short mode. If the path
46307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46308  # take no chances and rewrite it.
46309  # Note: m4 eats our [], so we need to use [ and ] instead.
46310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46311  if test "x$has_forbidden_chars" != x; then
46312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46316      # Going to short mode and back again did indeed matter. Since short mode is
46317      # case insensitive, let's make it lowercase to improve readability.
46318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46319      # Now convert it back to Unix-style (cygpath)
46320      input_path=`$CYGPATH -u "$shortmode_path"`
46321      new_path="$input_path"
46322    fi
46323  fi
46324
46325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46326  if test "x$test_cygdrive_prefix" = x; then
46327    # As a simple fix, exclude /usr/bin since it's not a real path.
46328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46330      # a path prefixed by /cygdrive for fixpath to work.
46331      new_path="$CYGWIN_ROOT_PATH$input_path"
46332    fi
46333  fi
46334
46335
46336  if test "x$path" != "x$new_path"; then
46337    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46339$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46340  fi
46341
46342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46343
46344  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46345  has_colon=`$ECHO $path | $GREP ^.:`
46346  new_path="$path"
46347  if test "x$has_colon" = x; then
46348    # Not in mixed or Windows style, start by that.
46349    new_path=`cmd //c echo $path`
46350  fi
46351
46352
46353  input_path="$new_path"
46354  # Check if we need to convert this using DOS-style short mode. If the path
46355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46356  # take no chances and rewrite it.
46357  # Note: m4 eats our [], so we need to use [ and ] instead.
46358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46359  if test "x$has_forbidden_chars" != x; then
46360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46362  fi
46363
46364
46365  windows_path="$new_path"
46366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46367    unix_path=`$CYGPATH -u "$windows_path"`
46368    new_path="$unix_path"
46369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46371    new_path="$unix_path"
46372  fi
46373
46374  if test "x$path" != "x$new_path"; then
46375    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46378  fi
46379
46380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46382
46383    else
46384      # We're on a unix platform. Hooray! :)
46385      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46386      has_space=`$ECHO "$path" | $GREP " "`
46387      if test "x$has_space" != x; then
46388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46391      fi
46392
46393      # Use eval to expand a potential ~
46394      eval path="$path"
46395      if test ! -f "$path" && test ! -d "$path"; then
46396        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46397      fi
46398
46399      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46400    fi
46401  fi
46402
46403
46404  # Only process if variable expands to non-empty
46405
46406  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46408
46409  # Input might be given as Windows format, start by converting to
46410  # unix format.
46411  path="$POTENTIAL_FREETYPE_LIB_PATH"
46412  new_path=`$CYGPATH -u "$path"`
46413
46414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46417  # "foo.exe" is OK but "foo" is an error.
46418  #
46419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46420  # It is also a way to make sure we got the proper file name for the real test later on.
46421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46422  if test "x$test_shortpath" = x; then
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46425    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46426  fi
46427
46428  # Call helper function which possibly converts this using DOS-style short mode.
46429  # If so, the updated path is stored in $new_path.
46430
46431  input_path="$new_path"
46432  # Check if we need to convert this using DOS-style short mode. If the path
46433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46434  # take no chances and rewrite it.
46435  # Note: m4 eats our [], so we need to use [ and ] instead.
46436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46437  if test "x$has_forbidden_chars" != x; then
46438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46442      # Going to short mode and back again did indeed matter. Since short mode is
46443      # case insensitive, let's make it lowercase to improve readability.
46444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46445      # Now convert it back to Unix-style (cygpath)
46446      input_path=`$CYGPATH -u "$shortmode_path"`
46447      new_path="$input_path"
46448    fi
46449  fi
46450
46451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46452  if test "x$test_cygdrive_prefix" = x; then
46453    # As a simple fix, exclude /usr/bin since it's not a real path.
46454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46456      # a path prefixed by /cygdrive for fixpath to work.
46457      new_path="$CYGWIN_ROOT_PATH$input_path"
46458    fi
46459  fi
46460
46461
46462  if test "x$path" != "x$new_path"; then
46463    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46466  fi
46467
46468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46469
46470  path="$POTENTIAL_FREETYPE_LIB_PATH"
46471  has_colon=`$ECHO $path | $GREP ^.:`
46472  new_path="$path"
46473  if test "x$has_colon" = x; then
46474    # Not in mixed or Windows style, start by that.
46475    new_path=`cmd //c echo $path`
46476  fi
46477
46478
46479  input_path="$new_path"
46480  # Check if we need to convert this using DOS-style short mode. If the path
46481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46482  # take no chances and rewrite it.
46483  # Note: m4 eats our [], so we need to use [ and ] instead.
46484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46485  if test "x$has_forbidden_chars" != x; then
46486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46488  fi
46489
46490
46491  windows_path="$new_path"
46492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46493    unix_path=`$CYGPATH -u "$windows_path"`
46494    new_path="$unix_path"
46495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46497    new_path="$unix_path"
46498  fi
46499
46500  if test "x$path" != "x$new_path"; then
46501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46504  fi
46505
46506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46508
46509    else
46510      # We're on a unix platform. Hooray! :)
46511      path="$POTENTIAL_FREETYPE_LIB_PATH"
46512      has_space=`$ECHO "$path" | $GREP " "`
46513      if test "x$has_space" != x; then
46514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46517      fi
46518
46519      # Use eval to expand a potential ~
46520      eval path="$path"
46521      if test ! -f "$path" && test ! -d "$path"; then
46522        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46523      fi
46524
46525      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46526    fi
46527  fi
46528
46529
46530    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46531    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46532$as_echo_n "checking for freetype includes... " >&6; }
46533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46534$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46535    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46537$as_echo_n "checking for freetype libraries... " >&6; }
46538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46539$as_echo "$FREETYPE_LIB_PATH" >&6; }
46540  fi
46541
46542
46543          if test "x$FOUND_FREETYPE" != xyes; then
46544            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46545
46546  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46547  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46548  METHOD="well-known location"
46549
46550  # Let's start with an optimistic view of the world :-)
46551  FOUND_FREETYPE=yes
46552
46553  # First look for the canonical freetype main include file ft2build.h.
46554  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46555    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46556    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46557    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46558      # Fail.
46559      FOUND_FREETYPE=no
46560    fi
46561  fi
46562
46563  if test "x$FOUND_FREETYPE" = xyes; then
46564    # Include file found, let's continue the sanity check.
46565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46566$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46567
46568    # Reset to default value
46569    FREETYPE_BASE_NAME=freetype
46570    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46571    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46572      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46573          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46574        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46575        # for the .6 version explicitly.
46576        FREETYPE_BASE_NAME=freetype.6
46577        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46578        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46579$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46580      else
46581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46582$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46583        FOUND_FREETYPE=no
46584      fi
46585    else
46586      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46587        # On Windows, we will need both .lib and .dll file.
46588        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46589          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46590$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46591          FOUND_FREETYPE=no
46592        fi
46593      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46594          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46595        # Found lib in isa dir, use that instead.
46596        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46597        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46598$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46599      fi
46600    fi
46601  fi
46602
46603  if test "x$FOUND_FREETYPE" = xyes; then
46604
46605  # Only process if variable expands to non-empty
46606
46607  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46609
46610  # Input might be given as Windows format, start by converting to
46611  # unix format.
46612  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46613  new_path=`$CYGPATH -u "$path"`
46614
46615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46618  # "foo.exe" is OK but "foo" is an error.
46619  #
46620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46621  # It is also a way to make sure we got the proper file name for the real test later on.
46622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46623  if test "x$test_shortpath" = x; then
46624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46626    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46627  fi
46628
46629  # Call helper function which possibly converts this using DOS-style short mode.
46630  # If so, the updated path is stored in $new_path.
46631
46632  input_path="$new_path"
46633  # Check if we need to convert this using DOS-style short mode. If the path
46634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46635  # take no chances and rewrite it.
46636  # Note: m4 eats our [], so we need to use [ and ] instead.
46637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46638  if test "x$has_forbidden_chars" != x; then
46639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46643      # Going to short mode and back again did indeed matter. Since short mode is
46644      # case insensitive, let's make it lowercase to improve readability.
46645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46646      # Now convert it back to Unix-style (cygpath)
46647      input_path=`$CYGPATH -u "$shortmode_path"`
46648      new_path="$input_path"
46649    fi
46650  fi
46651
46652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46653  if test "x$test_cygdrive_prefix" = x; then
46654    # As a simple fix, exclude /usr/bin since it's not a real path.
46655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46657      # a path prefixed by /cygdrive for fixpath to work.
46658      new_path="$CYGWIN_ROOT_PATH$input_path"
46659    fi
46660  fi
46661
46662
46663  if test "x$path" != "x$new_path"; then
46664    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46667  fi
46668
46669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46670
46671  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46672  has_colon=`$ECHO $path | $GREP ^.:`
46673  new_path="$path"
46674  if test "x$has_colon" = x; then
46675    # Not in mixed or Windows style, start by that.
46676    new_path=`cmd //c echo $path`
46677  fi
46678
46679
46680  input_path="$new_path"
46681  # Check if we need to convert this using DOS-style short mode. If the path
46682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46683  # take no chances and rewrite it.
46684  # Note: m4 eats our [], so we need to use [ and ] instead.
46685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46686  if test "x$has_forbidden_chars" != x; then
46687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46689  fi
46690
46691
46692  windows_path="$new_path"
46693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46694    unix_path=`$CYGPATH -u "$windows_path"`
46695    new_path="$unix_path"
46696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46698    new_path="$unix_path"
46699  fi
46700
46701  if test "x$path" != "x$new_path"; then
46702    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46705  fi
46706
46707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46709
46710    else
46711      # We're on a unix platform. Hooray! :)
46712      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46713      has_space=`$ECHO "$path" | $GREP " "`
46714      if test "x$has_space" != x; then
46715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46718      fi
46719
46720      # Use eval to expand a potential ~
46721      eval path="$path"
46722      if test ! -f "$path" && test ! -d "$path"; then
46723        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46724      fi
46725
46726      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46727    fi
46728  fi
46729
46730
46731  # Only process if variable expands to non-empty
46732
46733  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46735
46736  # Input might be given as Windows format, start by converting to
46737  # unix format.
46738  path="$POTENTIAL_FREETYPE_LIB_PATH"
46739  new_path=`$CYGPATH -u "$path"`
46740
46741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46744  # "foo.exe" is OK but "foo" is an error.
46745  #
46746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46747  # It is also a way to make sure we got the proper file name for the real test later on.
46748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46749  if test "x$test_shortpath" = x; then
46750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46751$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46752    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46753  fi
46754
46755  # Call helper function which possibly converts this using DOS-style short mode.
46756  # If so, the updated path is stored in $new_path.
46757
46758  input_path="$new_path"
46759  # Check if we need to convert this using DOS-style short mode. If the path
46760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46761  # take no chances and rewrite it.
46762  # Note: m4 eats our [], so we need to use [ and ] instead.
46763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46764  if test "x$has_forbidden_chars" != x; then
46765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46769      # Going to short mode and back again did indeed matter. Since short mode is
46770      # case insensitive, let's make it lowercase to improve readability.
46771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46772      # Now convert it back to Unix-style (cygpath)
46773      input_path=`$CYGPATH -u "$shortmode_path"`
46774      new_path="$input_path"
46775    fi
46776  fi
46777
46778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46779  if test "x$test_cygdrive_prefix" = x; then
46780    # As a simple fix, exclude /usr/bin since it's not a real path.
46781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46783      # a path prefixed by /cygdrive for fixpath to work.
46784      new_path="$CYGWIN_ROOT_PATH$input_path"
46785    fi
46786  fi
46787
46788
46789  if test "x$path" != "x$new_path"; then
46790    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46793  fi
46794
46795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46796
46797  path="$POTENTIAL_FREETYPE_LIB_PATH"
46798  has_colon=`$ECHO $path | $GREP ^.:`
46799  new_path="$path"
46800  if test "x$has_colon" = x; then
46801    # Not in mixed or Windows style, start by that.
46802    new_path=`cmd //c echo $path`
46803  fi
46804
46805
46806  input_path="$new_path"
46807  # Check if we need to convert this using DOS-style short mode. If the path
46808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46809  # take no chances and rewrite it.
46810  # Note: m4 eats our [], so we need to use [ and ] instead.
46811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46812  if test "x$has_forbidden_chars" != x; then
46813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46815  fi
46816
46817
46818  windows_path="$new_path"
46819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820    unix_path=`$CYGPATH -u "$windows_path"`
46821    new_path="$unix_path"
46822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46824    new_path="$unix_path"
46825  fi
46826
46827  if test "x$path" != "x$new_path"; then
46828    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46831  fi
46832
46833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46835
46836    else
46837      # We're on a unix platform. Hooray! :)
46838      path="$POTENTIAL_FREETYPE_LIB_PATH"
46839      has_space=`$ECHO "$path" | $GREP " "`
46840      if test "x$has_space" != x; then
46841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46844      fi
46845
46846      # Use eval to expand a potential ~
46847      eval path="$path"
46848      if test ! -f "$path" && test ! -d "$path"; then
46849        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46850      fi
46851
46852      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46853    fi
46854  fi
46855
46856
46857    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46859$as_echo_n "checking for freetype includes... " >&6; }
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46861$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46862    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46864$as_echo_n "checking for freetype libraries... " >&6; }
46865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46866$as_echo "$FREETYPE_LIB_PATH" >&6; }
46867  fi
46868
46869          fi
46870
46871          if test "x$FOUND_FREETYPE" != xyes; then
46872            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46873
46874  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46875  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46876  METHOD="well-known location"
46877
46878  # Let's start with an optimistic view of the world :-)
46879  FOUND_FREETYPE=yes
46880
46881  # First look for the canonical freetype main include file ft2build.h.
46882  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46883    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46884    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46885    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46886      # Fail.
46887      FOUND_FREETYPE=no
46888    fi
46889  fi
46890
46891  if test "x$FOUND_FREETYPE" = xyes; then
46892    # Include file found, let's continue the sanity check.
46893    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46894$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46895
46896    # Reset to default value
46897    FREETYPE_BASE_NAME=freetype
46898    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46899    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46900      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46901          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46902        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46903        # for the .6 version explicitly.
46904        FREETYPE_BASE_NAME=freetype.6
46905        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46906        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46907$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46908      else
46909        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46910$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46911        FOUND_FREETYPE=no
46912      fi
46913    else
46914      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46915        # On Windows, we will need both .lib and .dll file.
46916        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46917          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46918$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46919          FOUND_FREETYPE=no
46920        fi
46921      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46922          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46923        # Found lib in isa dir, use that instead.
46924        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46925        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46926$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46927      fi
46928    fi
46929  fi
46930
46931  if test "x$FOUND_FREETYPE" = xyes; then
46932
46933  # Only process if variable expands to non-empty
46934
46935  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46937
46938  # Input might be given as Windows format, start by converting to
46939  # unix format.
46940  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46941  new_path=`$CYGPATH -u "$path"`
46942
46943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46946  # "foo.exe" is OK but "foo" is an error.
46947  #
46948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46949  # It is also a way to make sure we got the proper file name for the real test later on.
46950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46951  if test "x$test_shortpath" = x; then
46952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46954    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46955  fi
46956
46957  # Call helper function which possibly converts this using DOS-style short mode.
46958  # If so, the updated path is stored in $new_path.
46959
46960  input_path="$new_path"
46961  # Check if we need to convert this using DOS-style short mode. If the path
46962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46963  # take no chances and rewrite it.
46964  # Note: m4 eats our [], so we need to use [ and ] instead.
46965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46966  if test "x$has_forbidden_chars" != x; then
46967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46971      # Going to short mode and back again did indeed matter. Since short mode is
46972      # case insensitive, let's make it lowercase to improve readability.
46973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46974      # Now convert it back to Unix-style (cygpath)
46975      input_path=`$CYGPATH -u "$shortmode_path"`
46976      new_path="$input_path"
46977    fi
46978  fi
46979
46980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46981  if test "x$test_cygdrive_prefix" = x; then
46982    # As a simple fix, exclude /usr/bin since it's not a real path.
46983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46985      # a path prefixed by /cygdrive for fixpath to work.
46986      new_path="$CYGWIN_ROOT_PATH$input_path"
46987    fi
46988  fi
46989
46990
46991  if test "x$path" != "x$new_path"; then
46992    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46994$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46995  fi
46996
46997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46998
46999  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47000  has_colon=`$ECHO $path | $GREP ^.:`
47001  new_path="$path"
47002  if test "x$has_colon" = x; then
47003    # Not in mixed or Windows style, start by that.
47004    new_path=`cmd //c echo $path`
47005  fi
47006
47007
47008  input_path="$new_path"
47009  # Check if we need to convert this using DOS-style short mode. If the path
47010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47011  # take no chances and rewrite it.
47012  # Note: m4 eats our [], so we need to use [ and ] instead.
47013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47014  if test "x$has_forbidden_chars" != x; then
47015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47017  fi
47018
47019
47020  windows_path="$new_path"
47021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47022    unix_path=`$CYGPATH -u "$windows_path"`
47023    new_path="$unix_path"
47024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47026    new_path="$unix_path"
47027  fi
47028
47029  if test "x$path" != "x$new_path"; then
47030    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47032$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47033  fi
47034
47035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47037
47038    else
47039      # We're on a unix platform. Hooray! :)
47040      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47041      has_space=`$ECHO "$path" | $GREP " "`
47042      if test "x$has_space" != x; then
47043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47045        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47046      fi
47047
47048      # Use eval to expand a potential ~
47049      eval path="$path"
47050      if test ! -f "$path" && test ! -d "$path"; then
47051        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47052      fi
47053
47054      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47055    fi
47056  fi
47057
47058
47059  # Only process if variable expands to non-empty
47060
47061  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47063
47064  # Input might be given as Windows format, start by converting to
47065  # unix format.
47066  path="$POTENTIAL_FREETYPE_LIB_PATH"
47067  new_path=`$CYGPATH -u "$path"`
47068
47069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47072  # "foo.exe" is OK but "foo" is an error.
47073  #
47074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47075  # It is also a way to make sure we got the proper file name for the real test later on.
47076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47077  if test "x$test_shortpath" = x; then
47078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47080    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47081  fi
47082
47083  # Call helper function which possibly converts this using DOS-style short mode.
47084  # If so, the updated path is stored in $new_path.
47085
47086  input_path="$new_path"
47087  # Check if we need to convert this using DOS-style short mode. If the path
47088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47089  # take no chances and rewrite it.
47090  # Note: m4 eats our [], so we need to use [ and ] instead.
47091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47092  if test "x$has_forbidden_chars" != x; then
47093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47097      # Going to short mode and back again did indeed matter. Since short mode is
47098      # case insensitive, let's make it lowercase to improve readability.
47099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47100      # Now convert it back to Unix-style (cygpath)
47101      input_path=`$CYGPATH -u "$shortmode_path"`
47102      new_path="$input_path"
47103    fi
47104  fi
47105
47106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47107  if test "x$test_cygdrive_prefix" = x; then
47108    # As a simple fix, exclude /usr/bin since it's not a real path.
47109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47111      # a path prefixed by /cygdrive for fixpath to work.
47112      new_path="$CYGWIN_ROOT_PATH$input_path"
47113    fi
47114  fi
47115
47116
47117  if test "x$path" != "x$new_path"; then
47118    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47121  fi
47122
47123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47124
47125  path="$POTENTIAL_FREETYPE_LIB_PATH"
47126  has_colon=`$ECHO $path | $GREP ^.:`
47127  new_path="$path"
47128  if test "x$has_colon" = x; then
47129    # Not in mixed or Windows style, start by that.
47130    new_path=`cmd //c echo $path`
47131  fi
47132
47133
47134  input_path="$new_path"
47135  # Check if we need to convert this using DOS-style short mode. If the path
47136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47137  # take no chances and rewrite it.
47138  # Note: m4 eats our [], so we need to use [ and ] instead.
47139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47140  if test "x$has_forbidden_chars" != x; then
47141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47143  fi
47144
47145
47146  windows_path="$new_path"
47147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47148    unix_path=`$CYGPATH -u "$windows_path"`
47149    new_path="$unix_path"
47150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47152    new_path="$unix_path"
47153  fi
47154
47155  if test "x$path" != "x$new_path"; then
47156    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47159  fi
47160
47161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47163
47164    else
47165      # We're on a unix platform. Hooray! :)
47166      path="$POTENTIAL_FREETYPE_LIB_PATH"
47167      has_space=`$ECHO "$path" | $GREP " "`
47168      if test "x$has_space" != x; then
47169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47172      fi
47173
47174      # Use eval to expand a potential ~
47175      eval path="$path"
47176      if test ! -f "$path" && test ! -d "$path"; then
47177        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47178      fi
47179
47180      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47181    fi
47182  fi
47183
47184
47185    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47187$as_echo_n "checking for freetype includes... " >&6; }
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47189$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47190    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47192$as_echo_n "checking for freetype libraries... " >&6; }
47193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47194$as_echo "$FREETYPE_LIB_PATH" >&6; }
47195  fi
47196
47197          fi
47198
47199          if test "x$FOUND_FREETYPE" != xyes; then
47200            FREETYPE_BASE_DIR="$SYSROOT/usr"
47201            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47202
47203  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47204  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47205  METHOD="well-known location"
47206
47207  # Let's start with an optimistic view of the world :-)
47208  FOUND_FREETYPE=yes
47209
47210  # First look for the canonical freetype main include file ft2build.h.
47211  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47212    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47213    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47214    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47215      # Fail.
47216      FOUND_FREETYPE=no
47217    fi
47218  fi
47219
47220  if test "x$FOUND_FREETYPE" = xyes; then
47221    # Include file found, let's continue the sanity check.
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47223$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47224
47225    # Reset to default value
47226    FREETYPE_BASE_NAME=freetype
47227    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47228    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47229      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47230          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47231        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47232        # for the .6 version explicitly.
47233        FREETYPE_BASE_NAME=freetype.6
47234        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47235        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47236$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47237      else
47238        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47239$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47240        FOUND_FREETYPE=no
47241      fi
47242    else
47243      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47244        # On Windows, we will need both .lib and .dll file.
47245        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47246          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47247$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47248          FOUND_FREETYPE=no
47249        fi
47250      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47251          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47252        # Found lib in isa dir, use that instead.
47253        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47254        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47255$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47256      fi
47257    fi
47258  fi
47259
47260  if test "x$FOUND_FREETYPE" = xyes; then
47261
47262  # Only process if variable expands to non-empty
47263
47264  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47266
47267  # Input might be given as Windows format, start by converting to
47268  # unix format.
47269  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47270  new_path=`$CYGPATH -u "$path"`
47271
47272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47275  # "foo.exe" is OK but "foo" is an error.
47276  #
47277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47278  # It is also a way to make sure we got the proper file name for the real test later on.
47279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47280  if test "x$test_shortpath" = x; then
47281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47283    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47284  fi
47285
47286  # Call helper function which possibly converts this using DOS-style short mode.
47287  # If so, the updated path is stored in $new_path.
47288
47289  input_path="$new_path"
47290  # Check if we need to convert this using DOS-style short mode. If the path
47291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47292  # take no chances and rewrite it.
47293  # Note: m4 eats our [], so we need to use [ and ] instead.
47294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47295  if test "x$has_forbidden_chars" != x; then
47296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47300      # Going to short mode and back again did indeed matter. Since short mode is
47301      # case insensitive, let's make it lowercase to improve readability.
47302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47303      # Now convert it back to Unix-style (cygpath)
47304      input_path=`$CYGPATH -u "$shortmode_path"`
47305      new_path="$input_path"
47306    fi
47307  fi
47308
47309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47310  if test "x$test_cygdrive_prefix" = x; then
47311    # As a simple fix, exclude /usr/bin since it's not a real path.
47312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47314      # a path prefixed by /cygdrive for fixpath to work.
47315      new_path="$CYGWIN_ROOT_PATH$input_path"
47316    fi
47317  fi
47318
47319
47320  if test "x$path" != "x$new_path"; then
47321    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47324  fi
47325
47326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47327
47328  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47329  has_colon=`$ECHO $path | $GREP ^.:`
47330  new_path="$path"
47331  if test "x$has_colon" = x; then
47332    # Not in mixed or Windows style, start by that.
47333    new_path=`cmd //c echo $path`
47334  fi
47335
47336
47337  input_path="$new_path"
47338  # Check if we need to convert this using DOS-style short mode. If the path
47339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47340  # take no chances and rewrite it.
47341  # Note: m4 eats our [], so we need to use [ and ] instead.
47342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47343  if test "x$has_forbidden_chars" != x; then
47344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47346  fi
47347
47348
47349  windows_path="$new_path"
47350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47351    unix_path=`$CYGPATH -u "$windows_path"`
47352    new_path="$unix_path"
47353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47355    new_path="$unix_path"
47356  fi
47357
47358  if test "x$path" != "x$new_path"; then
47359    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47362  fi
47363
47364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47366
47367    else
47368      # We're on a unix platform. Hooray! :)
47369      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47370      has_space=`$ECHO "$path" | $GREP " "`
47371      if test "x$has_space" != x; then
47372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47375      fi
47376
47377      # Use eval to expand a potential ~
47378      eval path="$path"
47379      if test ! -f "$path" && test ! -d "$path"; then
47380        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47381      fi
47382
47383      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47384    fi
47385  fi
47386
47387
47388  # Only process if variable expands to non-empty
47389
47390  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47392
47393  # Input might be given as Windows format, start by converting to
47394  # unix format.
47395  path="$POTENTIAL_FREETYPE_LIB_PATH"
47396  new_path=`$CYGPATH -u "$path"`
47397
47398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47401  # "foo.exe" is OK but "foo" is an error.
47402  #
47403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47404  # It is also a way to make sure we got the proper file name for the real test later on.
47405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47406  if test "x$test_shortpath" = x; then
47407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47409    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47410  fi
47411
47412  # Call helper function which possibly converts this using DOS-style short mode.
47413  # If so, the updated path is stored in $new_path.
47414
47415  input_path="$new_path"
47416  # Check if we need to convert this using DOS-style short mode. If the path
47417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47418  # take no chances and rewrite it.
47419  # Note: m4 eats our [], so we need to use [ and ] instead.
47420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47421  if test "x$has_forbidden_chars" != x; then
47422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47426      # Going to short mode and back again did indeed matter. Since short mode is
47427      # case insensitive, let's make it lowercase to improve readability.
47428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47429      # Now convert it back to Unix-style (cygpath)
47430      input_path=`$CYGPATH -u "$shortmode_path"`
47431      new_path="$input_path"
47432    fi
47433  fi
47434
47435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47436  if test "x$test_cygdrive_prefix" = x; then
47437    # As a simple fix, exclude /usr/bin since it's not a real path.
47438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47440      # a path prefixed by /cygdrive for fixpath to work.
47441      new_path="$CYGWIN_ROOT_PATH$input_path"
47442    fi
47443  fi
47444
47445
47446  if test "x$path" != "x$new_path"; then
47447    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47450  fi
47451
47452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47453
47454  path="$POTENTIAL_FREETYPE_LIB_PATH"
47455  has_colon=`$ECHO $path | $GREP ^.:`
47456  new_path="$path"
47457  if test "x$has_colon" = x; then
47458    # Not in mixed or Windows style, start by that.
47459    new_path=`cmd //c echo $path`
47460  fi
47461
47462
47463  input_path="$new_path"
47464  # Check if we need to convert this using DOS-style short mode. If the path
47465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47466  # take no chances and rewrite it.
47467  # Note: m4 eats our [], so we need to use [ and ] instead.
47468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47469  if test "x$has_forbidden_chars" != x; then
47470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47472  fi
47473
47474
47475  windows_path="$new_path"
47476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47477    unix_path=`$CYGPATH -u "$windows_path"`
47478    new_path="$unix_path"
47479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47481    new_path="$unix_path"
47482  fi
47483
47484  if test "x$path" != "x$new_path"; then
47485    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47487$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47488  fi
47489
47490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47492
47493    else
47494      # We're on a unix platform. Hooray! :)
47495      path="$POTENTIAL_FREETYPE_LIB_PATH"
47496      has_space=`$ECHO "$path" | $GREP " "`
47497      if test "x$has_space" != x; then
47498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47501      fi
47502
47503      # Use eval to expand a potential ~
47504      eval path="$path"
47505      if test ! -f "$path" && test ! -d "$path"; then
47506        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47507      fi
47508
47509      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47510    fi
47511  fi
47512
47513
47514    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47516$as_echo_n "checking for freetype includes... " >&6; }
47517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47518$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47519    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47521$as_echo_n "checking for freetype libraries... " >&6; }
47522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47523$as_echo "$FREETYPE_LIB_PATH" >&6; }
47524  fi
47525
47526            else
47527
47528  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47529  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47530  METHOD="well-known location"
47531
47532  # Let's start with an optimistic view of the world :-)
47533  FOUND_FREETYPE=yes
47534
47535  # First look for the canonical freetype main include file ft2build.h.
47536  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47537    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47538    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47539    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47540      # Fail.
47541      FOUND_FREETYPE=no
47542    fi
47543  fi
47544
47545  if test "x$FOUND_FREETYPE" = xyes; then
47546    # Include file found, let's continue the sanity check.
47547    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47548$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47549
47550    # Reset to default value
47551    FREETYPE_BASE_NAME=freetype
47552    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47553    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47554      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47555          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47556        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47557        # for the .6 version explicitly.
47558        FREETYPE_BASE_NAME=freetype.6
47559        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47560        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47561$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47562      else
47563        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47564$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47565        FOUND_FREETYPE=no
47566      fi
47567    else
47568      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47569        # On Windows, we will need both .lib and .dll file.
47570        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47571          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47572$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47573          FOUND_FREETYPE=no
47574        fi
47575      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47576          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47577        # Found lib in isa dir, use that instead.
47578        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47579        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47580$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47581      fi
47582    fi
47583  fi
47584
47585  if test "x$FOUND_FREETYPE" = xyes; then
47586
47587  # Only process if variable expands to non-empty
47588
47589  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47591
47592  # Input might be given as Windows format, start by converting to
47593  # unix format.
47594  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47595  new_path=`$CYGPATH -u "$path"`
47596
47597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47600  # "foo.exe" is OK but "foo" is an error.
47601  #
47602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47603  # It is also a way to make sure we got the proper file name for the real test later on.
47604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47605  if test "x$test_shortpath" = x; then
47606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47607$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47608    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47609  fi
47610
47611  # Call helper function which possibly converts this using DOS-style short mode.
47612  # If so, the updated path is stored in $new_path.
47613
47614  input_path="$new_path"
47615  # Check if we need to convert this using DOS-style short mode. If the path
47616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47617  # take no chances and rewrite it.
47618  # Note: m4 eats our [], so we need to use [ and ] instead.
47619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47620  if test "x$has_forbidden_chars" != x; then
47621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47625      # Going to short mode and back again did indeed matter. Since short mode is
47626      # case insensitive, let's make it lowercase to improve readability.
47627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47628      # Now convert it back to Unix-style (cygpath)
47629      input_path=`$CYGPATH -u "$shortmode_path"`
47630      new_path="$input_path"
47631    fi
47632  fi
47633
47634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47635  if test "x$test_cygdrive_prefix" = x; then
47636    # As a simple fix, exclude /usr/bin since it's not a real path.
47637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47639      # a path prefixed by /cygdrive for fixpath to work.
47640      new_path="$CYGWIN_ROOT_PATH$input_path"
47641    fi
47642  fi
47643
47644
47645  if test "x$path" != "x$new_path"; then
47646    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47649  fi
47650
47651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47652
47653  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47654  has_colon=`$ECHO $path | $GREP ^.:`
47655  new_path="$path"
47656  if test "x$has_colon" = x; then
47657    # Not in mixed or Windows style, start by that.
47658    new_path=`cmd //c echo $path`
47659  fi
47660
47661
47662  input_path="$new_path"
47663  # Check if we need to convert this using DOS-style short mode. If the path
47664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47665  # take no chances and rewrite it.
47666  # Note: m4 eats our [], so we need to use [ and ] instead.
47667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47668  if test "x$has_forbidden_chars" != x; then
47669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47671  fi
47672
47673
47674  windows_path="$new_path"
47675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47676    unix_path=`$CYGPATH -u "$windows_path"`
47677    new_path="$unix_path"
47678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47680    new_path="$unix_path"
47681  fi
47682
47683  if test "x$path" != "x$new_path"; then
47684    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47686$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47687  fi
47688
47689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47691
47692    else
47693      # We're on a unix platform. Hooray! :)
47694      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47695      has_space=`$ECHO "$path" | $GREP " "`
47696      if test "x$has_space" != x; then
47697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47700      fi
47701
47702      # Use eval to expand a potential ~
47703      eval path="$path"
47704      if test ! -f "$path" && test ! -d "$path"; then
47705        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47706      fi
47707
47708      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47709    fi
47710  fi
47711
47712
47713  # Only process if variable expands to non-empty
47714
47715  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47717
47718  # Input might be given as Windows format, start by converting to
47719  # unix format.
47720  path="$POTENTIAL_FREETYPE_LIB_PATH"
47721  new_path=`$CYGPATH -u "$path"`
47722
47723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47726  # "foo.exe" is OK but "foo" is an error.
47727  #
47728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47729  # It is also a way to make sure we got the proper file name for the real test later on.
47730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47731  if test "x$test_shortpath" = x; then
47732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47734    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47735  fi
47736
47737  # Call helper function which possibly converts this using DOS-style short mode.
47738  # If so, the updated path is stored in $new_path.
47739
47740  input_path="$new_path"
47741  # Check if we need to convert this using DOS-style short mode. If the path
47742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47743  # take no chances and rewrite it.
47744  # Note: m4 eats our [], so we need to use [ and ] instead.
47745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47746  if test "x$has_forbidden_chars" != x; then
47747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47751      # Going to short mode and back again did indeed matter. Since short mode is
47752      # case insensitive, let's make it lowercase to improve readability.
47753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47754      # Now convert it back to Unix-style (cygpath)
47755      input_path=`$CYGPATH -u "$shortmode_path"`
47756      new_path="$input_path"
47757    fi
47758  fi
47759
47760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47761  if test "x$test_cygdrive_prefix" = x; then
47762    # As a simple fix, exclude /usr/bin since it's not a real path.
47763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47765      # a path prefixed by /cygdrive for fixpath to work.
47766      new_path="$CYGWIN_ROOT_PATH$input_path"
47767    fi
47768  fi
47769
47770
47771  if test "x$path" != "x$new_path"; then
47772    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47775  fi
47776
47777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47778
47779  path="$POTENTIAL_FREETYPE_LIB_PATH"
47780  has_colon=`$ECHO $path | $GREP ^.:`
47781  new_path="$path"
47782  if test "x$has_colon" = x; then
47783    # Not in mixed or Windows style, start by that.
47784    new_path=`cmd //c echo $path`
47785  fi
47786
47787
47788  input_path="$new_path"
47789  # Check if we need to convert this using DOS-style short mode. If the path
47790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47791  # take no chances and rewrite it.
47792  # Note: m4 eats our [], so we need to use [ and ] instead.
47793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47794  if test "x$has_forbidden_chars" != x; then
47795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47797  fi
47798
47799
47800  windows_path="$new_path"
47801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47802    unix_path=`$CYGPATH -u "$windows_path"`
47803    new_path="$unix_path"
47804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47806    new_path="$unix_path"
47807  fi
47808
47809  if test "x$path" != "x$new_path"; then
47810    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47813  fi
47814
47815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47817
47818    else
47819      # We're on a unix platform. Hooray! :)
47820      path="$POTENTIAL_FREETYPE_LIB_PATH"
47821      has_space=`$ECHO "$path" | $GREP " "`
47822      if test "x$has_space" != x; then
47823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47826      fi
47827
47828      # Use eval to expand a potential ~
47829      eval path="$path"
47830      if test ! -f "$path" && test ! -d "$path"; then
47831        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47832      fi
47833
47834      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47835    fi
47836  fi
47837
47838
47839    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47841$as_echo_n "checking for freetype includes... " >&6; }
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47843$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47844    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47846$as_echo_n "checking for freetype libraries... " >&6; }
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47848$as_echo "$FREETYPE_LIB_PATH" >&6; }
47849  fi
47850
47851              if test "x$FOUND_FREETYPE" != xyes; then
47852
47853  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47854  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47855  METHOD="well-known location"
47856
47857  # Let's start with an optimistic view of the world :-)
47858  FOUND_FREETYPE=yes
47859
47860  # First look for the canonical freetype main include file ft2build.h.
47861  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47862    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47863    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47864    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47865      # Fail.
47866      FOUND_FREETYPE=no
47867    fi
47868  fi
47869
47870  if test "x$FOUND_FREETYPE" = xyes; then
47871    # Include file found, let's continue the sanity check.
47872    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47873$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47874
47875    # Reset to default value
47876    FREETYPE_BASE_NAME=freetype
47877    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47878    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47879      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47880          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47881        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47882        # for the .6 version explicitly.
47883        FREETYPE_BASE_NAME=freetype.6
47884        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47885        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47886$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47887      else
47888        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47889$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47890        FOUND_FREETYPE=no
47891      fi
47892    else
47893      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47894        # On Windows, we will need both .lib and .dll file.
47895        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47896          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47897$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47898          FOUND_FREETYPE=no
47899        fi
47900      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47901          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47902        # Found lib in isa dir, use that instead.
47903        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47904        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47905$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47906      fi
47907    fi
47908  fi
47909
47910  if test "x$FOUND_FREETYPE" = xyes; then
47911
47912  # Only process if variable expands to non-empty
47913
47914  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47916
47917  # Input might be given as Windows format, start by converting to
47918  # unix format.
47919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47920  new_path=`$CYGPATH -u "$path"`
47921
47922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47925  # "foo.exe" is OK but "foo" is an error.
47926  #
47927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47928  # It is also a way to make sure we got the proper file name for the real test later on.
47929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47930  if test "x$test_shortpath" = x; then
47931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47932$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47933    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47934  fi
47935
47936  # Call helper function which possibly converts this using DOS-style short mode.
47937  # If so, the updated path is stored in $new_path.
47938
47939  input_path="$new_path"
47940  # Check if we need to convert this using DOS-style short mode. If the path
47941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47942  # take no chances and rewrite it.
47943  # Note: m4 eats our [], so we need to use [ and ] instead.
47944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47945  if test "x$has_forbidden_chars" != x; then
47946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47950      # Going to short mode and back again did indeed matter. Since short mode is
47951      # case insensitive, let's make it lowercase to improve readability.
47952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47953      # Now convert it back to Unix-style (cygpath)
47954      input_path=`$CYGPATH -u "$shortmode_path"`
47955      new_path="$input_path"
47956    fi
47957  fi
47958
47959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47960  if test "x$test_cygdrive_prefix" = x; then
47961    # As a simple fix, exclude /usr/bin since it's not a real path.
47962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47964      # a path prefixed by /cygdrive for fixpath to work.
47965      new_path="$CYGWIN_ROOT_PATH$input_path"
47966    fi
47967  fi
47968
47969
47970  if test "x$path" != "x$new_path"; then
47971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47974  fi
47975
47976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47977
47978  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47979  has_colon=`$ECHO $path | $GREP ^.:`
47980  new_path="$path"
47981  if test "x$has_colon" = x; then
47982    # Not in mixed or Windows style, start by that.
47983    new_path=`cmd //c echo $path`
47984  fi
47985
47986
47987  input_path="$new_path"
47988  # Check if we need to convert this using DOS-style short mode. If the path
47989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47990  # take no chances and rewrite it.
47991  # Note: m4 eats our [], so we need to use [ and ] instead.
47992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47993  if test "x$has_forbidden_chars" != x; then
47994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47996  fi
47997
47998
47999  windows_path="$new_path"
48000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48001    unix_path=`$CYGPATH -u "$windows_path"`
48002    new_path="$unix_path"
48003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48005    new_path="$unix_path"
48006  fi
48007
48008  if test "x$path" != "x$new_path"; then
48009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48012  fi
48013
48014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48016
48017    else
48018      # We're on a unix platform. Hooray! :)
48019      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48020      has_space=`$ECHO "$path" | $GREP " "`
48021      if test "x$has_space" != x; then
48022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48025      fi
48026
48027      # Use eval to expand a potential ~
48028      eval path="$path"
48029      if test ! -f "$path" && test ! -d "$path"; then
48030        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48031      fi
48032
48033      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48034    fi
48035  fi
48036
48037
48038  # Only process if variable expands to non-empty
48039
48040  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48042
48043  # Input might be given as Windows format, start by converting to
48044  # unix format.
48045  path="$POTENTIAL_FREETYPE_LIB_PATH"
48046  new_path=`$CYGPATH -u "$path"`
48047
48048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48051  # "foo.exe" is OK but "foo" is an error.
48052  #
48053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48054  # It is also a way to make sure we got the proper file name for the real test later on.
48055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48056  if test "x$test_shortpath" = x; then
48057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48059    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48060  fi
48061
48062  # Call helper function which possibly converts this using DOS-style short mode.
48063  # If so, the updated path is stored in $new_path.
48064
48065  input_path="$new_path"
48066  # Check if we need to convert this using DOS-style short mode. If the path
48067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48068  # take no chances and rewrite it.
48069  # Note: m4 eats our [], so we need to use [ and ] instead.
48070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48071  if test "x$has_forbidden_chars" != x; then
48072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48076      # Going to short mode and back again did indeed matter. Since short mode is
48077      # case insensitive, let's make it lowercase to improve readability.
48078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48079      # Now convert it back to Unix-style (cygpath)
48080      input_path=`$CYGPATH -u "$shortmode_path"`
48081      new_path="$input_path"
48082    fi
48083  fi
48084
48085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48086  if test "x$test_cygdrive_prefix" = x; then
48087    # As a simple fix, exclude /usr/bin since it's not a real path.
48088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48090      # a path prefixed by /cygdrive for fixpath to work.
48091      new_path="$CYGWIN_ROOT_PATH$input_path"
48092    fi
48093  fi
48094
48095
48096  if test "x$path" != "x$new_path"; then
48097    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48100  fi
48101
48102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48103
48104  path="$POTENTIAL_FREETYPE_LIB_PATH"
48105  has_colon=`$ECHO $path | $GREP ^.:`
48106  new_path="$path"
48107  if test "x$has_colon" = x; then
48108    # Not in mixed or Windows style, start by that.
48109    new_path=`cmd //c echo $path`
48110  fi
48111
48112
48113  input_path="$new_path"
48114  # Check if we need to convert this using DOS-style short mode. If the path
48115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48116  # take no chances and rewrite it.
48117  # Note: m4 eats our [], so we need to use [ and ] instead.
48118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48119  if test "x$has_forbidden_chars" != x; then
48120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48122  fi
48123
48124
48125  windows_path="$new_path"
48126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48127    unix_path=`$CYGPATH -u "$windows_path"`
48128    new_path="$unix_path"
48129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48131    new_path="$unix_path"
48132  fi
48133
48134  if test "x$path" != "x$new_path"; then
48135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48138  fi
48139
48140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48142
48143    else
48144      # We're on a unix platform. Hooray! :)
48145      path="$POTENTIAL_FREETYPE_LIB_PATH"
48146      has_space=`$ECHO "$path" | $GREP " "`
48147      if test "x$has_space" != x; then
48148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48151      fi
48152
48153      # Use eval to expand a potential ~
48154      eval path="$path"
48155      if test ! -f "$path" && test ! -d "$path"; then
48156        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48157      fi
48158
48159      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48160    fi
48161  fi
48162
48163
48164    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48166$as_echo_n "checking for freetype includes... " >&6; }
48167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48168$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48169    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48171$as_echo_n "checking for freetype libraries... " >&6; }
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48173$as_echo "$FREETYPE_LIB_PATH" >&6; }
48174  fi
48175
48176              fi
48177            fi
48178          fi
48179        fi
48180      fi # end check in well-known locations
48181
48182      if test "x$FOUND_FREETYPE" != xyes; then
48183
48184  # Print a helpful message on how to acquire the necessary build dependency.
48185  # freetype is the help tag: freetype, cups, pulse, alsa etc
48186  MISSING_DEPENDENCY=freetype
48187
48188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48189    cygwin_help $MISSING_DEPENDENCY
48190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48191    msys_help $MISSING_DEPENDENCY
48192  else
48193    PKGHANDLER_COMMAND=
48194
48195    case $PKGHANDLER in
48196      apt-get)
48197        apt_help     $MISSING_DEPENDENCY ;;
48198      yum)
48199        yum_help     $MISSING_DEPENDENCY ;;
48200      port)
48201        port_help    $MISSING_DEPENDENCY ;;
48202      pkgutil)
48203        pkgutil_help $MISSING_DEPENDENCY ;;
48204      pkgadd)
48205        pkgadd_help  $MISSING_DEPENDENCY ;;
48206    esac
48207
48208    if test "x$PKGHANDLER_COMMAND" != x; then
48209      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48210    fi
48211  fi
48212
48213        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48214      fi
48215    fi # end user specified settings
48216
48217    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48218    if test "x$FREETYPE_CFLAGS" = x; then
48219
48220  # Only process if variable expands to non-empty
48221
48222  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48224
48225  # Input might be given as Windows format, start by converting to
48226  # unix format.
48227  path="$FREETYPE_INCLUDE_PATH"
48228  new_path=`$CYGPATH -u "$path"`
48229
48230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48233  # "foo.exe" is OK but "foo" is an error.
48234  #
48235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48236  # It is also a way to make sure we got the proper file name for the real test later on.
48237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48238  if test "x$test_shortpath" = x; then
48239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48240$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48241    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48242  fi
48243
48244  # Call helper function which possibly converts this using DOS-style short mode.
48245  # If so, the updated path is stored in $new_path.
48246
48247  input_path="$new_path"
48248  # Check if we need to convert this using DOS-style short mode. If the path
48249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48250  # take no chances and rewrite it.
48251  # Note: m4 eats our [], so we need to use [ and ] instead.
48252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48253  if test "x$has_forbidden_chars" != x; then
48254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48258      # Going to short mode and back again did indeed matter. Since short mode is
48259      # case insensitive, let's make it lowercase to improve readability.
48260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48261      # Now convert it back to Unix-style (cygpath)
48262      input_path=`$CYGPATH -u "$shortmode_path"`
48263      new_path="$input_path"
48264    fi
48265  fi
48266
48267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48268  if test "x$test_cygdrive_prefix" = x; then
48269    # As a simple fix, exclude /usr/bin since it's not a real path.
48270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48272      # a path prefixed by /cygdrive for fixpath to work.
48273      new_path="$CYGWIN_ROOT_PATH$input_path"
48274    fi
48275  fi
48276
48277
48278  if test "x$path" != "x$new_path"; then
48279    FREETYPE_INCLUDE_PATH="$new_path"
48280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48281$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48282  fi
48283
48284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48285
48286  path="$FREETYPE_INCLUDE_PATH"
48287  has_colon=`$ECHO $path | $GREP ^.:`
48288  new_path="$path"
48289  if test "x$has_colon" = x; then
48290    # Not in mixed or Windows style, start by that.
48291    new_path=`cmd //c echo $path`
48292  fi
48293
48294
48295  input_path="$new_path"
48296  # Check if we need to convert this using DOS-style short mode. If the path
48297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48298  # take no chances and rewrite it.
48299  # Note: m4 eats our [], so we need to use [ and ] instead.
48300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48301  if test "x$has_forbidden_chars" != x; then
48302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48304  fi
48305
48306
48307  windows_path="$new_path"
48308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48309    unix_path=`$CYGPATH -u "$windows_path"`
48310    new_path="$unix_path"
48311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48313    new_path="$unix_path"
48314  fi
48315
48316  if test "x$path" != "x$new_path"; then
48317    FREETYPE_INCLUDE_PATH="$new_path"
48318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48319$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48320  fi
48321
48322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48324
48325    else
48326      # We're on a unix platform. Hooray! :)
48327      path="$FREETYPE_INCLUDE_PATH"
48328      has_space=`$ECHO "$path" | $GREP " "`
48329      if test "x$has_space" != x; then
48330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48331$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48333      fi
48334
48335      # Use eval to expand a potential ~
48336      eval path="$path"
48337      if test ! -f "$path" && test ! -d "$path"; then
48338        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48339      fi
48340
48341      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48342    fi
48343  fi
48344
48345      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48346        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48347      else
48348        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48349      fi
48350    fi
48351
48352    if test "x$FREETYPE_LIBS" = x; then
48353
48354  # Only process if variable expands to non-empty
48355
48356  if test "x$FREETYPE_LIB_PATH" != x; then
48357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48358
48359  # Input might be given as Windows format, start by converting to
48360  # unix format.
48361  path="$FREETYPE_LIB_PATH"
48362  new_path=`$CYGPATH -u "$path"`
48363
48364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48367  # "foo.exe" is OK but "foo" is an error.
48368  #
48369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48370  # It is also a way to make sure we got the proper file name for the real test later on.
48371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48372  if test "x$test_shortpath" = x; then
48373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48374$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48375    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48376  fi
48377
48378  # Call helper function which possibly converts this using DOS-style short mode.
48379  # If so, the updated path is stored in $new_path.
48380
48381  input_path="$new_path"
48382  # Check if we need to convert this using DOS-style short mode. If the path
48383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48384  # take no chances and rewrite it.
48385  # Note: m4 eats our [], so we need to use [ and ] instead.
48386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48387  if test "x$has_forbidden_chars" != x; then
48388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48392      # Going to short mode and back again did indeed matter. Since short mode is
48393      # case insensitive, let's make it lowercase to improve readability.
48394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48395      # Now convert it back to Unix-style (cygpath)
48396      input_path=`$CYGPATH -u "$shortmode_path"`
48397      new_path="$input_path"
48398    fi
48399  fi
48400
48401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48402  if test "x$test_cygdrive_prefix" = x; then
48403    # As a simple fix, exclude /usr/bin since it's not a real path.
48404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48406      # a path prefixed by /cygdrive for fixpath to work.
48407      new_path="$CYGWIN_ROOT_PATH$input_path"
48408    fi
48409  fi
48410
48411
48412  if test "x$path" != "x$new_path"; then
48413    FREETYPE_LIB_PATH="$new_path"
48414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48415$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48416  fi
48417
48418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48419
48420  path="$FREETYPE_LIB_PATH"
48421  has_colon=`$ECHO $path | $GREP ^.:`
48422  new_path="$path"
48423  if test "x$has_colon" = x; then
48424    # Not in mixed or Windows style, start by that.
48425    new_path=`cmd //c echo $path`
48426  fi
48427
48428
48429  input_path="$new_path"
48430  # Check if we need to convert this using DOS-style short mode. If the path
48431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48432  # take no chances and rewrite it.
48433  # Note: m4 eats our [], so we need to use [ and ] instead.
48434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48435  if test "x$has_forbidden_chars" != x; then
48436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48438  fi
48439
48440
48441  windows_path="$new_path"
48442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48443    unix_path=`$CYGPATH -u "$windows_path"`
48444    new_path="$unix_path"
48445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48447    new_path="$unix_path"
48448  fi
48449
48450  if test "x$path" != "x$new_path"; then
48451    FREETYPE_LIB_PATH="$new_path"
48452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48453$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48454  fi
48455
48456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48458
48459    else
48460      # We're on a unix platform. Hooray! :)
48461      path="$FREETYPE_LIB_PATH"
48462      has_space=`$ECHO "$path" | $GREP " "`
48463      if test "x$has_space" != x; then
48464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48465$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48467      fi
48468
48469      # Use eval to expand a potential ~
48470      eval path="$path"
48471      if test ! -f "$path" && test ! -d "$path"; then
48472        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48473      fi
48474
48475      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48476    fi
48477  fi
48478
48479      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48480        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48481      else
48482        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48483      fi
48484    fi
48485
48486    # Try to compile it
48487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48488$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48489    ac_ext=cpp
48490ac_cpp='$CXXCPP $CPPFLAGS'
48491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48494
48495    PREV_CXXCFLAGS="$CXXFLAGS"
48496    PREV_LIBS="$LIBS"
48497    PREV_CXX="$CXX"
48498    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48499    LIBS="$LIBS $FREETYPE_LIBS"
48500    CXX="$FIXPATH $CXX"
48501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48502/* end confdefs.h.  */
48503
48504          #include<ft2build.h>
48505          #include FT_FREETYPE_H
48506          int main () {
48507            FT_Init_FreeType(NULL);
48508            return 0;
48509          }
48510
48511_ACEOF
48512if ac_fn_cxx_try_link "$LINENO"; then :
48513
48514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48515$as_echo "yes" >&6; }
48516
48517else
48518
48519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48520$as_echo "no" >&6; }
48521          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48522$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48523          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48524$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48525
48526
48527  # Print a helpful message on how to acquire the necessary build dependency.
48528  # freetype is the help tag: freetype, cups, pulse, alsa etc
48529  MISSING_DEPENDENCY=freetype
48530
48531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48532    cygwin_help $MISSING_DEPENDENCY
48533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48534    msys_help $MISSING_DEPENDENCY
48535  else
48536    PKGHANDLER_COMMAND=
48537
48538    case $PKGHANDLER in
48539      apt-get)
48540        apt_help     $MISSING_DEPENDENCY ;;
48541      yum)
48542        yum_help     $MISSING_DEPENDENCY ;;
48543      port)
48544        port_help    $MISSING_DEPENDENCY ;;
48545      pkgutil)
48546        pkgutil_help $MISSING_DEPENDENCY ;;
48547      pkgadd)
48548        pkgadd_help  $MISSING_DEPENDENCY ;;
48549    esac
48550
48551    if test "x$PKGHANDLER_COMMAND" != x; then
48552      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48553    fi
48554  fi
48555
48556
48557          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48558
48559
48560fi
48561rm -f core conftest.err conftest.$ac_objext \
48562    conftest$ac_exeext conftest.$ac_ext
48563    CXXCFLAGS="$PREV_CXXFLAGS"
48564    LIBS="$PREV_LIBS"
48565    CXX="$PREV_CXX"
48566    ac_ext=cpp
48567ac_cpp='$CXXCPP $CPPFLAGS'
48568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48571
48572
48573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48574$as_echo_n "checking if we should bundle freetype... " >&6; }
48575    if test "x$BUNDLE_FREETYPE" = xyes; then
48576      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48577    fi
48578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48579$as_echo "$BUNDLE_FREETYPE" >&6; }
48580
48581  fi # end freetype needed
48582
48583
48584
48585
48586
48587
48588
48589  ###############################################################################
48590  #
48591  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48592  #
48593
48594# Check whether --with-alsa was given.
48595if test "${with_alsa+set}" = set; then :
48596  withval=$with_alsa;
48597fi
48598
48599
48600# Check whether --with-alsa-include was given.
48601if test "${with_alsa_include+set}" = set; then :
48602  withval=$with_alsa_include;
48603fi
48604
48605
48606# Check whether --with-alsa-lib was given.
48607if test "${with_alsa_lib+set}" = set; then :
48608  withval=$with_alsa_lib;
48609fi
48610
48611
48612  if test "x$ALSA_NOT_NEEDED" = xyes; then
48613    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48614      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48615$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48616    fi
48617    ALSA_CFLAGS=
48618    ALSA_LIBS=
48619  else
48620    ALSA_FOUND=no
48621
48622    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48623      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48624    fi
48625
48626    if test "x${with_alsa}" != x; then
48627      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48628      ALSA_CFLAGS="-I${with_alsa}/include"
48629      ALSA_FOUND=yes
48630    fi
48631    if test "x${with_alsa_include}" != x; then
48632      ALSA_CFLAGS="-I${with_alsa_include}"
48633      ALSA_FOUND=yes
48634    fi
48635    if test "x${with_alsa_lib}" != x; then
48636      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48637      ALSA_FOUND=yes
48638    fi
48639    if test "x$ALSA_FOUND" = xno; then
48640
48641
48642  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48643    # Source the builddeps file again, to make sure it uses the latest variables!
48644    . $builddepsfile
48645    # Look for a target and build machine specific resource!
48646    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48647    if test "x$resource" = x; then
48648      # Ok, lets instead look for a target specific resource
48649      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48650    fi
48651    if test "x$resource" = x; then
48652      # Ok, lets instead look for a build specific resource
48653      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48654    fi
48655    if test "x$resource" = x; then
48656      # Ok, lets instead look for a generic resource
48657      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48658      resource=${builddep_alsa}
48659    fi
48660    if test "x$resource" != x; then
48661      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48662$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48663      # If the resource in the builddeps.conf file is an existing directory,
48664      # for example /java/linux/cups
48665      if test -d ${resource}; then
48666        depdir=${resource}
48667      else
48668
48669  # alsa is for example mymodule
48670  # $resource is for example libs/general/libmymod_1_2_3.zip
48671  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48672  # $with_builddeps_dir is for example /localhome/builddeps
48673  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48674  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48675  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48676  filename=`basename $resource`
48677  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48678  filebase=${filename%%.*}
48679  extension=${filename#*.}
48680  installdir=$with_builddeps_dir/$filebase
48681  if test ! -f $installdir/$filename.unpacked; then
48682    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48683$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48684    if test ! -d $installdir; then
48685      mkdir -p $installdir
48686    fi
48687    if test ! -d $installdir; then
48688      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48689    fi
48690    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48691    touch $tmpfile
48692    if test ! -f $tmpfile; then
48693      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48694    fi
48695
48696  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48697  # $tmpfile is the local file name for the downloaded file.
48698  VALID_TOOL=no
48699  if test "x$BDEPS_FTP" = xwget; then
48700    VALID_TOOL=yes
48701    wget -O $tmpfile $with_builddeps_server/$resource
48702  fi
48703  if test "x$BDEPS_FTP" = xlftp; then
48704    VALID_TOOL=yes
48705    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48706  fi
48707  if test "x$BDEPS_FTP" = xftp; then
48708    VALID_TOOL=yes
48709    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48710    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48711    FTPUSERPWD=${FTPSERVER%%@*}
48712    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48713      FTPUSER=${userpwd%%:*}
48714      FTPPWD=${userpwd#*@}
48715      FTPSERVER=${FTPSERVER#*@}
48716    else
48717      FTPUSER=ftp
48718      FTPPWD=ftp
48719    fi
48720    # the "pass" command does not work on some
48721    # ftp clients (read ftp.exe) but if it works,
48722    # passive mode is better!
48723    ( \
48724        echo "user $FTPUSER $FTPPWD"        ; \
48725        echo "pass"                         ; \
48726        echo "bin"                          ; \
48727        echo "get $FTPPATH $tmpfile"              ; \
48728    ) | ftp -in $FTPSERVER
48729  fi
48730  if test "x$VALID_TOOL" != xyes; then
48731    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48732  fi
48733
48734    mv $tmpfile $installdir/$filename
48735    if test ! -s $installdir/$filename; then
48736      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48737    fi
48738    case "$extension" in
48739      zip)  echo "Unzipping $installdir/$filename..."
48740        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48741        ;;
48742      tar.gz) echo "Untaring $installdir/$filename..."
48743        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48744        ;;
48745      tgz) echo "Untaring $installdir/$filename..."
48746        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48747        ;;
48748      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48749        ;;
48750    esac
48751  fi
48752  if test -f $installdir/$filename.unpacked; then
48753    depdir=$installdir
48754  fi
48755
48756      fi
48757      # Source the builddeps file again, because in the previous command, the depdir
48758      # was updated to point at the current build dependency install directory.
48759      . $builddepsfile
48760      # Now extract variables from the builddeps.conf files.
48761      theroot=${builddep_alsa_ROOT}
48762      thecflags=${builddep_alsa_CFLAGS}
48763      thelibs=${builddep_alsa_LIBS}
48764      if test "x$depdir" = x; then
48765        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48766      fi
48767      ALSA=$depdir
48768      if test "x$theroot" != x; then
48769        ALSA="$theroot"
48770      fi
48771      if test "x$thecflags" != x; then
48772        ALSA_CFLAGS="$thecflags"
48773      fi
48774      if test "x$thelibs" != x; then
48775        ALSA_LIBS="$thelibs"
48776      fi
48777      ALSA_FOUND=yes
48778      else ALSA_FOUND=no
48779
48780    fi
48781    else ALSA_FOUND=no
48782
48783  fi
48784
48785    fi
48786    # Do not try pkg-config if we have a sysroot set.
48787    if test "x$SYSROOT" = x; then
48788      if test "x$ALSA_FOUND" = xno; then
48789
48790pkg_failed=no
48791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48792$as_echo_n "checking for ALSA... " >&6; }
48793
48794if test -n "$ALSA_CFLAGS"; then
48795    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48796 elif test -n "$PKG_CONFIG"; then
48797    if test -n "$PKG_CONFIG" && \
48798    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48799  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48800  ac_status=$?
48801  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48802  test $ac_status = 0; }; then
48803  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48804else
48805  pkg_failed=yes
48806fi
48807 else
48808    pkg_failed=untried
48809fi
48810if test -n "$ALSA_LIBS"; then
48811    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48812 elif test -n "$PKG_CONFIG"; then
48813    if test -n "$PKG_CONFIG" && \
48814    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48815  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48816  ac_status=$?
48817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48818  test $ac_status = 0; }; then
48819  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48820else
48821  pkg_failed=yes
48822fi
48823 else
48824    pkg_failed=untried
48825fi
48826
48827
48828
48829if test $pkg_failed = yes; then
48830
48831if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48832        _pkg_short_errors_supported=yes
48833else
48834        _pkg_short_errors_supported=no
48835fi
48836        if test $_pkg_short_errors_supported = yes; then
48837	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48838        else
48839	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48840        fi
48841	# Put the nasty error message in config.log where it belongs
48842	echo "$ALSA_PKG_ERRORS" >&5
48843
48844	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48845$as_echo "no" >&6; }
48846                ALSA_FOUND=no
48847elif test $pkg_failed = untried; then
48848	ALSA_FOUND=no
48849else
48850	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48851	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48853$as_echo "yes" >&6; }
48854	ALSA_FOUND=yes
48855fi
48856      fi
48857    fi
48858    if test "x$ALSA_FOUND" = xno; then
48859      for ac_header in alsa/asoundlib.h
48860do :
48861  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48862if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48863  cat >>confdefs.h <<_ACEOF
48864#define HAVE_ALSA_ASOUNDLIB_H 1
48865_ACEOF
48866
48867            ALSA_FOUND=yes
48868            ALSA_CFLAGS=-Iignoreme
48869            ALSA_LIBS=-lasound
48870            DEFAULT_ALSA=yes
48871
48872else
48873  ALSA_FOUND=no
48874fi
48875
48876done
48877
48878    fi
48879    if test "x$ALSA_FOUND" = xno; then
48880
48881  # Print a helpful message on how to acquire the necessary build dependency.
48882  # alsa is the help tag: freetype, cups, pulse, alsa etc
48883  MISSING_DEPENDENCY=alsa
48884
48885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48886    cygwin_help $MISSING_DEPENDENCY
48887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48888    msys_help $MISSING_DEPENDENCY
48889  else
48890    PKGHANDLER_COMMAND=
48891
48892    case $PKGHANDLER in
48893      apt-get)
48894        apt_help     $MISSING_DEPENDENCY ;;
48895      yum)
48896        yum_help     $MISSING_DEPENDENCY ;;
48897      port)
48898        port_help    $MISSING_DEPENDENCY ;;
48899      pkgutil)
48900        pkgutil_help $MISSING_DEPENDENCY ;;
48901      pkgadd)
48902        pkgadd_help  $MISSING_DEPENDENCY ;;
48903    esac
48904
48905    if test "x$PKGHANDLER_COMMAND" != x; then
48906      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48907    fi
48908  fi
48909
48910      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48911    fi
48912  fi
48913
48914
48915
48916
48917
48918
48919  ###############################################################################
48920  #
48921  # Check for the jpeg library
48922  #
48923
48924
48925# Check whether --with-libjpeg was given.
48926if test "${with_libjpeg+set}" = set; then :
48927  withval=$with_libjpeg;
48928fi
48929
48930
48931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48932$as_echo_n "checking for which libjpeg to use... " >&6; }
48933
48934  # default is bundled
48935  DEFAULT_LIBJPEG=bundled
48936
48937  #
48938  # if user didn't specify, use DEFAULT_LIBJPEG
48939  #
48940  if test "x${with_libjpeg}" = "x"; then
48941    with_libjpeg=${DEFAULT_LIBJPEG}
48942  fi
48943
48944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48945$as_echo "${with_libjpeg}" >&6; }
48946
48947  if test "x${with_libjpeg}" = "xbundled"; then
48948    USE_EXTERNAL_LIBJPEG=false
48949  elif test "x${with_libjpeg}" = "xsystem"; then
48950    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48951if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48952
48953else
48954   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48955fi
48956
48957
48958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48959$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48960if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48961  $as_echo_n "(cached) " >&6
48962else
48963  ac_check_lib_save_LIBS=$LIBS
48964LIBS="-ljpeg  $LIBS"
48965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48966/* end confdefs.h.  */
48967
48968/* Override any GCC internal prototype to avoid an error.
48969   Use char because int might match the return type of a GCC
48970   builtin and then its argument prototype would still apply.  */
48971#ifdef __cplusplus
48972extern "C"
48973#endif
48974char jpeg_CreateDecompress ();
48975int
48976main ()
48977{
48978return jpeg_CreateDecompress ();
48979  ;
48980  return 0;
48981}
48982_ACEOF
48983if ac_fn_cxx_try_link "$LINENO"; then :
48984  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48985else
48986  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48987fi
48988rm -f core conftest.err conftest.$ac_objext \
48989    conftest$ac_exeext conftest.$ac_ext
48990LIBS=$ac_check_lib_save_LIBS
48991fi
48992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48993$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48994if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48995  cat >>confdefs.h <<_ACEOF
48996#define HAVE_LIBJPEG 1
48997_ACEOF
48998
48999  LIBS="-ljpeg $LIBS"
49000
49001else
49002   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49003fi
49004
49005
49006    USE_EXTERNAL_LIBJPEG=true
49007  else
49008    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49009  fi
49010
49011
49012
49013  ###############################################################################
49014  #
49015  # Check for the gif library
49016  #
49017
49018
49019# Check whether --with-giflib was given.
49020if test "${with_giflib+set}" = set; then :
49021  withval=$with_giflib;
49022fi
49023
49024
49025
49026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49027$as_echo_n "checking for which giflib to use... " >&6; }
49028
49029  # default is bundled
49030  DEFAULT_GIFLIB=bundled
49031
49032  #
49033  # if user didn't specify, use DEFAULT_GIFLIB
49034  #
49035  if test "x${with_giflib}" = "x"; then
49036    with_giflib=${DEFAULT_GIFLIB}
49037  fi
49038
49039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49040$as_echo "${with_giflib}" >&6; }
49041
49042  if test "x${with_giflib}" = "xbundled"; then
49043    USE_EXTERNAL_LIBGIF=false
49044  elif test "x${with_giflib}" = "xsystem"; then
49045    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49046if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49047
49048else
49049   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49050fi
49051
49052
49053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49054$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49055if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49056  $as_echo_n "(cached) " >&6
49057else
49058  ac_check_lib_save_LIBS=$LIBS
49059LIBS="-lgif  $LIBS"
49060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49061/* end confdefs.h.  */
49062
49063/* Override any GCC internal prototype to avoid an error.
49064   Use char because int might match the return type of a GCC
49065   builtin and then its argument prototype would still apply.  */
49066#ifdef __cplusplus
49067extern "C"
49068#endif
49069char DGifGetCode ();
49070int
49071main ()
49072{
49073return DGifGetCode ();
49074  ;
49075  return 0;
49076}
49077_ACEOF
49078if ac_fn_cxx_try_link "$LINENO"; then :
49079  ac_cv_lib_gif_DGifGetCode=yes
49080else
49081  ac_cv_lib_gif_DGifGetCode=no
49082fi
49083rm -f core conftest.err conftest.$ac_objext \
49084    conftest$ac_exeext conftest.$ac_ext
49085LIBS=$ac_check_lib_save_LIBS
49086fi
49087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49088$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49089if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49090  cat >>confdefs.h <<_ACEOF
49091#define HAVE_LIBGIF 1
49092_ACEOF
49093
49094  LIBS="-lgif $LIBS"
49095
49096else
49097   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49098fi
49099
49100
49101    USE_EXTERNAL_LIBGIF=true
49102  else
49103    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49104  fi
49105
49106
49107  ###############################################################################
49108  #
49109  # Check for the lcms2 library
49110  #
49111
49112
49113# Check whether --with-lcms was given.
49114if test "${with_lcms+set}" = set; then :
49115  withval=$with_lcms;
49116fi
49117
49118
49119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49120$as_echo_n "checking for which lcms to use... " >&6; }
49121
49122  DEFAULT_LCMS=bundled
49123
49124  #
49125  # If user didn't specify, use DEFAULT_LCMS
49126  #
49127  if test "x${with_lcms}" = "x"; then
49128      with_lcms=${DEFAULT_LCMS}
49129  fi
49130
49131  if test "x${with_lcms}" = "xbundled"; then
49132    USE_EXTERNAL_LCMS=false
49133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49134$as_echo "bundled" >&6; }
49135  elif test "x${with_lcms}" = "xsystem"; then
49136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49137$as_echo "system" >&6; }
49138
49139pkg_failed=no
49140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49141$as_echo_n "checking for LCMS... " >&6; }
49142
49143if test -n "$LCMS_CFLAGS"; then
49144    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49145 elif test -n "$PKG_CONFIG"; then
49146    if test -n "$PKG_CONFIG" && \
49147    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49148  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49149  ac_status=$?
49150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49151  test $ac_status = 0; }; then
49152  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49153else
49154  pkg_failed=yes
49155fi
49156 else
49157    pkg_failed=untried
49158fi
49159if test -n "$LCMS_LIBS"; then
49160    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49161 elif test -n "$PKG_CONFIG"; then
49162    if test -n "$PKG_CONFIG" && \
49163    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49164  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49165  ac_status=$?
49166  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49167  test $ac_status = 0; }; then
49168  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49169else
49170  pkg_failed=yes
49171fi
49172 else
49173    pkg_failed=untried
49174fi
49175
49176
49177
49178if test $pkg_failed = yes; then
49179
49180if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49181        _pkg_short_errors_supported=yes
49182else
49183        _pkg_short_errors_supported=no
49184fi
49185        if test $_pkg_short_errors_supported = yes; then
49186	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49187        else
49188	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49189        fi
49190	# Put the nasty error message in config.log where it belongs
49191	echo "$LCMS_PKG_ERRORS" >&5
49192
49193	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49194$as_echo "no" >&6; }
49195                LCMS_FOUND=no
49196elif test $pkg_failed = untried; then
49197	LCMS_FOUND=no
49198else
49199	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49200	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49202$as_echo "yes" >&6; }
49203	LCMS_FOUND=yes
49204fi
49205    if test "x${LCMS_FOUND}" = "xyes"; then
49206      USE_EXTERNAL_LCMS=true
49207    else
49208      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49209    fi
49210  else
49211    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49212  fi
49213
49214
49215
49216  ###############################################################################
49217  #
49218  # Check for the png library
49219  #
49220
49221
49222# Check whether --with-libpng was given.
49223if test "${with_libpng+set}" = set; then :
49224  withval=$with_libpng;
49225fi
49226
49227
49228
49229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49230$as_echo_n "checking for which libpng to use... " >&6; }
49231
49232  # default is bundled
49233  DEFAULT_LIBPNG=bundled
49234
49235  #
49236  # if user didn't specify, use DEFAULT_LIBPNG
49237  #
49238  if test "x${with_libpng}" = "x"; then
49239      with_libpng=${DEFAULT_LIBPNG}
49240  fi
49241
49242  if test "x${with_libpng}" = "xbundled"; then
49243      USE_EXTERNAL_LIBPNG=false
49244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49245$as_echo "bundled" >&6; }
49246  elif test "x${with_libpng}" = "xsystem"; then
49247
49248pkg_failed=no
49249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49250$as_echo_n "checking for PNG... " >&6; }
49251
49252if test -n "$PNG_CFLAGS"; then
49253    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49254 elif test -n "$PKG_CONFIG"; then
49255    if test -n "$PKG_CONFIG" && \
49256    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49257  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49258  ac_status=$?
49259  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49260  test $ac_status = 0; }; then
49261  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49262else
49263  pkg_failed=yes
49264fi
49265 else
49266    pkg_failed=untried
49267fi
49268if test -n "$PNG_LIBS"; then
49269    pkg_cv_PNG_LIBS="$PNG_LIBS"
49270 elif test -n "$PKG_CONFIG"; then
49271    if test -n "$PKG_CONFIG" && \
49272    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49273  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49274  ac_status=$?
49275  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49276  test $ac_status = 0; }; then
49277  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49278else
49279  pkg_failed=yes
49280fi
49281 else
49282    pkg_failed=untried
49283fi
49284
49285
49286
49287if test $pkg_failed = yes; then
49288
49289if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49290        _pkg_short_errors_supported=yes
49291else
49292        _pkg_short_errors_supported=no
49293fi
49294        if test $_pkg_short_errors_supported = yes; then
49295	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49296        else
49297	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49298        fi
49299	# Put the nasty error message in config.log where it belongs
49300	echo "$PNG_PKG_ERRORS" >&5
49301
49302	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49303$as_echo "no" >&6; }
49304                 LIBPNG_FOUND=no
49305elif test $pkg_failed = untried; then
49306	 LIBPNG_FOUND=no
49307else
49308	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49309	PNG_LIBS=$pkg_cv_PNG_LIBS
49310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49311$as_echo "yes" >&6; }
49312	 LIBPNG_FOUND=yes
49313fi
49314      if test "x${LIBPNG_FOUND}" = "xyes"; then
49315          USE_EXTERNAL_LIBPNG=true
49316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49317$as_echo "system" >&6; }
49318      else
49319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49320$as_echo "system not found" >&6; }
49321          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49322      fi
49323  else
49324      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49325  fi
49326
49327
49328  ###############################################################################
49329  #
49330  # Check for the zlib library
49331  #
49332
49333
49334# Check whether --with-zlib was given.
49335if test "${with_zlib+set}" = set; then :
49336  withval=$with_zlib;
49337fi
49338
49339
49340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49341$as_echo_n "checking for compress in -lz... " >&6; }
49342if ${ac_cv_lib_z_compress+:} false; then :
49343  $as_echo_n "(cached) " >&6
49344else
49345  ac_check_lib_save_LIBS=$LIBS
49346LIBS="-lz  $LIBS"
49347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49348/* end confdefs.h.  */
49349
49350/* Override any GCC internal prototype to avoid an error.
49351   Use char because int might match the return type of a GCC
49352   builtin and then its argument prototype would still apply.  */
49353#ifdef __cplusplus
49354extern "C"
49355#endif
49356char compress ();
49357int
49358main ()
49359{
49360return compress ();
49361  ;
49362  return 0;
49363}
49364_ACEOF
49365if ac_fn_cxx_try_link "$LINENO"; then :
49366  ac_cv_lib_z_compress=yes
49367else
49368  ac_cv_lib_z_compress=no
49369fi
49370rm -f core conftest.err conftest.$ac_objext \
49371    conftest$ac_exeext conftest.$ac_ext
49372LIBS=$ac_check_lib_save_LIBS
49373fi
49374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49375$as_echo "$ac_cv_lib_z_compress" >&6; }
49376if test "x$ac_cv_lib_z_compress" = xyes; then :
49377   ZLIB_FOUND=yes
49378else
49379   ZLIB_FOUND=no
49380fi
49381
49382
49383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49384$as_echo_n "checking for which zlib to use... " >&6; }
49385
49386  DEFAULT_ZLIB=bundled
49387  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49388    #
49389    # On macosx default is system...on others default is
49390    #
49391    DEFAULT_ZLIB=system
49392  fi
49393
49394  if test "x${ZLIB_FOUND}" != "xyes"; then
49395    #
49396    # If we don't find any system...set default to bundled
49397    #
49398    DEFAULT_ZLIB=bundled
49399  fi
49400
49401  #
49402  # If user didn't specify, use DEFAULT_ZLIB
49403  #
49404  if test "x${with_zlib}" = "x"; then
49405    with_zlib=${DEFAULT_ZLIB}
49406  fi
49407
49408  if test "x${with_zlib}" = "xbundled"; then
49409    USE_EXTERNAL_LIBZ=false
49410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49411$as_echo "bundled" >&6; }
49412  elif test "x${with_zlib}" = "xsystem"; then
49413    if test "x${ZLIB_FOUND}" = "xyes"; then
49414      USE_EXTERNAL_LIBZ=true
49415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49416$as_echo "system" >&6; }
49417    else
49418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49419$as_echo "system not found" >&6; }
49420      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49421    fi
49422  else
49423    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49424  fi
49425
49426
49427
49428  ###############################################################################
49429  LIBZIP_CAN_USE_MMAP=true
49430
49431
49432
49433  ###############################################################################
49434  #
49435  # Check if altzone exists in time.h
49436  #
49437
49438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49439/* end confdefs.h.  */
49440#include <time.h>
49441int
49442main ()
49443{
49444return (int)altzone;
49445  ;
49446  return 0;
49447}
49448_ACEOF
49449if ac_fn_cxx_try_link "$LINENO"; then :
49450  has_altzone=yes
49451else
49452  has_altzone=no
49453fi
49454rm -f core conftest.err conftest.$ac_objext \
49455    conftest$ac_exeext conftest.$ac_ext
49456  if test "x$has_altzone" = xyes; then
49457
49458$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49459
49460  fi
49461
49462  ###############################################################################
49463  #
49464  # Check the maths library
49465  #
49466
49467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49468$as_echo_n "checking for cos in -lm... " >&6; }
49469if ${ac_cv_lib_m_cos+:} false; then :
49470  $as_echo_n "(cached) " >&6
49471else
49472  ac_check_lib_save_LIBS=$LIBS
49473LIBS="-lm  $LIBS"
49474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49475/* end confdefs.h.  */
49476
49477/* Override any GCC internal prototype to avoid an error.
49478   Use char because int might match the return type of a GCC
49479   builtin and then its argument prototype would still apply.  */
49480#ifdef __cplusplus
49481extern "C"
49482#endif
49483char cos ();
49484int
49485main ()
49486{
49487return cos ();
49488  ;
49489  return 0;
49490}
49491_ACEOF
49492if ac_fn_cxx_try_link "$LINENO"; then :
49493  ac_cv_lib_m_cos=yes
49494else
49495  ac_cv_lib_m_cos=no
49496fi
49497rm -f core conftest.err conftest.$ac_objext \
49498    conftest$ac_exeext conftest.$ac_ext
49499LIBS=$ac_check_lib_save_LIBS
49500fi
49501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49502$as_echo "$ac_cv_lib_m_cos" >&6; }
49503if test "x$ac_cv_lib_m_cos" = xyes; then :
49504  cat >>confdefs.h <<_ACEOF
49505#define HAVE_LIBM 1
49506_ACEOF
49507
49508  LIBS="-lm $LIBS"
49509
49510else
49511
49512        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49513$as_echo "$as_me: Maths library was not found" >&6;}
49514
49515
49516fi
49517
49518
49519
49520  ###############################################################################
49521  #
49522  # Check for libdl.so
49523
49524  save_LIBS="$LIBS"
49525  LIBS=""
49526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49527$as_echo_n "checking for dlopen in -ldl... " >&6; }
49528if ${ac_cv_lib_dl_dlopen+:} false; then :
49529  $as_echo_n "(cached) " >&6
49530else
49531  ac_check_lib_save_LIBS=$LIBS
49532LIBS="-ldl  $LIBS"
49533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49534/* end confdefs.h.  */
49535
49536/* Override any GCC internal prototype to avoid an error.
49537   Use char because int might match the return type of a GCC
49538   builtin and then its argument prototype would still apply.  */
49539#ifdef __cplusplus
49540extern "C"
49541#endif
49542char dlopen ();
49543int
49544main ()
49545{
49546return dlopen ();
49547  ;
49548  return 0;
49549}
49550_ACEOF
49551if ac_fn_cxx_try_link "$LINENO"; then :
49552  ac_cv_lib_dl_dlopen=yes
49553else
49554  ac_cv_lib_dl_dlopen=no
49555fi
49556rm -f core conftest.err conftest.$ac_objext \
49557    conftest$ac_exeext conftest.$ac_ext
49558LIBS=$ac_check_lib_save_LIBS
49559fi
49560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49561$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49562if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49563  cat >>confdefs.h <<_ACEOF
49564#define HAVE_LIBDL 1
49565_ACEOF
49566
49567  LIBS="-ldl $LIBS"
49568
49569fi
49570
49571  LIBDL="$LIBS"
49572
49573  LIBS="$save_LIBS"
49574
49575
49576  ###############################################################################
49577  #
49578  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49579  # dynamic build is configured on command line.
49580  #
49581
49582# Check whether --with-stdc++lib was given.
49583if test "${with_stdc__lib+set}" = set; then :
49584  withval=$with_stdc__lib;
49585        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49586                && test "x$with_stdc__lib" != xdefault; then
49587          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49588        fi
49589
49590else
49591  with_stdc__lib=default
49592
49593fi
49594
49595
49596  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49597    # Test if -lstdc++ works.
49598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49599$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49600    ac_ext=cpp
49601ac_cpp='$CXXCPP $CPPFLAGS'
49602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49605
49606    OLD_CXXFLAGS="$CXXFLAGS"
49607    CXXFLAGS="$CXXFLAGS -lstdc++"
49608    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49609/* end confdefs.h.  */
49610
49611int
49612main ()
49613{
49614return 0;
49615  ;
49616  return 0;
49617}
49618_ACEOF
49619if ac_fn_cxx_try_link "$LINENO"; then :
49620  has_dynamic_libstdcxx=yes
49621else
49622  has_dynamic_libstdcxx=no
49623fi
49624rm -f core conftest.err conftest.$ac_objext \
49625    conftest$ac_exeext conftest.$ac_ext
49626    CXXFLAGS="$OLD_CXXFLAGS"
49627    ac_ext=cpp
49628ac_cpp='$CXXCPP $CPPFLAGS'
49629ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49630ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49631ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49632
49633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49634$as_echo "$has_dynamic_libstdcxx" >&6; }
49635
49636    # Test if stdc++ can be linked statically.
49637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49638$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49639    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49640    ac_ext=cpp
49641ac_cpp='$CXXCPP $CPPFLAGS'
49642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49645
49646    OLD_LIBS="$LIBS"
49647    OLD_CXX="$CXX"
49648    LIBS="$STATIC_STDCXX_FLAGS"
49649    CXX="$CC"
49650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49651/* end confdefs.h.  */
49652
49653int
49654main ()
49655{
49656return 0;
49657  ;
49658  return 0;
49659}
49660_ACEOF
49661if ac_fn_cxx_try_link "$LINENO"; then :
49662  has_static_libstdcxx=yes
49663else
49664  has_static_libstdcxx=no
49665fi
49666rm -f core conftest.err conftest.$ac_objext \
49667    conftest$ac_exeext conftest.$ac_ext
49668    LIBS="$OLD_LIBS"
49669    CXX="$OLD_CXX"
49670    ac_ext=cpp
49671ac_cpp='$CXXCPP $CPPFLAGS'
49672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49675
49676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49677$as_echo "$has_static_libstdcxx" >&6; }
49678
49679    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49680      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49681    fi
49682
49683    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49684      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49685    fi
49686
49687    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49688      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49689    fi
49690
49691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49692$as_echo_n "checking how to link with libstdc++... " >&6; }
49693    # If dynamic was requested, it's available since it would fail above otherwise.
49694    # If dynamic wasn't requested, go with static unless it isn't available.
49695    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49696      LIBCXX="$LIBCXX -lstdc++"
49697      LDCXX="$CXX"
49698      STATIC_CXX_SETTING="STATIC_CXX=false"
49699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49700$as_echo "dynamic" >&6; }
49701    else
49702      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49703      LDCXX="$CC"
49704      STATIC_CXX_SETTING="STATIC_CXX=true"
49705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49706$as_echo "static" >&6; }
49707    fi
49708  fi
49709
49710
49711  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49712    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49713
49714pkg_failed=no
49715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49716$as_echo_n "checking for LIBFFI... " >&6; }
49717
49718if test -n "$LIBFFI_CFLAGS"; then
49719    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49720 elif test -n "$PKG_CONFIG"; then
49721    if test -n "$PKG_CONFIG" && \
49722    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49723  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49724  ac_status=$?
49725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49726  test $ac_status = 0; }; then
49727  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49728else
49729  pkg_failed=yes
49730fi
49731 else
49732    pkg_failed=untried
49733fi
49734if test -n "$LIBFFI_LIBS"; then
49735    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49736 elif test -n "$PKG_CONFIG"; then
49737    if test -n "$PKG_CONFIG" && \
49738    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49739  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49740  ac_status=$?
49741  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49742  test $ac_status = 0; }; then
49743  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49744else
49745  pkg_failed=yes
49746fi
49747 else
49748    pkg_failed=untried
49749fi
49750
49751
49752
49753if test $pkg_failed = yes; then
49754
49755if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49756        _pkg_short_errors_supported=yes
49757else
49758        _pkg_short_errors_supported=no
49759fi
49760        if test $_pkg_short_errors_supported = yes; then
49761	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49762        else
49763	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49764        fi
49765	# Put the nasty error message in config.log where it belongs
49766	echo "$LIBFFI_PKG_ERRORS" >&5
49767
49768	as_fn_error $? "Package requirements (libffi) were not met:
49769
49770$LIBFFI_PKG_ERRORS
49771
49772Consider adjusting the PKG_CONFIG_PATH environment variable if you
49773installed software in a non-standard prefix.
49774
49775Alternatively, you may set the environment variables LIBFFI_CFLAGS
49776and LIBFFI_LIBS to avoid the need to call pkg-config.
49777See the pkg-config man page for more details.
49778" "$LINENO" 5
49779elif test $pkg_failed = untried; then
49780	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49782as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49783is in your PATH or set the PKG_CONFIG environment variable to the full
49784path to pkg-config.
49785
49786Alternatively, you may set the environment variables LIBFFI_CFLAGS
49787and LIBFFI_LIBS to avoid the need to call pkg-config.
49788See the pkg-config man page for more details.
49789
49790To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49791See \`config.log' for more details" "$LINENO" 5; }
49792else
49793	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49794	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49796$as_echo "yes" >&6; }
49797	:
49798fi
49799
49800  fi
49801
49802  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49803    # Extract the first word of "llvm-config", so it can be a program name with args.
49804set dummy llvm-config; ac_word=$2
49805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49806$as_echo_n "checking for $ac_word... " >&6; }
49807if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49808  $as_echo_n "(cached) " >&6
49809else
49810  if test -n "$LLVM_CONFIG"; then
49811  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49812else
49813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49814for as_dir in $PATH
49815do
49816  IFS=$as_save_IFS
49817  test -z "$as_dir" && as_dir=.
49818    for ac_exec_ext in '' $ac_executable_extensions; do
49819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49820    ac_cv_prog_LLVM_CONFIG="llvm-config"
49821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49822    break 2
49823  fi
49824done
49825  done
49826IFS=$as_save_IFS
49827
49828fi
49829fi
49830LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49831if test -n "$LLVM_CONFIG"; then
49832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49833$as_echo "$LLVM_CONFIG" >&6; }
49834else
49835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49836$as_echo "no" >&6; }
49837fi
49838
49839
49840
49841    if test "x$LLVM_CONFIG" != xllvm-config; then
49842      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49843    fi
49844
49845    llvm_components="jit mcjit engine nativecodegen native"
49846    unset LLVM_CFLAGS
49847    for flag in $("$LLVM_CONFIG" --cxxflags); do
49848      if echo "${flag}" | grep -q '^-[ID]'; then
49849        if test "${flag}" != "-D_DEBUG" ; then
49850          if test "${LLVM_CFLAGS}" != "" ; then
49851            LLVM_CFLAGS="${LLVM_CFLAGS} "
49852          fi
49853          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49854        fi
49855      fi
49856    done
49857    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49858    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49859
49860    unset LLVM_LDFLAGS
49861    for flag in $("${LLVM_CONFIG}" --ldflags); do
49862      if echo "${flag}" | grep -q '^-L'; then
49863        if test "${LLVM_LDFLAGS}" != ""; then
49864          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49865        fi
49866        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49867      fi
49868    done
49869
49870    unset LLVM_LIBS
49871    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49872      if echo "${flag}" | grep -q '^-l'; then
49873        if test "${LLVM_LIBS}" != ""; then
49874          LLVM_LIBS="${LLVM_LIBS} "
49875        fi
49876        LLVM_LIBS="${LLVM_LIBS}${flag}"
49877      fi
49878    done
49879
49880
49881
49882
49883  fi
49884
49885  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49886  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49887    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49888  fi
49889
49890  # TODO better (platform agnostic) test
49891  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49892    LIBCXX="-lstdc++"
49893  fi
49894
49895
49896
49897
49898  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49899
49900
49901# Check whether --with-msvcr-dll was given.
49902if test "${with_msvcr_dll+set}" = set; then :
49903  withval=$with_msvcr_dll;
49904fi
49905
49906
49907  if test "x$with_msvcr_dll" != x; then
49908    # If given explicitely by user, do not probe. If not present, fail directly.
49909
49910  DLL_NAME="$MSVCR_NAME"
49911  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49912  METHOD="--with-msvcr-dll"
49913  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49914    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49915$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49916
49917    # Need to check if the found msvcr is correct architecture
49918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49919$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49920    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49922      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49923      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49924      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49925        CORRECT_MSVCR_ARCH="PE32 executable"
49926      else
49927        CORRECT_MSVCR_ARCH="PE32+ executable"
49928      fi
49929    else
49930      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49931        CORRECT_MSVCR_ARCH=386
49932      else
49933        CORRECT_MSVCR_ARCH=x86-64
49934      fi
49935    fi
49936    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49938$as_echo "ok" >&6; }
49939      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49940
49941  # Only process if variable expands to non-empty
49942
49943  if test "x$MSVC_DLL" != x; then
49944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49945
49946  # Input might be given as Windows format, start by converting to
49947  # unix format.
49948  path="$MSVC_DLL"
49949  new_path=`$CYGPATH -u "$path"`
49950
49951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49954  # "foo.exe" is OK but "foo" is an error.
49955  #
49956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49957  # It is also a way to make sure we got the proper file name for the real test later on.
49958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49959  if test "x$test_shortpath" = x; then
49960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49961$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49962    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49963  fi
49964
49965  # Call helper function which possibly converts this using DOS-style short mode.
49966  # If so, the updated path is stored in $new_path.
49967
49968  input_path="$new_path"
49969  # Check if we need to convert this using DOS-style short mode. If the path
49970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49971  # take no chances and rewrite it.
49972  # Note: m4 eats our [], so we need to use [ and ] instead.
49973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49974  if test "x$has_forbidden_chars" != x; then
49975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49979      # Going to short mode and back again did indeed matter. Since short mode is
49980      # case insensitive, let's make it lowercase to improve readability.
49981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49982      # Now convert it back to Unix-style (cygpath)
49983      input_path=`$CYGPATH -u "$shortmode_path"`
49984      new_path="$input_path"
49985    fi
49986  fi
49987
49988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49989  if test "x$test_cygdrive_prefix" = x; then
49990    # As a simple fix, exclude /usr/bin since it's not a real path.
49991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49993      # a path prefixed by /cygdrive for fixpath to work.
49994      new_path="$CYGWIN_ROOT_PATH$input_path"
49995    fi
49996  fi
49997
49998
49999  if test "x$path" != "x$new_path"; then
50000    MSVC_DLL="$new_path"
50001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50002$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50003  fi
50004
50005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50006
50007  path="$MSVC_DLL"
50008  has_colon=`$ECHO $path | $GREP ^.:`
50009  new_path="$path"
50010  if test "x$has_colon" = x; then
50011    # Not in mixed or Windows style, start by that.
50012    new_path=`cmd //c echo $path`
50013  fi
50014
50015
50016  input_path="$new_path"
50017  # Check if we need to convert this using DOS-style short mode. If the path
50018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50019  # take no chances and rewrite it.
50020  # Note: m4 eats our [], so we need to use [ and ] instead.
50021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50022  if test "x$has_forbidden_chars" != x; then
50023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50025  fi
50026
50027
50028  windows_path="$new_path"
50029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50030    unix_path=`$CYGPATH -u "$windows_path"`
50031    new_path="$unix_path"
50032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50034    new_path="$unix_path"
50035  fi
50036
50037  if test "x$path" != "x$new_path"; then
50038    MSVC_DLL="$new_path"
50039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50040$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50041  fi
50042
50043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50045
50046    else
50047      # We're on a unix platform. Hooray! :)
50048      path="$MSVC_DLL"
50049      has_space=`$ECHO "$path" | $GREP " "`
50050      if test "x$has_space" != x; then
50051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50052$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50054      fi
50055
50056      # Use eval to expand a potential ~
50057      eval path="$path"
50058      if test ! -f "$path" && test ! -d "$path"; then
50059        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50060      fi
50061
50062      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50063    fi
50064  fi
50065
50066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50067$as_echo_n "checking for $DLL_NAME... " >&6; }
50068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50069$as_echo "$MSVC_DLL" >&6; }
50070    else
50071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50072$as_echo "incorrect, ignoring" >&6; }
50073      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50074$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50075    fi
50076  fi
50077
50078    if test "x$MSVC_DLL" = x; then
50079      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50080    fi
50081    MSVCR_DLL="$MSVC_DLL"
50082  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50083
50084  DLL_NAME="$MSVCR_NAME"
50085  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50086  METHOD="devkit"
50087  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50089$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50090
50091    # Need to check if the found msvcr is correct architecture
50092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50093$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50094    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50096      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50097      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50098      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50099        CORRECT_MSVCR_ARCH="PE32 executable"
50100      else
50101        CORRECT_MSVCR_ARCH="PE32+ executable"
50102      fi
50103    else
50104      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50105        CORRECT_MSVCR_ARCH=386
50106      else
50107        CORRECT_MSVCR_ARCH=x86-64
50108      fi
50109    fi
50110    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50112$as_echo "ok" >&6; }
50113      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50114
50115  # Only process if variable expands to non-empty
50116
50117  if test "x$MSVC_DLL" != x; then
50118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50119
50120  # Input might be given as Windows format, start by converting to
50121  # unix format.
50122  path="$MSVC_DLL"
50123  new_path=`$CYGPATH -u "$path"`
50124
50125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50128  # "foo.exe" is OK but "foo" is an error.
50129  #
50130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50131  # It is also a way to make sure we got the proper file name for the real test later on.
50132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50133  if test "x$test_shortpath" = x; then
50134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50135$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50136    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50137  fi
50138
50139  # Call helper function which possibly converts this using DOS-style short mode.
50140  # If so, the updated path is stored in $new_path.
50141
50142  input_path="$new_path"
50143  # Check if we need to convert this using DOS-style short mode. If the path
50144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50145  # take no chances and rewrite it.
50146  # Note: m4 eats our [], so we need to use [ and ] instead.
50147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50148  if test "x$has_forbidden_chars" != x; then
50149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50153      # Going to short mode and back again did indeed matter. Since short mode is
50154      # case insensitive, let's make it lowercase to improve readability.
50155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50156      # Now convert it back to Unix-style (cygpath)
50157      input_path=`$CYGPATH -u "$shortmode_path"`
50158      new_path="$input_path"
50159    fi
50160  fi
50161
50162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50163  if test "x$test_cygdrive_prefix" = x; then
50164    # As a simple fix, exclude /usr/bin since it's not a real path.
50165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50167      # a path prefixed by /cygdrive for fixpath to work.
50168      new_path="$CYGWIN_ROOT_PATH$input_path"
50169    fi
50170  fi
50171
50172
50173  if test "x$path" != "x$new_path"; then
50174    MSVC_DLL="$new_path"
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50177  fi
50178
50179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50180
50181  path="$MSVC_DLL"
50182  has_colon=`$ECHO $path | $GREP ^.:`
50183  new_path="$path"
50184  if test "x$has_colon" = x; then
50185    # Not in mixed or Windows style, start by that.
50186    new_path=`cmd //c echo $path`
50187  fi
50188
50189
50190  input_path="$new_path"
50191  # Check if we need to convert this using DOS-style short mode. If the path
50192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50193  # take no chances and rewrite it.
50194  # Note: m4 eats our [], so we need to use [ and ] instead.
50195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50196  if test "x$has_forbidden_chars" != x; then
50197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50199  fi
50200
50201
50202  windows_path="$new_path"
50203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50204    unix_path=`$CYGPATH -u "$windows_path"`
50205    new_path="$unix_path"
50206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50208    new_path="$unix_path"
50209  fi
50210
50211  if test "x$path" != "x$new_path"; then
50212    MSVC_DLL="$new_path"
50213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50215  fi
50216
50217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50219
50220    else
50221      # We're on a unix platform. Hooray! :)
50222      path="$MSVC_DLL"
50223      has_space=`$ECHO "$path" | $GREP " "`
50224      if test "x$has_space" != x; then
50225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50226$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50228      fi
50229
50230      # Use eval to expand a potential ~
50231      eval path="$path"
50232      if test ! -f "$path" && test ! -d "$path"; then
50233        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50234      fi
50235
50236      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50237    fi
50238  fi
50239
50240      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50241$as_echo_n "checking for $DLL_NAME... " >&6; }
50242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50243$as_echo "$MSVC_DLL" >&6; }
50244    else
50245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50246$as_echo "incorrect, ignoring" >&6; }
50247      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50248$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50249    fi
50250  fi
50251
50252    if test "x$MSVC_DLL" = x; then
50253      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50254    fi
50255    MSVCR_DLL="$MSVC_DLL"
50256  else
50257
50258  DLL_NAME="${MSVCR_NAME}"
50259  MSVC_DLL=
50260
50261  if test "x$MSVC_DLL" = x; then
50262    # Probe: Using well-known location from Visual Studio 10.0
50263    if test "x$VCINSTALLDIR" != x; then
50264      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50265
50266  windows_path="$CYGWIN_VC_INSTALL_DIR"
50267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50268    unix_path=`$CYGPATH -u "$windows_path"`
50269    CYGWIN_VC_INSTALL_DIR="$unix_path"
50270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50272    CYGWIN_VC_INSTALL_DIR="$unix_path"
50273  fi
50274
50275      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50276        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50277      else
50278        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50279      fi
50280      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50281
50282  DLL_NAME="$DLL_NAME"
50283  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50284  METHOD="well-known location in VCINSTALLDIR"
50285  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50286    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50287$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50288
50289    # Need to check if the found msvcr is correct architecture
50290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50291$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50292    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50294      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50295      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50296      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50297        CORRECT_MSVCR_ARCH="PE32 executable"
50298      else
50299        CORRECT_MSVCR_ARCH="PE32+ executable"
50300      fi
50301    else
50302      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50303        CORRECT_MSVCR_ARCH=386
50304      else
50305        CORRECT_MSVCR_ARCH=x86-64
50306      fi
50307    fi
50308    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50310$as_echo "ok" >&6; }
50311      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50312
50313  # Only process if variable expands to non-empty
50314
50315  if test "x$MSVC_DLL" != x; then
50316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50317
50318  # Input might be given as Windows format, start by converting to
50319  # unix format.
50320  path="$MSVC_DLL"
50321  new_path=`$CYGPATH -u "$path"`
50322
50323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50326  # "foo.exe" is OK but "foo" is an error.
50327  #
50328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50329  # It is also a way to make sure we got the proper file name for the real test later on.
50330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50331  if test "x$test_shortpath" = x; then
50332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50333$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50334    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50335  fi
50336
50337  # Call helper function which possibly converts this using DOS-style short mode.
50338  # If so, the updated path is stored in $new_path.
50339
50340  input_path="$new_path"
50341  # Check if we need to convert this using DOS-style short mode. If the path
50342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50343  # take no chances and rewrite it.
50344  # Note: m4 eats our [], so we need to use [ and ] instead.
50345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50346  if test "x$has_forbidden_chars" != x; then
50347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50351      # Going to short mode and back again did indeed matter. Since short mode is
50352      # case insensitive, let's make it lowercase to improve readability.
50353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50354      # Now convert it back to Unix-style (cygpath)
50355      input_path=`$CYGPATH -u "$shortmode_path"`
50356      new_path="$input_path"
50357    fi
50358  fi
50359
50360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50361  if test "x$test_cygdrive_prefix" = x; then
50362    # As a simple fix, exclude /usr/bin since it's not a real path.
50363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50365      # a path prefixed by /cygdrive for fixpath to work.
50366      new_path="$CYGWIN_ROOT_PATH$input_path"
50367    fi
50368  fi
50369
50370
50371  if test "x$path" != "x$new_path"; then
50372    MSVC_DLL="$new_path"
50373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50374$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50375  fi
50376
50377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50378
50379  path="$MSVC_DLL"
50380  has_colon=`$ECHO $path | $GREP ^.:`
50381  new_path="$path"
50382  if test "x$has_colon" = x; then
50383    # Not in mixed or Windows style, start by that.
50384    new_path=`cmd //c echo $path`
50385  fi
50386
50387
50388  input_path="$new_path"
50389  # Check if we need to convert this using DOS-style short mode. If the path
50390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50391  # take no chances and rewrite it.
50392  # Note: m4 eats our [], so we need to use [ and ] instead.
50393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50394  if test "x$has_forbidden_chars" != x; then
50395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50397  fi
50398
50399
50400  windows_path="$new_path"
50401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50402    unix_path=`$CYGPATH -u "$windows_path"`
50403    new_path="$unix_path"
50404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50406    new_path="$unix_path"
50407  fi
50408
50409  if test "x$path" != "x$new_path"; then
50410    MSVC_DLL="$new_path"
50411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50412$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50413  fi
50414
50415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50417
50418    else
50419      # We're on a unix platform. Hooray! :)
50420      path="$MSVC_DLL"
50421      has_space=`$ECHO "$path" | $GREP " "`
50422      if test "x$has_space" != x; then
50423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50424$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50426      fi
50427
50428      # Use eval to expand a potential ~
50429      eval path="$path"
50430      if test ! -f "$path" && test ! -d "$path"; then
50431        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50432      fi
50433
50434      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50435    fi
50436  fi
50437
50438      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50439$as_echo_n "checking for $DLL_NAME... " >&6; }
50440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50441$as_echo "$MSVC_DLL" >&6; }
50442    else
50443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50444$as_echo "incorrect, ignoring" >&6; }
50445      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50446$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50447    fi
50448  fi
50449
50450    fi
50451  fi
50452
50453  if test "x$MSVC_DLL" = x; then
50454    # Probe: Check in the Boot JDK directory.
50455    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50456
50457  DLL_NAME="$DLL_NAME"
50458  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50459  METHOD="well-known location in Boot JDK"
50460  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50461    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50462$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50463
50464    # Need to check if the found msvcr is correct architecture
50465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50466$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50467    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50469      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50470      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50471      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50472        CORRECT_MSVCR_ARCH="PE32 executable"
50473      else
50474        CORRECT_MSVCR_ARCH="PE32+ executable"
50475      fi
50476    else
50477      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50478        CORRECT_MSVCR_ARCH=386
50479      else
50480        CORRECT_MSVCR_ARCH=x86-64
50481      fi
50482    fi
50483    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50485$as_echo "ok" >&6; }
50486      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50487
50488  # Only process if variable expands to non-empty
50489
50490  if test "x$MSVC_DLL" != x; then
50491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50492
50493  # Input might be given as Windows format, start by converting to
50494  # unix format.
50495  path="$MSVC_DLL"
50496  new_path=`$CYGPATH -u "$path"`
50497
50498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50501  # "foo.exe" is OK but "foo" is an error.
50502  #
50503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50504  # It is also a way to make sure we got the proper file name for the real test later on.
50505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50506  if test "x$test_shortpath" = x; then
50507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50508$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50509    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50510  fi
50511
50512  # Call helper function which possibly converts this using DOS-style short mode.
50513  # If so, the updated path is stored in $new_path.
50514
50515  input_path="$new_path"
50516  # Check if we need to convert this using DOS-style short mode. If the path
50517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50518  # take no chances and rewrite it.
50519  # Note: m4 eats our [], so we need to use [ and ] instead.
50520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50521  if test "x$has_forbidden_chars" != x; then
50522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50526      # Going to short mode and back again did indeed matter. Since short mode is
50527      # case insensitive, let's make it lowercase to improve readability.
50528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50529      # Now convert it back to Unix-style (cygpath)
50530      input_path=`$CYGPATH -u "$shortmode_path"`
50531      new_path="$input_path"
50532    fi
50533  fi
50534
50535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50536  if test "x$test_cygdrive_prefix" = x; then
50537    # As a simple fix, exclude /usr/bin since it's not a real path.
50538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50540      # a path prefixed by /cygdrive for fixpath to work.
50541      new_path="$CYGWIN_ROOT_PATH$input_path"
50542    fi
50543  fi
50544
50545
50546  if test "x$path" != "x$new_path"; then
50547    MSVC_DLL="$new_path"
50548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50549$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50550  fi
50551
50552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50553
50554  path="$MSVC_DLL"
50555  has_colon=`$ECHO $path | $GREP ^.:`
50556  new_path="$path"
50557  if test "x$has_colon" = x; then
50558    # Not in mixed or Windows style, start by that.
50559    new_path=`cmd //c echo $path`
50560  fi
50561
50562
50563  input_path="$new_path"
50564  # Check if we need to convert this using DOS-style short mode. If the path
50565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50566  # take no chances and rewrite it.
50567  # Note: m4 eats our [], so we need to use [ and ] instead.
50568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50569  if test "x$has_forbidden_chars" != x; then
50570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50572  fi
50573
50574
50575  windows_path="$new_path"
50576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50577    unix_path=`$CYGPATH -u "$windows_path"`
50578    new_path="$unix_path"
50579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50581    new_path="$unix_path"
50582  fi
50583
50584  if test "x$path" != "x$new_path"; then
50585    MSVC_DLL="$new_path"
50586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50587$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50588  fi
50589
50590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50592
50593    else
50594      # We're on a unix platform. Hooray! :)
50595      path="$MSVC_DLL"
50596      has_space=`$ECHO "$path" | $GREP " "`
50597      if test "x$has_space" != x; then
50598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50599$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50601      fi
50602
50603      # Use eval to expand a potential ~
50604      eval path="$path"
50605      if test ! -f "$path" && test ! -d "$path"; then
50606        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50607      fi
50608
50609      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50610    fi
50611  fi
50612
50613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50614$as_echo_n "checking for $DLL_NAME... " >&6; }
50615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50616$as_echo "$MSVC_DLL" >&6; }
50617    else
50618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50619$as_echo "incorrect, ignoring" >&6; }
50620      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50621$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50622    fi
50623  fi
50624
50625  fi
50626
50627  if test "x$MSVC_DLL" = x; then
50628    # Probe: Look in the Windows system32 directory
50629    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50630
50631  windows_path="$CYGWIN_SYSTEMROOT"
50632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50633    unix_path=`$CYGPATH -u "$windows_path"`
50634    CYGWIN_SYSTEMROOT="$unix_path"
50635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50637    CYGWIN_SYSTEMROOT="$unix_path"
50638  fi
50639
50640    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50641
50642  DLL_NAME="$DLL_NAME"
50643  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50644  METHOD="well-known location in SYSTEMROOT"
50645  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50647$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50648
50649    # Need to check if the found msvcr is correct architecture
50650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50651$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50652    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50654      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50655      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50656      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50657        CORRECT_MSVCR_ARCH="PE32 executable"
50658      else
50659        CORRECT_MSVCR_ARCH="PE32+ executable"
50660      fi
50661    else
50662      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50663        CORRECT_MSVCR_ARCH=386
50664      else
50665        CORRECT_MSVCR_ARCH=x86-64
50666      fi
50667    fi
50668    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50670$as_echo "ok" >&6; }
50671      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50672
50673  # Only process if variable expands to non-empty
50674
50675  if test "x$MSVC_DLL" != x; then
50676    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50677
50678  # Input might be given as Windows format, start by converting to
50679  # unix format.
50680  path="$MSVC_DLL"
50681  new_path=`$CYGPATH -u "$path"`
50682
50683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50686  # "foo.exe" is OK but "foo" is an error.
50687  #
50688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50689  # It is also a way to make sure we got the proper file name for the real test later on.
50690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50691  if test "x$test_shortpath" = x; then
50692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50693$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50694    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50695  fi
50696
50697  # Call helper function which possibly converts this using DOS-style short mode.
50698  # If so, the updated path is stored in $new_path.
50699
50700  input_path="$new_path"
50701  # Check if we need to convert this using DOS-style short mode. If the path
50702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50703  # take no chances and rewrite it.
50704  # Note: m4 eats our [], so we need to use [ and ] instead.
50705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50706  if test "x$has_forbidden_chars" != x; then
50707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50711      # Going to short mode and back again did indeed matter. Since short mode is
50712      # case insensitive, let's make it lowercase to improve readability.
50713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50714      # Now convert it back to Unix-style (cygpath)
50715      input_path=`$CYGPATH -u "$shortmode_path"`
50716      new_path="$input_path"
50717    fi
50718  fi
50719
50720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50721  if test "x$test_cygdrive_prefix" = x; then
50722    # As a simple fix, exclude /usr/bin since it's not a real path.
50723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50725      # a path prefixed by /cygdrive for fixpath to work.
50726      new_path="$CYGWIN_ROOT_PATH$input_path"
50727    fi
50728  fi
50729
50730
50731  if test "x$path" != "x$new_path"; then
50732    MSVC_DLL="$new_path"
50733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50734$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50735  fi
50736
50737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50738
50739  path="$MSVC_DLL"
50740  has_colon=`$ECHO $path | $GREP ^.:`
50741  new_path="$path"
50742  if test "x$has_colon" = x; then
50743    # Not in mixed or Windows style, start by that.
50744    new_path=`cmd //c echo $path`
50745  fi
50746
50747
50748  input_path="$new_path"
50749  # Check if we need to convert this using DOS-style short mode. If the path
50750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50751  # take no chances and rewrite it.
50752  # Note: m4 eats our [], so we need to use [ and ] instead.
50753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50754  if test "x$has_forbidden_chars" != x; then
50755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50757  fi
50758
50759
50760  windows_path="$new_path"
50761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50762    unix_path=`$CYGPATH -u "$windows_path"`
50763    new_path="$unix_path"
50764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50766    new_path="$unix_path"
50767  fi
50768
50769  if test "x$path" != "x$new_path"; then
50770    MSVC_DLL="$new_path"
50771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50772$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50773  fi
50774
50775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50777
50778    else
50779      # We're on a unix platform. Hooray! :)
50780      path="$MSVC_DLL"
50781      has_space=`$ECHO "$path" | $GREP " "`
50782      if test "x$has_space" != x; then
50783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50784$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50785        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50786      fi
50787
50788      # Use eval to expand a potential ~
50789      eval path="$path"
50790      if test ! -f "$path" && test ! -d "$path"; then
50791        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50792      fi
50793
50794      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50795    fi
50796  fi
50797
50798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50799$as_echo_n "checking for $DLL_NAME... " >&6; }
50800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50801$as_echo "$MSVC_DLL" >&6; }
50802    else
50803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50804$as_echo "incorrect, ignoring" >&6; }
50805      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50806$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50807    fi
50808  fi
50809
50810  fi
50811
50812  if test "x$MSVC_DLL" = x; then
50813    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50814    if test "x$VS100COMNTOOLS" != x; then
50815      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50816
50817  windows_path="$CYGWIN_VS_TOOLS_DIR"
50818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50819    unix_path=`$CYGPATH -u "$windows_path"`
50820    CYGWIN_VS_TOOLS_DIR="$unix_path"
50821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50823    CYGWIN_VS_TOOLS_DIR="$unix_path"
50824  fi
50825
50826      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50827        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50828	    | $GREP -i /x64/ | $HEAD --lines 1`
50829      else
50830        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50831	    | $GREP -i /x86/ | $HEAD --lines 1`
50832      fi
50833
50834  DLL_NAME="$DLL_NAME"
50835  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50836  METHOD="search of VS100COMNTOOLS"
50837  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50838    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50839$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50840
50841    # Need to check if the found msvcr is correct architecture
50842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50843$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50844    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50846      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50847      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50848      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50849        CORRECT_MSVCR_ARCH="PE32 executable"
50850      else
50851        CORRECT_MSVCR_ARCH="PE32+ executable"
50852      fi
50853    else
50854      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50855        CORRECT_MSVCR_ARCH=386
50856      else
50857        CORRECT_MSVCR_ARCH=x86-64
50858      fi
50859    fi
50860    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50862$as_echo "ok" >&6; }
50863      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50864
50865  # Only process if variable expands to non-empty
50866
50867  if test "x$MSVC_DLL" != x; then
50868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50869
50870  # Input might be given as Windows format, start by converting to
50871  # unix format.
50872  path="$MSVC_DLL"
50873  new_path=`$CYGPATH -u "$path"`
50874
50875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50878  # "foo.exe" is OK but "foo" is an error.
50879  #
50880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50881  # It is also a way to make sure we got the proper file name for the real test later on.
50882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50883  if test "x$test_shortpath" = x; then
50884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50885$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50886    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50887  fi
50888
50889  # Call helper function which possibly converts this using DOS-style short mode.
50890  # If so, the updated path is stored in $new_path.
50891
50892  input_path="$new_path"
50893  # Check if we need to convert this using DOS-style short mode. If the path
50894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50895  # take no chances and rewrite it.
50896  # Note: m4 eats our [], so we need to use [ and ] instead.
50897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50898  if test "x$has_forbidden_chars" != x; then
50899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50903      # Going to short mode and back again did indeed matter. Since short mode is
50904      # case insensitive, let's make it lowercase to improve readability.
50905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50906      # Now convert it back to Unix-style (cygpath)
50907      input_path=`$CYGPATH -u "$shortmode_path"`
50908      new_path="$input_path"
50909    fi
50910  fi
50911
50912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50913  if test "x$test_cygdrive_prefix" = x; then
50914    # As a simple fix, exclude /usr/bin since it's not a real path.
50915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50917      # a path prefixed by /cygdrive for fixpath to work.
50918      new_path="$CYGWIN_ROOT_PATH$input_path"
50919    fi
50920  fi
50921
50922
50923  if test "x$path" != "x$new_path"; then
50924    MSVC_DLL="$new_path"
50925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50926$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50927  fi
50928
50929    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50930
50931  path="$MSVC_DLL"
50932  has_colon=`$ECHO $path | $GREP ^.:`
50933  new_path="$path"
50934  if test "x$has_colon" = x; then
50935    # Not in mixed or Windows style, start by that.
50936    new_path=`cmd //c echo $path`
50937  fi
50938
50939
50940  input_path="$new_path"
50941  # Check if we need to convert this using DOS-style short mode. If the path
50942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50943  # take no chances and rewrite it.
50944  # Note: m4 eats our [], so we need to use [ and ] instead.
50945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50946  if test "x$has_forbidden_chars" != x; then
50947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50949  fi
50950
50951
50952  windows_path="$new_path"
50953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50954    unix_path=`$CYGPATH -u "$windows_path"`
50955    new_path="$unix_path"
50956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50958    new_path="$unix_path"
50959  fi
50960
50961  if test "x$path" != "x$new_path"; then
50962    MSVC_DLL="$new_path"
50963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50964$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50965  fi
50966
50967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50969
50970    else
50971      # We're on a unix platform. Hooray! :)
50972      path="$MSVC_DLL"
50973      has_space=`$ECHO "$path" | $GREP " "`
50974      if test "x$has_space" != x; then
50975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50976$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50977        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50978      fi
50979
50980      # Use eval to expand a potential ~
50981      eval path="$path"
50982      if test ! -f "$path" && test ! -d "$path"; then
50983        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50984      fi
50985
50986      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50987    fi
50988  fi
50989
50990      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50991$as_echo_n "checking for $DLL_NAME... " >&6; }
50992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50993$as_echo "$MSVC_DLL" >&6; }
50994    else
50995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50996$as_echo "incorrect, ignoring" >&6; }
50997      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50998$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50999    fi
51000  fi
51001
51002    fi
51003  fi
51004
51005  if test "x$MSVC_DLL" = x; then
51006    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51007    # (This was the original behaviour; kept since it might turn something up)
51008    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51009      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51010        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51011	    | $GREP x64 | $HEAD --lines 1`
51012      else
51013        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51014	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51015        if test "x$POSSIBLE_MSVC_DLL" = x; then
51016          # We're grasping at straws now...
51017          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51018	      | $HEAD --lines 1`
51019        fi
51020      fi
51021
51022
51023  DLL_NAME="$DLL_NAME"
51024  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51025  METHOD="search of VCINSTALLDIR"
51026  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51027    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51028$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51029
51030    # Need to check if the found msvcr is correct architecture
51031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51032$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51033    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51035      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51036      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51037      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51038        CORRECT_MSVCR_ARCH="PE32 executable"
51039      else
51040        CORRECT_MSVCR_ARCH="PE32+ executable"
51041      fi
51042    else
51043      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51044        CORRECT_MSVCR_ARCH=386
51045      else
51046        CORRECT_MSVCR_ARCH=x86-64
51047      fi
51048    fi
51049    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51051$as_echo "ok" >&6; }
51052      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51053
51054  # Only process if variable expands to non-empty
51055
51056  if test "x$MSVC_DLL" != x; then
51057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51058
51059  # Input might be given as Windows format, start by converting to
51060  # unix format.
51061  path="$MSVC_DLL"
51062  new_path=`$CYGPATH -u "$path"`
51063
51064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51067  # "foo.exe" is OK but "foo" is an error.
51068  #
51069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51070  # It is also a way to make sure we got the proper file name for the real test later on.
51071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51072  if test "x$test_shortpath" = x; then
51073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51074$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51075    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51076  fi
51077
51078  # Call helper function which possibly converts this using DOS-style short mode.
51079  # If so, the updated path is stored in $new_path.
51080
51081  input_path="$new_path"
51082  # Check if we need to convert this using DOS-style short mode. If the path
51083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51084  # take no chances and rewrite it.
51085  # Note: m4 eats our [], so we need to use [ and ] instead.
51086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51087  if test "x$has_forbidden_chars" != x; then
51088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51092      # Going to short mode and back again did indeed matter. Since short mode is
51093      # case insensitive, let's make it lowercase to improve readability.
51094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51095      # Now convert it back to Unix-style (cygpath)
51096      input_path=`$CYGPATH -u "$shortmode_path"`
51097      new_path="$input_path"
51098    fi
51099  fi
51100
51101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51102  if test "x$test_cygdrive_prefix" = x; then
51103    # As a simple fix, exclude /usr/bin since it's not a real path.
51104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51106      # a path prefixed by /cygdrive for fixpath to work.
51107      new_path="$CYGWIN_ROOT_PATH$input_path"
51108    fi
51109  fi
51110
51111
51112  if test "x$path" != "x$new_path"; then
51113    MSVC_DLL="$new_path"
51114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51116  fi
51117
51118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51119
51120  path="$MSVC_DLL"
51121  has_colon=`$ECHO $path | $GREP ^.:`
51122  new_path="$path"
51123  if test "x$has_colon" = x; then
51124    # Not in mixed or Windows style, start by that.
51125    new_path=`cmd //c echo $path`
51126  fi
51127
51128
51129  input_path="$new_path"
51130  # Check if we need to convert this using DOS-style short mode. If the path
51131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51132  # take no chances and rewrite it.
51133  # Note: m4 eats our [], so we need to use [ and ] instead.
51134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51135  if test "x$has_forbidden_chars" != x; then
51136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51138  fi
51139
51140
51141  windows_path="$new_path"
51142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51143    unix_path=`$CYGPATH -u "$windows_path"`
51144    new_path="$unix_path"
51145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51147    new_path="$unix_path"
51148  fi
51149
51150  if test "x$path" != "x$new_path"; then
51151    MSVC_DLL="$new_path"
51152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51153$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51154  fi
51155
51156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51158
51159    else
51160      # We're on a unix platform. Hooray! :)
51161      path="$MSVC_DLL"
51162      has_space=`$ECHO "$path" | $GREP " "`
51163      if test "x$has_space" != x; then
51164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51165$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51166        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51167      fi
51168
51169      # Use eval to expand a potential ~
51170      eval path="$path"
51171      if test ! -f "$path" && test ! -d "$path"; then
51172        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51173      fi
51174
51175      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51176    fi
51177  fi
51178
51179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51180$as_echo_n "checking for $DLL_NAME... " >&6; }
51181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51182$as_echo "$MSVC_DLL" >&6; }
51183    else
51184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51185$as_echo "incorrect, ignoring" >&6; }
51186      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51187$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51188    fi
51189  fi
51190
51191    fi
51192  fi
51193
51194  if test "x$MSVC_DLL" = x; then
51195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51196$as_echo_n "checking for $DLL_NAME... " >&6; }
51197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51198$as_echo "no" >&6; }
51199    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51200  fi
51201
51202    MSVCR_DLL="$MSVC_DLL"
51203  fi
51204
51205
51206
51207# Check whether --with-msvcp-dll was given.
51208if test "${with_msvcp_dll+set}" = set; then :
51209  withval=$with_msvcp_dll;
51210fi
51211
51212
51213  if test "x$MSVCP_NAME" != "x"; then
51214    if test "x$with_msvcp_dll" != x; then
51215      # If given explicitely by user, do not probe. If not present, fail directly.
51216
51217  DLL_NAME="$MSVCP_NAME"
51218  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51219  METHOD="--with-msvcp-dll"
51220  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51222$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51223
51224    # Need to check if the found msvcr is correct architecture
51225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51226$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51227    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51229      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51230      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51231      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51232        CORRECT_MSVCR_ARCH="PE32 executable"
51233      else
51234        CORRECT_MSVCR_ARCH="PE32+ executable"
51235      fi
51236    else
51237      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51238        CORRECT_MSVCR_ARCH=386
51239      else
51240        CORRECT_MSVCR_ARCH=x86-64
51241      fi
51242    fi
51243    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51245$as_echo "ok" >&6; }
51246      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51247
51248  # Only process if variable expands to non-empty
51249
51250  if test "x$MSVC_DLL" != x; then
51251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51252
51253  # Input might be given as Windows format, start by converting to
51254  # unix format.
51255  path="$MSVC_DLL"
51256  new_path=`$CYGPATH -u "$path"`
51257
51258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51261  # "foo.exe" is OK but "foo" is an error.
51262  #
51263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51264  # It is also a way to make sure we got the proper file name for the real test later on.
51265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51266  if test "x$test_shortpath" = x; then
51267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51268$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51269    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51270  fi
51271
51272  # Call helper function which possibly converts this using DOS-style short mode.
51273  # If so, the updated path is stored in $new_path.
51274
51275  input_path="$new_path"
51276  # Check if we need to convert this using DOS-style short mode. If the path
51277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51278  # take no chances and rewrite it.
51279  # Note: m4 eats our [], so we need to use [ and ] instead.
51280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51281  if test "x$has_forbidden_chars" != x; then
51282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51286      # Going to short mode and back again did indeed matter. Since short mode is
51287      # case insensitive, let's make it lowercase to improve readability.
51288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51289      # Now convert it back to Unix-style (cygpath)
51290      input_path=`$CYGPATH -u "$shortmode_path"`
51291      new_path="$input_path"
51292    fi
51293  fi
51294
51295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51296  if test "x$test_cygdrive_prefix" = x; then
51297    # As a simple fix, exclude /usr/bin since it's not a real path.
51298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51300      # a path prefixed by /cygdrive for fixpath to work.
51301      new_path="$CYGWIN_ROOT_PATH$input_path"
51302    fi
51303  fi
51304
51305
51306  if test "x$path" != "x$new_path"; then
51307    MSVC_DLL="$new_path"
51308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51309$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51310  fi
51311
51312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51313
51314  path="$MSVC_DLL"
51315  has_colon=`$ECHO $path | $GREP ^.:`
51316  new_path="$path"
51317  if test "x$has_colon" = x; then
51318    # Not in mixed or Windows style, start by that.
51319    new_path=`cmd //c echo $path`
51320  fi
51321
51322
51323  input_path="$new_path"
51324  # Check if we need to convert this using DOS-style short mode. If the path
51325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51326  # take no chances and rewrite it.
51327  # Note: m4 eats our [], so we need to use [ and ] instead.
51328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51329  if test "x$has_forbidden_chars" != x; then
51330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51332  fi
51333
51334
51335  windows_path="$new_path"
51336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51337    unix_path=`$CYGPATH -u "$windows_path"`
51338    new_path="$unix_path"
51339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51341    new_path="$unix_path"
51342  fi
51343
51344  if test "x$path" != "x$new_path"; then
51345    MSVC_DLL="$new_path"
51346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51347$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51348  fi
51349
51350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51352
51353    else
51354      # We're on a unix platform. Hooray! :)
51355      path="$MSVC_DLL"
51356      has_space=`$ECHO "$path" | $GREP " "`
51357      if test "x$has_space" != x; then
51358        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51359$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51360        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51361      fi
51362
51363      # Use eval to expand a potential ~
51364      eval path="$path"
51365      if test ! -f "$path" && test ! -d "$path"; then
51366        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51367      fi
51368
51369      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51370    fi
51371  fi
51372
51373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51374$as_echo_n "checking for $DLL_NAME... " >&6; }
51375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51376$as_echo "$MSVC_DLL" >&6; }
51377    else
51378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51379$as_echo "incorrect, ignoring" >&6; }
51380      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51381$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51382    fi
51383  fi
51384
51385      if test "x$MSVC_DLL" = x; then
51386        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51387      fi
51388      MSVCP_DLL="$MSVC_DLL"
51389    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51390
51391  DLL_NAME="$MSVCP_NAME"
51392  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51393  METHOD="devkit"
51394  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51395    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51396$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51397
51398    # Need to check if the found msvcr is correct architecture
51399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51400$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51401    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51403      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51404      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51405      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51406        CORRECT_MSVCR_ARCH="PE32 executable"
51407      else
51408        CORRECT_MSVCR_ARCH="PE32+ executable"
51409      fi
51410    else
51411      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51412        CORRECT_MSVCR_ARCH=386
51413      else
51414        CORRECT_MSVCR_ARCH=x86-64
51415      fi
51416    fi
51417    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51419$as_echo "ok" >&6; }
51420      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51421
51422  # Only process if variable expands to non-empty
51423
51424  if test "x$MSVC_DLL" != x; then
51425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51426
51427  # Input might be given as Windows format, start by converting to
51428  # unix format.
51429  path="$MSVC_DLL"
51430  new_path=`$CYGPATH -u "$path"`
51431
51432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51435  # "foo.exe" is OK but "foo" is an error.
51436  #
51437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51438  # It is also a way to make sure we got the proper file name for the real test later on.
51439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51440  if test "x$test_shortpath" = x; then
51441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51442$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51443    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51444  fi
51445
51446  # Call helper function which possibly converts this using DOS-style short mode.
51447  # If so, the updated path is stored in $new_path.
51448
51449  input_path="$new_path"
51450  # Check if we need to convert this using DOS-style short mode. If the path
51451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51452  # take no chances and rewrite it.
51453  # Note: m4 eats our [], so we need to use [ and ] instead.
51454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51455  if test "x$has_forbidden_chars" != x; then
51456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51460      # Going to short mode and back again did indeed matter. Since short mode is
51461      # case insensitive, let's make it lowercase to improve readability.
51462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51463      # Now convert it back to Unix-style (cygpath)
51464      input_path=`$CYGPATH -u "$shortmode_path"`
51465      new_path="$input_path"
51466    fi
51467  fi
51468
51469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51470  if test "x$test_cygdrive_prefix" = x; then
51471    # As a simple fix, exclude /usr/bin since it's not a real path.
51472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51474      # a path prefixed by /cygdrive for fixpath to work.
51475      new_path="$CYGWIN_ROOT_PATH$input_path"
51476    fi
51477  fi
51478
51479
51480  if test "x$path" != "x$new_path"; then
51481    MSVC_DLL="$new_path"
51482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51483$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51484  fi
51485
51486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51487
51488  path="$MSVC_DLL"
51489  has_colon=`$ECHO $path | $GREP ^.:`
51490  new_path="$path"
51491  if test "x$has_colon" = x; then
51492    # Not in mixed or Windows style, start by that.
51493    new_path=`cmd //c echo $path`
51494  fi
51495
51496
51497  input_path="$new_path"
51498  # Check if we need to convert this using DOS-style short mode. If the path
51499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51500  # take no chances and rewrite it.
51501  # Note: m4 eats our [], so we need to use [ and ] instead.
51502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51503  if test "x$has_forbidden_chars" != x; then
51504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51506  fi
51507
51508
51509  windows_path="$new_path"
51510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51511    unix_path=`$CYGPATH -u "$windows_path"`
51512    new_path="$unix_path"
51513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51515    new_path="$unix_path"
51516  fi
51517
51518  if test "x$path" != "x$new_path"; then
51519    MSVC_DLL="$new_path"
51520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51521$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51522  fi
51523
51524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51526
51527    else
51528      # We're on a unix platform. Hooray! :)
51529      path="$MSVC_DLL"
51530      has_space=`$ECHO "$path" | $GREP " "`
51531      if test "x$has_space" != x; then
51532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51533$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51535      fi
51536
51537      # Use eval to expand a potential ~
51538      eval path="$path"
51539      if test ! -f "$path" && test ! -d "$path"; then
51540        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51541      fi
51542
51543      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51544    fi
51545  fi
51546
51547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51548$as_echo_n "checking for $DLL_NAME... " >&6; }
51549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51550$as_echo "$MSVC_DLL" >&6; }
51551    else
51552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51553$as_echo "incorrect, ignoring" >&6; }
51554      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51555$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51556    fi
51557  fi
51558
51559      if test "x$MSVC_DLL" = x; then
51560        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51561      fi
51562      MSVCP_DLL="$MSVC_DLL"
51563    else
51564
51565  DLL_NAME="${MSVCP_NAME}"
51566  MSVC_DLL=
51567
51568  if test "x$MSVC_DLL" = x; then
51569    # Probe: Using well-known location from Visual Studio 10.0
51570    if test "x$VCINSTALLDIR" != x; then
51571      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51572
51573  windows_path="$CYGWIN_VC_INSTALL_DIR"
51574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51575    unix_path=`$CYGPATH -u "$windows_path"`
51576    CYGWIN_VC_INSTALL_DIR="$unix_path"
51577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51579    CYGWIN_VC_INSTALL_DIR="$unix_path"
51580  fi
51581
51582      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51583        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51584      else
51585        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51586      fi
51587      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51588
51589  DLL_NAME="$DLL_NAME"
51590  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51591  METHOD="well-known location in VCINSTALLDIR"
51592  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51593    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51594$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51595
51596    # Need to check if the found msvcr is correct architecture
51597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51598$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51599    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51601      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51602      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51603      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51604        CORRECT_MSVCR_ARCH="PE32 executable"
51605      else
51606        CORRECT_MSVCR_ARCH="PE32+ executable"
51607      fi
51608    else
51609      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51610        CORRECT_MSVCR_ARCH=386
51611      else
51612        CORRECT_MSVCR_ARCH=x86-64
51613      fi
51614    fi
51615    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51617$as_echo "ok" >&6; }
51618      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51619
51620  # Only process if variable expands to non-empty
51621
51622  if test "x$MSVC_DLL" != x; then
51623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51624
51625  # Input might be given as Windows format, start by converting to
51626  # unix format.
51627  path="$MSVC_DLL"
51628  new_path=`$CYGPATH -u "$path"`
51629
51630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51633  # "foo.exe" is OK but "foo" is an error.
51634  #
51635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51636  # It is also a way to make sure we got the proper file name for the real test later on.
51637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51638  if test "x$test_shortpath" = x; then
51639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51640$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51641    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51642  fi
51643
51644  # Call helper function which possibly converts this using DOS-style short mode.
51645  # If so, the updated path is stored in $new_path.
51646
51647  input_path="$new_path"
51648  # Check if we need to convert this using DOS-style short mode. If the path
51649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51650  # take no chances and rewrite it.
51651  # Note: m4 eats our [], so we need to use [ and ] instead.
51652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51653  if test "x$has_forbidden_chars" != x; then
51654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51658      # Going to short mode and back again did indeed matter. Since short mode is
51659      # case insensitive, let's make it lowercase to improve readability.
51660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51661      # Now convert it back to Unix-style (cygpath)
51662      input_path=`$CYGPATH -u "$shortmode_path"`
51663      new_path="$input_path"
51664    fi
51665  fi
51666
51667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51668  if test "x$test_cygdrive_prefix" = x; then
51669    # As a simple fix, exclude /usr/bin since it's not a real path.
51670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51672      # a path prefixed by /cygdrive for fixpath to work.
51673      new_path="$CYGWIN_ROOT_PATH$input_path"
51674    fi
51675  fi
51676
51677
51678  if test "x$path" != "x$new_path"; then
51679    MSVC_DLL="$new_path"
51680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51681$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51682  fi
51683
51684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51685
51686  path="$MSVC_DLL"
51687  has_colon=`$ECHO $path | $GREP ^.:`
51688  new_path="$path"
51689  if test "x$has_colon" = x; then
51690    # Not in mixed or Windows style, start by that.
51691    new_path=`cmd //c echo $path`
51692  fi
51693
51694
51695  input_path="$new_path"
51696  # Check if we need to convert this using DOS-style short mode. If the path
51697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51698  # take no chances and rewrite it.
51699  # Note: m4 eats our [], so we need to use [ and ] instead.
51700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51701  if test "x$has_forbidden_chars" != x; then
51702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51704  fi
51705
51706
51707  windows_path="$new_path"
51708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51709    unix_path=`$CYGPATH -u "$windows_path"`
51710    new_path="$unix_path"
51711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51713    new_path="$unix_path"
51714  fi
51715
51716  if test "x$path" != "x$new_path"; then
51717    MSVC_DLL="$new_path"
51718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51719$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51720  fi
51721
51722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51724
51725    else
51726      # We're on a unix platform. Hooray! :)
51727      path="$MSVC_DLL"
51728      has_space=`$ECHO "$path" | $GREP " "`
51729      if test "x$has_space" != x; then
51730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51731$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51733      fi
51734
51735      # Use eval to expand a potential ~
51736      eval path="$path"
51737      if test ! -f "$path" && test ! -d "$path"; then
51738        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51739      fi
51740
51741      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51742    fi
51743  fi
51744
51745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51746$as_echo_n "checking for $DLL_NAME... " >&6; }
51747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51748$as_echo "$MSVC_DLL" >&6; }
51749    else
51750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51751$as_echo "incorrect, ignoring" >&6; }
51752      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51753$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51754    fi
51755  fi
51756
51757    fi
51758  fi
51759
51760  if test "x$MSVC_DLL" = x; then
51761    # Probe: Check in the Boot JDK directory.
51762    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51763
51764  DLL_NAME="$DLL_NAME"
51765  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51766  METHOD="well-known location in Boot JDK"
51767  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51768    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51769$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51770
51771    # Need to check if the found msvcr is correct architecture
51772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51773$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51774    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51776      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51777      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51778      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51779        CORRECT_MSVCR_ARCH="PE32 executable"
51780      else
51781        CORRECT_MSVCR_ARCH="PE32+ executable"
51782      fi
51783    else
51784      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51785        CORRECT_MSVCR_ARCH=386
51786      else
51787        CORRECT_MSVCR_ARCH=x86-64
51788      fi
51789    fi
51790    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51792$as_echo "ok" >&6; }
51793      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51794
51795  # Only process if variable expands to non-empty
51796
51797  if test "x$MSVC_DLL" != x; then
51798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51799
51800  # Input might be given as Windows format, start by converting to
51801  # unix format.
51802  path="$MSVC_DLL"
51803  new_path=`$CYGPATH -u "$path"`
51804
51805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51808  # "foo.exe" is OK but "foo" is an error.
51809  #
51810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51811  # It is also a way to make sure we got the proper file name for the real test later on.
51812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51813  if test "x$test_shortpath" = x; then
51814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51815$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51816    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51817  fi
51818
51819  # Call helper function which possibly converts this using DOS-style short mode.
51820  # If so, the updated path is stored in $new_path.
51821
51822  input_path="$new_path"
51823  # Check if we need to convert this using DOS-style short mode. If the path
51824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51825  # take no chances and rewrite it.
51826  # Note: m4 eats our [], so we need to use [ and ] instead.
51827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51828  if test "x$has_forbidden_chars" != x; then
51829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51833      # Going to short mode and back again did indeed matter. Since short mode is
51834      # case insensitive, let's make it lowercase to improve readability.
51835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51836      # Now convert it back to Unix-style (cygpath)
51837      input_path=`$CYGPATH -u "$shortmode_path"`
51838      new_path="$input_path"
51839    fi
51840  fi
51841
51842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51843  if test "x$test_cygdrive_prefix" = x; then
51844    # As a simple fix, exclude /usr/bin since it's not a real path.
51845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51847      # a path prefixed by /cygdrive for fixpath to work.
51848      new_path="$CYGWIN_ROOT_PATH$input_path"
51849    fi
51850  fi
51851
51852
51853  if test "x$path" != "x$new_path"; then
51854    MSVC_DLL="$new_path"
51855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51856$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51857  fi
51858
51859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51860
51861  path="$MSVC_DLL"
51862  has_colon=`$ECHO $path | $GREP ^.:`
51863  new_path="$path"
51864  if test "x$has_colon" = x; then
51865    # Not in mixed or Windows style, start by that.
51866    new_path=`cmd //c echo $path`
51867  fi
51868
51869
51870  input_path="$new_path"
51871  # Check if we need to convert this using DOS-style short mode. If the path
51872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51873  # take no chances and rewrite it.
51874  # Note: m4 eats our [], so we need to use [ and ] instead.
51875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51876  if test "x$has_forbidden_chars" != x; then
51877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51879  fi
51880
51881
51882  windows_path="$new_path"
51883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51884    unix_path=`$CYGPATH -u "$windows_path"`
51885    new_path="$unix_path"
51886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51888    new_path="$unix_path"
51889  fi
51890
51891  if test "x$path" != "x$new_path"; then
51892    MSVC_DLL="$new_path"
51893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51894$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51895  fi
51896
51897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51899
51900    else
51901      # We're on a unix platform. Hooray! :)
51902      path="$MSVC_DLL"
51903      has_space=`$ECHO "$path" | $GREP " "`
51904      if test "x$has_space" != x; then
51905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51906$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51907        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51908      fi
51909
51910      # Use eval to expand a potential ~
51911      eval path="$path"
51912      if test ! -f "$path" && test ! -d "$path"; then
51913        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51914      fi
51915
51916      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51917    fi
51918  fi
51919
51920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51921$as_echo_n "checking for $DLL_NAME... " >&6; }
51922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51923$as_echo "$MSVC_DLL" >&6; }
51924    else
51925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51926$as_echo "incorrect, ignoring" >&6; }
51927      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51928$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51929    fi
51930  fi
51931
51932  fi
51933
51934  if test "x$MSVC_DLL" = x; then
51935    # Probe: Look in the Windows system32 directory
51936    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51937
51938  windows_path="$CYGWIN_SYSTEMROOT"
51939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51940    unix_path=`$CYGPATH -u "$windows_path"`
51941    CYGWIN_SYSTEMROOT="$unix_path"
51942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51944    CYGWIN_SYSTEMROOT="$unix_path"
51945  fi
51946
51947    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51948
51949  DLL_NAME="$DLL_NAME"
51950  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51951  METHOD="well-known location in SYSTEMROOT"
51952  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51954$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51955
51956    # Need to check if the found msvcr is correct architecture
51957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51958$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51959    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51961      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51962      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51963      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51964        CORRECT_MSVCR_ARCH="PE32 executable"
51965      else
51966        CORRECT_MSVCR_ARCH="PE32+ executable"
51967      fi
51968    else
51969      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51970        CORRECT_MSVCR_ARCH=386
51971      else
51972        CORRECT_MSVCR_ARCH=x86-64
51973      fi
51974    fi
51975    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51977$as_echo "ok" >&6; }
51978      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51979
51980  # Only process if variable expands to non-empty
51981
51982  if test "x$MSVC_DLL" != x; then
51983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51984
51985  # Input might be given as Windows format, start by converting to
51986  # unix format.
51987  path="$MSVC_DLL"
51988  new_path=`$CYGPATH -u "$path"`
51989
51990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51993  # "foo.exe" is OK but "foo" is an error.
51994  #
51995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51996  # It is also a way to make sure we got the proper file name for the real test later on.
51997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51998  if test "x$test_shortpath" = x; then
51999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52000$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52001    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52002  fi
52003
52004  # Call helper function which possibly converts this using DOS-style short mode.
52005  # If so, the updated path is stored in $new_path.
52006
52007  input_path="$new_path"
52008  # Check if we need to convert this using DOS-style short mode. If the path
52009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52010  # take no chances and rewrite it.
52011  # Note: m4 eats our [], so we need to use [ and ] instead.
52012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52013  if test "x$has_forbidden_chars" != x; then
52014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52018      # Going to short mode and back again did indeed matter. Since short mode is
52019      # case insensitive, let's make it lowercase to improve readability.
52020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52021      # Now convert it back to Unix-style (cygpath)
52022      input_path=`$CYGPATH -u "$shortmode_path"`
52023      new_path="$input_path"
52024    fi
52025  fi
52026
52027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52028  if test "x$test_cygdrive_prefix" = x; then
52029    # As a simple fix, exclude /usr/bin since it's not a real path.
52030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52032      # a path prefixed by /cygdrive for fixpath to work.
52033      new_path="$CYGWIN_ROOT_PATH$input_path"
52034    fi
52035  fi
52036
52037
52038  if test "x$path" != "x$new_path"; then
52039    MSVC_DLL="$new_path"
52040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52041$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52042  fi
52043
52044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52045
52046  path="$MSVC_DLL"
52047  has_colon=`$ECHO $path | $GREP ^.:`
52048  new_path="$path"
52049  if test "x$has_colon" = x; then
52050    # Not in mixed or Windows style, start by that.
52051    new_path=`cmd //c echo $path`
52052  fi
52053
52054
52055  input_path="$new_path"
52056  # Check if we need to convert this using DOS-style short mode. If the path
52057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52058  # take no chances and rewrite it.
52059  # Note: m4 eats our [], so we need to use [ and ] instead.
52060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52061  if test "x$has_forbidden_chars" != x; then
52062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52064  fi
52065
52066
52067  windows_path="$new_path"
52068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52069    unix_path=`$CYGPATH -u "$windows_path"`
52070    new_path="$unix_path"
52071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52073    new_path="$unix_path"
52074  fi
52075
52076  if test "x$path" != "x$new_path"; then
52077    MSVC_DLL="$new_path"
52078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52079$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52080  fi
52081
52082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52084
52085    else
52086      # We're on a unix platform. Hooray! :)
52087      path="$MSVC_DLL"
52088      has_space=`$ECHO "$path" | $GREP " "`
52089      if test "x$has_space" != x; then
52090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52091$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52093      fi
52094
52095      # Use eval to expand a potential ~
52096      eval path="$path"
52097      if test ! -f "$path" && test ! -d "$path"; then
52098        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52099      fi
52100
52101      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52102    fi
52103  fi
52104
52105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52106$as_echo_n "checking for $DLL_NAME... " >&6; }
52107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52108$as_echo "$MSVC_DLL" >&6; }
52109    else
52110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52111$as_echo "incorrect, ignoring" >&6; }
52112      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52113$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52114    fi
52115  fi
52116
52117  fi
52118
52119  if test "x$MSVC_DLL" = x; then
52120    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52121    if test "x$VS100COMNTOOLS" != x; then
52122      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52123
52124  windows_path="$CYGWIN_VS_TOOLS_DIR"
52125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52126    unix_path=`$CYGPATH -u "$windows_path"`
52127    CYGWIN_VS_TOOLS_DIR="$unix_path"
52128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52130    CYGWIN_VS_TOOLS_DIR="$unix_path"
52131  fi
52132
52133      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52134        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52135	    | $GREP -i /x64/ | $HEAD --lines 1`
52136      else
52137        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52138	    | $GREP -i /x86/ | $HEAD --lines 1`
52139      fi
52140
52141  DLL_NAME="$DLL_NAME"
52142  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52143  METHOD="search of VS100COMNTOOLS"
52144  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52146$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52147
52148    # Need to check if the found msvcr is correct architecture
52149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52150$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52151    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52153      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52154      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52155      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52156        CORRECT_MSVCR_ARCH="PE32 executable"
52157      else
52158        CORRECT_MSVCR_ARCH="PE32+ executable"
52159      fi
52160    else
52161      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52162        CORRECT_MSVCR_ARCH=386
52163      else
52164        CORRECT_MSVCR_ARCH=x86-64
52165      fi
52166    fi
52167    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52169$as_echo "ok" >&6; }
52170      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52171
52172  # Only process if variable expands to non-empty
52173
52174  if test "x$MSVC_DLL" != x; then
52175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52176
52177  # Input might be given as Windows format, start by converting to
52178  # unix format.
52179  path="$MSVC_DLL"
52180  new_path=`$CYGPATH -u "$path"`
52181
52182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52185  # "foo.exe" is OK but "foo" is an error.
52186  #
52187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52188  # It is also a way to make sure we got the proper file name for the real test later on.
52189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52190  if test "x$test_shortpath" = x; then
52191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52192$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52193    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52194  fi
52195
52196  # Call helper function which possibly converts this using DOS-style short mode.
52197  # If so, the updated path is stored in $new_path.
52198
52199  input_path="$new_path"
52200  # Check if we need to convert this using DOS-style short mode. If the path
52201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52202  # take no chances and rewrite it.
52203  # Note: m4 eats our [], so we need to use [ and ] instead.
52204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52205  if test "x$has_forbidden_chars" != x; then
52206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52210      # Going to short mode and back again did indeed matter. Since short mode is
52211      # case insensitive, let's make it lowercase to improve readability.
52212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52213      # Now convert it back to Unix-style (cygpath)
52214      input_path=`$CYGPATH -u "$shortmode_path"`
52215      new_path="$input_path"
52216    fi
52217  fi
52218
52219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52220  if test "x$test_cygdrive_prefix" = x; then
52221    # As a simple fix, exclude /usr/bin since it's not a real path.
52222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52224      # a path prefixed by /cygdrive for fixpath to work.
52225      new_path="$CYGWIN_ROOT_PATH$input_path"
52226    fi
52227  fi
52228
52229
52230  if test "x$path" != "x$new_path"; then
52231    MSVC_DLL="$new_path"
52232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52233$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52234  fi
52235
52236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52237
52238  path="$MSVC_DLL"
52239  has_colon=`$ECHO $path | $GREP ^.:`
52240  new_path="$path"
52241  if test "x$has_colon" = x; then
52242    # Not in mixed or Windows style, start by that.
52243    new_path=`cmd //c echo $path`
52244  fi
52245
52246
52247  input_path="$new_path"
52248  # Check if we need to convert this using DOS-style short mode. If the path
52249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52250  # take no chances and rewrite it.
52251  # Note: m4 eats our [], so we need to use [ and ] instead.
52252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52253  if test "x$has_forbidden_chars" != x; then
52254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52256  fi
52257
52258
52259  windows_path="$new_path"
52260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52261    unix_path=`$CYGPATH -u "$windows_path"`
52262    new_path="$unix_path"
52263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52265    new_path="$unix_path"
52266  fi
52267
52268  if test "x$path" != "x$new_path"; then
52269    MSVC_DLL="$new_path"
52270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52271$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52272  fi
52273
52274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52276
52277    else
52278      # We're on a unix platform. Hooray! :)
52279      path="$MSVC_DLL"
52280      has_space=`$ECHO "$path" | $GREP " "`
52281      if test "x$has_space" != x; then
52282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52283$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52285      fi
52286
52287      # Use eval to expand a potential ~
52288      eval path="$path"
52289      if test ! -f "$path" && test ! -d "$path"; then
52290        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52291      fi
52292
52293      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52294    fi
52295  fi
52296
52297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52298$as_echo_n "checking for $DLL_NAME... " >&6; }
52299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52300$as_echo "$MSVC_DLL" >&6; }
52301    else
52302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52303$as_echo "incorrect, ignoring" >&6; }
52304      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52305$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52306    fi
52307  fi
52308
52309    fi
52310  fi
52311
52312  if test "x$MSVC_DLL" = x; then
52313    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52314    # (This was the original behaviour; kept since it might turn something up)
52315    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52316      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52317        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52318	    | $GREP x64 | $HEAD --lines 1`
52319      else
52320        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52321	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52322        if test "x$POSSIBLE_MSVC_DLL" = x; then
52323          # We're grasping at straws now...
52324          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52325	      | $HEAD --lines 1`
52326        fi
52327      fi
52328
52329
52330  DLL_NAME="$DLL_NAME"
52331  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52332  METHOD="search of VCINSTALLDIR"
52333  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52334    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52335$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52336
52337    # Need to check if the found msvcr is correct architecture
52338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52339$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52340    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52342      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52343      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52344      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52345        CORRECT_MSVCR_ARCH="PE32 executable"
52346      else
52347        CORRECT_MSVCR_ARCH="PE32+ executable"
52348      fi
52349    else
52350      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52351        CORRECT_MSVCR_ARCH=386
52352      else
52353        CORRECT_MSVCR_ARCH=x86-64
52354      fi
52355    fi
52356    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52358$as_echo "ok" >&6; }
52359      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52360
52361  # Only process if variable expands to non-empty
52362
52363  if test "x$MSVC_DLL" != x; then
52364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52365
52366  # Input might be given as Windows format, start by converting to
52367  # unix format.
52368  path="$MSVC_DLL"
52369  new_path=`$CYGPATH -u "$path"`
52370
52371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52374  # "foo.exe" is OK but "foo" is an error.
52375  #
52376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52377  # It is also a way to make sure we got the proper file name for the real test later on.
52378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52379  if test "x$test_shortpath" = x; then
52380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52381$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52382    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52383  fi
52384
52385  # Call helper function which possibly converts this using DOS-style short mode.
52386  # If so, the updated path is stored in $new_path.
52387
52388  input_path="$new_path"
52389  # Check if we need to convert this using DOS-style short mode. If the path
52390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52391  # take no chances and rewrite it.
52392  # Note: m4 eats our [], so we need to use [ and ] instead.
52393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52394  if test "x$has_forbidden_chars" != x; then
52395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52399      # Going to short mode and back again did indeed matter. Since short mode is
52400      # case insensitive, let's make it lowercase to improve readability.
52401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52402      # Now convert it back to Unix-style (cygpath)
52403      input_path=`$CYGPATH -u "$shortmode_path"`
52404      new_path="$input_path"
52405    fi
52406  fi
52407
52408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52409  if test "x$test_cygdrive_prefix" = x; then
52410    # As a simple fix, exclude /usr/bin since it's not a real path.
52411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52413      # a path prefixed by /cygdrive for fixpath to work.
52414      new_path="$CYGWIN_ROOT_PATH$input_path"
52415    fi
52416  fi
52417
52418
52419  if test "x$path" != "x$new_path"; then
52420    MSVC_DLL="$new_path"
52421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52422$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52423  fi
52424
52425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52426
52427  path="$MSVC_DLL"
52428  has_colon=`$ECHO $path | $GREP ^.:`
52429  new_path="$path"
52430  if test "x$has_colon" = x; then
52431    # Not in mixed or Windows style, start by that.
52432    new_path=`cmd //c echo $path`
52433  fi
52434
52435
52436  input_path="$new_path"
52437  # Check if we need to convert this using DOS-style short mode. If the path
52438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52439  # take no chances and rewrite it.
52440  # Note: m4 eats our [], so we need to use [ and ] instead.
52441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52442  if test "x$has_forbidden_chars" != x; then
52443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52445  fi
52446
52447
52448  windows_path="$new_path"
52449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52450    unix_path=`$CYGPATH -u "$windows_path"`
52451    new_path="$unix_path"
52452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52454    new_path="$unix_path"
52455  fi
52456
52457  if test "x$path" != "x$new_path"; then
52458    MSVC_DLL="$new_path"
52459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52460$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52461  fi
52462
52463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52465
52466    else
52467      # We're on a unix platform. Hooray! :)
52468      path="$MSVC_DLL"
52469      has_space=`$ECHO "$path" | $GREP " "`
52470      if test "x$has_space" != x; then
52471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52472$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52474      fi
52475
52476      # Use eval to expand a potential ~
52477      eval path="$path"
52478      if test ! -f "$path" && test ! -d "$path"; then
52479        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52480      fi
52481
52482      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52483    fi
52484  fi
52485
52486      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52487$as_echo_n "checking for $DLL_NAME... " >&6; }
52488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52489$as_echo "$MSVC_DLL" >&6; }
52490    else
52491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52492$as_echo "incorrect, ignoring" >&6; }
52493      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52494$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52495    fi
52496  fi
52497
52498    fi
52499  fi
52500
52501  if test "x$MSVC_DLL" = x; then
52502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52503$as_echo_n "checking for $DLL_NAME... " >&6; }
52504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52505$as_echo "no" >&6; }
52506    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52507  fi
52508
52509      MSVCP_DLL="$MSVC_DLL"
52510    fi
52511
52512  fi
52513
52514
52515
52516# Check whether --with-dxsdk was given.
52517if test "${with_dxsdk+set}" = set; then :
52518  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52519$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52520fi
52521
52522
52523
52524
52525# Check whether --with-dxsdk-lib was given.
52526if test "${with_dxsdk_lib+set}" = set; then :
52527  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52528$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52529fi
52530
52531
52532
52533
52534# Check whether --with-dxsdk-include was given.
52535if test "${with_dxsdk_include+set}" = set; then :
52536  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52537$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52538fi
52539
52540
52541  fi
52542
52543
52544###############################################################################
52545#
52546# We need to do some final tweaking, when everything else is done.
52547#
52548###############################################################################
52549
52550
52551  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52552
52553
52554  # The name of the Service Agent jar.
52555  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52556  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52557    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52558  fi
52559
52560
52561
52562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52563$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52564
52565    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52566      ENABLE_INTREE_EC=yes
52567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52568$as_echo "yes" >&6; }
52569    else
52570      ENABLE_INTREE_EC=no
52571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52572$as_echo "no" >&6; }
52573    fi
52574
52575
52576
52577
52578###############################################################################
52579#
52580# Configure parts of the build that only affect the build performance,
52581# not the result.
52582#
52583###############################################################################
52584
52585
52586  # How many cores do we have on this build system?
52587
52588# Check whether --with-num-cores was given.
52589if test "${with_num_cores+set}" = set; then :
52590  withval=$with_num_cores;
52591fi
52592
52593  if test "x$with_num_cores" = x; then
52594    # The number of cores were not specified, try to probe them.
52595
52596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52597$as_echo_n "checking for number of cores... " >&6; }
52598  NUM_CORES=1
52599  FOUND_CORES=no
52600
52601  if test -f /proc/cpuinfo; then
52602    # Looks like a Linux (or cygwin) system
52603    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52604    FOUND_CORES=yes
52605  elif test -x /usr/sbin/psrinfo; then
52606    # Looks like a Solaris system
52607    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52608    FOUND_CORES=yes
52609  elif test -x /usr/sbin/system_profiler; then
52610    # Looks like a MacOSX system
52611    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52612    FOUND_CORES=yes
52613  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52614    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52615    FOUND_CORES=yes
52616  elif test -n "$NUMBER_OF_PROCESSORS"; then
52617    # On windows, look in the env
52618    NUM_CORES=$NUMBER_OF_PROCESSORS
52619    FOUND_CORES=yes
52620  fi
52621
52622  if test "x$FOUND_CORES" = xyes; then
52623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52624$as_echo "$NUM_CORES" >&6; }
52625  else
52626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52627$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52628    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52629$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52630  fi
52631
52632  else
52633    NUM_CORES=$with_num_cores
52634  fi
52635
52636
52637
52638  # How much memory do we have on this build system?
52639
52640# Check whether --with-memory-size was given.
52641if test "${with_memory_size+set}" = set; then :
52642  withval=$with_memory_size;
52643fi
52644
52645  if test "x$with_memory_size" = x; then
52646    # The memory size was not specified, try to probe it.
52647
52648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52649$as_echo_n "checking for memory size... " >&6; }
52650  # Default to 1024 MB
52651  MEMORY_SIZE=1024
52652  FOUND_MEM=no
52653
52654  if test -f /proc/meminfo; then
52655    # Looks like a Linux (or cygwin) system
52656    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52657    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52658    FOUND_MEM=yes
52659  elif test -x /usr/sbin/prtconf; then
52660    # Looks like a Solaris or AIX system
52661    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52662    FOUND_MEM=yes
52663  elif test -x /usr/sbin/system_profiler; then
52664    # Looks like a MacOSX system
52665    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52666    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52667    FOUND_MEM=yes
52668  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52669    # Windows, but without cygwin
52670    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52671    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52672    FOUND_MEM=yes
52673  fi
52674
52675  if test "x$FOUND_MEM" = xyes; then
52676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52677$as_echo "$MEMORY_SIZE MB" >&6; }
52678  else
52679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52680$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52681    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52682$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52683  fi
52684
52685  else
52686    MEMORY_SIZE=$with_memory_size
52687  fi
52688
52689
52690
52691  # Provide a decent default number of parallel jobs for make depending on
52692  # number of cores, amount of memory and machine architecture.
52693
52694# Check whether --with-jobs was given.
52695if test "${with_jobs+set}" = set; then :
52696  withval=$with_jobs;
52697fi
52698
52699  if test "x$with_jobs" = x; then
52700    # Number of jobs was not specified, calculate.
52701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52702$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52703    # Approximate memory in GB.
52704    memory_gb=`expr $MEMORY_SIZE / 1024`
52705    # Pick the lowest of memory in gb and number of cores.
52706    if test "$memory_gb" -lt "$NUM_CORES"; then
52707      JOBS="$memory_gb"
52708    else
52709      JOBS="$NUM_CORES"
52710      # On bigger machines, leave some room for other processes to run
52711      if test "$JOBS" -gt "4"; then
52712        JOBS=`expr $JOBS '*' 90 / 100`
52713      fi
52714    fi
52715    # Cap number of jobs to 16
52716    if test "$JOBS" -gt "16"; then
52717      JOBS=16
52718    fi
52719    if test "$JOBS" -eq "0"; then
52720      JOBS=1
52721    fi
52722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52723$as_echo "$JOBS" >&6; }
52724  else
52725    JOBS=$with_jobs
52726  fi
52727
52728
52729
52730# Setup arguments for the boot jdk (after cores and memory have been setup)
52731
52732  ##############################################################################
52733  #
52734  # Specify jvm options for anything that is run with the Boot JDK.
52735  # Not all JVM:s accept the same arguments on the command line.
52736  #
52737
52738# Check whether --with-boot-jdk-jvmargs was given.
52739if test "${with_boot_jdk_jvmargs+set}" = set; then :
52740  withval=$with_boot_jdk_jvmargs;
52741fi
52742
52743
52744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52745$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52746
52747  # Disable special log output when a debug build is used as Boot JDK...
52748
52749  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52750  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52751  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52752  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52753  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52754  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52755    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52756    JVM_ARG_OK=true
52757  else
52758    $ECHO "Arg failed:" >&5
52759    $ECHO "$OUTPUT" >&5
52760    JVM_ARG_OK=false
52761  fi
52762
52763
52764  # Apply user provided options.
52765
52766  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52767  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52768  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52769  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52770  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52771  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52772    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52773    JVM_ARG_OK=true
52774  else
52775    $ECHO "Arg failed:" >&5
52776    $ECHO "$OUTPUT" >&5
52777    JVM_ARG_OK=false
52778  fi
52779
52780
52781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52782$as_echo "$boot_jdk_jvmargs" >&6; }
52783
52784  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52785  JAVA_FLAGS=$boot_jdk_jvmargs
52786
52787
52788
52789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52790$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52791
52792  # Starting amount of heap memory.
52793
52794  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52795  $ECHO "Command: $JAVA -Xms64M -version" >&5
52796  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52797  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52798  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52799  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52800    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52801    JVM_ARG_OK=true
52802  else
52803    $ECHO "Arg failed:" >&5
52804    $ECHO "$OUTPUT" >&5
52805    JVM_ARG_OK=false
52806  fi
52807
52808
52809  # Maximum amount of heap memory.
52810  # Maximum stack size.
52811  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52812  if test "x$BUILD_NUM_BITS" = x32; then
52813    if test "$JVM_MAX_HEAP" -gt "1100"; then
52814      JVM_MAX_HEAP=1100
52815    elif test "$JVM_MAX_HEAP" -lt "512"; then
52816      JVM_MAX_HEAP=512
52817    fi
52818    STACK_SIZE=768
52819  else
52820    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52821    # pointers are used. Apparently, we need to increase the heap and stack
52822    # space for the jvm. More specifically, when running javac to build huge
52823    # jdk batch
52824    if test "$JVM_MAX_HEAP" -gt "1600"; then
52825      JVM_MAX_HEAP=1600
52826    elif test "$JVM_MAX_HEAP" -lt "512"; then
52827      JVM_MAX_HEAP=512
52828    fi
52829    STACK_SIZE=1536
52830  fi
52831
52832  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52833  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52834  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52835  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52836  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52837  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52838    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52839    JVM_ARG_OK=true
52840  else
52841    $ECHO "Arg failed:" >&5
52842    $ECHO "$OUTPUT" >&5
52843    JVM_ARG_OK=false
52844  fi
52845
52846
52847  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52848  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52849  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52850  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52851  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52852  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52853    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52854    JVM_ARG_OK=true
52855  else
52856    $ECHO "Arg failed:" >&5
52857    $ECHO "$OUTPUT" >&5
52858    JVM_ARG_OK=false
52859  fi
52860
52861
52862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52863$as_echo "$boot_jdk_jvmargs_big" >&6; }
52864
52865  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52866
52867
52868
52869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52870$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52871
52872  # Use serial gc for small short lived tools if possible
52873
52874  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52875  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52876  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52877  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52878  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52879  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52880    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52881    JVM_ARG_OK=true
52882  else
52883    $ECHO "Arg failed:" >&5
52884    $ECHO "$OUTPUT" >&5
52885    JVM_ARG_OK=false
52886  fi
52887
52888
52889  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52890  $ECHO "Command: $JAVA -Xms32M -version" >&5
52891  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52892  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52893  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52894  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52895    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52896    JVM_ARG_OK=true
52897  else
52898    $ECHO "Arg failed:" >&5
52899    $ECHO "$OUTPUT" >&5
52900    JVM_ARG_OK=false
52901  fi
52902
52903
52904  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52905  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52906  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52907  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52908  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52909  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52910    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52911    JVM_ARG_OK=true
52912  else
52913    $ECHO "Arg failed:" >&5
52914    $ECHO "$OUTPUT" >&5
52915    JVM_ARG_OK=false
52916  fi
52917
52918
52919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52920$as_echo "$boot_jdk_jvmargs_small" >&6; }
52921
52922  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52923
52924
52925  JAVA_TOOL_FLAGS_SMALL=""
52926  for f in $JAVA_FLAGS_SMALL; do
52927    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52928  done
52929
52930
52931
52932# Setup smart javac (after cores and memory have been setup)
52933
52934
52935# Check whether --with-sjavac-server-java was given.
52936if test "${with_sjavac_server_java+set}" = set; then :
52937  withval=$with_sjavac_server_java;
52938fi
52939
52940
52941  if test "x$with_sjavac_server_java" != x; then
52942    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52943    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52944    if test "x$FOUND_VERSION" = x; then
52945      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52946    fi
52947  else
52948    SJAVAC_SERVER_JAVA="$JAVA"
52949  fi
52950
52951
52952  if test "$MEMORY_SIZE" -gt "3000"; then
52953
52954  $ECHO "Check if jvm arg is ok: -d64" >&5
52955  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52956  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52957  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52958  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52959  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52960    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52961    JVM_ARG_OK=true
52962  else
52963    $ECHO "Arg failed:" >&5
52964    $ECHO "$OUTPUT" >&5
52965    JVM_ARG_OK=false
52966  fi
52967
52968    if test "$JVM_ARG_OK" = true; then
52969      JVM_64BIT=true
52970      JVM_ARG_OK=false
52971    fi
52972  fi
52973
52974  MX_VALUE=`expr $MEMORY_SIZE / 2`
52975  if test "$JVM_64BIT" = true; then
52976    # Set ms lower than mx since more than one instance of the server might
52977    # get launched at the same time before they figure out which instance won.
52978    MS_VALUE=512
52979    if test "$MX_VALUE" -gt "2048"; then
52980      MX_VALUE=2048
52981    fi
52982  else
52983    MS_VALUE=256
52984    if test "$MX_VALUE" -gt "1500"; then
52985      MX_VALUE=1500
52986    fi
52987  fi
52988  if test "$MX_VALUE" -lt "512"; then
52989    MX_VALUE=512
52990  fi
52991
52992  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52993  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52994  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52995  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52996  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52997  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52998    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52999    JVM_ARG_OK=true
53000  else
53001    $ECHO "Arg failed:" >&5
53002    $ECHO "$OUTPUT" >&5
53003    JVM_ARG_OK=false
53004  fi
53005
53006
53007
53008  # Check whether --enable-sjavac was given.
53009if test "${enable_sjavac+set}" = set; then :
53010  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53011else
53012  ENABLE_SJAVAC='no'
53013fi
53014
53015  if test "x$JVM_ARG_OK" = "xfalse"; then
53016    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53017$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53018    ENABLE_SJAVAC=no;
53019  fi
53020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53021$as_echo_n "checking whether to use sjavac... " >&6; }
53022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53023$as_echo "$ENABLE_SJAVAC" >&6; }
53024
53025
53026
53027# Can the C/C++ compiler use precompiled headers?
53028
53029
53030  ###############################################################################
53031  #
53032  # Can the C/C++ compiler use precompiled headers?
53033  #
53034  # Check whether --enable-precompiled-headers was given.
53035if test "${enable_precompiled_headers+set}" = set; then :
53036  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53037else
53038  ENABLE_PRECOMPH=yes
53039fi
53040
53041
53042  USE_PRECOMPILED_HEADER=1
53043  if test "x$ENABLE_PRECOMPH" = xno; then
53044    USE_PRECOMPILED_HEADER=0
53045  fi
53046
53047  if test "x$ENABLE_PRECOMPH" = xyes; then
53048    # Check that the compiler actually supports precomp headers.
53049    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53050      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53051$as_echo_n "checking that precompiled headers work... " >&6; }
53052      echo "int alfa();" > conftest.h
53053      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53054      if test ! -f conftest.hpp.gch; then
53055        USE_PRECOMPILED_HEADER=0
53056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53057$as_echo "no" >&6; }
53058      else
53059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53060$as_echo "yes" >&6; }
53061      fi
53062      rm -f conftest.h conftest.hpp.gch
53063    fi
53064  fi
53065
53066
53067
53068
53069# Setup use of ccache, if available
53070
53071  # Check whether --enable-ccache was given.
53072if test "${enable_ccache+set}" = set; then :
53073  enableval=$enable_ccache;
53074fi
53075
53076
53077  CCACHE=
53078  CCACHE_STATUS=
53079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53080$as_echo_n "checking is ccache enabled... " >&6; }
53081  if test "x$enable_ccache" = xyes; then
53082    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53084$as_echo "yes" >&6; }
53085      OLD_PATH="$PATH"
53086      if test "x$TOOLCHAIN_PATH" != x; then
53087        PATH=$TOOLCHAIN_PATH:$PATH
53088      fi
53089
53090
53091
53092  # Publish this variable in the help.
53093
53094
53095  if test "x$CCACHE" = x; then
53096    # The variable is not set by user, try to locate tool using the code snippet
53097    for ac_prog in ccache
53098do
53099  # Extract the first word of "$ac_prog", so it can be a program name with args.
53100set dummy $ac_prog; ac_word=$2
53101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53102$as_echo_n "checking for $ac_word... " >&6; }
53103if ${ac_cv_path_CCACHE+:} false; then :
53104  $as_echo_n "(cached) " >&6
53105else
53106  case $CCACHE in
53107  [\\/]* | ?:[\\/]*)
53108  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53109  ;;
53110  *)
53111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53112for as_dir in $PATH
53113do
53114  IFS=$as_save_IFS
53115  test -z "$as_dir" && as_dir=.
53116    for ac_exec_ext in '' $ac_executable_extensions; do
53117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53118    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53120    break 2
53121  fi
53122done
53123  done
53124IFS=$as_save_IFS
53125
53126  ;;
53127esac
53128fi
53129CCACHE=$ac_cv_path_CCACHE
53130if test -n "$CCACHE"; then
53131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53132$as_echo "$CCACHE" >&6; }
53133else
53134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53135$as_echo "no" >&6; }
53136fi
53137
53138
53139  test -n "$CCACHE" && break
53140done
53141
53142  else
53143    # The variable is set, but is it from the command line or the environment?
53144
53145    # Try to remove the string !CCACHE! from our list.
53146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53148      # If it failed, the variable was not from the command line. Ignore it,
53149      # but warn the user (except for BASH, which is always set by the calling BASH).
53150      if test "xCCACHE" != xBASH; then
53151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53152$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53153      fi
53154      # Try to locate tool using the code snippet
53155      for ac_prog in ccache
53156do
53157  # Extract the first word of "$ac_prog", so it can be a program name with args.
53158set dummy $ac_prog; ac_word=$2
53159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53160$as_echo_n "checking for $ac_word... " >&6; }
53161if ${ac_cv_path_CCACHE+:} false; then :
53162  $as_echo_n "(cached) " >&6
53163else
53164  case $CCACHE in
53165  [\\/]* | ?:[\\/]*)
53166  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53167  ;;
53168  *)
53169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53170for as_dir in $PATH
53171do
53172  IFS=$as_save_IFS
53173  test -z "$as_dir" && as_dir=.
53174    for ac_exec_ext in '' $ac_executable_extensions; do
53175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53176    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53178    break 2
53179  fi
53180done
53181  done
53182IFS=$as_save_IFS
53183
53184  ;;
53185esac
53186fi
53187CCACHE=$ac_cv_path_CCACHE
53188if test -n "$CCACHE"; then
53189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53190$as_echo "$CCACHE" >&6; }
53191else
53192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53193$as_echo "no" >&6; }
53194fi
53195
53196
53197  test -n "$CCACHE" && break
53198done
53199
53200    else
53201      # If it succeeded, then it was overridden by the user. We will use it
53202      # for the tool.
53203
53204      # First remove it from the list of overridden variables, so we can test
53205      # for unknown variables in the end.
53206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53207
53208      # Check if the provided tool contains a complete path.
53209      tool_specified="$CCACHE"
53210      tool_basename="${tool_specified##*/}"
53211      if test "x$tool_basename" = "x$tool_specified"; then
53212        # A command without a complete path is provided, search $PATH.
53213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53214$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53215        # Extract the first word of "$tool_basename", so it can be a program name with args.
53216set dummy $tool_basename; ac_word=$2
53217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53218$as_echo_n "checking for $ac_word... " >&6; }
53219if ${ac_cv_path_CCACHE+:} false; then :
53220  $as_echo_n "(cached) " >&6
53221else
53222  case $CCACHE in
53223  [\\/]* | ?:[\\/]*)
53224  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53225  ;;
53226  *)
53227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53228for as_dir in $PATH
53229do
53230  IFS=$as_save_IFS
53231  test -z "$as_dir" && as_dir=.
53232    for ac_exec_ext in '' $ac_executable_extensions; do
53233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53234    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53236    break 2
53237  fi
53238done
53239  done
53240IFS=$as_save_IFS
53241
53242  ;;
53243esac
53244fi
53245CCACHE=$ac_cv_path_CCACHE
53246if test -n "$CCACHE"; then
53247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53248$as_echo "$CCACHE" >&6; }
53249else
53250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53251$as_echo "no" >&6; }
53252fi
53253
53254
53255        if test "x$CCACHE" = x; then
53256          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53257        fi
53258      else
53259        # Otherwise we believe it is a complete path. Use it as it is.
53260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53261$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53263$as_echo_n "checking for CCACHE... " >&6; }
53264        if test ! -x "$tool_specified"; then
53265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53266$as_echo "not found" >&6; }
53267          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53268        fi
53269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53270$as_echo "$tool_specified" >&6; }
53271      fi
53272    fi
53273  fi
53274
53275
53276
53277  if test "x$CCACHE" = x; then
53278    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53279  fi
53280
53281
53282      PATH="$OLD_PATH"
53283      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53284      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53285    else
53286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53287$as_echo "no" >&6; }
53288      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53289$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53290    fi
53291  elif test "x$enable_ccache" = xno; then
53292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53293$as_echo "no, explicitly disabled" >&6; }
53294    CCACHE_STATUS="Disabled"
53295  elif test "x$enable_ccache" = x; then
53296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53297$as_echo "no" >&6; }
53298  else
53299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53300$as_echo "unknown" >&6; }
53301    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53302  fi
53303
53304
53305
53306# Check whether --with-ccache-dir was given.
53307if test "${with_ccache_dir+set}" = set; then :
53308  withval=$with_ccache_dir;
53309fi
53310
53311
53312  if test "x$with_ccache_dir" != x; then
53313    # When using a non home ccache directory, assume the use is to share ccache files
53314    # with other users. Thus change the umask.
53315    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53316    if test "x$CCACHE" = x; then
53317      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53318$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53319    fi
53320  fi
53321
53322  if test "x$CCACHE" != x; then
53323
53324  if test "x$CCACHE" != x; then
53325    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53326      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53327          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53328      if test "x$HAS_BAD_CCACHE" != "x"; then
53329        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53330      fi
53331      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53332$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53333      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53334      PUSHED_FLAGS="$CXXFLAGS"
53335      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53336      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53337/* end confdefs.h.  */
53338
53339int
53340main ()
53341{
53342
53343  ;
53344  return 0;
53345}
53346_ACEOF
53347if ac_fn_cxx_try_compile "$LINENO"; then :
53348  CC_KNOWS_CCACHE_TRICK=yes
53349else
53350  CC_KNOWS_CCACHE_TRICK=no
53351fi
53352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53353      CXXFLAGS="$PUSHED_FLAGS"
53354      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53356$as_echo "yes" >&6; }
53357        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53358
53359        CCACHE_SLOPPINESS=pch_defines,time_macros
53360      else
53361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53362$as_echo "no" >&6; }
53363        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53364      fi
53365    fi
53366
53367    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53368        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53369
53370    if test "x$SET_CCACHE_DIR" != x; then
53371      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53372      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53373    fi
53374  fi
53375
53376  fi
53377
53378
53379###############################################################################
53380#
53381# And now the finish...
53382#
53383###############################################################################
53384
53385# Check for some common pitfalls
53386
53387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53388    file_to_test="$SRC_ROOT/LICENSE"
53389    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53390      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
53391    fi
53392  fi
53393
53394
53395  # Did user specify any unknown variables?
53396
53397  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53398    # Replace the separating ! with spaces before presenting for end user.
53399    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53401$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53402  fi
53403
53404
53405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53406$as_echo_n "checking if build directory is on local disk... " >&6; }
53407
53408  # df -l lists only local disks; if the given directory is not found then
53409  # a non-zero exit code is given
53410  if test "x$DF" = x; then
53411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53412      # msys does not have df; use Windows "net use" instead.
53413      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53414      if test "x$IS_NETWORK_DISK" = x; then
53415        OUTPUT_DIR_IS_LOCAL="yes"
53416      else
53417        OUTPUT_DIR_IS_LOCAL="no"
53418      fi
53419    else
53420      # No df here, say it's local
53421      OUTPUT_DIR_IS_LOCAL="yes"
53422    fi
53423  else
53424    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53425      OUTPUT_DIR_IS_LOCAL="yes"
53426    else
53427      OUTPUT_DIR_IS_LOCAL="no"
53428    fi
53429  fi
53430
53431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53432$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53433
53434
53435
53436  # Check if the user has any old-style ALT_ variables set.
53437  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53438
53439  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53440  # Since we can't properly handle the dependencies for this, warn the user about the situation
53441  if test -e $OUTPUT_ROOT/spec.gmk; then
53442    IS_RECONFIGURE=yes
53443  else
53444    IS_RECONFIGURE=no
53445  fi
53446
53447
53448# At the end, call the custom hook. (Dummy macro if no custom sources available)
53449
53450
53451# We're messing a bit with internal autoconf variables to put the config.status
53452# in the output directory instead of the current directory.
53453CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53454
53455# Create the actual output files. Now the main work of configure is done.
53456cat >confcache <<\_ACEOF
53457# This file is a shell script that caches the results of configure
53458# tests run on this system so they can be shared between configure
53459# scripts and configure runs, see configure's option --config-cache.
53460# It is not useful on other systems.  If it contains results you don't
53461# want to keep, you may remove or edit it.
53462#
53463# config.status only pays attention to the cache file if you give it
53464# the --recheck option to rerun configure.
53465#
53466# `ac_cv_env_foo' variables (set or unset) will be overridden when
53467# loading this file, other *unset* `ac_cv_foo' will be assigned the
53468# following values.
53469
53470_ACEOF
53471
53472# The following way of writing the cache mishandles newlines in values,
53473# but we know of no workaround that is simple, portable, and efficient.
53474# So, we kill variables containing newlines.
53475# Ultrix sh set writes to stderr and can't be redirected directly,
53476# and sets the high bit in the cache file unless we assign to the vars.
53477(
53478  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53479    eval ac_val=\$$ac_var
53480    case $ac_val in #(
53481    *${as_nl}*)
53482      case $ac_var in #(
53483      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53484$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53485      esac
53486      case $ac_var in #(
53487      _ | IFS | as_nl) ;; #(
53488      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53489      *) { eval $ac_var=; unset $ac_var;} ;;
53490      esac ;;
53491    esac
53492  done
53493
53494  (set) 2>&1 |
53495    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53496    *${as_nl}ac_space=\ *)
53497      # `set' does not quote correctly, so add quotes: double-quote
53498      # substitution turns \\\\ into \\, and sed turns \\ into \.
53499      sed -n \
53500	"s/'/'\\\\''/g;
53501	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53502      ;; #(
53503    *)
53504      # `set' quotes correctly as required by POSIX, so do not add quotes.
53505      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53506      ;;
53507    esac |
53508    sort
53509) |
53510  sed '
53511     /^ac_cv_env_/b end
53512     t clear
53513     :clear
53514     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53515     t end
53516     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53517     :end' >>confcache
53518if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53519  if test -w "$cache_file"; then
53520    if test "x$cache_file" != "x/dev/null"; then
53521      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53522$as_echo "$as_me: updating cache $cache_file" >&6;}
53523      if test ! -f "$cache_file" || test -h "$cache_file"; then
53524	cat confcache >"$cache_file"
53525      else
53526        case $cache_file in #(
53527        */* | ?:*)
53528	  mv -f confcache "$cache_file"$$ &&
53529	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53530        *)
53531	  mv -f confcache "$cache_file" ;;
53532	esac
53533      fi
53534    fi
53535  else
53536    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53537$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53538  fi
53539fi
53540rm -f confcache
53541
53542test "x$prefix" = xNONE && prefix=$ac_default_prefix
53543# Let make expand exec_prefix.
53544test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53545
53546# Transform confdefs.h into DEFS.
53547# Protect against shell expansion while executing Makefile rules.
53548# Protect against Makefile macro expansion.
53549#
53550# If the first sed substitution is executed (which looks for macros that
53551# take arguments), then branch to the quote section.  Otherwise,
53552# look for a macro that doesn't take arguments.
53553ac_script='
53554:mline
53555/\\$/{
53556 N
53557 s,\\\n,,
53558 b mline
53559}
53560t clear
53561:clear
53562s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53563t quote
53564s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53565t quote
53566b any
53567:quote
53568s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53569s/\[/\\&/g
53570s/\]/\\&/g
53571s/\$/$$/g
53572H
53573:any
53574${
53575	g
53576	s/^\n//
53577	s/\n/ /g
53578	p
53579}
53580'
53581DEFS=`sed -n "$ac_script" confdefs.h`
53582
53583
53584ac_libobjs=
53585ac_ltlibobjs=
53586U=
53587for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53588  # 1. Remove the extension, and $U if already installed.
53589  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53590  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53591  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53592  #    will be set to the directory where LIBOBJS objects are built.
53593  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53594  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53595done
53596LIBOBJS=$ac_libobjs
53597
53598LTLIBOBJS=$ac_ltlibobjs
53599
53600
53601
53602: "${CONFIG_STATUS=./config.status}"
53603ac_write_fail=0
53604ac_clean_files_save=$ac_clean_files
53605ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53606{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53607$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53608as_write_fail=0
53609cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53610#! $SHELL
53611# Generated by $as_me.
53612# Run this file to recreate the current configuration.
53613# Compiler output produced by configure, useful for debugging
53614# configure, is in config.log if it exists.
53615
53616debug=false
53617ac_cs_recheck=false
53618ac_cs_silent=false
53619
53620SHELL=\${CONFIG_SHELL-$SHELL}
53621export SHELL
53622_ASEOF
53623cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53624## -------------------- ##
53625## M4sh Initialization. ##
53626## -------------------- ##
53627
53628# Be more Bourne compatible
53629DUALCASE=1; export DUALCASE # for MKS sh
53630if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53631  emulate sh
53632  NULLCMD=:
53633  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53634  # is contrary to our usage.  Disable this feature.
53635  alias -g '${1+"$@"}'='"$@"'
53636  setopt NO_GLOB_SUBST
53637else
53638  case `(set -o) 2>/dev/null` in #(
53639  *posix*) :
53640    set -o posix ;; #(
53641  *) :
53642     ;;
53643esac
53644fi
53645
53646
53647as_nl='
53648'
53649export as_nl
53650# Printing a long string crashes Solaris 7 /usr/bin/printf.
53651as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53652as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53653as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53654# Prefer a ksh shell builtin over an external printf program on Solaris,
53655# but without wasting forks for bash or zsh.
53656if test -z "$BASH_VERSION$ZSH_VERSION" \
53657    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53658  as_echo='print -r --'
53659  as_echo_n='print -rn --'
53660elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53661  as_echo='printf %s\n'
53662  as_echo_n='printf %s'
53663else
53664  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53665    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53666    as_echo_n='/usr/ucb/echo -n'
53667  else
53668    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53669    as_echo_n_body='eval
53670      arg=$1;
53671      case $arg in #(
53672      *"$as_nl"*)
53673	expr "X$arg" : "X\\(.*\\)$as_nl";
53674	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53675      esac;
53676      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53677    '
53678    export as_echo_n_body
53679    as_echo_n='sh -c $as_echo_n_body as_echo'
53680  fi
53681  export as_echo_body
53682  as_echo='sh -c $as_echo_body as_echo'
53683fi
53684
53685# The user is always right.
53686if test "${PATH_SEPARATOR+set}" != set; then
53687  PATH_SEPARATOR=:
53688  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53689    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53690      PATH_SEPARATOR=';'
53691  }
53692fi
53693
53694
53695# IFS
53696# We need space, tab and new line, in precisely that order.  Quoting is
53697# there to prevent editors from complaining about space-tab.
53698# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53699# splitting by setting IFS to empty value.)
53700IFS=" ""	$as_nl"
53701
53702# Find who we are.  Look in the path if we contain no directory separator.
53703as_myself=
53704case $0 in #((
53705  *[\\/]* ) as_myself=$0 ;;
53706  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53707for as_dir in $PATH
53708do
53709  IFS=$as_save_IFS
53710  test -z "$as_dir" && as_dir=.
53711    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53712  done
53713IFS=$as_save_IFS
53714
53715     ;;
53716esac
53717# We did not find ourselves, most probably we were run as `sh COMMAND'
53718# in which case we are not to be found in the path.
53719if test "x$as_myself" = x; then
53720  as_myself=$0
53721fi
53722if test ! -f "$as_myself"; then
53723  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53724  exit 1
53725fi
53726
53727# Unset variables that we do not need and which cause bugs (e.g. in
53728# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53729# suppresses any "Segmentation fault" message there.  '((' could
53730# trigger a bug in pdksh 5.2.14.
53731for as_var in BASH_ENV ENV MAIL MAILPATH
53732do eval test x\${$as_var+set} = xset \
53733  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53734done
53735PS1='$ '
53736PS2='> '
53737PS4='+ '
53738
53739# NLS nuisances.
53740LC_ALL=C
53741export LC_ALL
53742LANGUAGE=C
53743export LANGUAGE
53744
53745# CDPATH.
53746(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53747
53748
53749# as_fn_error STATUS ERROR [LINENO LOG_FD]
53750# ----------------------------------------
53751# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53752# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53753# script with STATUS, using 1 if that was 0.
53754as_fn_error ()
53755{
53756  as_status=$1; test $as_status -eq 0 && as_status=1
53757  if test "$4"; then
53758    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53759    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53760  fi
53761  $as_echo "$as_me: error: $2" >&2
53762  as_fn_exit $as_status
53763} # as_fn_error
53764
53765
53766# as_fn_set_status STATUS
53767# -----------------------
53768# Set $? to STATUS, without forking.
53769as_fn_set_status ()
53770{
53771  return $1
53772} # as_fn_set_status
53773
53774# as_fn_exit STATUS
53775# -----------------
53776# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53777as_fn_exit ()
53778{
53779  set +e
53780  as_fn_set_status $1
53781  exit $1
53782} # as_fn_exit
53783
53784# as_fn_unset VAR
53785# ---------------
53786# Portably unset VAR.
53787as_fn_unset ()
53788{
53789  { eval $1=; unset $1;}
53790}
53791as_unset=as_fn_unset
53792# as_fn_append VAR VALUE
53793# ----------------------
53794# Append the text in VALUE to the end of the definition contained in VAR. Take
53795# advantage of any shell optimizations that allow amortized linear growth over
53796# repeated appends, instead of the typical quadratic growth present in naive
53797# implementations.
53798if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53799  eval 'as_fn_append ()
53800  {
53801    eval $1+=\$2
53802  }'
53803else
53804  as_fn_append ()
53805  {
53806    eval $1=\$$1\$2
53807  }
53808fi # as_fn_append
53809
53810# as_fn_arith ARG...
53811# ------------------
53812# Perform arithmetic evaluation on the ARGs, and store the result in the
53813# global $as_val. Take advantage of shells that can avoid forks. The arguments
53814# must be portable across $(()) and expr.
53815if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53816  eval 'as_fn_arith ()
53817  {
53818    as_val=$(( $* ))
53819  }'
53820else
53821  as_fn_arith ()
53822  {
53823    as_val=`expr "$@" || test $? -eq 1`
53824  }
53825fi # as_fn_arith
53826
53827
53828if expr a : '\(a\)' >/dev/null 2>&1 &&
53829   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53830  as_expr=expr
53831else
53832  as_expr=false
53833fi
53834
53835if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53836  as_basename=basename
53837else
53838  as_basename=false
53839fi
53840
53841if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53842  as_dirname=dirname
53843else
53844  as_dirname=false
53845fi
53846
53847as_me=`$as_basename -- "$0" ||
53848$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53849	 X"$0" : 'X\(//\)$' \| \
53850	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53851$as_echo X/"$0" |
53852    sed '/^.*\/\([^/][^/]*\)\/*$/{
53853	    s//\1/
53854	    q
53855	  }
53856	  /^X\/\(\/\/\)$/{
53857	    s//\1/
53858	    q
53859	  }
53860	  /^X\/\(\/\).*/{
53861	    s//\1/
53862	    q
53863	  }
53864	  s/.*/./; q'`
53865
53866# Avoid depending upon Character Ranges.
53867as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53868as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53869as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53870as_cr_digits='0123456789'
53871as_cr_alnum=$as_cr_Letters$as_cr_digits
53872
53873ECHO_C= ECHO_N= ECHO_T=
53874case `echo -n x` in #(((((
53875-n*)
53876  case `echo 'xy\c'` in
53877  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53878  xy)  ECHO_C='\c';;
53879  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53880       ECHO_T='	';;
53881  esac;;
53882*)
53883  ECHO_N='-n';;
53884esac
53885
53886rm -f conf$$ conf$$.exe conf$$.file
53887if test -d conf$$.dir; then
53888  rm -f conf$$.dir/conf$$.file
53889else
53890  rm -f conf$$.dir
53891  mkdir conf$$.dir 2>/dev/null
53892fi
53893if (echo >conf$$.file) 2>/dev/null; then
53894  if ln -s conf$$.file conf$$ 2>/dev/null; then
53895    as_ln_s='ln -s'
53896    # ... but there are two gotchas:
53897    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53898    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53899    # In both cases, we have to default to `cp -pR'.
53900    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53901      as_ln_s='cp -pR'
53902  elif ln conf$$.file conf$$ 2>/dev/null; then
53903    as_ln_s=ln
53904  else
53905    as_ln_s='cp -pR'
53906  fi
53907else
53908  as_ln_s='cp -pR'
53909fi
53910rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53911rmdir conf$$.dir 2>/dev/null
53912
53913
53914# as_fn_mkdir_p
53915# -------------
53916# Create "$as_dir" as a directory, including parents if necessary.
53917as_fn_mkdir_p ()
53918{
53919
53920  case $as_dir in #(
53921  -*) as_dir=./$as_dir;;
53922  esac
53923  test -d "$as_dir" || eval $as_mkdir_p || {
53924    as_dirs=
53925    while :; do
53926      case $as_dir in #(
53927      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53928      *) as_qdir=$as_dir;;
53929      esac
53930      as_dirs="'$as_qdir' $as_dirs"
53931      as_dir=`$as_dirname -- "$as_dir" ||
53932$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53933	 X"$as_dir" : 'X\(//\)[^/]' \| \
53934	 X"$as_dir" : 'X\(//\)$' \| \
53935	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53936$as_echo X"$as_dir" |
53937    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53938	    s//\1/
53939	    q
53940	  }
53941	  /^X\(\/\/\)[^/].*/{
53942	    s//\1/
53943	    q
53944	  }
53945	  /^X\(\/\/\)$/{
53946	    s//\1/
53947	    q
53948	  }
53949	  /^X\(\/\).*/{
53950	    s//\1/
53951	    q
53952	  }
53953	  s/.*/./; q'`
53954      test -d "$as_dir" && break
53955    done
53956    test -z "$as_dirs" || eval "mkdir $as_dirs"
53957  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53958
53959
53960} # as_fn_mkdir_p
53961if mkdir -p . 2>/dev/null; then
53962  as_mkdir_p='mkdir -p "$as_dir"'
53963else
53964  test -d ./-p && rmdir ./-p
53965  as_mkdir_p=false
53966fi
53967
53968
53969# as_fn_executable_p FILE
53970# -----------------------
53971# Test if FILE is an executable regular file.
53972as_fn_executable_p ()
53973{
53974  test -f "$1" && test -x "$1"
53975} # as_fn_executable_p
53976as_test_x='test -x'
53977as_executable_p=as_fn_executable_p
53978
53979# Sed expression to map a string onto a valid CPP name.
53980as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53981
53982# Sed expression to map a string onto a valid variable name.
53983as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53984
53985
53986exec 6>&1
53987## ----------------------------------- ##
53988## Main body of $CONFIG_STATUS script. ##
53989## ----------------------------------- ##
53990_ASEOF
53991test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53992
53993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53994# Save the log message, to keep $0 and so on meaningful, and to
53995# report actual input values of CONFIG_FILES etc. instead of their
53996# values after options handling.
53997ac_log="
53998This file was extended by OpenJDK $as_me jdk9, which was
53999generated by GNU Autoconf 2.69.  Invocation command line was
54000
54001  CONFIG_FILES    = $CONFIG_FILES
54002  CONFIG_HEADERS  = $CONFIG_HEADERS
54003  CONFIG_LINKS    = $CONFIG_LINKS
54004  CONFIG_COMMANDS = $CONFIG_COMMANDS
54005  $ $0 $@
54006
54007on `(hostname || uname -n) 2>/dev/null | sed 1q`
54008"
54009
54010_ACEOF
54011
54012case $ac_config_files in *"
54013"*) set x $ac_config_files; shift; ac_config_files=$*;;
54014esac
54015
54016
54017
54018cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54019# Files that config.status was made for.
54020config_files="$ac_config_files"
54021
54022_ACEOF
54023
54024cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54025ac_cs_usage="\
54026\`$as_me' instantiates files and other configuration actions
54027from templates according to the current configuration.  Unless the files
54028and actions are specified as TAGs, all are instantiated by default.
54029
54030Usage: $0 [OPTION]... [TAG]...
54031
54032  -h, --help       print this help, then exit
54033  -V, --version    print version number and configuration settings, then exit
54034      --config     print configuration, then exit
54035  -q, --quiet, --silent
54036                   do not print progress messages
54037  -d, --debug      don't remove temporary files
54038      --recheck    update $as_me by reconfiguring in the same conditions
54039      --file=FILE[:TEMPLATE]
54040                   instantiate the configuration file FILE
54041
54042Configuration files:
54043$config_files
54044
54045Report bugs to <build-dev@openjdk.java.net>.
54046OpenJDK home page: <http://openjdk.java.net>."
54047
54048_ACEOF
54049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54050ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54051ac_cs_version="\\
54052OpenJDK config.status jdk9
54053configured by $0, generated by GNU Autoconf 2.69,
54054  with options \\"\$ac_cs_config\\"
54055
54056Copyright (C) 2012 Free Software Foundation, Inc.
54057This config.status script is free software; the Free Software Foundation
54058gives unlimited permission to copy, distribute and modify it."
54059
54060ac_pwd='$ac_pwd'
54061srcdir='$srcdir'
54062AWK='$AWK'
54063test -n "\$AWK" || AWK=awk
54064_ACEOF
54065
54066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54067# The default lists apply if the user does not specify any file.
54068ac_need_defaults=:
54069while test $# != 0
54070do
54071  case $1 in
54072  --*=?*)
54073    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54074    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54075    ac_shift=:
54076    ;;
54077  --*=)
54078    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54079    ac_optarg=
54080    ac_shift=:
54081    ;;
54082  *)
54083    ac_option=$1
54084    ac_optarg=$2
54085    ac_shift=shift
54086    ;;
54087  esac
54088
54089  case $ac_option in
54090  # Handling of the options.
54091  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54092    ac_cs_recheck=: ;;
54093  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54094    $as_echo "$ac_cs_version"; exit ;;
54095  --config | --confi | --conf | --con | --co | --c )
54096    $as_echo "$ac_cs_config"; exit ;;
54097  --debug | --debu | --deb | --de | --d | -d )
54098    debug=: ;;
54099  --file | --fil | --fi | --f )
54100    $ac_shift
54101    case $ac_optarg in
54102    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54103    '') as_fn_error $? "missing file argument" ;;
54104    esac
54105    as_fn_append CONFIG_FILES " '$ac_optarg'"
54106    ac_need_defaults=false;;
54107  --he | --h |  --help | --hel | -h )
54108    $as_echo "$ac_cs_usage"; exit ;;
54109  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54110  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54111    ac_cs_silent=: ;;
54112
54113  # This is an error.
54114  -*) as_fn_error $? "unrecognized option: \`$1'
54115Try \`$0 --help' for more information." ;;
54116
54117  *) as_fn_append ac_config_targets " $1"
54118     ac_need_defaults=false ;;
54119
54120  esac
54121  shift
54122done
54123
54124ac_configure_extra_args=
54125
54126if $ac_cs_silent; then
54127  exec 6>/dev/null
54128  ac_configure_extra_args="$ac_configure_extra_args --silent"
54129fi
54130
54131_ACEOF
54132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54133if \$ac_cs_recheck; then
54134  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54135  shift
54136  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54137  CONFIG_SHELL='$SHELL'
54138  export CONFIG_SHELL
54139  exec "\$@"
54140fi
54141
54142_ACEOF
54143cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54144exec 5>>config.log
54145{
54146  echo
54147  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54148## Running $as_me. ##
54149_ASBOX
54150  $as_echo "$ac_log"
54151} >&5
54152
54153_ACEOF
54154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54155_ACEOF
54156
54157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54158
54159# Handling of arguments.
54160for ac_config_target in $ac_config_targets
54161do
54162  case $ac_config_target in
54163    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54164    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54165    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54166    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54167    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54168
54169  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54170  esac
54171done
54172
54173
54174# If the user did not use the arguments to specify the items to instantiate,
54175# then the envvar interface is used.  Set only those that are not.
54176# We use the long form for the default assignment because of an extremely
54177# bizarre bug on SunOS 4.1.3.
54178if $ac_need_defaults; then
54179  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54180fi
54181
54182# Have a temporary directory for convenience.  Make it in the build tree
54183# simply because there is no reason against having it here, and in addition,
54184# creating and moving files from /tmp can sometimes cause problems.
54185# Hook for its removal unless debugging.
54186# Note that there is a small window in which the directory will not be cleaned:
54187# after its creation but before its name has been assigned to `$tmp'.
54188$debug ||
54189{
54190  tmp= ac_tmp=
54191  trap 'exit_status=$?
54192  : "${ac_tmp:=$tmp}"
54193  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54194' 0
54195  trap 'as_fn_exit 1' 1 2 13 15
54196}
54197# Create a (secure) tmp directory for tmp files.
54198
54199{
54200  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54201  test -d "$tmp"
54202}  ||
54203{
54204  tmp=./conf$$-$RANDOM
54205  (umask 077 && mkdir "$tmp")
54206} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54207ac_tmp=$tmp
54208
54209# Set up the scripts for CONFIG_FILES section.
54210# No need to generate them if there are no CONFIG_FILES.
54211# This happens for instance with `./config.status config.h'.
54212if test -n "$CONFIG_FILES"; then
54213
54214
54215ac_cr=`echo X | tr X '\015'`
54216# On cygwin, bash can eat \r inside `` if the user requested igncr.
54217# But we know of no other shell where ac_cr would be empty at this
54218# point, so we can use a bashism as a fallback.
54219if test "x$ac_cr" = x; then
54220  eval ac_cr=\$\'\\r\'
54221fi
54222ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54223if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54224  ac_cs_awk_cr='\\r'
54225else
54226  ac_cs_awk_cr=$ac_cr
54227fi
54228
54229echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54230_ACEOF
54231
54232
54233{
54234  echo "cat >conf$$subs.awk <<_ACEOF" &&
54235  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54236  echo "_ACEOF"
54237} >conf$$subs.sh ||
54238  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54239ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54240ac_delim='%!_!# '
54241for ac_last_try in false false false false false :; do
54242  . ./conf$$subs.sh ||
54243    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54244
54245  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54246  if test $ac_delim_n = $ac_delim_num; then
54247    break
54248  elif $ac_last_try; then
54249    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54250  else
54251    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54252  fi
54253done
54254rm -f conf$$subs.sh
54255
54256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54257cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54258_ACEOF
54259sed -n '
54260h
54261s/^/S["/; s/!.*/"]=/
54262p
54263g
54264s/^[^!]*!//
54265:repl
54266t repl
54267s/'"$ac_delim"'$//
54268t delim
54269:nl
54270h
54271s/\(.\{148\}\)..*/\1/
54272t more1
54273s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54274p
54275n
54276b repl
54277:more1
54278s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54279p
54280g
54281s/.\{148\}//
54282t nl
54283:delim
54284h
54285s/\(.\{148\}\)..*/\1/
54286t more2
54287s/["\\]/\\&/g; s/^/"/; s/$/"/
54288p
54289b
54290:more2
54291s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54292p
54293g
54294s/.\{148\}//
54295t delim
54296' <conf$$subs.awk | sed '
54297/^[^""]/{
54298  N
54299  s/\n//
54300}
54301' >>$CONFIG_STATUS || ac_write_fail=1
54302rm -f conf$$subs.awk
54303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54304_ACAWK
54305cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54306  for (key in S) S_is_set[key] = 1
54307  FS = ""
54308
54309}
54310{
54311  line = $ 0
54312  nfields = split(line, field, "@")
54313  substed = 0
54314  len = length(field[1])
54315  for (i = 2; i < nfields; i++) {
54316    key = field[i]
54317    keylen = length(key)
54318    if (S_is_set[key]) {
54319      value = S[key]
54320      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54321      len += length(value) + length(field[++i])
54322      substed = 1
54323    } else
54324      len += 1 + keylen
54325  }
54326
54327  print line
54328}
54329
54330_ACAWK
54331_ACEOF
54332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54333if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54334  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54335else
54336  cat
54337fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54338  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54339_ACEOF
54340
54341# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54342# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54343# trailing colons and then remove the whole line if VPATH becomes empty
54344# (actually we leave an empty line to preserve line numbers).
54345if test "x$srcdir" = x.; then
54346  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54347h
54348s///
54349s/^/:/
54350s/[	 ]*$/:/
54351s/:\$(srcdir):/:/g
54352s/:\${srcdir}:/:/g
54353s/:@srcdir@:/:/g
54354s/^:*//
54355s/:*$//
54356x
54357s/\(=[	 ]*\).*/\1/
54358G
54359s/\n//
54360s/^[^=]*=[	 ]*$//
54361}'
54362fi
54363
54364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54365fi # test -n "$CONFIG_FILES"
54366
54367
54368eval set X "  :F $CONFIG_FILES      "
54369shift
54370for ac_tag
54371do
54372  case $ac_tag in
54373  :[FHLC]) ac_mode=$ac_tag; continue;;
54374  esac
54375  case $ac_mode$ac_tag in
54376  :[FHL]*:*);;
54377  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54378  :[FH]-) ac_tag=-:-;;
54379  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54380  esac
54381  ac_save_IFS=$IFS
54382  IFS=:
54383  set x $ac_tag
54384  IFS=$ac_save_IFS
54385  shift
54386  ac_file=$1
54387  shift
54388
54389  case $ac_mode in
54390  :L) ac_source=$1;;
54391  :[FH])
54392    ac_file_inputs=
54393    for ac_f
54394    do
54395      case $ac_f in
54396      -) ac_f="$ac_tmp/stdin";;
54397      *) # Look for the file first in the build tree, then in the source tree
54398	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54399	 # because $ac_f cannot contain `:'.
54400	 test -f "$ac_f" ||
54401	   case $ac_f in
54402	   [\\/$]*) false;;
54403	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54404	   esac ||
54405	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54406      esac
54407      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54408      as_fn_append ac_file_inputs " '$ac_f'"
54409    done
54410
54411    # Let's still pretend it is `configure' which instantiates (i.e., don't
54412    # use $as_me), people would be surprised to read:
54413    #    /* config.h.  Generated by config.status.  */
54414    configure_input='Generated from '`
54415	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54416	`' by configure.'
54417    if test x"$ac_file" != x-; then
54418      configure_input="$ac_file.  $configure_input"
54419      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54420$as_echo "$as_me: creating $ac_file" >&6;}
54421    fi
54422    # Neutralize special characters interpreted by sed in replacement strings.
54423    case $configure_input in #(
54424    *\&* | *\|* | *\\* )
54425       ac_sed_conf_input=`$as_echo "$configure_input" |
54426       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54427    *) ac_sed_conf_input=$configure_input;;
54428    esac
54429
54430    case $ac_tag in
54431    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54432      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54433    esac
54434    ;;
54435  esac
54436
54437  ac_dir=`$as_dirname -- "$ac_file" ||
54438$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54439	 X"$ac_file" : 'X\(//\)[^/]' \| \
54440	 X"$ac_file" : 'X\(//\)$' \| \
54441	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54442$as_echo X"$ac_file" |
54443    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54444	    s//\1/
54445	    q
54446	  }
54447	  /^X\(\/\/\)[^/].*/{
54448	    s//\1/
54449	    q
54450	  }
54451	  /^X\(\/\/\)$/{
54452	    s//\1/
54453	    q
54454	  }
54455	  /^X\(\/\).*/{
54456	    s//\1/
54457	    q
54458	  }
54459	  s/.*/./; q'`
54460  as_dir="$ac_dir"; as_fn_mkdir_p
54461  ac_builddir=.
54462
54463case "$ac_dir" in
54464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54465*)
54466  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54467  # A ".." for each directory in $ac_dir_suffix.
54468  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54469  case $ac_top_builddir_sub in
54470  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54471  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54472  esac ;;
54473esac
54474ac_abs_top_builddir=$ac_pwd
54475ac_abs_builddir=$ac_pwd$ac_dir_suffix
54476# for backward compatibility:
54477ac_top_builddir=$ac_top_build_prefix
54478
54479case $srcdir in
54480  .)  # We are building in place.
54481    ac_srcdir=.
54482    ac_top_srcdir=$ac_top_builddir_sub
54483    ac_abs_top_srcdir=$ac_pwd ;;
54484  [\\/]* | ?:[\\/]* )  # Absolute name.
54485    ac_srcdir=$srcdir$ac_dir_suffix;
54486    ac_top_srcdir=$srcdir
54487    ac_abs_top_srcdir=$srcdir ;;
54488  *) # Relative name.
54489    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54490    ac_top_srcdir=$ac_top_build_prefix$srcdir
54491    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54492esac
54493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54494
54495
54496  case $ac_mode in
54497  :F)
54498  #
54499  # CONFIG_FILE
54500  #
54501
54502_ACEOF
54503
54504cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54505# If the template does not know about datarootdir, expand it.
54506# FIXME: This hack should be removed a few years after 2.60.
54507ac_datarootdir_hack=; ac_datarootdir_seen=
54508ac_sed_dataroot='
54509/datarootdir/ {
54510  p
54511  q
54512}
54513/@datadir@/p
54514/@docdir@/p
54515/@infodir@/p
54516/@localedir@/p
54517/@mandir@/p'
54518case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54519*datarootdir*) ac_datarootdir_seen=yes;;
54520*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54521  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54522$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54523_ACEOF
54524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54525  ac_datarootdir_hack='
54526  s&@datadir@&$datadir&g
54527  s&@docdir@&$docdir&g
54528  s&@infodir@&$infodir&g
54529  s&@localedir@&$localedir&g
54530  s&@mandir@&$mandir&g
54531  s&\\\${datarootdir}&$datarootdir&g' ;;
54532esac
54533_ACEOF
54534
54535# Neutralize VPATH when `$srcdir' = `.'.
54536# Shell code in configure.ac might set extrasub.
54537# FIXME: do we really want to maintain this feature?
54538cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54539ac_sed_extra="$ac_vpsub
54540$extrasub
54541_ACEOF
54542cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54543:t
54544/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54545s|@configure_input@|$ac_sed_conf_input|;t t
54546s&@top_builddir@&$ac_top_builddir_sub&;t t
54547s&@top_build_prefix@&$ac_top_build_prefix&;t t
54548s&@srcdir@&$ac_srcdir&;t t
54549s&@abs_srcdir@&$ac_abs_srcdir&;t t
54550s&@top_srcdir@&$ac_top_srcdir&;t t
54551s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54552s&@builddir@&$ac_builddir&;t t
54553s&@abs_builddir@&$ac_abs_builddir&;t t
54554s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54555$ac_datarootdir_hack
54556"
54557eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54558  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54559
54560test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54561  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54562  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54563      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54564  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54565which seems to be undefined.  Please make sure it is defined" >&5
54566$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54567which seems to be undefined.  Please make sure it is defined" >&2;}
54568
54569  rm -f "$ac_tmp/stdin"
54570  case $ac_file in
54571  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54572  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54573  esac \
54574  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54575 ;;
54576
54577
54578
54579  esac
54580
54581done # for ac_tag
54582
54583
54584as_fn_exit 0
54585_ACEOF
54586ac_clean_files=$ac_clean_files_save
54587
54588test $ac_write_fail = 0 ||
54589  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54590
54591
54592# configure is writing to config.log, and then calls config.status.
54593# config.status does its own redirection, appending to config.log.
54594# Unfortunately, on DOS this fails, as config.log is still kept open
54595# by configure, so config.status won't be able to write to it; its
54596# output is simply discarded.  So we exec the FD to /dev/null,
54597# effectively closing config.log, so it can be properly (re)opened and
54598# appended to by config.status.  When coming back to configure, we
54599# need to make the FD available again.
54600if test "$no_create" != yes; then
54601  ac_cs_success=:
54602  ac_config_status_args=
54603  test "$silent" = yes &&
54604    ac_config_status_args="$ac_config_status_args --quiet"
54605  exec 5>/dev/null
54606  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54607  exec 5>>config.log
54608  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54609  # would make configure fail if this is the last instruction.
54610  $ac_cs_success || as_fn_exit 1
54611fi
54612if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54613  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54614$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54615fi
54616
54617
54618# After AC_OUTPUT, we need to do final work
54619
54620
54621  # Try to move config.log (generated by autoconf) to the configure-support directory.
54622  if test -e ./config.log; then
54623    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54624  fi
54625
54626  # Rotate our log file (configure.log)
54627  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54628    $RM -f "$OUTPUT_ROOT/configure.log.old"
54629  fi
54630  if test -e "$OUTPUT_ROOT/configure.log"; then
54631    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54632  fi
54633
54634  # Move configure.log from current directory to the build output root
54635  if test -e ./configure.log; then
54636    echo found it
54637    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54638  fi
54639
54640  # Make the compare script executable
54641  $CHMOD +x $OUTPUT_ROOT/compare.sh
54642
54643
54644# Finally output some useful information to the user
54645
54646  # Finally output some useful information to the user
54647
54648  printf "\n"
54649  printf "====================================================\n"
54650  if test "x$no_create" != "xyes"; then
54651    if test "x$IS_RECONFIGURE" != "xyes"; then
54652      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54653    else
54654      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54655    fi
54656  else
54657    if test "x$IS_RECONFIGURE" != "xyes"; then
54658      printf "A configuration has been successfully checked but not created\n"
54659    else
54660      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54661    fi
54662  fi
54663  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54664    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54665  else
54666    printf "using default settings.\n"
54667  fi
54668
54669  printf "\n"
54670  printf "Configuration summary:\n"
54671  printf "* Debug level:    $DEBUG_LEVEL\n"
54672  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54673  printf "* JDK variant:    $JDK_VARIANT\n"
54674  printf "* JVM variants:   $with_jvm_variants\n"
54675  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54676
54677  printf "\n"
54678  printf "Tools summary:\n"
54679  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54680    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54681  fi
54682  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54683  if test "x$TOOLCHAIN_VERSION" != "x"; then
54684    print_version=" $TOOLCHAIN_VERSION"
54685  fi
54686  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54687  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54688  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54689
54690  printf "\n"
54691  printf "Build performance summary:\n"
54692  printf "* Cores to use:   $JOBS\n"
54693  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54694  if test "x$CCACHE_STATUS" != "x"; then
54695    printf "* ccache status:  $CCACHE_STATUS\n"
54696  fi
54697  printf "\n"
54698
54699  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54700    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54701    printf "will result in longer build times.\n"
54702    printf "\n"
54703  fi
54704
54705  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54706    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54707    printf "These are not respected, and will be ignored. It is recommended\n"
54708    printf "that you clean your environment. The following variables are set:\n"
54709    printf "$FOUND_ALT_VARIABLES\n"
54710    printf "\n"
54711  fi
54712
54713  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54714    printf "WARNING: Your build output directory is not on a local disk.\n"
54715    printf "This will severely degrade build performance!\n"
54716    printf "It is recommended that you create an output directory on a local disk,\n"
54717    printf "and run the configure script again from that directory.\n"
54718    printf "\n"
54719  fi
54720
54721  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54722    printf "WARNING: The result of this configuration has overridden an older\n"
54723    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54724    printf "proper build. Failure to do so might result in strange build problems.\n"
54725    printf "\n"
54726  fi
54727
54728  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54729    printf "WARNING: The result of this configuration was not saved.\n"
54730    printf "You should run without '--no-create | -n' to create the configuration.\n"
54731    printf "\n"
54732  fi
54733
54734
54735
54736  # Locate config.log.
54737  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54738    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54739  elif test -e "./config.log"; then
54740    CONFIG_LOG_PATH="."
54741  fi
54742
54743  if test -e "$CONFIG_LOG_PATH/config.log"; then
54744    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54745    if test $? -eq 0; then
54746      printf "The following warnings were produced. Repeated here for convenience:\n"
54747      # We must quote sed expression (using []) to stop m4 from eating the [].
54748      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54749      printf "\n"
54750    fi
54751  fi
54752
54753