generated-configure.sh revision 1682:cb3f10185e63
1139825Simp#!/bin/bash
21541Srgrimes#
31541Srgrimes# ##########################################################
41541Srgrimes# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
51541Srgrimes# ##########################################################
61541Srgrimes#
71541Srgrimes#! /bin/sh
81541Srgrimes# Guess values for system-dependent variables and create Makefiles.
91541Srgrimes# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
101541Srgrimes#
111541Srgrimes# Report bugs to <build-dev@openjdk.java.net>.
121541Srgrimes#
131541Srgrimes#
141541Srgrimes# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
151541Srgrimes#
161541Srgrimes#
171541Srgrimes# This configure script is free software; the Free Software Foundation
181541Srgrimes# gives unlimited permission to copy, distribute and modify it.
191541Srgrimes## -------------------- ##
201541Srgrimes## M4sh Initialization. ##
211541Srgrimes## -------------------- ##
221541Srgrimes
231541Srgrimes# Be more Bourne compatible
241541SrgrimesDUALCASE=1; export DUALCASE # for MKS sh
251541Srgrimesif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
261541Srgrimes  emulate sh
271541Srgrimes  NULLCMD=:
281541Srgrimes  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
291541Srgrimes  # is contrary to our usage.  Disable this feature.
301541Srgrimes  alias -g '${1+"$@"}'='"$@"'
311541Srgrimes  setopt NO_GLOB_SUBST
321817Sdgelse
331541Srgrimes  case `(set -o) 2>/dev/null` in #(
341541Srgrimes  *posix*) :
351541Srgrimes    set -o posix ;; #(
361541Srgrimes  *) :
371541Srgrimes     ;;
381541Srgrimesesac
395455Sdgfi
401541Srgrimes
411541Srgrimes
421541Srgrimesas_nl='
431541Srgrimes'
441541Srgrimesexport as_nl
455455Sdg# Printing a long string crashes Solaris 7 /usr/bin/printf.
465455Sdgas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
475455Sdgas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
481541Srgrimesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
495455Sdg# Prefer a ksh shell builtin over an external printf program on Solaris,
501541Srgrimes# but without wasting forks for bash or zsh.
511541Srgrimesif test -z "$BASH_VERSION$ZSH_VERSION" \
521541Srgrimes    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
531541Srgrimes  as_echo='print -r --'
541541Srgrimes  as_echo_n='print -rn --'
551541Srgrimeselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
561541Srgrimes  as_echo='printf %s\n'
571541Srgrimes  as_echo_n='printf %s'
581541Srgrimeselse
591817Sdg  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6050477Speter    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
611541Srgrimes    as_echo_n='/usr/ucb/echo -n'
621541Srgrimes  else
631541Srgrimes    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
641541Srgrimes    as_echo_n_body='eval
651541Srgrimes      arg=$1;
661541Srgrimes      case $arg in #(
671541Srgrimes      *"$as_nl"*)
681541Srgrimes	expr "X$arg" : "X\\(.*\\)$as_nl";
691541Srgrimes	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
706816Sdg      esac;
7138517Sdfr      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
721541Srgrimes    '
731541Srgrimes    export as_echo_n_body
741541Srgrimes    as_echo_n='sh -c $as_echo_n_body as_echo'
751541Srgrimes  fi
761541Srgrimes  export as_echo_body
771541Srgrimes  as_echo='sh -c $as_echo_body as_echo'
781541Srgrimesfi
791541Srgrimes
801541Srgrimes# The user is always right.
811541Srgrimesif test "${PATH_SEPARATOR+set}" != set; then
821541Srgrimes  PATH_SEPARATOR=:
831541Srgrimes  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
841541Srgrimes    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
851541Srgrimes      PATH_SEPARATOR=';'
861541Srgrimes  }
871541Srgrimesfi
881541Srgrimes
891541Srgrimes
901541Srgrimes# IFS
911541Srgrimes# We need space, tab and new line, in precisely that order.  Quoting is
921541Srgrimes# there to prevent editors from complaining about space-tab.
931541Srgrimes# (If _AS_PATH_WALK were called with IFS unset, it would disable word
941541Srgrimes# splitting by setting IFS to empty value.)
9546349SalcIFS=" ""	$as_nl"
9646349Salc
9746349Salc# Find who we are.  Look in the path if we contain no directory separator.
9846349Salcas_myself=
991541Srgrimescase $0 in #((
1001541Srgrimes  *[\\/]* ) as_myself=$0 ;;
10160938Sjake  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1021541Srgrimesfor as_dir in $PATH
1031541Srgrimesdo
10460938Sjake  IFS=$as_save_IFS
10560938Sjake  test -z "$as_dir" && as_dir=.
106105407Sdillon    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107105407Sdillon  done
1081541SrgrimesIFS=$as_save_IFS
10942957Sdillon
11012767Sdyson     ;;
111121511Salcesac
11260755Speter# We did not find ourselves, most probably we were run as `sh COMMAND'
11318169Sdyson# in which case we are not to be found in the path.
11418169Sdysonif test "x$as_myself" = x; then
11518169Sdyson  as_myself=$0
1165455Sdgfi
117134184Smarcelif test ! -f "$as_myself"; then
1185455Sdg  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119161125Salc  exit 1
12013490Sdysonfi
121139338Salc
12213490Sdyson# Unset variables that we do not need and which cause bugs (e.g. in
12313490Sdyson# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12436735Sdfr# suppresses any "Segmentation fault" message there.  '((' could
125121511Salc# trigger a bug in pdksh 5.2.14.
12613490Sdysonfor as_var in BASH_ENV ENV MAIL MAILPATH
12736735Sdfrdo eval test x\${$as_var+set} = xset \
128121511Salc  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12936735Sdfrdone
130119354SmarcelPS1='$ '
131121511SalcPS2='> '
132119354SmarcelPS4='+ '
133119354Smarcel
134121511Salc# NLS nuisances.
135119354SmarcelLC_ALL=C
13636735Sdfrexport LC_ALL
1371541SrgrimesLANGUAGE=C
1381541Srgrimesexport LANGUAGE
139161125Salc
140161125Salc# CDPATH.
141161125Salc(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142161125Salc
143161125Salc# Use a proper internal environment variable to ensure we don't fall
144161125Salc  # into an infinite loop, continuously re-executing ourselves.
145161125Salc  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146161125Salc    _as_can_reexec=no; export _as_can_reexec;
147161125Salc    # We cannot yet assume a decent shell, so we have to provide a
148119468Smarcel# neutralization value for shells without unset; and this also
149119468Smarcel# works around shells that cannot unset nonexistent variables.
150119468Smarcel# Preserve -v and -x to the replacement shell.
151119468SmarcelBASH_ENV=/dev/null
152119468SmarcelENV=/dev/null
153119468Smarcel(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154119468Smarcelcase $- in # ((((
155153940Snetchild  *v*x* | *x*v* ) as_opts=-vx ;;
156153940Snetchild  *v* ) as_opts=-v ;;
157153940Snetchild  *x* ) as_opts=-x ;;
158153940Snetchild  * ) as_opts= ;;
159153940Snetchildesac
160153940Snetchildexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161153940Snetchild# Admittedly, this is quite paranoid, since all the known shells bail
162153940Snetchild# out after a failed `exec'.
163153940Snetchild$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164153940Snetchildas_fn_exit 255
165153940Snetchild  fi
166153940Snetchild  # We don't want this to propagate to other subprocesses.
167153940Snetchild          { _as_can_reexec=; unset _as_can_reexec;}
168153940Snetchildif test "x$CONFIG_SHELL" = x; then
169153940Snetchild  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
17018169Sdyson  emulate sh
171153940Snetchild  NULLCMD=:
172153940Snetchild  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
17362568Sjhb  # is contrary to our usage.  Disable this feature.
174153940Snetchild  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175153940Snetchild  setopt NO_GLOB_SUBST
176153940Snetchildelse
17736326Sdyson  case \`(set -o) 2>/dev/null\` in #(
178153940Snetchild  *posix*) :
179153940Snetchild    set -o posix ;; #(
18018169Sdyson  *) :
181153940Snetchild     ;;
182153940Snetchildesac
183153940Snetchildfi
18418169Sdyson"
185153940Snetchild  as_required="as_fn_return () { (exit \$1); }
186153940Snetchildas_fn_success () { as_fn_return 0; }
187153940Snetchildas_fn_failure () { as_fn_return 1; }
18818169Sdysonas_fn_ret_success () { return 0; }
18952647Salcas_fn_ret_failure () { return 1; }
19052647Salc
19118169Sdysonexitcode=0
19249326Salcas_fn_success || { exitcode=1; echo as_fn_success failed.; }
19352647Salcas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
19418169Sdysonas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195153940Snetchildas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196153940Snetchildif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197153940Snetchild
198153940Snetchildelse
199153940Snetchild  exitcode=1; echo positional parameters were not saved.
200153940Snetchildfi
201153940Snetchildtest x\$exitcode = x0 || exit 1
202153940Snetchildtest -x / || exit 1"
203153940Snetchild  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204153940Snetchild  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205153940Snetchild  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206153940Snetchild  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207153940Snetchildtest \$(( 1 + 1 )) = 2 || exit 1"
208153940Snetchild  if (eval "$as_required") 2>/dev/null; then :
20999416Salc  as_have_required=yes
210153940Snetchildelse
21152647Salc  as_have_required=no
2121541Srgrimesfi
2131541Srgrimes  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
2141541Srgrimes
21561081Sdillonelse
21661081Sdillon  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21761081Sdillonas_found=false
21861081Sdillonfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21961081Sdillondo
22061081Sdillon  IFS=$as_save_IFS
2211541Srgrimes  test -z "$as_dir" && as_dir=.
22242957Sdillon  as_found=:
22370374Sdillon  case $as_dir in #(
22442957Sdillon	 /*)
22542957Sdillon	   for as_base in sh bash ksh sh5; do
22642957Sdillon	     # Try only shells that exist, to save several forks.
22742957Sdillon	     as_shell=$as_dir/$as_base
22842957Sdillon	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
22954467Sdillon		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
23061081Sdillon  CONFIG_SHELL=$as_shell as_have_required=yes
23168885Sdillon		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232103531Sjeff  break 2
2331541Srgrimesfi
2349507Sdgfi
2359507Sdg	   done;;
2369507Sdg       esac
2379507Sdg  as_found=false
2389507Sdgdone
23916750Sdyson$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
24018169Sdyson	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
2419507Sdg  CONFIG_SHELL=$SHELL as_have_required=yes
24255206Speterfi; }
2431541SrgrimesIFS=$as_save_IFS
2449507Sdg
2451541Srgrimes
2465455Sdg      if test "x$CONFIG_SHELL" != x; then :
2471541Srgrimes  export CONFIG_SHELL
2489507Sdg             # We cannot yet assume a decent shell, so we have to provide a
2499507Sdg# neutralization value for shells without unset; and this also
2509507Sdg# works around shells that cannot unset nonexistent variables.
2519507Sdg# Preserve -v and -x to the replacement shell.
2529507SdgBASH_ENV=/dev/null
2539507SdgENV=/dev/null
2549507Sdg(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
2559507Sdgcase $- in # ((((
2561541Srgrimes  *v*x* | *x*v* ) as_opts=-vx ;;
25713765Smpp  *v* ) as_opts=-v ;;
2581541Srgrimes  *x* ) as_opts=-x ;;
2591541Srgrimes  * ) as_opts= ;;
2609507Sdgesac
2611541Srgrimesexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
2629507Sdg# Admittedly, this is quite paranoid, since all the known shells bail
2639507Sdg# out after a failed `exec'.
26410544Sdyson$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
26510544Sdysonexit 255
26610544Sdysonfi
26710544Sdyson
2681541Srgrimes    if test x$as_have_required = xno; then :
2691541Srgrimes  $as_echo "$0: This script requires a shell more modern than all"
27012767Sdyson  $as_echo "$0: the shells that I found on your system."
27112767Sdyson  if test x${ZSH_VERSION+set} = xset ; then
2725455Sdg    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
27360755Speter    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
2745455Sdg  else
2751541Srgrimes    $as_echo "$0: Please tell bug-autoconf@gnu.org and
2761541Srgrimes$0: build-dev@openjdk.java.net about your system, including
2771541Srgrimes$0: any error possibly output before this message. Then
2781541Srgrimes$0: install a modern shell, or manually run the script
2791541Srgrimes$0: under such a shell if you do have one."
2801541Srgrimes  fi
28199927Salc  exit 1
28299927Salcfi
28399927Salcfi
2841541Srgrimesfi
2855455SdgSHELL=${CONFIG_SHELL-/bin/sh}
286119356Smarcelexport SHELL
287119356Smarcel# Unset more variables known to interfere with behavior of common tools.
288119356SmarcelCLICOLOR_FORCE= GREP_OPTIONS=
289119356Smarcelunset CLICOLOR_FORCE GREP_OPTIONS
290119356Smarcel
291119356Smarcel## --------------------- ##
292119356Smarcel## M4sh Shell Functions. ##
2935455Sdg## --------------------- ##
2941541Srgrimes# as_fn_unset VAR
295100276Salc# ---------------
29633109Sdyson# Portably unset VAR.
29733109Sdysonas_fn_unset ()
29833109Sdyson{
299100276Salc  { eval $1=; unset $1;}
300100276Salc}
301106276Sjeffas_unset=as_fn_unset
302106276Sjeff
303106276Sjeff# as_fn_set_status STATUS
304106276Sjeff# -----------------------
305136850Salc# Set $? to STATUS, without forking.
3065455Sdgas_fn_set_status ()
30779248Sdillon{
30879248Sdillon  return $1
30979248Sdillon} # as_fn_set_status
31079248Sdillon
31179248Sdillon# as_fn_exit STATUS
31279248Sdillon# -----------------
31379248Sdillon# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31479248Sdillonas_fn_exit ()
31579248Sdillon{
31679248Sdillon  set +e
317100889Salc  as_fn_set_status $1
31879248Sdillon  exit $1
31979248Sdillon} # as_fn_exit
32079248Sdillon
32179263Sdillon# as_fn_mkdir_p
322112569Sjake# -------------
32391641Salc# Create "$as_dir" as a directory, including parents if necessary.
32479263Sdillonas_fn_mkdir_p ()
32579263Sdillon{
32679263Sdillon
32779263Sdillon  case $as_dir in #(
32879263Sdillon  -*) as_dir=./$as_dir;;
32979248Sdillon  esac
33079248Sdillon  test -d "$as_dir" || eval $as_mkdir_p || {
331132379Sgreen    as_dirs=
332132379Sgreen    while :; do
333132379Sgreen      case $as_dir in #(
33479248Sdillon      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33579248Sdillon      *) as_qdir=$as_dir;;
33679248Sdillon      esac
33779248Sdillon      as_dirs="'$as_qdir' $as_dirs"
33879248Sdillon      as_dir=`$as_dirname -- "$as_dir" ||
33979248Sdillon$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34079248Sdillon	 X"$as_dir" : 'X\(//\)[^/]' \| \
34179248Sdillon	 X"$as_dir" : 'X\(//\)$' \| \
34279248Sdillon	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34379248Sdillon$as_echo X"$as_dir" |
344121351Salc    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345106422Salc	    s//\1/
346127868Salc	    q
34779248Sdillon	  }
34879248Sdillon	  /^X\(\/\/\)[^/].*/{
34979248Sdillon	    s//\1/
35079248Sdillon	    q
35179248Sdillon	  }
35279248Sdillon	  /^X\(\/\/\)$/{
35379248Sdillon	    s//\1/
35479248Sdillon	    q
35579248Sdillon	  }
35645347Sjulian	  /^X\(\/\).*/{
35743752Sdillon	    s//\1/
35882314Speter	    q
35998849Sken	  }
36098849Sken	  s/.*/./; q'`
36198849Sken      test -d "$as_dir" && break
36298849Sken    done
363105549Salc    test -z "$as_dirs" || eval "mkdir $as_dirs"
364105549Salc  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365105549Salc
366105549Salc
367105549Salc} # as_fn_mkdir_p
368105549Salc
369105549Salc# as_fn_executable_p FILE
370105549Salc# -----------------------
371105549Salc# Test if FILE is an executable regular file.
372105549Salcas_fn_executable_p ()
373105549Salc{
37455206Speter  test -f "$1" && test -x "$1"
3755455Sdg} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648LIBZIP_CAN_USE_MMAP
649LIBDL
650LIBM
651USE_EXTERNAL_LCMS
652LCMS_LIBS
653LCMS_CFLAGS
654USE_EXTERNAL_LIBZ
655USE_EXTERNAL_LIBPNG
656PNG_LIBS
657PNG_CFLAGS
658USE_EXTERNAL_LIBGIF
659USE_EXTERNAL_LIBJPEG
660LLVM_LIBS
661LLVM_LDFLAGS
662LLVM_CFLAGS
663LLVM_CONFIG
664LIBFFI_LIBS
665LIBFFI_CFLAGS
666ALSA_LIBS
667ALSA_CFLAGS
668FREETYPE_BUNDLE_LIB_PATH
669FREETYPE_LIBS
670FREETYPE_CFLAGS
671CUPS_CFLAGS
672X_EXTRA_LIBS
673X_LIBS
674X_PRE_LIBS
675X_CFLAGS
676XMKMF
677MSVCP_DLL
678MSVCR_DLL
679LIBCXX
680STATIC_CXX_SETTING
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708CXX_O_FLAG_NONE
709CXX_O_FLAG_DEBUG
710CXX_O_FLAG_NORM
711CXX_O_FLAG_HI
712CXX_O_FLAG_HIGHEST
713C_O_FLAG_NONE
714C_O_FLAG_DEBUG
715C_O_FLAG_NORM
716C_O_FLAG_HI
717C_O_FLAG_HIGHEST
718CXXFLAGS_DEBUG_SYMBOLS
719CFLAGS_DEBUG_SYMBOLS
720CXX_FLAG_DEPS
721C_FLAG_DEPS
722SET_SHARED_LIBRARY_MAPFILE
723SET_SHARED_LIBRARY_NAME
724SET_SHARED_LIBRARY_ORIGIN
725SET_EXECUTABLE_ORIGIN
726CXX_FLAG_REORDER
727C_FLAG_REORDER
728RC_FLAGS
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733STRIPFLAGS
734ARFLAGS
735COMPILER_TARGET_BITS_FLAG
736JT_HOME
737JTREGEXE
738USING_BROKEN_SUSE_LD
739PACKAGE_PATH
740USE_CLANG
741HOTSPOT_LD
742HOTSPOT_CXX
743HOTSPOT_RC
744HOTSPOT_MT
745BUILD_SYSROOT_LDFLAGS
746BUILD_SYSROOT_CFLAGS
747BUILD_LD
748BUILD_CXX
749BUILD_CC
750ac_ct_OBJDUMP
751OBJDUMP
752ac_ct_OBJCOPY
753OBJCOPY
754ac_ct_NM
755ac_ct_STRIP
756GNM
757NM
758STRIP
759MSBUILD
760DUMPBIN
761RC
762MT
763LIPO
764ac_ct_AR
765AR
766AS
767LDCXX
768LD
769CXXCPP
770CPP
771ac_ct_CXX
772CXXFLAGS
773CXX
774ac_ct_PROPER_COMPILER_CXX
775PROPER_COMPILER_CXX
776TOOLCHAIN_PATH_CXX
777POTENTIAL_CXX
778OBJEXT
779EXEEXT
780ac_ct_CC
781CPPFLAGS
782LDFLAGS
783CFLAGS
784CC
785ac_ct_PROPER_COMPILER_CC
786PROPER_COMPILER_CC
787TOOLCHAIN_PATH_CC
788POTENTIAL_CC
789VS_LIB
790VS_INCLUDE
791VS_PATH
792CYGWIN_LINK
793SYSROOT_LDFLAGS
794SYSROOT_CFLAGS
795LEGACY_EXTRA_LDFLAGS
796LEGACY_EXTRA_CXXFLAGS
797LEGACY_EXTRA_CFLAGS
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809OVERRIDE_SRC_ROOT
810ADD_SRC_ROOT
811JDK_TOPDIR
812NASHORN_TOPDIR
813HOTSPOT_TOPDIR
814JAXWS_TOPDIR
815JAXP_TOPDIR
816CORBA_TOPDIR
817LANGTOOLS_TOPDIR
818BOOT_JDK_BITS
819JAVAC_FLAGS
820BOOT_JDK_SOURCETARGET
821JARSIGNER
822JAR
823JAVAH
824JAVAC
825JAVA
826BOOT_JDK
827JAVA_CHECK
828JAVAC_CHECK
829COOKED_BUILD_NUMBER
830JDK_VERSION
831COPYRIGHT_YEAR
832MACOSX_BUNDLE_ID_BASE
833MACOSX_BUNDLE_NAME_BASE
834COMPANY_NAME
835JDK_RC_PLATFORM_NAME
836PRODUCT_SUFFIX
837PRODUCT_NAME
838LAUNCHER_NAME
839MILESTONE
840JDK_BUILD_NUMBER
841JDK_UPDATE_VERSION
842JDK_MICRO_VERSION
843JDK_MINOR_VERSION
844JDK_MAJOR_VERSION
845USER_RELEASE_SUFFIX
846COMPRESS_JARS
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858SETFILE
859CODESIGN
860XATTR
861DSYMUTIL
862IS_GNU_TIME
863PATCH
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875MAKE
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950NICE
951CPIO
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_extra_cflags
1080with_extra_cxxflags
1081with_extra_ldflags
1082with_toolchain_version
1083with_jtreg
1084enable_warnings_as_errors
1085enable_debug_symbols
1086enable_zip_debug_info
1087enable_native_coverage
1088with_stdc__lib
1089with_msvcr_dll
1090with_msvcp_dll
1091with_x
1092with_cups
1093with_cups_include
1094with_freetype
1095with_freetype_include
1096with_freetype_lib
1097with_freetype_src
1098enable_freetype_bundling
1099with_alsa
1100with_alsa_include
1101with_alsa_lib
1102with_libffi
1103with_libffi_include
1104with_libffi_lib
1105with_libjpeg
1106with_giflib
1107with_libpng
1108with_zlib
1109with_lcms
1110with_dxsdk
1111with_dxsdk_lib
1112with_dxsdk_include
1113with_num_cores
1114with_memory_size
1115with_jobs
1116with_boot_jdk_jvmargs
1117with_sjavac_server_java
1118enable_sjavac
1119enable_precompiled_headers
1120enable_ccache
1121with_ccache_dir
1122'
1123      ac_precious_vars='build_alias
1124host_alias
1125target_alias
1126BASENAME
1127BASH
1128CAT
1129CHMOD
1130CMP
1131COMM
1132CP
1133CUT
1134DATE
1135DIFF
1136DIRNAME
1137ECHO
1138EXPR
1139FILE
1140FIND
1141HEAD
1142LN
1143LS
1144MKDIR
1145MKTEMP
1146MV
1147NAWK
1148PRINTF
1149RM
1150SH
1151SORT
1152TAIL
1153TAR
1154TEE
1155TOUCH
1156TR
1157UNAME
1158UNIQ
1159WC
1160WHICH
1161XARGS
1162AWK
1163GREP
1164EGREP
1165FGREP
1166SED
1167CYGPATH
1168READLINK
1169DF
1170CPIO
1171NICE
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
1218LIBFFI_CFLAGS
1219LIBFFI_LIBS
1220PNG_CFLAGS
1221PNG_LIBS
1222LCMS_CFLAGS
1223LCMS_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-cacerts-file     specify alternative cacerts file
1902  --with-milestone        Set milestone value for build [internal]
1903  --with-update-version   Set update version value for build [b00]
1904  --with-user-release-suffix
1905                          Add a custom string to the version string if build
1906                          number is not set.[username_builddateb00]
1907  --with-build-number     Set build number value for build [b00]
1908  --with-copyright-year   Set copyright year value for build [current year]
1909  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1910  --with-add-source-root  for each and every source directory, look in this
1911                          additional source root for the same directory; if it
1912                          exists and have files in it, include it in the build
1913  --with-override-source-root
1914                          for each and every source directory, look in this
1915                          override source root for the same directory; if it
1916                          exists, use that directory instead and ignore the
1917                          directory in the original source root
1918  --with-adds-and-overrides
1919                          use the subdirs 'adds' and 'overrides' in the
1920                          specified directory as add-source-root and
1921                          override-source-root
1922  --with-override-langtools
1923                          use this langtools dir for the build
1924  --with-override-corba   use this corba dir for the build
1925  --with-override-jaxp    use this jaxp dir for the build
1926  --with-override-jaxws   use this jaxws dir for the build
1927  --with-override-hotspot use this hotspot dir for the build
1928  --with-override-nashorn use this nashorn dir for the build
1929  --with-override-jdk     use this jdk dir for the build
1930  --with-import-hotspot   import hotspot binaries from this jdk image or
1931                          hotspot build dist dir instead of building from
1932                          source
1933  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1934                          to show possible values [platform dependent]
1935  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937  --with-extra-ldflags    extra flags to be used when linking jdk
1938  --with-toolchain-version
1939                          the version of the toolchain to look for, use
1940                          '--help' to show possible values [platform
1941                          dependent]
1942  --with-jtreg            Regression Test Harness [probed]
1943  --with-stdc++lib=<static>,<dynamic>,<default>
1944                          force linking of the C++ runtime on Linux to either
1945                          static or dynamic, default is static with dynamic as
1946                          fallback
1947  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1948                          (Windows only) [probed]
1949  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1950                          (Windows only) [probed]
1951  --with-x                use the X Window System
1952  --with-cups             specify prefix directory for the cups package
1953                          (expecting the headers under PATH/include)
1954  --with-cups-include     specify directory for the cups include files
1955  --with-freetype         specify prefix directory for the freetype package
1956                          (expecting the libraries under PATH/lib and the
1957                          headers under PATH/include)
1958  --with-freetype-include specify directory for the freetype include files
1959  --with-freetype-lib     specify directory for the freetype library
1960  --with-freetype-src     specify directory with freetype sources to
1961                          automatically build the library (experimental,
1962                          Windows-only)
1963  --with-alsa             specify prefix directory for the alsa package
1964                          (expecting the libraries under PATH/lib and the
1965                          headers under PATH/include)
1966  --with-alsa-include     specify directory for the alsa include files
1967  --with-alsa-lib         specify directory for the alsa library
1968  --with-libffi           specify prefix directory for the libffi package
1969                          (expecting the libraries under PATH/lib and the
1970                          headers under PATH/include)
1971  --with-libffi-include   specify directory for the libffi include files
1972  --with-libffi-lib       specify directory for the libffi library
1973  --with-libjpeg          use libjpeg from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-giflib           use giflib from build system or OpenJDK source
1976                          (system, bundled) [bundled]
1977  --with-libpng           use libpng from build system or OpenJDK source
1978                          (system, bundled) [bundled]
1979  --with-zlib             use zlib from build system or OpenJDK source
1980                          (system, bundled) [bundled]
1981  --with-lcms             use lcms2 from build system or OpenJDK source
1982                          (system, bundled) [bundled]
1983  --with-dxsdk            Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-include    Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-num-cores        number of cores in the build system, e.g.
1990                          --with-num-cores=8 [probed]
1991  --with-memory-size      memory (in MB) available in the build system, e.g.
1992                          --with-memory-size=1024 [probed]
1993  --with-jobs             number of parallel jobs to let make run [calculated
1994                          based on cores and memory]
1995  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1996                          invocations of boot JDK, overriding the default
1997                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1998                          -enableassertions"
1999  --with-sjavac-server-java
2000                          use this java binary for running the sjavac
2001                          background server [Boot JDK java]
2002  --with-ccache-dir       where to store ccache files [~/.ccache]
2003
2004Some influential environment variables:
2005  BASENAME    Override default value for BASENAME
2006  BASH        Override default value for BASH
2007  CAT         Override default value for CAT
2008  CHMOD       Override default value for CHMOD
2009  CMP         Override default value for CMP
2010  COMM        Override default value for COMM
2011  CP          Override default value for CP
2012  CUT         Override default value for CUT
2013  DATE        Override default value for DATE
2014  DIFF        Override default value for DIFF
2015  DIRNAME     Override default value for DIRNAME
2016  ECHO        Override default value for ECHO
2017  EXPR        Override default value for EXPR
2018  FILE        Override default value for FILE
2019  FIND        Override default value for FIND
2020  HEAD        Override default value for HEAD
2021  LN          Override default value for LN
2022  LS          Override default value for LS
2023  MKDIR       Override default value for MKDIR
2024  MKTEMP      Override default value for MKTEMP
2025  MV          Override default value for MV
2026  NAWK        Override default value for NAWK
2027  PRINTF      Override default value for PRINTF
2028  RM          Override default value for RM
2029  SH          Override default value for SH
2030  SORT        Override default value for SORT
2031  TAIL        Override default value for TAIL
2032  TAR         Override default value for TAR
2033  TEE         Override default value for TEE
2034  TOUCH       Override default value for TOUCH
2035  TR          Override default value for TR
2036  UNAME       Override default value for UNAME
2037  UNIQ        Override default value for UNIQ
2038  WC          Override default value for WC
2039  WHICH       Override default value for WHICH
2040  XARGS       Override default value for XARGS
2041  AWK         Override default value for AWK
2042  GREP        Override default value for GREP
2043  EGREP       Override default value for EGREP
2044  FGREP       Override default value for FGREP
2045  SED         Override default value for SED
2046  CYGPATH     Override default value for CYGPATH
2047  READLINK    Override default value for READLINK
2048  DF          Override default value for DF
2049  CPIO        Override default value for CPIO
2050  NICE        Override default value for NICE
2051  UNZIP       Override default value for UNZIP
2052  ZIP         Override default value for ZIP
2053  LDD         Override default value for LDD
2054  OTOOL       Override default value for OTOOL
2055  READELF     Override default value for READELF
2056  HG          Override default value for HG
2057  STAT        Override default value for STAT
2058  TIME        Override default value for TIME
2059  PATCH       Override default value for PATCH
2060  DSYMUTIL    Override default value for DSYMUTIL
2061  XATTR       Override default value for XATTR
2062  CODESIGN    Override default value for CODESIGN
2063  SETFILE     Override default value for SETFILE
2064  PKG_CONFIG  path to pkg-config utility
2065  JAVA        Override default value for JAVA
2066  JAVAC       Override default value for JAVAC
2067  JAVAH       Override default value for JAVAH
2068  JAR         Override default value for JAR
2069  JARSIGNER   Override default value for JARSIGNER
2070  CC          C compiler command
2071  CFLAGS      C compiler flags
2072  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2073              nonstandard directory <lib dir>
2074  LIBS        libraries to pass to the linker, e.g. -l<library>
2075  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2076              you have headers in a nonstandard directory <include dir>
2077  CXX         C++ compiler command
2078  CXXFLAGS    C++ compiler flags
2079  CPP         C preprocessor
2080  CXXCPP      C++ preprocessor
2081  AS          Override default value for AS
2082  AR          Override default value for AR
2083  LIPO        Override default value for LIPO
2084  STRIP       Override default value for STRIP
2085  NM          Override default value for NM
2086  GNM         Override default value for GNM
2087  OBJCOPY     Override default value for OBJCOPY
2088  OBJDUMP     Override default value for OBJDUMP
2089  BUILD_CC    Override default value for BUILD_CC
2090  BUILD_CXX   Override default value for BUILD_CXX
2091  BUILD_LD    Override default value for BUILD_LD
2092  JTREGEXE    Override default value for JTREGEXE
2093  XMKMF       Path to xmkmf, Makefile generator for X Window System
2094  FREETYPE_CFLAGS
2095              C compiler flags for FREETYPE, overriding pkg-config
2096  FREETYPE_LIBS
2097              linker flags for FREETYPE, overriding pkg-config
2098  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2099  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2100  LIBFFI_CFLAGS
2101              C compiler flags for LIBFFI, overriding pkg-config
2102  LIBFFI_LIBS linker flags for LIBFFI, 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  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2106  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2107  CCACHE      Override default value for CCACHE
2108
2109Use these variables to override the choices made by `configure' or to help
2110it to find libraries and programs with nonstandard names/locations.
2111
2112Report bugs to <build-dev@openjdk.java.net>.
2113OpenJDK home page: <http://openjdk.java.net>.
2114_ACEOF
2115ac_status=$?
2116fi
2117
2118if test "$ac_init_help" = "recursive"; then
2119  # If there are subdirs, report their specific --help.
2120  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2121    test -d "$ac_dir" ||
2122      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2123      continue
2124    ac_builddir=.
2125
2126case "$ac_dir" in
2127.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2128*)
2129  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2130  # A ".." for each directory in $ac_dir_suffix.
2131  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2132  case $ac_top_builddir_sub in
2133  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2134  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2135  esac ;;
2136esac
2137ac_abs_top_builddir=$ac_pwd
2138ac_abs_builddir=$ac_pwd$ac_dir_suffix
2139# for backward compatibility:
2140ac_top_builddir=$ac_top_build_prefix
2141
2142case $srcdir in
2143  .)  # We are building in place.
2144    ac_srcdir=.
2145    ac_top_srcdir=$ac_top_builddir_sub
2146    ac_abs_top_srcdir=$ac_pwd ;;
2147  [\\/]* | ?:[\\/]* )  # Absolute name.
2148    ac_srcdir=$srcdir$ac_dir_suffix;
2149    ac_top_srcdir=$srcdir
2150    ac_abs_top_srcdir=$srcdir ;;
2151  *) # Relative name.
2152    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2153    ac_top_srcdir=$ac_top_build_prefix$srcdir
2154    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2155esac
2156ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2157
2158    cd "$ac_dir" || { ac_status=$?; continue; }
2159    # Check for guested configure.
2160    if test -f "$ac_srcdir/configure.gnu"; then
2161      echo &&
2162      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2163    elif test -f "$ac_srcdir/configure"; then
2164      echo &&
2165      $SHELL "$ac_srcdir/configure" --help=recursive
2166    else
2167      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2168    fi || ac_status=$?
2169    cd "$ac_pwd" || { ac_status=$?; break; }
2170  done
2171fi
2172
2173test -n "$ac_init_help" && exit $ac_status
2174if $ac_init_version; then
2175  cat <<\_ACEOF
2176OpenJDK configure jdk9
2177generated by GNU Autoconf 2.69
2178
2179Copyright (C) 2012 Free Software Foundation, Inc.
2180This configure script is free software; the Free Software Foundation
2181gives unlimited permission to copy, distribute and modify it.
2182_ACEOF
2183  exit
2184fi
2185
2186## ------------------------ ##
2187## Autoconf initialization. ##
2188## ------------------------ ##
2189
2190# ac_fn_c_try_compile LINENO
2191# --------------------------
2192# Try to compile conftest.$ac_ext, and return whether this succeeded.
2193ac_fn_c_try_compile ()
2194{
2195  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196  rm -f conftest.$ac_objext
2197  if { { ac_try="$ac_compile"
2198case "(($ac_try" in
2199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200  *) ac_try_echo=$ac_try;;
2201esac
2202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203$as_echo "$ac_try_echo"; } >&5
2204  (eval "$ac_compile") 2>conftest.err
2205  ac_status=$?
2206  if test -s conftest.err; then
2207    grep -v '^ *+' conftest.err >conftest.er1
2208    cat conftest.er1 >&5
2209    mv -f conftest.er1 conftest.err
2210  fi
2211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2212  test $ac_status = 0; } && {
2213	 test -z "$ac_c_werror_flag" ||
2214	 test ! -s conftest.err
2215       } && test -s conftest.$ac_objext; then :
2216  ac_retval=0
2217else
2218  $as_echo "$as_me: failed program was:" >&5
2219sed 's/^/| /' conftest.$ac_ext >&5
2220
2221	ac_retval=1
2222fi
2223  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2224  as_fn_set_status $ac_retval
2225
2226} # ac_fn_c_try_compile
2227
2228# ac_fn_cxx_try_compile LINENO
2229# ----------------------------
2230# Try to compile conftest.$ac_ext, and return whether this succeeded.
2231ac_fn_cxx_try_compile ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  rm -f conftest.$ac_objext
2235  if { { ac_try="$ac_compile"
2236case "(($ac_try" in
2237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238  *) ac_try_echo=$ac_try;;
2239esac
2240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2241$as_echo "$ac_try_echo"; } >&5
2242  (eval "$ac_compile") 2>conftest.err
2243  ac_status=$?
2244  if test -s conftest.err; then
2245    grep -v '^ *+' conftest.err >conftest.er1
2246    cat conftest.er1 >&5
2247    mv -f conftest.er1 conftest.err
2248  fi
2249  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2250  test $ac_status = 0; } && {
2251	 test -z "$ac_cxx_werror_flag" ||
2252	 test ! -s conftest.err
2253       } && test -s conftest.$ac_objext; then :
2254  ac_retval=0
2255else
2256  $as_echo "$as_me: failed program was:" >&5
2257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259	ac_retval=1
2260fi
2261  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262  as_fn_set_status $ac_retval
2263
2264} # ac_fn_cxx_try_compile
2265
2266# ac_fn_c_try_cpp LINENO
2267# ----------------------
2268# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2269ac_fn_c_try_cpp ()
2270{
2271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272  if { { ac_try="$ac_cpp conftest.$ac_ext"
2273case "(($ac_try" in
2274  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2275  *) ac_try_echo=$ac_try;;
2276esac
2277eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2278$as_echo "$ac_try_echo"; } >&5
2279  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2280  ac_status=$?
2281  if test -s conftest.err; then
2282    grep -v '^ *+' conftest.err >conftest.er1
2283    cat conftest.er1 >&5
2284    mv -f conftest.er1 conftest.err
2285  fi
2286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2287  test $ac_status = 0; } > conftest.i && {
2288	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2289	 test ! -s conftest.err
2290       }; then :
2291  ac_retval=0
2292else
2293  $as_echo "$as_me: failed program was:" >&5
2294sed 's/^/| /' conftest.$ac_ext >&5
2295
2296    ac_retval=1
2297fi
2298  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299  as_fn_set_status $ac_retval
2300
2301} # ac_fn_c_try_cpp
2302
2303# ac_fn_cxx_try_cpp LINENO
2304# ------------------------
2305# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2306ac_fn_cxx_try_cpp ()
2307{
2308  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309  if { { ac_try="$ac_cpp conftest.$ac_ext"
2310case "(($ac_try" in
2311  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2312  *) ac_try_echo=$ac_try;;
2313esac
2314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2315$as_echo "$ac_try_echo"; } >&5
2316  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2317  ac_status=$?
2318  if test -s conftest.err; then
2319    grep -v '^ *+' conftest.err >conftest.er1
2320    cat conftest.er1 >&5
2321    mv -f conftest.er1 conftest.err
2322  fi
2323  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2324  test $ac_status = 0; } > conftest.i && {
2325	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2326	 test ! -s conftest.err
2327       }; then :
2328  ac_retval=0
2329else
2330  $as_echo "$as_me: failed program was:" >&5
2331sed 's/^/| /' conftest.$ac_ext >&5
2332
2333    ac_retval=1
2334fi
2335  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2336  as_fn_set_status $ac_retval
2337
2338} # ac_fn_cxx_try_cpp
2339
2340# ac_fn_c_try_link LINENO
2341# -----------------------
2342# Try to link conftest.$ac_ext, and return whether this succeeded.
2343ac_fn_c_try_link ()
2344{
2345  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2346  rm -f conftest.$ac_objext conftest$ac_exeext
2347  if { { ac_try="$ac_link"
2348case "(($ac_try" in
2349  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2350  *) ac_try_echo=$ac_try;;
2351esac
2352eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2353$as_echo "$ac_try_echo"; } >&5
2354  (eval "$ac_link") 2>conftest.err
2355  ac_status=$?
2356  if test -s conftest.err; then
2357    grep -v '^ *+' conftest.err >conftest.er1
2358    cat conftest.er1 >&5
2359    mv -f conftest.er1 conftest.err
2360  fi
2361  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2362  test $ac_status = 0; } && {
2363	 test -z "$ac_c_werror_flag" ||
2364	 test ! -s conftest.err
2365       } && test -s conftest$ac_exeext && {
2366	 test "$cross_compiling" = yes ||
2367	 test -x conftest$ac_exeext
2368       }; then :
2369  ac_retval=0
2370else
2371  $as_echo "$as_me: failed program was:" >&5
2372sed 's/^/| /' conftest.$ac_ext >&5
2373
2374	ac_retval=1
2375fi
2376  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2377  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2378  # interfere with the next link command; also delete a directory that is
2379  # left behind by Apple's compiler.  We do this before executing the actions.
2380  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2381  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2382  as_fn_set_status $ac_retval
2383
2384} # ac_fn_c_try_link
2385
2386# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2387# ---------------------------------------------------------
2388# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2389# the include files in INCLUDES and setting the cache variable VAR
2390# accordingly.
2391ac_fn_cxx_check_header_mongrel ()
2392{
2393  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2394  if eval \${$3+:} false; then :
2395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2396$as_echo_n "checking for $2... " >&6; }
2397if eval \${$3+:} false; then :
2398  $as_echo_n "(cached) " >&6
2399fi
2400eval ac_res=\$$3
2401	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402$as_echo "$ac_res" >&6; }
2403else
2404  # Is the header compilable?
2405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2406$as_echo_n "checking $2 usability... " >&6; }
2407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h.  */
2409$4
2410#include <$2>
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_header_compiler=yes
2414else
2415  ac_header_compiler=no
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2419$as_echo "$ac_header_compiler" >&6; }
2420
2421# Is the header present?
2422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2423$as_echo_n "checking $2 presence... " >&6; }
2424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426#include <$2>
2427_ACEOF
2428if ac_fn_cxx_try_cpp "$LINENO"; then :
2429  ac_header_preproc=yes
2430else
2431  ac_header_preproc=no
2432fi
2433rm -f conftest.err conftest.i conftest.$ac_ext
2434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2435$as_echo "$ac_header_preproc" >&6; }
2436
2437# So?  What about this header?
2438case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2439  yes:no: )
2440    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2441$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2443$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2444    ;;
2445  no:yes:* )
2446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2447$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2448    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2449$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2451$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2452    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2453$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2455$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2456( $as_echo "## ----------------------------------------- ##
2457## Report this to build-dev@openjdk.java.net ##
2458## ----------------------------------------- ##"
2459     ) | sed "s/^/$as_me: WARNING:     /" >&2
2460    ;;
2461esac
2462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2463$as_echo_n "checking for $2... " >&6; }
2464if eval \${$3+:} false; then :
2465  $as_echo_n "(cached) " >&6
2466else
2467  eval "$3=\$ac_header_compiler"
2468fi
2469eval ac_res=\$$3
2470	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2471$as_echo "$ac_res" >&6; }
2472fi
2473  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474
2475} # ac_fn_cxx_check_header_mongrel
2476
2477# ac_fn_cxx_try_run LINENO
2478# ------------------------
2479# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2480# that executables *can* be run.
2481ac_fn_cxx_try_run ()
2482{
2483  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484  if { { ac_try="$ac_link"
2485case "(($ac_try" in
2486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487  *) ac_try_echo=$ac_try;;
2488esac
2489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490$as_echo "$ac_try_echo"; } >&5
2491  (eval "$ac_link") 2>&5
2492  ac_status=$?
2493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2494  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2495  { { case "(($ac_try" in
2496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2497  *) ac_try_echo=$ac_try;;
2498esac
2499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2500$as_echo "$ac_try_echo"; } >&5
2501  (eval "$ac_try") 2>&5
2502  ac_status=$?
2503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2504  test $ac_status = 0; }; }; then :
2505  ac_retval=0
2506else
2507  $as_echo "$as_me: program exited with status $ac_status" >&5
2508       $as_echo "$as_me: failed program was:" >&5
2509sed 's/^/| /' conftest.$ac_ext >&5
2510
2511       ac_retval=$ac_status
2512fi
2513  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2514  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515  as_fn_set_status $ac_retval
2516
2517} # ac_fn_cxx_try_run
2518
2519# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2520# ---------------------------------------------------------
2521# Tests whether HEADER exists and can be compiled using the include files in
2522# INCLUDES, setting the cache variable VAR accordingly.
2523ac_fn_cxx_check_header_compile ()
2524{
2525  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527$as_echo_n "checking for $2... " >&6; }
2528if eval \${$3+:} false; then :
2529  $as_echo_n "(cached) " >&6
2530else
2531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532/* end confdefs.h.  */
2533$4
2534#include <$2>
2535_ACEOF
2536if ac_fn_cxx_try_compile "$LINENO"; then :
2537  eval "$3=yes"
2538else
2539  eval "$3=no"
2540fi
2541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2542fi
2543eval ac_res=\$$3
2544	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2545$as_echo "$ac_res" >&6; }
2546  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2547
2548} # ac_fn_cxx_check_header_compile
2549
2550# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2551# ----------------------------------------------
2552# Tries to find the compile-time value of EXPR in a program that includes
2553# INCLUDES, setting VAR accordingly. Returns whether the value could be
2554# computed
2555ac_fn_cxx_compute_int ()
2556{
2557  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558  if test "$cross_compiling" = yes; then
2559    # Depending upon the size, compute the lo and hi bounds.
2560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561/* end confdefs.h.  */
2562$4
2563int
2564main ()
2565{
2566static int test_array [1 - 2 * !(($2) >= 0)];
2567test_array [0] = 0;
2568return test_array [0];
2569
2570  ;
2571  return 0;
2572}
2573_ACEOF
2574if ac_fn_cxx_try_compile "$LINENO"; then :
2575  ac_lo=0 ac_mid=0
2576  while :; do
2577    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2578/* end confdefs.h.  */
2579$4
2580int
2581main ()
2582{
2583static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2584test_array [0] = 0;
2585return test_array [0];
2586
2587  ;
2588  return 0;
2589}
2590_ACEOF
2591if ac_fn_cxx_try_compile "$LINENO"; then :
2592  ac_hi=$ac_mid; break
2593else
2594  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2595			if test $ac_lo -le $ac_mid; then
2596			  ac_lo= ac_hi=
2597			  break
2598			fi
2599			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2600fi
2601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2602  done
2603else
2604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607int
2608main ()
2609{
2610static int test_array [1 - 2 * !(($2) < 0)];
2611test_array [0] = 0;
2612return test_array [0];
2613
2614  ;
2615  return 0;
2616}
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  ac_hi=-1 ac_mid=-1
2620  while :; do
2621    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h.  */
2623$4
2624int
2625main ()
2626{
2627static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2628test_array [0] = 0;
2629return test_array [0];
2630
2631  ;
2632  return 0;
2633}
2634_ACEOF
2635if ac_fn_cxx_try_compile "$LINENO"; then :
2636  ac_lo=$ac_mid; break
2637else
2638  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2639			if test $ac_mid -le $ac_hi; then
2640			  ac_lo= ac_hi=
2641			  break
2642			fi
2643			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2644fi
2645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2646  done
2647else
2648  ac_lo= ac_hi=
2649fi
2650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2651fi
2652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2653# Binary search between lo and hi bounds.
2654while test "x$ac_lo" != "x$ac_hi"; do
2655  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2657/* end confdefs.h.  */
2658$4
2659int
2660main ()
2661{
2662static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2663test_array [0] = 0;
2664return test_array [0];
2665
2666  ;
2667  return 0;
2668}
2669_ACEOF
2670if ac_fn_cxx_try_compile "$LINENO"; then :
2671  ac_hi=$ac_mid
2672else
2673  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2674fi
2675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2676done
2677case $ac_lo in #((
2678?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2679'') ac_retval=1 ;;
2680esac
2681  else
2682    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2683/* end confdefs.h.  */
2684$4
2685static long int longval () { return $2; }
2686static unsigned long int ulongval () { return $2; }
2687#include <stdio.h>
2688#include <stdlib.h>
2689int
2690main ()
2691{
2692
2693  FILE *f = fopen ("conftest.val", "w");
2694  if (! f)
2695    return 1;
2696  if (($2) < 0)
2697    {
2698      long int i = longval ();
2699      if (i != ($2))
2700	return 1;
2701      fprintf (f, "%ld", i);
2702    }
2703  else
2704    {
2705      unsigned long int i = ulongval ();
2706      if (i != ($2))
2707	return 1;
2708      fprintf (f, "%lu", i);
2709    }
2710  /* Do not output a trailing newline, as this causes \r\n confusion
2711     on some platforms.  */
2712  return ferror (f) || fclose (f) != 0;
2713
2714  ;
2715  return 0;
2716}
2717_ACEOF
2718if ac_fn_cxx_try_run "$LINENO"; then :
2719  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2720else
2721  ac_retval=1
2722fi
2723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2724  conftest.$ac_objext conftest.beam conftest.$ac_ext
2725rm -f conftest.val
2726
2727  fi
2728  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2729  as_fn_set_status $ac_retval
2730
2731} # ac_fn_cxx_compute_int
2732
2733# ac_fn_cxx_try_link LINENO
2734# -------------------------
2735# Try to link conftest.$ac_ext, and return whether this succeeded.
2736ac_fn_cxx_try_link ()
2737{
2738  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2739  rm -f conftest.$ac_objext conftest$ac_exeext
2740  if { { ac_try="$ac_link"
2741case "(($ac_try" in
2742  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2743  *) ac_try_echo=$ac_try;;
2744esac
2745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2746$as_echo "$ac_try_echo"; } >&5
2747  (eval "$ac_link") 2>conftest.err
2748  ac_status=$?
2749  if test -s conftest.err; then
2750    grep -v '^ *+' conftest.err >conftest.er1
2751    cat conftest.er1 >&5
2752    mv -f conftest.er1 conftest.err
2753  fi
2754  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2755  test $ac_status = 0; } && {
2756	 test -z "$ac_cxx_werror_flag" ||
2757	 test ! -s conftest.err
2758       } && test -s conftest$ac_exeext && {
2759	 test "$cross_compiling" = yes ||
2760	 test -x conftest$ac_exeext
2761       }; then :
2762  ac_retval=0
2763else
2764  $as_echo "$as_me: failed program was:" >&5
2765sed 's/^/| /' conftest.$ac_ext >&5
2766
2767	ac_retval=1
2768fi
2769  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2770  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2771  # interfere with the next link command; also delete a directory that is
2772  # left behind by Apple's compiler.  We do this before executing the actions.
2773  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2774  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2775  as_fn_set_status $ac_retval
2776
2777} # ac_fn_cxx_try_link
2778
2779# ac_fn_cxx_check_func LINENO FUNC VAR
2780# ------------------------------------
2781# Tests whether FUNC exists, setting the cache variable VAR accordingly
2782ac_fn_cxx_check_func ()
2783{
2784  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2786$as_echo_n "checking for $2... " >&6; }
2787if eval \${$3+:} false; then :
2788  $as_echo_n "(cached) " >&6
2789else
2790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2791/* end confdefs.h.  */
2792/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2793   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2794#define $2 innocuous_$2
2795
2796/* System header to define __stub macros and hopefully few prototypes,
2797    which can conflict with char $2 (); below.
2798    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2799    <limits.h> exists even on freestanding compilers.  */
2800
2801#ifdef __STDC__
2802# include <limits.h>
2803#else
2804# include <assert.h>
2805#endif
2806
2807#undef $2
2808
2809/* Override any GCC internal prototype to avoid an error.
2810   Use char because int might match the return type of a GCC
2811   builtin and then its argument prototype would still apply.  */
2812#ifdef __cplusplus
2813extern "C"
2814#endif
2815char $2 ();
2816/* The GNU C library defines this for functions which it implements
2817    to always fail with ENOSYS.  Some functions are actually named
2818    something starting with __ and the normal name is an alias.  */
2819#if defined __stub_$2 || defined __stub___$2
2820choke me
2821#endif
2822
2823int
2824main ()
2825{
2826return $2 ();
2827  ;
2828  return 0;
2829}
2830_ACEOF
2831if ac_fn_cxx_try_link "$LINENO"; then :
2832  eval "$3=yes"
2833else
2834  eval "$3=no"
2835fi
2836rm -f core conftest.err conftest.$ac_objext \
2837    conftest$ac_exeext conftest.$ac_ext
2838fi
2839eval ac_res=\$$3
2840	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2841$as_echo "$ac_res" >&6; }
2842  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2843
2844} # ac_fn_cxx_check_func
2845
2846# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2847# -------------------------------------------------------
2848# Tests whether HEADER exists and can be compiled using the include files in
2849# INCLUDES, setting the cache variable VAR accordingly.
2850ac_fn_c_check_header_compile ()
2851{
2852  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2854$as_echo_n "checking for $2... " >&6; }
2855if eval \${$3+:} false; then :
2856  $as_echo_n "(cached) " >&6
2857else
2858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2859/* end confdefs.h.  */
2860$4
2861#include <$2>
2862_ACEOF
2863if ac_fn_c_try_compile "$LINENO"; then :
2864  eval "$3=yes"
2865else
2866  eval "$3=no"
2867fi
2868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2869fi
2870eval ac_res=\$$3
2871	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2872$as_echo "$ac_res" >&6; }
2873  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2874
2875} # ac_fn_c_check_header_compile
2876cat >config.log <<_ACEOF
2877This file contains any messages produced by compilers while
2878running configure, to aid debugging if configure makes a mistake.
2879
2880It was created by OpenJDK $as_me jdk9, which was
2881generated by GNU Autoconf 2.69.  Invocation command line was
2882
2883  $ $0 $@
2884
2885_ACEOF
2886exec 5>>config.log
2887{
2888cat <<_ASUNAME
2889## --------- ##
2890## Platform. ##
2891## --------- ##
2892
2893hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2894uname -m = `(uname -m) 2>/dev/null || echo unknown`
2895uname -r = `(uname -r) 2>/dev/null || echo unknown`
2896uname -s = `(uname -s) 2>/dev/null || echo unknown`
2897uname -v = `(uname -v) 2>/dev/null || echo unknown`
2898
2899/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2900/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2901
2902/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2903/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2904/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2905/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2906/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2907/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2908/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2909
2910_ASUNAME
2911
2912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2913for as_dir in $PATH
2914do
2915  IFS=$as_save_IFS
2916  test -z "$as_dir" && as_dir=.
2917    $as_echo "PATH: $as_dir"
2918  done
2919IFS=$as_save_IFS
2920
2921} >&5
2922
2923cat >&5 <<_ACEOF
2924
2925
2926## ----------- ##
2927## Core tests. ##
2928## ----------- ##
2929
2930_ACEOF
2931
2932
2933# Keep a trace of the command line.
2934# Strip out --no-create and --no-recursion so they do not pile up.
2935# Strip out --silent because we don't want to record it for future runs.
2936# Also quote any args containing shell meta-characters.
2937# Make two passes to allow for proper duplicate-argument suppression.
2938ac_configure_args=
2939ac_configure_args0=
2940ac_configure_args1=
2941ac_must_keep_next=false
2942for ac_pass in 1 2
2943do
2944  for ac_arg
2945  do
2946    case $ac_arg in
2947    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2948    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2949    | -silent | --silent | --silen | --sile | --sil)
2950      continue ;;
2951    *\'*)
2952      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2953    esac
2954    case $ac_pass in
2955    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2956    2)
2957      as_fn_append ac_configure_args1 " '$ac_arg'"
2958      if test $ac_must_keep_next = true; then
2959	ac_must_keep_next=false # Got value, back to normal.
2960      else
2961	case $ac_arg in
2962	  *=* | --config-cache | -C | -disable-* | --disable-* \
2963	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2964	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2965	  | -with-* | --with-* | -without-* | --without-* | --x)
2966	    case "$ac_configure_args0 " in
2967	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2968	    esac
2969	    ;;
2970	  -* ) ac_must_keep_next=true ;;
2971	esac
2972      fi
2973      as_fn_append ac_configure_args " '$ac_arg'"
2974      ;;
2975    esac
2976  done
2977done
2978{ ac_configure_args0=; unset ac_configure_args0;}
2979{ ac_configure_args1=; unset ac_configure_args1;}
2980
2981# When interrupted or exit'd, cleanup temporary files, and complete
2982# config.log.  We remove comments because anyway the quotes in there
2983# would cause problems or look ugly.
2984# WARNING: Use '\'' to represent an apostrophe within the trap.
2985# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2986trap 'exit_status=$?
2987  # Save into config.log some information that might help in debugging.
2988  {
2989    echo
2990
2991    $as_echo "## ---------------- ##
2992## Cache variables. ##
2993## ---------------- ##"
2994    echo
2995    # The following way of writing the cache mishandles newlines in values,
2996(
2997  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2998    eval ac_val=\$$ac_var
2999    case $ac_val in #(
3000    *${as_nl}*)
3001      case $ac_var in #(
3002      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3003$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3004      esac
3005      case $ac_var in #(
3006      _ | IFS | as_nl) ;; #(
3007      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3008      *) { eval $ac_var=; unset $ac_var;} ;;
3009      esac ;;
3010    esac
3011  done
3012  (set) 2>&1 |
3013    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3014    *${as_nl}ac_space=\ *)
3015      sed -n \
3016	"s/'\''/'\''\\\\'\'''\''/g;
3017	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3018      ;; #(
3019    *)
3020      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3021      ;;
3022    esac |
3023    sort
3024)
3025    echo
3026
3027    $as_echo "## ----------------- ##
3028## Output variables. ##
3029## ----------------- ##"
3030    echo
3031    for ac_var in $ac_subst_vars
3032    do
3033      eval ac_val=\$$ac_var
3034      case $ac_val in
3035      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3036      esac
3037      $as_echo "$ac_var='\''$ac_val'\''"
3038    done | sort
3039    echo
3040
3041    if test -n "$ac_subst_files"; then
3042      $as_echo "## ------------------- ##
3043## File substitutions. ##
3044## ------------------- ##"
3045      echo
3046      for ac_var in $ac_subst_files
3047      do
3048	eval ac_val=\$$ac_var
3049	case $ac_val in
3050	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3051	esac
3052	$as_echo "$ac_var='\''$ac_val'\''"
3053      done | sort
3054      echo
3055    fi
3056
3057    if test -s confdefs.h; then
3058      $as_echo "## ----------- ##
3059## confdefs.h. ##
3060## ----------- ##"
3061      echo
3062      cat confdefs.h
3063      echo
3064    fi
3065    test "$ac_signal" != 0 &&
3066      $as_echo "$as_me: caught signal $ac_signal"
3067    $as_echo "$as_me: exit $exit_status"
3068  } >&5
3069  rm -f core *.core core.conftest.* &&
3070    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3071    exit $exit_status
3072' 0
3073for ac_signal in 1 2 13 15; do
3074  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3075done
3076ac_signal=0
3077
3078# confdefs.h avoids OS command line length limits that DEFS can exceed.
3079rm -f -r conftest* confdefs.h
3080
3081$as_echo "/* confdefs.h */" > confdefs.h
3082
3083# Predefined preprocessor variables.
3084
3085cat >>confdefs.h <<_ACEOF
3086#define PACKAGE_NAME "$PACKAGE_NAME"
3087_ACEOF
3088
3089cat >>confdefs.h <<_ACEOF
3090#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3091_ACEOF
3092
3093cat >>confdefs.h <<_ACEOF
3094#define PACKAGE_VERSION "$PACKAGE_VERSION"
3095_ACEOF
3096
3097cat >>confdefs.h <<_ACEOF
3098#define PACKAGE_STRING "$PACKAGE_STRING"
3099_ACEOF
3100
3101cat >>confdefs.h <<_ACEOF
3102#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3103_ACEOF
3104
3105cat >>confdefs.h <<_ACEOF
3106#define PACKAGE_URL "$PACKAGE_URL"
3107_ACEOF
3108
3109
3110# Let the site file select an alternate cache file if it wants to.
3111# Prefer an explicitly selected file to automatically selected ones.
3112ac_site_file1=NONE
3113ac_site_file2=NONE
3114if test -n "$CONFIG_SITE"; then
3115  # We do not want a PATH search for config.site.
3116  case $CONFIG_SITE in #((
3117    -*)  ac_site_file1=./$CONFIG_SITE;;
3118    */*) ac_site_file1=$CONFIG_SITE;;
3119    *)   ac_site_file1=./$CONFIG_SITE;;
3120  esac
3121elif test "x$prefix" != xNONE; then
3122  ac_site_file1=$prefix/share/config.site
3123  ac_site_file2=$prefix/etc/config.site
3124else
3125  ac_site_file1=$ac_default_prefix/share/config.site
3126  ac_site_file2=$ac_default_prefix/etc/config.site
3127fi
3128for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3129do
3130  test "x$ac_site_file" = xNONE && continue
3131  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3132    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3133$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3134    sed 's/^/| /' "$ac_site_file" >&5
3135    . "$ac_site_file" \
3136      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3138as_fn_error $? "failed to load site script $ac_site_file
3139See \`config.log' for more details" "$LINENO" 5; }
3140  fi
3141done
3142
3143if test -r "$cache_file"; then
3144  # Some versions of bash will fail to source /dev/null (special files
3145  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3146  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3147    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3148$as_echo "$as_me: loading cache $cache_file" >&6;}
3149    case $cache_file in
3150      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3151      *)                      . "./$cache_file";;
3152    esac
3153  fi
3154else
3155  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3156$as_echo "$as_me: creating cache $cache_file" >&6;}
3157  >$cache_file
3158fi
3159
3160# Check that the precious variables saved in the cache have kept the same
3161# value.
3162ac_cache_corrupted=false
3163for ac_var in $ac_precious_vars; do
3164  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3165  eval ac_new_set=\$ac_env_${ac_var}_set
3166  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3167  eval ac_new_val=\$ac_env_${ac_var}_value
3168  case $ac_old_set,$ac_new_set in
3169    set,)
3170      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3171$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3172      ac_cache_corrupted=: ;;
3173    ,set)
3174      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3175$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3176      ac_cache_corrupted=: ;;
3177    ,);;
3178    *)
3179      if test "x$ac_old_val" != "x$ac_new_val"; then
3180	# differences in whitespace do not lead to failure.
3181	ac_old_val_w=`echo x $ac_old_val`
3182	ac_new_val_w=`echo x $ac_new_val`
3183	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3184	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3185$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3186	  ac_cache_corrupted=:
3187	else
3188	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3189$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3190	  eval $ac_var=\$ac_old_val
3191	fi
3192	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3193$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3194	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3195$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3196      fi;;
3197  esac
3198  # Pass precious variables to config.status.
3199  if test "$ac_new_set" = set; then
3200    case $ac_new_val in
3201    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3202    *) ac_arg=$ac_var=$ac_new_val ;;
3203    esac
3204    case " $ac_configure_args " in
3205      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3206      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3207    esac
3208  fi
3209done
3210if $ac_cache_corrupted; then
3211  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3212$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3213  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3214$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3215  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3216fi
3217## -------------------- ##
3218## Main body of script. ##
3219## -------------------- ##
3220
3221ac_ext=c
3222ac_cpp='$CPP $CPPFLAGS'
3223ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3224ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3225ac_compiler_gnu=$ac_cv_c_compiler_gnu
3226
3227
3228
3229ac_aux_dir=
3230for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3231  if test -f "$ac_dir/install-sh"; then
3232    ac_aux_dir=$ac_dir
3233    ac_install_sh="$ac_aux_dir/install-sh -c"
3234    break
3235  elif test -f "$ac_dir/install.sh"; then
3236    ac_aux_dir=$ac_dir
3237    ac_install_sh="$ac_aux_dir/install.sh -c"
3238    break
3239  elif test -f "$ac_dir/shtool"; then
3240    ac_aux_dir=$ac_dir
3241    ac_install_sh="$ac_aux_dir/shtool install -c"
3242    break
3243  fi
3244done
3245if test -z "$ac_aux_dir"; then
3246  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
3247fi
3248
3249# These three variables are undocumented and unsupported,
3250# and are intended to be withdrawn in a future Autoconf release.
3251# They can cause serious problems if a builder's source tree is in a directory
3252# whose full name contains unusual characters.
3253ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3254ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3255ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3256
3257
3258# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3259
3260#
3261# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3262# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3263#
3264# This code is free software; you can redistribute it and/or modify it
3265# under the terms of the GNU General Public License version 2 only, as
3266# published by the Free Software Foundation.  Oracle designates this
3267# particular file as subject to the "Classpath" exception as provided
3268# by Oracle in the LICENSE file that accompanied this code.
3269#
3270# This code is distributed in the hope that it will be useful, but WITHOUT
3271# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3272# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3273# version 2 for more details (a copy is included in the LICENSE file that
3274# accompanied this code).
3275#
3276# You should have received a copy of the GNU General Public License version
3277# 2 along with this work; if not, write to the Free Software Foundation,
3278# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3279#
3280# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3281# or visit www.oracle.com if you need additional information or have any
3282# questions.
3283#
3284
3285#
3286# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3287#
3288# This program is free software; you can redistribute it and/or modify
3289# it under the terms of the GNU General Public License as published by
3290# the Free Software Foundation; either version 2 of the License, or
3291# (at your option) any later version.
3292#
3293# This program is distributed in the hope that it will be useful, but
3294# WITHOUT ANY WARRANTY; without even the implied warranty of
3295# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3296# General Public License for more details.
3297#
3298# You should have received a copy of the GNU General Public License
3299# along with this program; if not, write to the Free Software
3300# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3301#
3302# As a special exception to the GNU General Public License, if you
3303# distribute this file as part of a program that contains a
3304# configuration script generated by Autoconf, you may include it under
3305# the same distribution terms that you use for the rest of that program.
3306
3307# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3308# ----------------------------------
3309# PKG_PROG_PKG_CONFIG
3310
3311# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3312#
3313# Check to see whether a particular set of modules exists.  Similar
3314# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3315#
3316#
3317# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3318# this or PKG_CHECK_MODULES is called, or make sure to call
3319# PKG_CHECK_EXISTS manually
3320# --------------------------------------------------------------
3321
3322
3323
3324# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3325# ---------------------------------------------
3326# _PKG_CONFIG
3327
3328# _PKG_SHORT_ERRORS_SUPPORTED
3329# -----------------------------
3330# _PKG_SHORT_ERRORS_SUPPORTED
3331
3332
3333# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3334# [ACTION-IF-NOT-FOUND])
3335#
3336#
3337# Note that if there is a possibility the first call to
3338# PKG_CHECK_MODULES might not happen, you should be sure to include an
3339# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3340#
3341#
3342# --------------------------------------------------------------
3343# PKG_CHECK_MODULES
3344
3345
3346# Include these first...
3347#
3348# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3349# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3350#
3351# This code is free software; you can redistribute it and/or modify it
3352# under the terms of the GNU General Public License version 2 only, as
3353# published by the Free Software Foundation.  Oracle designates this
3354# particular file as subject to the "Classpath" exception as provided
3355# by Oracle in the LICENSE file that accompanied this code.
3356#
3357# This code is distributed in the hope that it will be useful, but WITHOUT
3358# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3359# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3360# version 2 for more details (a copy is included in the LICENSE file that
3361# accompanied this code).
3362#
3363# You should have received a copy of the GNU General Public License version
3364# 2 along with this work; if not, write to the Free Software Foundation,
3365# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3366#
3367# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3368# or visit www.oracle.com if you need additional information or have any
3369# questions.
3370#
3371
3372# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3373# If so, then append $1 to $2 \
3374# Also set JVM_ARG_OK to true/false depending on outcome.
3375
3376
3377# Appends a string to a path variable, only adding the : when needed.
3378
3379
3380# Prepends a string to a path variable, only adding the : when needed.
3381
3382
3383# This will make sure the given variable points to a full and proper
3384# path. This means:
3385# 1) There will be no spaces in the path. On unix platforms,
3386#    spaces in the path will result in an error. On Windows,
3387#    the path will be rewritten using short-style to be space-free.
3388# 2) The path will be absolute, and it will be in unix-style (on
3389#     cygwin).
3390# $1: The name of the variable to fix
3391
3392
3393# This will make sure the given variable points to a executable
3394# with a full and proper path. This means:
3395# 1) There will be no spaces in the path. On unix platforms,
3396#    spaces in the path will result in an error. On Windows,
3397#    the path will be rewritten using short-style to be space-free.
3398# 2) The path will be absolute, and it will be in unix-style (on
3399#     cygwin).
3400# Any arguments given to the executable is preserved.
3401# If the input variable does not have a directory specification, then
3402# it need to be in the PATH.
3403# $1: The name of the variable to fix
3404
3405
3406
3407
3408# Register a --with argument but mark it as deprecated
3409# $1: The name of the with argument to deprecate, not including --with-
3410
3411
3412# Register a --enable argument but mark it as deprecated
3413# $1: The name of the with argument to deprecate, not including --enable-
3414# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3415
3416
3417
3418
3419# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3420# $1: variable to check
3421
3422
3423# Check that there are no unprocessed overridden variables left.
3424# If so, they are an incorrect argument and we will exit with an error.
3425
3426
3427# Setup a tool for the given variable. If correctly specified by the user,
3428# use that value, otherwise search for the tool using the supplied code snippet.
3429# $1: variable to set
3430# $2: code snippet to call to look for the tool
3431
3432
3433# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3434# $1: variable to set
3435# $2: executable name (or list of names) to look for
3436
3437
3438# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3439# $1: variable to set
3440# $2: executable name (or list of names) to look for
3441
3442
3443# Like BASIC_PATH_PROGS but fails if no tool was found.
3444# $1: variable to set
3445# $2: executable name (or list of names) to look for
3446
3447
3448# Like BASIC_SETUP_TOOL but fails if no tool was found.
3449# $1: variable to set
3450# $2: autoconf macro to call to look for the special tool
3451
3452
3453# Setup the most fundamental tools that relies on not much else to set up,
3454# but is used by much of the early bootstrap code.
3455
3456
3457# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3458
3459
3460# Evaluates platform specific overrides for devkit variables.
3461# $1: Name of variable
3462
3463
3464
3465
3466
3467
3468#%%% Simple tools %%%
3469
3470# Check if we have found a usable version of make
3471# $1: the path to a potential make binary (or empty)
3472# $2: the description on how we found this
3473
3474
3475
3476
3477# Goes looking for a usable version of GNU make.
3478
3479
3480
3481
3482
3483
3484# Check if build directory is on local disk. If not possible to determine,
3485# we prefer to claim it's local.
3486# Argument 1: directory to test
3487# Argument 2: what to do if it is on local disk
3488# Argument 3: what to do otherwise (remote disk or failure)
3489
3490
3491# Check that source files have basic read permissions set. This might
3492# not be the case in cygwin in certain conditions.
3493
3494
3495
3496
3497# Check for support for specific options in bash
3498
3499
3500# Code to run after AC_OUTPUT
3501
3502
3503#
3504# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3506#
3507# This code is free software; you can redistribute it and/or modify it
3508# under the terms of the GNU General Public License version 2 only, as
3509# published by the Free Software Foundation.  Oracle designates this
3510# particular file as subject to the "Classpath" exception as provided
3511# by Oracle in the LICENSE file that accompanied this code.
3512#
3513# This code is distributed in the hope that it will be useful, but WITHOUT
3514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3516# version 2 for more details (a copy is included in the LICENSE file that
3517# accompanied this code).
3518#
3519# You should have received a copy of the GNU General Public License version
3520# 2 along with this work; if not, write to the Free Software Foundation,
3521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3522#
3523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3524# or visit www.oracle.com if you need additional information or have any
3525# questions.
3526#
3527
3528
3529
3530
3531
3532# Helper function which possibly converts a path using DOS-style short mode.
3533# If so, the updated path is stored in $new_path.
3534# $1: The path to check
3535
3536
3537# Helper function which possibly converts a path using DOS-style short mode.
3538# If so, the updated path is stored in $new_path.
3539# $1: The path to check
3540
3541
3542# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3543# and could probably be heavily simplified. However, all changes in this
3544# area tend to need lot of testing in different scenarios, and in lack of
3545# proper unit testing, cleaning this up has not been deemed worth the effort
3546# at the moment.
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3557
3558
3559
3560
3561# ... then the rest
3562#
3563# Copyright (c) 2011, 2015, 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# This file handles detection of the Boot JDK. The Boot JDK detection
3589# process has been developed as a response to solve a complex real-world
3590# problem. Initially, it was simple, but it has grown as platform after
3591# platform, idiosyncracy after idiosyncracy has been supported.
3592#
3593# The basic idea is this:
3594# 1) You need an acceptable *) JDK to use as a Boot JDK
3595# 2) There are several ways to locate a JDK, that are mostly platform
3596#    dependent **)
3597# 3) You can have multiple JDKs installed
3598# 4) If possible, configure should try to dig out an acceptable JDK
3599#    automatically, without having to resort to command-line options
3600#
3601# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3602#     javac) and not a JRE, etc.
3603#
3604# **) On Windows we typically use a well-known path.
3605#     On MacOSX we typically use the tool java_home.
3606#     On Linux we typically find javac in the $PATH, and then follow a
3607#     chain of symlinks that often ends up in a real JDK.
3608#
3609# This leads to the code where we check in different ways to locate a
3610# JDK, and if one is found, check if it is acceptable. If not, we print
3611# our reasons for rejecting it (useful when debugging non-working
3612# configure situations) and continue checking the next one.
3613########################################################################
3614
3615# Execute the check given as argument, and verify the result
3616# If the Boot JDK was previously found, do nothing
3617# $1 A command line (typically autoconf macro) to execute
3618
3619
3620# Test: Is bootjdk explicitely set by command line arguments?
3621
3622
3623# Test: Is $JAVA_HOME set?
3624
3625
3626# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3627
3628
3629# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3630# $1: Argument to the java_home binary (optional)
3631
3632
3633# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3634
3635
3636# Look for a jdk in the given path. If there are multiple, try to select the newest.
3637# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3638# $1 = Path to directory containing jdk installations.
3639# $2 = String to append to the found JDK directory to get the proper JDK home
3640
3641
3642# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3643# environmental variable as base for where to look.
3644# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3645
3646
3647# Test: Is there a JDK installed in default, well-known locations?
3648
3649
3650# Check that a command-line tool in the Boot JDK is correct
3651# $1 = name of variable to assign
3652# $2 = name of binary
3653
3654
3655###############################################################################
3656#
3657# We need a Boot JDK to bootstrap the build.
3658#
3659
3660
3661
3662
3663
3664#
3665# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3666# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3667#
3668# This code is free software; you can redistribute it and/or modify it
3669# under the terms of the GNU General Public License version 2 only, as
3670# published by the Free Software Foundation.  Oracle designates this
3671# particular file as subject to the "Classpath" exception as provided
3672# by Oracle in the LICENSE file that accompanied this code.
3673#
3674# This code is distributed in the hope that it will be useful, but WITHOUT
3675# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3676# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3677# version 2 for more details (a copy is included in the LICENSE file that
3678# accompanied this code).
3679#
3680# You should have received a copy of the GNU General Public License version
3681# 2 along with this work; if not, write to the Free Software Foundation,
3682# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3683#
3684# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3685# or visit www.oracle.com if you need additional information or have any
3686# questions.
3687#
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708#
3709# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3710# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3711#
3712# This code is free software; you can redistribute it and/or modify it
3713# under the terms of the GNU General Public License version 2 only, as
3714# published by the Free Software Foundation.  Oracle designates this
3715# particular file as subject to the "Classpath" exception as provided
3716# by Oracle in the LICENSE file that accompanied this code.
3717#
3718# This code is distributed in the hope that it will be useful, but WITHOUT
3719# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3720# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3721# version 2 for more details (a copy is included in the LICENSE file that
3722# accompanied this code).
3723#
3724# You should have received a copy of the GNU General Public License version
3725# 2 along with this work; if not, write to the Free Software Foundation,
3726# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3727#
3728# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3729# or visit www.oracle.com if you need additional information or have any
3730# questions.
3731#
3732
3733# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3734# corresponding configure arguments instead
3735
3736
3737# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3738# that configure can use them while detecting compilers.
3739# TOOLCHAIN_TYPE is available here.
3740
3741
3742
3743
3744
3745
3746# Documentation on common flags used for solstudio in HIGHEST.
3747#
3748# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3749#          done with care, there are some assumptions below that need to
3750#          be understood about the use of pointers, and IEEE behavior.
3751#
3752# -fns: Use non-standard floating point mode (not IEEE 754)
3753# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3754# -fsingle: Use single precision floating point with 'float'
3755# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3756#   (Source with excessing pointer casting and data access with mixed
3757#    pointer types are not recommended)
3758# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3759#   (If you expect perfect errno behavior, do not use this)
3760# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3761# -xrestrict: Pointer parameters to functions do not overlap
3762#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3763#    If you pass in multiple pointers to the same data, do not use this)
3764# -xlibmil: Inline some library routines
3765#   (If you expect perfect errno behavior, do not use this)
3766# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3767#   (If you expect perfect errno behavior, do not use this)
3768#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3769
3770    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3771    # Bug?
3772    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3773    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3774    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3775    #fi
3776
3777
3778
3779
3780
3781# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3782#                                   [RUN-IF-FALSE])
3783# ------------------------------------------------------------
3784# Check that the c and c++ compilers support an argument
3785
3786
3787# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3788#                                    [RUN-IF-FALSE])
3789# ------------------------------------------------------------
3790# Check that the linker support an argument
3791
3792
3793
3794
3795#
3796# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3797# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3798#
3799# This code is free software; you can redistribute it and/or modify it
3800# under the terms of the GNU General Public License version 2 only, as
3801# published by the Free Software Foundation.  Oracle designates this
3802# particular file as subject to the "Classpath" exception as provided
3803# by Oracle in the LICENSE file that accompanied this code.
3804#
3805# This code is distributed in the hope that it will be useful, but WITHOUT
3806# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3807# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3808# version 2 for more details (a copy is included in the LICENSE file that
3809# accompanied this code).
3810#
3811# You should have received a copy of the GNU General Public License version
3812# 2 along with this work; if not, write to the Free Software Foundation,
3813# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3814#
3815# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3816# or visit www.oracle.com if you need additional information or have any
3817# questions.
3818#
3819
3820
3821
3822
3823
3824cygwin_help() {
3825  case $1 in
3826    unzip)
3827      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3828      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3829      ;;
3830    zip)
3831      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3832      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3833      ;;
3834    make)
3835      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3836      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3837      ;;
3838    freetype)
3839      HELP_MSG="
3840The freetype library can now be build during the configure process.
3841Download the freetype sources and unpack them into an arbitrary directory:
3842
3843wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3844tar -xzf freetype-2.5.3.tar.gz
3845
3846Then run configure with '--with-freetype-src=<freetype_src>'. This will
3847automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3848builds or into '<freetype_src>/lib32' for 32-bit builds.
3849Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3850and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3851      ;;
3852  esac
3853}
3854
3855msys_help() {
3856  PKGHANDLER_COMMAND=""
3857}
3858
3859apt_help() {
3860  case $1 in
3861    reduced)
3862      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3863    devkit)
3864      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3865    openjdk)
3866      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3867    alsa)
3868      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3869    cups)
3870      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3871    freetype)
3872      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3873    ffi)
3874      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3875    x11)
3876      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3877    ccache)
3878      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3879  esac
3880}
3881
3882yum_help() {
3883  case $1 in
3884    devkit)
3885      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3886    openjdk)
3887      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3888    alsa)
3889      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3890    cups)
3891      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3892    freetype)
3893      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3894    x11)
3895      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3896    ccache)
3897      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3898  esac
3899}
3900
3901port_help() {
3902  PKGHANDLER_COMMAND=""
3903}
3904
3905pkgutil_help() {
3906  PKGHANDLER_COMMAND=""
3907}
3908
3909pkgadd_help() {
3910  PKGHANDLER_COMMAND=""
3911}
3912
3913# This function will check if we're called from the "configure" wrapper while
3914# printing --help. If so, we will print out additional information that can
3915# only be extracted within the autoconf script, and then exit. This must be
3916# called at the very beginning in configure.ac.
3917
3918
3919
3920
3921
3922
3923#
3924# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3925# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3926#
3927# This code is free software; you can redistribute it and/or modify it
3928# under the terms of the GNU General Public License version 2 only, as
3929# published by the Free Software Foundation.  Oracle designates this
3930# particular file as subject to the "Classpath" exception as provided
3931# by Oracle in the LICENSE file that accompanied this code.
3932#
3933# This code is distributed in the hope that it will be useful, but WITHOUT
3934# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3935# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3936# version 2 for more details (a copy is included in the LICENSE file that
3937# accompanied this code).
3938#
3939# You should have received a copy of the GNU General Public License version
3940# 2 along with this work; if not, write to the Free Software Foundation,
3941# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3942#
3943# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3944# or visit www.oracle.com if you need additional information or have any
3945# questions.
3946#
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957###############################################################################
3958#
3959# Should we build only OpenJDK even if closed sources are present?
3960#
3961
3962
3963
3964
3965###############################################################################
3966#
3967# Setup version numbers
3968#
3969
3970
3971
3972
3973
3974
3975################################################################################
3976#
3977# Gcov coverage data for hotspot
3978#
3979
3980
3981#
3982# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3983# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3984#
3985# This code is free software; you can redistribute it and/or modify it
3986# under the terms of the GNU General Public License version 2 only, as
3987# published by the Free Software Foundation.  Oracle designates this
3988# particular file as subject to the "Classpath" exception as provided
3989# by Oracle in the LICENSE file that accompanied this code.
3990#
3991# This code is distributed in the hope that it will be useful, but WITHOUT
3992# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3993# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3994# version 2 for more details (a copy is included in the LICENSE file that
3995# accompanied this code).
3996#
3997# You should have received a copy of the GNU General Public License version
3998# 2 along with this work; if not, write to the Free Software Foundation,
3999# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4000#
4001# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4002# or visit www.oracle.com if you need additional information or have any
4003# questions.
4004#
4005
4006# Major library component reside in separate files.
4007#
4008# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4009# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4010#
4011# This code is free software; you can redistribute it and/or modify it
4012# under the terms of the GNU General Public License version 2 only, as
4013# published by the Free Software Foundation.  Oracle designates this
4014# particular file as subject to the "Classpath" exception as provided
4015# by Oracle in the LICENSE file that accompanied this code.
4016#
4017# This code is distributed in the hope that it will be useful, but WITHOUT
4018# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4019# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4020# version 2 for more details (a copy is included in the LICENSE file that
4021# accompanied this code).
4022#
4023# You should have received a copy of the GNU General Public License version
4024# 2 along with this work; if not, write to the Free Software Foundation,
4025# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4026#
4027# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4028# or visit www.oracle.com if you need additional information or have any
4029# questions.
4030#
4031
4032################################################################################
4033# Setup alsa (Advanced Linux Sound Architecture)
4034################################################################################
4035
4036
4037#
4038# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4039# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4040#
4041# This code is free software; you can redistribute it and/or modify it
4042# under the terms of the GNU General Public License version 2 only, as
4043# published by the Free Software Foundation.  Oracle designates this
4044# particular file as subject to the "Classpath" exception as provided
4045# by Oracle in the LICENSE file that accompanied this code.
4046#
4047# This code is distributed in the hope that it will be useful, but WITHOUT
4048# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4049# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4050# version 2 for more details (a copy is included in the LICENSE file that
4051# accompanied this code).
4052#
4053# You should have received a copy of the GNU General Public License version
4054# 2 along with this work; if not, write to the Free Software Foundation,
4055# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4056#
4057# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4058# or visit www.oracle.com if you need additional information or have any
4059# questions.
4060#
4061
4062################################################################################
4063# Setup bundled libraries.
4064#
4065# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4066# OpenJDK repository. Default is to use these libraries as bundled, but they
4067# might be replaced by en external version by the user.
4068################################################################################
4069
4070
4071################################################################################
4072# Setup libjpeg
4073################################################################################
4074
4075
4076################################################################################
4077# Setup giflib
4078################################################################################
4079
4080
4081################################################################################
4082# Setup libpng
4083################################################################################
4084
4085
4086################################################################################
4087# Setup zlib
4088################################################################################
4089
4090
4091################################################################################
4092# Setup lcms (Little CMS)
4093################################################################################
4094
4095
4096#
4097# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4098# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4099#
4100# This code is free software; you can redistribute it and/or modify it
4101# under the terms of the GNU General Public License version 2 only, as
4102# published by the Free Software Foundation.  Oracle designates this
4103# particular file as subject to the "Classpath" exception as provided
4104# by Oracle in the LICENSE file that accompanied this code.
4105#
4106# This code is distributed in the hope that it will be useful, but WITHOUT
4107# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4108# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4109# version 2 for more details (a copy is included in the LICENSE file that
4110# accompanied this code).
4111#
4112# You should have received a copy of the GNU General Public License version
4113# 2 along with this work; if not, write to the Free Software Foundation,
4114# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4115#
4116# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4117# or visit www.oracle.com if you need additional information or have any
4118# questions.
4119#
4120
4121################################################################################
4122# Setup cups (Common Unix Printing System)
4123################################################################################
4124
4125
4126#
4127# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4129#
4130# This code is free software; you can redistribute it and/or modify it
4131# under the terms of the GNU General Public License version 2 only, as
4132# published by the Free Software Foundation.  Oracle designates this
4133# particular file as subject to the "Classpath" exception as provided
4134# by Oracle in the LICENSE file that accompanied this code.
4135#
4136# This code is distributed in the hope that it will be useful, but WITHOUT
4137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4139# version 2 for more details (a copy is included in the LICENSE file that
4140# accompanied this code).
4141#
4142# You should have received a copy of the GNU General Public License version
4143# 2 along with this work; if not, write to the Free Software Foundation,
4144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4145#
4146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4147# or visit www.oracle.com if you need additional information or have any
4148# questions.
4149#
4150
4151################################################################################
4152# Setup libffi (Foreign Function Interface)
4153################################################################################
4154
4155
4156#
4157# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4158# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4159#
4160# This code is free software; you can redistribute it and/or modify it
4161# under the terms of the GNU General Public License version 2 only, as
4162# published by the Free Software Foundation.  Oracle designates this
4163# particular file as subject to the "Classpath" exception as provided
4164# by Oracle in the LICENSE file that accompanied this code.
4165#
4166# This code is distributed in the hope that it will be useful, but WITHOUT
4167# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4168# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4169# version 2 for more details (a copy is included in the LICENSE file that
4170# accompanied this code).
4171#
4172# You should have received a copy of the GNU General Public License version
4173# 2 along with this work; if not, write to the Free Software Foundation,
4174# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4175#
4176# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4177# or visit www.oracle.com if you need additional information or have any
4178# questions.
4179#
4180
4181################################################################################
4182# Build the freetype lib from source
4183################################################################################
4184
4185
4186################################################################################
4187# Check if a potential freeype library match is correct and usable
4188################################################################################
4189
4190
4191################################################################################
4192# Setup freetype (The FreeType2 font rendering library)
4193################################################################################
4194
4195
4196#
4197# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4199#
4200# This code is free software; you can redistribute it and/or modify it
4201# under the terms of the GNU General Public License version 2 only, as
4202# published by the Free Software Foundation.  Oracle designates this
4203# particular file as subject to the "Classpath" exception as provided
4204# by Oracle in the LICENSE file that accompanied this code.
4205#
4206# This code is distributed in the hope that it will be useful, but WITHOUT
4207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4209# version 2 for more details (a copy is included in the LICENSE file that
4210# accompanied this code).
4211#
4212# You should have received a copy of the GNU General Public License version
4213# 2 along with this work; if not, write to the Free Software Foundation,
4214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4215#
4216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4217# or visit www.oracle.com if you need additional information or have any
4218# questions.
4219#
4220
4221################################################################################
4222# Setup the standard C/C++ runtime libraries.
4223#
4224# Most importantly, determine if stdc++ should be linked statically or
4225# dynamically.
4226################################################################################
4227
4228
4229#
4230# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254################################################################################
4255# Setup X11 Windows system
4256################################################################################
4257
4258
4259
4260################################################################################
4261# Determine which libraries are needed for this configuration
4262################################################################################
4263
4264
4265################################################################################
4266# Parse library options, and setup needed libraries
4267################################################################################
4268
4269
4270################################################################################
4271# Setup llvm (Low-Level VM)
4272################################################################################
4273
4274
4275################################################################################
4276# Setup various libraries, typically small system libraries
4277################################################################################
4278
4279
4280#
4281# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4282# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4283#
4284# This code is free software; you can redistribute it and/or modify it
4285# under the terms of the GNU General Public License version 2 only, as
4286# published by the Free Software Foundation.  Oracle designates this
4287# particular file as subject to the "Classpath" exception as provided
4288# by Oracle in the LICENSE file that accompanied this code.
4289#
4290# This code is distributed in the hope that it will be useful, but WITHOUT
4291# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4292# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4293# version 2 for more details (a copy is included in the LICENSE file that
4294# accompanied this code).
4295#
4296# You should have received a copy of the GNU General Public License version
4297# 2 along with this work; if not, write to the Free Software Foundation,
4298# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4299#
4300# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4301# or visit www.oracle.com if you need additional information or have any
4302# questions.
4303#
4304
4305# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4306# Converts autoconf style CPU name to OpenJDK style, into
4307# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4308
4309
4310# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4311# Converts autoconf style OS name to OpenJDK style, into
4312# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4313
4314
4315# Expects $host_os $host_cpu $build_os and $build_cpu
4316# and $with_target_bits to have been setup!
4317#
4318# Translate the standard triplet(quadruplet) definition
4319# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4320# OPENJDK_BUILD_OS, etc.
4321
4322
4323# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4324# accordingly. Must be done after setting up build and target system, but before
4325# doing anything else with these values.
4326
4327
4328# Setup the legacy variables, for controlling the old makefiles.
4329#
4330
4331
4332
4333
4334#%%% Build and target systems %%%
4335
4336
4337
4338
4339# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4340# Add -mX to various FLAGS variables.
4341
4342
4343
4344
4345
4346
4347#
4348# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4349# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4350#
4351# This code is free software; you can redistribute it and/or modify it
4352# under the terms of the GNU General Public License version 2 only, as
4353# published by the Free Software Foundation.  Oracle designates this
4354# particular file as subject to the "Classpath" exception as provided
4355# by Oracle in the LICENSE file that accompanied this code.
4356#
4357# This code is distributed in the hope that it will be useful, but WITHOUT
4358# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4359# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4360# version 2 for more details (a copy is included in the LICENSE file that
4361# accompanied this code).
4362#
4363# You should have received a copy of the GNU General Public License version
4364# 2 along with this work; if not, write to the Free Software Foundation,
4365# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4366#
4367# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4368# or visit www.oracle.com if you need additional information or have any
4369# questions.
4370#
4371
4372
4373
4374
4375
4376
4377
4378
4379#
4380# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4381# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4382#
4383# This code is free software; you can redistribute it and/or modify it
4384# under the terms of the GNU General Public License version 2 only, as
4385# published by the Free Software Foundation.  Oracle designates this
4386# particular file as subject to the "Classpath" exception as provided
4387# by Oracle in the LICENSE file that accompanied this code.
4388#
4389# This code is distributed in the hope that it will be useful, but WITHOUT
4390# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4391# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4392# version 2 for more details (a copy is included in the LICENSE file that
4393# accompanied this code).
4394#
4395# You should have received a copy of the GNU General Public License version
4396# 2 along with this work; if not, write to the Free Software Foundation,
4397# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4398#
4399# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4400# or visit www.oracle.com if you need additional information or have any
4401# questions.
4402#
4403
4404########################################################################
4405# This file is responsible for detecting, verifying and setting up the
4406# toolchain, i.e. the compiler, linker and related utilities. It will setup
4407# proper paths to the binaries, but it will not setup any flags.
4408#
4409# The binaries used is determined by the toolchain type, which is the family of
4410# compilers and related tools that are used.
4411########################################################################
4412
4413
4414# All valid toolchains, regardless of platform (used by help.m4)
4415VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4416
4417# These toolchains are valid on different platforms
4418VALID_TOOLCHAINS_linux="gcc clang"
4419VALID_TOOLCHAINS_solaris="solstudio"
4420VALID_TOOLCHAINS_macosx="gcc clang"
4421VALID_TOOLCHAINS_aix="xlc"
4422VALID_TOOLCHAINS_windows="microsoft"
4423
4424# Toolchain descriptions
4425TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4426TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4427TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4428TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4429TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4430
4431# Setup a number of variables describing how native output files are
4432# named on this platform/toolchain.
4433
4434
4435# Determine which toolchain type to use, and make sure it is valid for this
4436# platform. Setup various information about the selected toolchain.
4437
4438
4439# Before we start detecting the toolchain executables, we might need some
4440# special setup, e.g. additional paths etc.
4441
4442
4443# Restore path, etc
4444
4445
4446# Check if a compiler is of the toolchain type we expect, and save the version
4447# information from it. If the compiler does not match the expected type,
4448# this function will abort using AC_MSG_ERROR. If it matches, the version will
4449# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4450# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4451#
4452# $1 = compiler to test (CC or CXX)
4453# $2 = human readable name of compiler (C or C++)
4454
4455
4456# Try to locate the given C or C++ compiler in the path, or otherwise.
4457#
4458# $1 = compiler to test (CC or CXX)
4459# $2 = human readable name of compiler (C or C++)
4460# $3 = list of compiler names to search for
4461
4462
4463# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4464# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4465# archiver (AR). Verify that the compilers are correct according to the
4466# toolchain type.
4467
4468
4469# Setup additional tools that is considered a part of the toolchain, but not the
4470# core part. Many of these are highly platform-specific and do not exist,
4471# and/or are not needed on all platforms.
4472
4473
4474# Setup the build tools (i.e, the compiler and linker used to build programs
4475# that should be run on the build platform, not the target platform, as a build
4476# helper). Since the non-cross-compile case uses the normal, target compilers
4477# for this, we can only do this after these have been setup.
4478
4479
4480# Setup legacy variables that are still needed as alternative ways to refer to
4481# parts of the toolchain.
4482
4483
4484# Do some additional checks on the detected tools.
4485
4486
4487# Setup the JTReg Regression Test Harness.
4488
4489
4490#
4491# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4492# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4493#
4494# This code is free software; you can redistribute it and/or modify it
4495# under the terms of the GNU General Public License version 2 only, as
4496# published by the Free Software Foundation.  Oracle designates this
4497# particular file as subject to the "Classpath" exception as provided
4498# by Oracle in the LICENSE file that accompanied this code.
4499#
4500# This code is distributed in the hope that it will be useful, but WITHOUT
4501# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4502# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4503# version 2 for more details (a copy is included in the LICENSE file that
4504# accompanied this code).
4505#
4506# You should have received a copy of the GNU General Public License version
4507# 2 along with this work; if not, write to the Free Software Foundation,
4508# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4509#
4510# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4511# or visit www.oracle.com if you need additional information or have any
4512# questions.
4513#
4514
4515################################################################################
4516# The order of these defines the priority by which we try to find them.
4517VALID_VS_VERSIONS="2013 2012 2010"
4518
4519VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4520VS_VERSION_INTERNAL_2010=100
4521VS_MSVCR_2010=msvcr100.dll
4522# We don't use msvcp on Visual Studio 2010
4523#VS_MSVCP_2010=msvcp100.dll
4524VS_ENVVAR_2010="VS100COMNTOOLS"
4525VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4526VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4527VS_VS_PLATFORM_NAME_2010="v100"
4528VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4529
4530VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4531VS_VERSION_INTERNAL_2012=110
4532VS_MSVCR_2012=msvcr110.dll
4533VS_MSVCP_2012=msvcp110.dll
4534VS_ENVVAR_2012="VS110COMNTOOLS"
4535VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4536VS_SDK_INSTALLDIR_2012=
4537VS_VS_PLATFORM_NAME_2012="v110"
4538VS_SDK_PLATFORM_NAME_2012=
4539
4540VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4541VS_VERSION_INTERNAL_2013=120
4542VS_MSVCR_2013=msvcr120.dll
4543VS_MSVCP_2013=msvcp120.dll
4544VS_ENVVAR_2013="VS120COMNTOOLS"
4545VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4546VS_SDK_INSTALLDIR_2013=
4547VS_VS_PLATFORM_NAME_2013="v120"
4548VS_SDK_PLATFORM_NAME_2013=
4549
4550################################################################################
4551
4552
4553
4554################################################################################
4555
4556
4557
4558################################################################################
4559# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4560# build environment and assigns it to VS_ENV_CMD
4561
4562
4563################################################################################
4564
4565
4566
4567################################################################################
4568# Check if the VS env variables were setup prior to running configure.
4569# If not, then find vcvarsall.bat and run it automatically, and integrate
4570# the set env variables into the spec file.
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585# This line needs to be here, verbatim, after all includes and the dummy hook
4586# definitions. It is replaced with custom functionality when building
4587# custom sources.
4588#CUSTOM_AUTOCONF_INCLUDE
4589
4590# Do not change or remove the following line, it is needed for consistency checks:
4591DATE_WHEN_GENERATED=1445354942
4592
4593###############################################################################
4594#
4595# Initialization / Boot-strapping
4596#
4597# The bootstrapping process needs to solve the "chicken or the egg" problem,
4598# thus it jumps back and forth, each time gaining something needed later on.
4599#
4600###############################################################################
4601
4602# If we are requested to print additional help, do that and then exit.
4603# This must be the very first call.
4604
4605  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4606    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4607    $PRINTF "Which are valid to use depends on the build platform.\n"
4608    for toolchain in $VALID_TOOLCHAINS_all; do
4609      # Use indirect variable referencing
4610      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4611      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4612      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4613    done
4614
4615    # And now exit directly
4616    exit 0
4617  fi
4618
4619
4620# Basic initialization that must happen first of all in the normal process.
4621
4622  # Save the original command line. This is passed to us by the wrapper configure script.
4623
4624  # Save the path variable before it gets changed
4625  ORIGINAL_PATH="$PATH"
4626
4627  DATE_WHEN_CONFIGURED=`LANG=C date`
4628
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4630$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4631  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4632$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4633
4634
4635  # Start with tools that do not need have cross compilation support
4636  # and can be expected to be found in the default PATH. These tools are
4637  # used by configure.
4638
4639  # First are all the simple required tools.
4640
4641
4642
4643  # Publish this variable in the help.
4644
4645
4646  if [ -z "${BASENAME+x}" ]; then
4647    # The variable is not set by user, try to locate tool using the code snippet
4648    for ac_prog in basename
4649do
4650  # Extract the first word of "$ac_prog", so it can be a program name with args.
4651set dummy $ac_prog; ac_word=$2
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653$as_echo_n "checking for $ac_word... " >&6; }
4654if ${ac_cv_path_BASENAME+:} false; then :
4655  $as_echo_n "(cached) " >&6
4656else
4657  case $BASENAME in
4658  [\\/]* | ?:[\\/]*)
4659  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4660  ;;
4661  *)
4662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663for as_dir in $PATH
4664do
4665  IFS=$as_save_IFS
4666  test -z "$as_dir" && as_dir=.
4667    for ac_exec_ext in '' $ac_executable_extensions; do
4668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4669    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671    break 2
4672  fi
4673done
4674  done
4675IFS=$as_save_IFS
4676
4677  ;;
4678esac
4679fi
4680BASENAME=$ac_cv_path_BASENAME
4681if test -n "$BASENAME"; then
4682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4683$as_echo "$BASENAME" >&6; }
4684else
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686$as_echo "no" >&6; }
4687fi
4688
4689
4690  test -n "$BASENAME" && break
4691done
4692
4693  else
4694    # The variable is set, but is it from the command line or the environment?
4695
4696    # Try to remove the string !BASENAME! from our list.
4697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4699      # If it failed, the variable was not from the command line. Ignore it,
4700      # but warn the user (except for BASH, which is always set by the calling BASH).
4701      if test "xBASENAME" != xBASH; then
4702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4703$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4704      fi
4705      # Try to locate tool using the code snippet
4706      for ac_prog in basename
4707do
4708  # Extract the first word of "$ac_prog", so it can be a program name with args.
4709set dummy $ac_prog; ac_word=$2
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
4712if ${ac_cv_path_BASENAME+:} false; then :
4713  $as_echo_n "(cached) " >&6
4714else
4715  case $BASENAME in
4716  [\\/]* | ?:[\\/]*)
4717  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4718  ;;
4719  *)
4720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in $PATH
4722do
4723  IFS=$as_save_IFS
4724  test -z "$as_dir" && as_dir=.
4725    for ac_exec_ext in '' $ac_executable_extensions; do
4726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4727    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729    break 2
4730  fi
4731done
4732  done
4733IFS=$as_save_IFS
4734
4735  ;;
4736esac
4737fi
4738BASENAME=$ac_cv_path_BASENAME
4739if test -n "$BASENAME"; then
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4741$as_echo "$BASENAME" >&6; }
4742else
4743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
4745fi
4746
4747
4748  test -n "$BASENAME" && break
4749done
4750
4751    else
4752      # If it succeeded, then it was overridden by the user. We will use it
4753      # for the tool.
4754
4755      # First remove it from the list of overridden variables, so we can test
4756      # for unknown variables in the end.
4757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4758
4759      # Check if we try to supply an empty value
4760      if test "x$BASENAME" = x; then
4761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4762$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4764$as_echo_n "checking for BASENAME... " >&6; }
4765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4766$as_echo "disabled" >&6; }
4767      else
4768        # Check if the provided tool contains a complete path.
4769        tool_specified="$BASENAME"
4770        tool_basename="${tool_specified##*/}"
4771        if test "x$tool_basename" = "x$tool_specified"; then
4772          # A command without a complete path is provided, search $PATH.
4773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4774$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4775          # Extract the first word of "$tool_basename", so it can be a program name with args.
4776set dummy $tool_basename; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
4779if ${ac_cv_path_BASENAME+:} false; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  case $BASENAME in
4783  [\\/]* | ?:[\\/]*)
4784  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4785  ;;
4786  *)
4787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790  IFS=$as_save_IFS
4791  test -z "$as_dir" && as_dir=.
4792    for ac_exec_ext in '' $ac_executable_extensions; do
4793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4794    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796    break 2
4797  fi
4798done
4799  done
4800IFS=$as_save_IFS
4801
4802  ;;
4803esac
4804fi
4805BASENAME=$ac_cv_path_BASENAME
4806if test -n "$BASENAME"; then
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4808$as_echo "$BASENAME" >&6; }
4809else
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
4812fi
4813
4814
4815          if test "x$BASENAME" = x; then
4816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4817          fi
4818        else
4819          # Otherwise we believe it is a complete path. Use it as it is.
4820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4821$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4823$as_echo_n "checking for BASENAME... " >&6; }
4824          if test ! -x "$tool_specified"; then
4825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4826$as_echo "not found" >&6; }
4827            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4828          fi
4829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4830$as_echo "$tool_specified" >&6; }
4831        fi
4832      fi
4833    fi
4834  fi
4835
4836
4837
4838  if test "x$BASENAME" = x; then
4839    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4840  fi
4841
4842
4843
4844
4845
4846  # Publish this variable in the help.
4847
4848
4849  if [ -z "${BASH+x}" ]; then
4850    # The variable is not set by user, try to locate tool using the code snippet
4851    for ac_prog in bash
4852do
4853  # Extract the first word of "$ac_prog", so it can be a program name with args.
4854set dummy $ac_prog; ac_word=$2
4855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4856$as_echo_n "checking for $ac_word... " >&6; }
4857if ${ac_cv_path_BASH+:} false; then :
4858  $as_echo_n "(cached) " >&6
4859else
4860  case $BASH in
4861  [\\/]* | ?:[\\/]*)
4862  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4863  ;;
4864  *)
4865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in $PATH
4867do
4868  IFS=$as_save_IFS
4869  test -z "$as_dir" && as_dir=.
4870    for ac_exec_ext in '' $ac_executable_extensions; do
4871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4872    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4874    break 2
4875  fi
4876done
4877  done
4878IFS=$as_save_IFS
4879
4880  ;;
4881esac
4882fi
4883BASH=$ac_cv_path_BASH
4884if test -n "$BASH"; then
4885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4886$as_echo "$BASH" >&6; }
4887else
4888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889$as_echo "no" >&6; }
4890fi
4891
4892
4893  test -n "$BASH" && break
4894done
4895
4896  else
4897    # The variable is set, but is it from the command line or the environment?
4898
4899    # Try to remove the string !BASH! from our list.
4900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4902      # If it failed, the variable was not from the command line. Ignore it,
4903      # but warn the user (except for BASH, which is always set by the calling BASH).
4904      if test "xBASH" != xBASH; then
4905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4906$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4907      fi
4908      # Try to locate tool using the code snippet
4909      for ac_prog in bash
4910do
4911  # Extract the first word of "$ac_prog", so it can be a program name with args.
4912set dummy $ac_prog; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if ${ac_cv_path_BASH+:} false; then :
4916  $as_echo_n "(cached) " >&6
4917else
4918  case $BASH in
4919  [\\/]* | ?:[\\/]*)
4920  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4921  ;;
4922  *)
4923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in $PATH
4925do
4926  IFS=$as_save_IFS
4927  test -z "$as_dir" && as_dir=.
4928    for ac_exec_ext in '' $ac_executable_extensions; do
4929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4930    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932    break 2
4933  fi
4934done
4935  done
4936IFS=$as_save_IFS
4937
4938  ;;
4939esac
4940fi
4941BASH=$ac_cv_path_BASH
4942if test -n "$BASH"; then
4943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4944$as_echo "$BASH" >&6; }
4945else
4946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950
4951  test -n "$BASH" && break
4952done
4953
4954    else
4955      # If it succeeded, then it was overridden by the user. We will use it
4956      # for the tool.
4957
4958      # First remove it from the list of overridden variables, so we can test
4959      # for unknown variables in the end.
4960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4961
4962      # Check if we try to supply an empty value
4963      if test "x$BASH" = x; then
4964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4965$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4967$as_echo_n "checking for BASH... " >&6; }
4968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4969$as_echo "disabled" >&6; }
4970      else
4971        # Check if the provided tool contains a complete path.
4972        tool_specified="$BASH"
4973        tool_basename="${tool_specified##*/}"
4974        if test "x$tool_basename" = "x$tool_specified"; then
4975          # A command without a complete path is provided, search $PATH.
4976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4977$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4978          # Extract the first word of "$tool_basename", so it can be a program name with args.
4979set dummy $tool_basename; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_BASH+:} false; then :
4983  $as_echo_n "(cached) " >&6
4984else
4985  case $BASH in
4986  [\\/]* | ?:[\\/]*)
4987  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4988  ;;
4989  *)
4990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993  IFS=$as_save_IFS
4994  test -z "$as_dir" && as_dir=.
4995    for ac_exec_ext in '' $ac_executable_extensions; do
4996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999    break 2
5000  fi
5001done
5002  done
5003IFS=$as_save_IFS
5004
5005  ;;
5006esac
5007fi
5008BASH=$ac_cv_path_BASH
5009if test -n "$BASH"; then
5010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5011$as_echo "$BASH" >&6; }
5012else
5013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017
5018          if test "x$BASH" = x; then
5019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5020          fi
5021        else
5022          # Otherwise we believe it is a complete path. Use it as it is.
5023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5024$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5026$as_echo_n "checking for BASH... " >&6; }
5027          if test ! -x "$tool_specified"; then
5028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5029$as_echo "not found" >&6; }
5030            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5031          fi
5032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5033$as_echo "$tool_specified" >&6; }
5034        fi
5035      fi
5036    fi
5037  fi
5038
5039
5040
5041  if test "x$BASH" = x; then
5042    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5043  fi
5044
5045
5046
5047
5048
5049  # Publish this variable in the help.
5050
5051
5052  if [ -z "${CAT+x}" ]; then
5053    # The variable is not set by user, try to locate tool using the code snippet
5054    for ac_prog in cat
5055do
5056  # Extract the first word of "$ac_prog", so it can be a program name with args.
5057set dummy $ac_prog; ac_word=$2
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
5060if ${ac_cv_path_CAT+:} false; then :
5061  $as_echo_n "(cached) " >&6
5062else
5063  case $CAT in
5064  [\\/]* | ?:[\\/]*)
5065  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5066  ;;
5067  *)
5068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071  IFS=$as_save_IFS
5072  test -z "$as_dir" && as_dir=.
5073    for ac_exec_ext in '' $ac_executable_extensions; do
5074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5075    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5077    break 2
5078  fi
5079done
5080  done
5081IFS=$as_save_IFS
5082
5083  ;;
5084esac
5085fi
5086CAT=$ac_cv_path_CAT
5087if test -n "$CAT"; then
5088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5089$as_echo "$CAT" >&6; }
5090else
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
5093fi
5094
5095
5096  test -n "$CAT" && break
5097done
5098
5099  else
5100    # The variable is set, but is it from the command line or the environment?
5101
5102    # Try to remove the string !CAT! from our list.
5103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5105      # If it failed, the variable was not from the command line. Ignore it,
5106      # but warn the user (except for BASH, which is always set by the calling BASH).
5107      if test "xCAT" != xBASH; then
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5109$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5110      fi
5111      # Try to locate tool using the code snippet
5112      for ac_prog in cat
5113do
5114  # Extract the first word of "$ac_prog", so it can be a program name with args.
5115set dummy $ac_prog; ac_word=$2
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
5118if ${ac_cv_path_CAT+:} false; then :
5119  $as_echo_n "(cached) " >&6
5120else
5121  case $CAT in
5122  [\\/]* | ?:[\\/]*)
5123  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5124  ;;
5125  *)
5126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5127for as_dir in $PATH
5128do
5129  IFS=$as_save_IFS
5130  test -z "$as_dir" && as_dir=.
5131    for ac_exec_ext in '' $ac_executable_extensions; do
5132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5133    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5135    break 2
5136  fi
5137done
5138  done
5139IFS=$as_save_IFS
5140
5141  ;;
5142esac
5143fi
5144CAT=$ac_cv_path_CAT
5145if test -n "$CAT"; then
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5147$as_echo "$CAT" >&6; }
5148else
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150$as_echo "no" >&6; }
5151fi
5152
5153
5154  test -n "$CAT" && break
5155done
5156
5157    else
5158      # If it succeeded, then it was overridden by the user. We will use it
5159      # for the tool.
5160
5161      # First remove it from the list of overridden variables, so we can test
5162      # for unknown variables in the end.
5163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5164
5165      # Check if we try to supply an empty value
5166      if test "x$CAT" = x; then
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5168$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5170$as_echo_n "checking for CAT... " >&6; }
5171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5172$as_echo "disabled" >&6; }
5173      else
5174        # Check if the provided tool contains a complete path.
5175        tool_specified="$CAT"
5176        tool_basename="${tool_specified##*/}"
5177        if test "x$tool_basename" = "x$tool_specified"; then
5178          # A command without a complete path is provided, search $PATH.
5179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5180$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5181          # Extract the first word of "$tool_basename", so it can be a program name with args.
5182set dummy $tool_basename; ac_word=$2
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184$as_echo_n "checking for $ac_word... " >&6; }
5185if ${ac_cv_path_CAT+:} false; then :
5186  $as_echo_n "(cached) " >&6
5187else
5188  case $CAT in
5189  [\\/]* | ?:[\\/]*)
5190  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5191  ;;
5192  *)
5193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5194for as_dir in $PATH
5195do
5196  IFS=$as_save_IFS
5197  test -z "$as_dir" && as_dir=.
5198    for ac_exec_ext in '' $ac_executable_extensions; do
5199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5200    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5202    break 2
5203  fi
5204done
5205  done
5206IFS=$as_save_IFS
5207
5208  ;;
5209esac
5210fi
5211CAT=$ac_cv_path_CAT
5212if test -n "$CAT"; then
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5214$as_echo "$CAT" >&6; }
5215else
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217$as_echo "no" >&6; }
5218fi
5219
5220
5221          if test "x$CAT" = x; then
5222            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5223          fi
5224        else
5225          # Otherwise we believe it is a complete path. Use it as it is.
5226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5227$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5228          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5229$as_echo_n "checking for CAT... " >&6; }
5230          if test ! -x "$tool_specified"; then
5231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5232$as_echo "not found" >&6; }
5233            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5234          fi
5235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5236$as_echo "$tool_specified" >&6; }
5237        fi
5238      fi
5239    fi
5240  fi
5241
5242
5243
5244  if test "x$CAT" = x; then
5245    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5246  fi
5247
5248
5249
5250
5251
5252  # Publish this variable in the help.
5253
5254
5255  if [ -z "${CHMOD+x}" ]; then
5256    # The variable is not set by user, try to locate tool using the code snippet
5257    for ac_prog in chmod
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_CHMOD+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $CHMOD in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289CHMOD=$ac_cv_path_CHMOD
5290if test -n "$CHMOD"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5292$as_echo "$CHMOD" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$CHMOD" && break
5300done
5301
5302  else
5303    # The variable is set, but is it from the command line or the environment?
5304
5305    # Try to remove the string !CHMOD! from our list.
5306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5308      # If it failed, the variable was not from the command line. Ignore it,
5309      # but warn the user (except for BASH, which is always set by the calling BASH).
5310      if test "xCHMOD" != xBASH; then
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5312$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5313      fi
5314      # Try to locate tool using the code snippet
5315      for ac_prog in chmod
5316do
5317  # Extract the first word of "$ac_prog", so it can be a program name with args.
5318set dummy $ac_prog; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_CHMOD+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $CHMOD in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347CHMOD=$ac_cv_path_CHMOD
5348if test -n "$CHMOD"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5350$as_echo "$CHMOD" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357  test -n "$CHMOD" && break
5358done
5359
5360    else
5361      # If it succeeded, then it was overridden by the user. We will use it
5362      # for the tool.
5363
5364      # First remove it from the list of overridden variables, so we can test
5365      # for unknown variables in the end.
5366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5367
5368      # Check if we try to supply an empty value
5369      if test "x$CHMOD" = x; then
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5371$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5373$as_echo_n "checking for CHMOD... " >&6; }
5374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5375$as_echo "disabled" >&6; }
5376      else
5377        # Check if the provided tool contains a complete path.
5378        tool_specified="$CHMOD"
5379        tool_basename="${tool_specified##*/}"
5380        if test "x$tool_basename" = "x$tool_specified"; then
5381          # A command without a complete path is provided, search $PATH.
5382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5383$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5384          # Extract the first word of "$tool_basename", so it can be a program name with args.
5385set dummy $tool_basename; ac_word=$2
5386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5387$as_echo_n "checking for $ac_word... " >&6; }
5388if ${ac_cv_path_CHMOD+:} false; then :
5389  $as_echo_n "(cached) " >&6
5390else
5391  case $CHMOD in
5392  [\\/]* | ?:[\\/]*)
5393  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5394  ;;
5395  *)
5396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5397for as_dir in $PATH
5398do
5399  IFS=$as_save_IFS
5400  test -z "$as_dir" && as_dir=.
5401    for ac_exec_ext in '' $ac_executable_extensions; do
5402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5403    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5405    break 2
5406  fi
5407done
5408  done
5409IFS=$as_save_IFS
5410
5411  ;;
5412esac
5413fi
5414CHMOD=$ac_cv_path_CHMOD
5415if test -n "$CHMOD"; then
5416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5417$as_echo "$CHMOD" >&6; }
5418else
5419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5420$as_echo "no" >&6; }
5421fi
5422
5423
5424          if test "x$CHMOD" = x; then
5425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5426          fi
5427        else
5428          # Otherwise we believe it is a complete path. Use it as it is.
5429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5430$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5432$as_echo_n "checking for CHMOD... " >&6; }
5433          if test ! -x "$tool_specified"; then
5434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5435$as_echo "not found" >&6; }
5436            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5437          fi
5438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5439$as_echo "$tool_specified" >&6; }
5440        fi
5441      fi
5442    fi
5443  fi
5444
5445
5446
5447  if test "x$CHMOD" = x; then
5448    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5449  fi
5450
5451
5452
5453
5454
5455  # Publish this variable in the help.
5456
5457
5458  if [ -z "${CMP+x}" ]; then
5459    # The variable is not set by user, try to locate tool using the code snippet
5460    for ac_prog in cmp
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_CMP+:} false; then :
5467  $as_echo_n "(cached) " >&6
5468else
5469  case $CMP in
5470  [\\/]* | ?:[\\/]*)
5471  ac_cv_path_CMP="$CMP" # 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_CMP="$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
5492CMP=$ac_cv_path_CMP
5493if test -n "$CMP"; then
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5495$as_echo "$CMP" >&6; }
5496else
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498$as_echo "no" >&6; }
5499fi
5500
5501
5502  test -n "$CMP" && break
5503done
5504
5505  else
5506    # The variable is set, but is it from the command line or the environment?
5507
5508    # Try to remove the string !CMP! from our list.
5509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5511      # If it failed, the variable was not from the command line. Ignore it,
5512      # but warn the user (except for BASH, which is always set by the calling BASH).
5513      if test "xCMP" != xBASH; then
5514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5515$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5516      fi
5517      # Try to locate tool using the code snippet
5518      for ac_prog in cmp
5519do
5520  # Extract the first word of "$ac_prog", so it can be a program name with args.
5521set dummy $ac_prog; 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_CMP+:} false; then :
5525  $as_echo_n "(cached) " >&6
5526else
5527  case $CMP in
5528  [\\/]* | ?:[\\/]*)
5529  ac_cv_path_CMP="$CMP" # 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_CMP="$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
5550CMP=$ac_cv_path_CMP
5551if test -n "$CMP"; then
5552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5553$as_echo "$CMP" >&6; }
5554else
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556$as_echo "no" >&6; }
5557fi
5558
5559
5560  test -n "$CMP" && break
5561done
5562
5563    else
5564      # If it succeeded, then it was overridden by the user. We will use it
5565      # for the tool.
5566
5567      # First remove it from the list of overridden variables, so we can test
5568      # for unknown variables in the end.
5569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5570
5571      # Check if we try to supply an empty value
5572      if test "x$CMP" = x; then
5573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5574$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5576$as_echo_n "checking for CMP... " >&6; }
5577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5578$as_echo "disabled" >&6; }
5579      else
5580        # Check if the provided tool contains a complete path.
5581        tool_specified="$CMP"
5582        tool_basename="${tool_specified##*/}"
5583        if test "x$tool_basename" = "x$tool_specified"; then
5584          # A command without a complete path is provided, search $PATH.
5585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5586$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5587          # Extract the first word of "$tool_basename", so it can be a program name with args.
5588set dummy $tool_basename; ac_word=$2
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
5591if ${ac_cv_path_CMP+:} false; then :
5592  $as_echo_n "(cached) " >&6
5593else
5594  case $CMP in
5595  [\\/]* | ?:[\\/]*)
5596  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5597  ;;
5598  *)
5599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH
5601do
5602  IFS=$as_save_IFS
5603  test -z "$as_dir" && as_dir=.
5604    for ac_exec_ext in '' $ac_executable_extensions; do
5605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5606    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608    break 2
5609  fi
5610done
5611  done
5612IFS=$as_save_IFS
5613
5614  ;;
5615esac
5616fi
5617CMP=$ac_cv_path_CMP
5618if test -n "$CMP"; then
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5620$as_echo "$CMP" >&6; }
5621else
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623$as_echo "no" >&6; }
5624fi
5625
5626
5627          if test "x$CMP" = x; then
5628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5629          fi
5630        else
5631          # Otherwise we believe it is a complete path. Use it as it is.
5632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5633$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5635$as_echo_n "checking for CMP... " >&6; }
5636          if test ! -x "$tool_specified"; then
5637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5638$as_echo "not found" >&6; }
5639            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5640          fi
5641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5642$as_echo "$tool_specified" >&6; }
5643        fi
5644      fi
5645    fi
5646  fi
5647
5648
5649
5650  if test "x$CMP" = x; then
5651    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5652  fi
5653
5654
5655
5656
5657
5658  # Publish this variable in the help.
5659
5660
5661  if [ -z "${COMM+x}" ]; then
5662    # The variable is not set by user, try to locate tool using the code snippet
5663    for ac_prog in comm
5664do
5665  # Extract the first word of "$ac_prog", so it can be a program name with args.
5666set dummy $ac_prog; ac_word=$2
5667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5668$as_echo_n "checking for $ac_word... " >&6; }
5669if ${ac_cv_path_COMM+:} false; then :
5670  $as_echo_n "(cached) " >&6
5671else
5672  case $COMM in
5673  [\\/]* | ?:[\\/]*)
5674  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5675  ;;
5676  *)
5677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678for as_dir in $PATH
5679do
5680  IFS=$as_save_IFS
5681  test -z "$as_dir" && as_dir=.
5682    for ac_exec_ext in '' $ac_executable_extensions; do
5683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686    break 2
5687  fi
5688done
5689  done
5690IFS=$as_save_IFS
5691
5692  ;;
5693esac
5694fi
5695COMM=$ac_cv_path_COMM
5696if test -n "$COMM"; then
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5698$as_echo "$COMM" >&6; }
5699else
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
5702fi
5703
5704
5705  test -n "$COMM" && break
5706done
5707
5708  else
5709    # The variable is set, but is it from the command line or the environment?
5710
5711    # Try to remove the string !COMM! from our list.
5712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5714      # If it failed, the variable was not from the command line. Ignore it,
5715      # but warn the user (except for BASH, which is always set by the calling BASH).
5716      if test "xCOMM" != xBASH; then
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5718$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5719      fi
5720      # Try to locate tool using the code snippet
5721      for ac_prog in comm
5722do
5723  # Extract the first word of "$ac_prog", so it can be a program name with args.
5724set dummy $ac_prog; ac_word=$2
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726$as_echo_n "checking for $ac_word... " >&6; }
5727if ${ac_cv_path_COMM+:} false; then :
5728  $as_echo_n "(cached) " >&6
5729else
5730  case $COMM in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738  IFS=$as_save_IFS
5739  test -z "$as_dir" && as_dir=.
5740    for ac_exec_ext in '' $ac_executable_extensions; do
5741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744    break 2
5745  fi
5746done
5747  done
5748IFS=$as_save_IFS
5749
5750  ;;
5751esac
5752fi
5753COMM=$ac_cv_path_COMM
5754if test -n "$COMM"; then
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5756$as_echo "$COMM" >&6; }
5757else
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760fi
5761
5762
5763  test -n "$COMM" && break
5764done
5765
5766    else
5767      # If it succeeded, then it was overridden by the user. We will use it
5768      # for the tool.
5769
5770      # First remove it from the list of overridden variables, so we can test
5771      # for unknown variables in the end.
5772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5773
5774      # Check if we try to supply an empty value
5775      if test "x$COMM" = x; then
5776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5777$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5779$as_echo_n "checking for COMM... " >&6; }
5780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5781$as_echo "disabled" >&6; }
5782      else
5783        # Check if the provided tool contains a complete path.
5784        tool_specified="$COMM"
5785        tool_basename="${tool_specified##*/}"
5786        if test "x$tool_basename" = "x$tool_specified"; then
5787          # A command without a complete path is provided, search $PATH.
5788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5789$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5790          # Extract the first word of "$tool_basename", so it can be a program name with args.
5791set dummy $tool_basename; 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_COMM+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $COMM in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_COMM="$COMM" # 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_COMM="$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
5820COMM=$ac_cv_path_COMM
5821if test -n "$COMM"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5823$as_echo "$COMM" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830          if test "x$COMM" = x; then
5831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5832          fi
5833        else
5834          # Otherwise we believe it is a complete path. Use it as it is.
5835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5836$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5838$as_echo_n "checking for COMM... " >&6; }
5839          if test ! -x "$tool_specified"; then
5840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5841$as_echo "not found" >&6; }
5842            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5843          fi
5844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5845$as_echo "$tool_specified" >&6; }
5846        fi
5847      fi
5848    fi
5849  fi
5850
5851
5852
5853  if test "x$COMM" = x; then
5854    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5855  fi
5856
5857
5858
5859
5860
5861  # Publish this variable in the help.
5862
5863
5864  if [ -z "${CP+x}" ]; then
5865    # The variable is not set by user, try to locate tool using the code snippet
5866    for ac_prog in cp
5867do
5868  # Extract the first word of "$ac_prog", so it can be a program name with args.
5869set dummy $ac_prog; ac_word=$2
5870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5871$as_echo_n "checking for $ac_word... " >&6; }
5872if ${ac_cv_path_CP+:} false; then :
5873  $as_echo_n "(cached) " >&6
5874else
5875  case $CP in
5876  [\\/]* | ?:[\\/]*)
5877  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5878  ;;
5879  *)
5880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5881for as_dir in $PATH
5882do
5883  IFS=$as_save_IFS
5884  test -z "$as_dir" && as_dir=.
5885    for ac_exec_ext in '' $ac_executable_extensions; do
5886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5887    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5889    break 2
5890  fi
5891done
5892  done
5893IFS=$as_save_IFS
5894
5895  ;;
5896esac
5897fi
5898CP=$ac_cv_path_CP
5899if test -n "$CP"; then
5900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5901$as_echo "$CP" >&6; }
5902else
5903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5904$as_echo "no" >&6; }
5905fi
5906
5907
5908  test -n "$CP" && break
5909done
5910
5911  else
5912    # The variable is set, but is it from the command line or the environment?
5913
5914    # Try to remove the string !CP! from our list.
5915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5917      # If it failed, the variable was not from the command line. Ignore it,
5918      # but warn the user (except for BASH, which is always set by the calling BASH).
5919      if test "xCP" != xBASH; then
5920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5921$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5922      fi
5923      # Try to locate tool using the code snippet
5924      for ac_prog in cp
5925do
5926  # Extract the first word of "$ac_prog", so it can be a program name with args.
5927set dummy $ac_prog; ac_word=$2
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929$as_echo_n "checking for $ac_word... " >&6; }
5930if ${ac_cv_path_CP+:} false; then :
5931  $as_echo_n "(cached) " >&6
5932else
5933  case $CP in
5934  [\\/]* | ?:[\\/]*)
5935  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5936  ;;
5937  *)
5938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941  IFS=$as_save_IFS
5942  test -z "$as_dir" && as_dir=.
5943    for ac_exec_ext in '' $ac_executable_extensions; do
5944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5945    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5947    break 2
5948  fi
5949done
5950  done
5951IFS=$as_save_IFS
5952
5953  ;;
5954esac
5955fi
5956CP=$ac_cv_path_CP
5957if test -n "$CP"; then
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5959$as_echo "$CP" >&6; }
5960else
5961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
5963fi
5964
5965
5966  test -n "$CP" && break
5967done
5968
5969    else
5970      # If it succeeded, then it was overridden by the user. We will use it
5971      # for the tool.
5972
5973      # First remove it from the list of overridden variables, so we can test
5974      # for unknown variables in the end.
5975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5976
5977      # Check if we try to supply an empty value
5978      if test "x$CP" = x; then
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
5980$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
5981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5982$as_echo_n "checking for CP... " >&6; }
5983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5984$as_echo "disabled" >&6; }
5985      else
5986        # Check if the provided tool contains a complete path.
5987        tool_specified="$CP"
5988        tool_basename="${tool_specified##*/}"
5989        if test "x$tool_basename" = "x$tool_specified"; then
5990          # A command without a complete path is provided, search $PATH.
5991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5992$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5993          # Extract the first word of "$tool_basename", so it can be a program name with args.
5994set dummy $tool_basename; ac_word=$2
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
5997if ${ac_cv_path_CP+:} false; then :
5998  $as_echo_n "(cached) " >&6
5999else
6000  case $CP in
6001  [\\/]* | ?:[\\/]*)
6002  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6003  ;;
6004  *)
6005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008  IFS=$as_save_IFS
6009  test -z "$as_dir" && as_dir=.
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6012    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6014    break 2
6015  fi
6016done
6017  done
6018IFS=$as_save_IFS
6019
6020  ;;
6021esac
6022fi
6023CP=$ac_cv_path_CP
6024if test -n "$CP"; then
6025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6026$as_echo "$CP" >&6; }
6027else
6028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6029$as_echo "no" >&6; }
6030fi
6031
6032
6033          if test "x$CP" = x; then
6034            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6035          fi
6036        else
6037          # Otherwise we believe it is a complete path. Use it as it is.
6038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6039$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6040          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6041$as_echo_n "checking for CP... " >&6; }
6042          if test ! -x "$tool_specified"; then
6043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6044$as_echo "not found" >&6; }
6045            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6046          fi
6047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6048$as_echo "$tool_specified" >&6; }
6049        fi
6050      fi
6051    fi
6052  fi
6053
6054
6055
6056  if test "x$CP" = x; then
6057    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6058  fi
6059
6060
6061
6062
6063
6064  # Publish this variable in the help.
6065
6066
6067  if [ -z "${CUT+x}" ]; then
6068    # The variable is not set by user, try to locate tool using the code snippet
6069    for ac_prog in cut
6070do
6071  # Extract the first word of "$ac_prog", so it can be a program name with args.
6072set dummy $ac_prog; ac_word=$2
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
6075if ${ac_cv_path_CUT+:} false; then :
6076  $as_echo_n "(cached) " >&6
6077else
6078  case $CUT in
6079  [\\/]* | ?:[\\/]*)
6080  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6081  ;;
6082  *)
6083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH
6085do
6086  IFS=$as_save_IFS
6087  test -z "$as_dir" && as_dir=.
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6090    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6092    break 2
6093  fi
6094done
6095  done
6096IFS=$as_save_IFS
6097
6098  ;;
6099esac
6100fi
6101CUT=$ac_cv_path_CUT
6102if test -n "$CUT"; then
6103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6104$as_echo "$CUT" >&6; }
6105else
6106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
6108fi
6109
6110
6111  test -n "$CUT" && break
6112done
6113
6114  else
6115    # The variable is set, but is it from the command line or the environment?
6116
6117    # Try to remove the string !CUT! from our list.
6118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6120      # If it failed, the variable was not from the command line. Ignore it,
6121      # but warn the user (except for BASH, which is always set by the calling BASH).
6122      if test "xCUT" != xBASH; then
6123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6124$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6125      fi
6126      # Try to locate tool using the code snippet
6127      for ac_prog in cut
6128do
6129  # Extract the first word of "$ac_prog", so it can be a program name with args.
6130set dummy $ac_prog; ac_word=$2
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132$as_echo_n "checking for $ac_word... " >&6; }
6133if ${ac_cv_path_CUT+:} false; then :
6134  $as_echo_n "(cached) " >&6
6135else
6136  case $CUT in
6137  [\\/]* | ?:[\\/]*)
6138  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6139  ;;
6140  *)
6141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142for as_dir in $PATH
6143do
6144  IFS=$as_save_IFS
6145  test -z "$as_dir" && as_dir=.
6146    for ac_exec_ext in '' $ac_executable_extensions; do
6147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6148    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6150    break 2
6151  fi
6152done
6153  done
6154IFS=$as_save_IFS
6155
6156  ;;
6157esac
6158fi
6159CUT=$ac_cv_path_CUT
6160if test -n "$CUT"; then
6161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6162$as_echo "$CUT" >&6; }
6163else
6164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165$as_echo "no" >&6; }
6166fi
6167
6168
6169  test -n "$CUT" && break
6170done
6171
6172    else
6173      # If it succeeded, then it was overridden by the user. We will use it
6174      # for the tool.
6175
6176      # First remove it from the list of overridden variables, so we can test
6177      # for unknown variables in the end.
6178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6179
6180      # Check if we try to supply an empty value
6181      if test "x$CUT" = x; then
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6183$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6185$as_echo_n "checking for CUT... " >&6; }
6186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6187$as_echo "disabled" >&6; }
6188      else
6189        # Check if the provided tool contains a complete path.
6190        tool_specified="$CUT"
6191        tool_basename="${tool_specified##*/}"
6192        if test "x$tool_basename" = "x$tool_specified"; then
6193          # A command without a complete path is provided, search $PATH.
6194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6195$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6196          # Extract the first word of "$tool_basename", so it can be a program name with args.
6197set dummy $tool_basename; ac_word=$2
6198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6199$as_echo_n "checking for $ac_word... " >&6; }
6200if ${ac_cv_path_CUT+:} false; then :
6201  $as_echo_n "(cached) " >&6
6202else
6203  case $CUT in
6204  [\\/]* | ?:[\\/]*)
6205  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6206  ;;
6207  *)
6208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6209for as_dir in $PATH
6210do
6211  IFS=$as_save_IFS
6212  test -z "$as_dir" && as_dir=.
6213    for ac_exec_ext in '' $ac_executable_extensions; do
6214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6215    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6217    break 2
6218  fi
6219done
6220  done
6221IFS=$as_save_IFS
6222
6223  ;;
6224esac
6225fi
6226CUT=$ac_cv_path_CUT
6227if test -n "$CUT"; then
6228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6229$as_echo "$CUT" >&6; }
6230else
6231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
6233fi
6234
6235
6236          if test "x$CUT" = x; then
6237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6238          fi
6239        else
6240          # Otherwise we believe it is a complete path. Use it as it is.
6241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6242$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6244$as_echo_n "checking for CUT... " >&6; }
6245          if test ! -x "$tool_specified"; then
6246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6247$as_echo "not found" >&6; }
6248            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6249          fi
6250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6251$as_echo "$tool_specified" >&6; }
6252        fi
6253      fi
6254    fi
6255  fi
6256
6257
6258
6259  if test "x$CUT" = x; then
6260    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6261  fi
6262
6263
6264
6265
6266
6267  # Publish this variable in the help.
6268
6269
6270  if [ -z "${DATE+x}" ]; then
6271    # The variable is not set by user, try to locate tool using the code snippet
6272    for ac_prog in date
6273do
6274  # Extract the first word of "$ac_prog", so it can be a program name with args.
6275set dummy $ac_prog; ac_word=$2
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277$as_echo_n "checking for $ac_word... " >&6; }
6278if ${ac_cv_path_DATE+:} false; then :
6279  $as_echo_n "(cached) " >&6
6280else
6281  case $DATE in
6282  [\\/]* | ?:[\\/]*)
6283  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6284  ;;
6285  *)
6286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289  IFS=$as_save_IFS
6290  test -z "$as_dir" && as_dir=.
6291    for ac_exec_ext in '' $ac_executable_extensions; do
6292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295    break 2
6296  fi
6297done
6298  done
6299IFS=$as_save_IFS
6300
6301  ;;
6302esac
6303fi
6304DATE=$ac_cv_path_DATE
6305if test -n "$DATE"; then
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6307$as_echo "$DATE" >&6; }
6308else
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
6311fi
6312
6313
6314  test -n "$DATE" && break
6315done
6316
6317  else
6318    # The variable is set, but is it from the command line or the environment?
6319
6320    # Try to remove the string !DATE! from our list.
6321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6323      # If it failed, the variable was not from the command line. Ignore it,
6324      # but warn the user (except for BASH, which is always set by the calling BASH).
6325      if test "xDATE" != xBASH; then
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6327$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6328      fi
6329      # Try to locate tool using the code snippet
6330      for ac_prog in date
6331do
6332  # Extract the first word of "$ac_prog", so it can be a program name with args.
6333set dummy $ac_prog; ac_word=$2
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335$as_echo_n "checking for $ac_word... " >&6; }
6336if ${ac_cv_path_DATE+:} false; then :
6337  $as_echo_n "(cached) " >&6
6338else
6339  case $DATE in
6340  [\\/]* | ?:[\\/]*)
6341  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6342  ;;
6343  *)
6344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345for as_dir in $PATH
6346do
6347  IFS=$as_save_IFS
6348  test -z "$as_dir" && as_dir=.
6349    for ac_exec_ext in '' $ac_executable_extensions; do
6350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353    break 2
6354  fi
6355done
6356  done
6357IFS=$as_save_IFS
6358
6359  ;;
6360esac
6361fi
6362DATE=$ac_cv_path_DATE
6363if test -n "$DATE"; then
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6365$as_echo "$DATE" >&6; }
6366else
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368$as_echo "no" >&6; }
6369fi
6370
6371
6372  test -n "$DATE" && break
6373done
6374
6375    else
6376      # If it succeeded, then it was overridden by the user. We will use it
6377      # for the tool.
6378
6379      # First remove it from the list of overridden variables, so we can test
6380      # for unknown variables in the end.
6381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6382
6383      # Check if we try to supply an empty value
6384      if test "x$DATE" = x; then
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6386$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6388$as_echo_n "checking for DATE... " >&6; }
6389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6390$as_echo "disabled" >&6; }
6391      else
6392        # Check if the provided tool contains a complete path.
6393        tool_specified="$DATE"
6394        tool_basename="${tool_specified##*/}"
6395        if test "x$tool_basename" = "x$tool_specified"; then
6396          # A command without a complete path is provided, search $PATH.
6397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6398$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6399          # Extract the first word of "$tool_basename", so it can be a program name with args.
6400set dummy $tool_basename; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_path_DATE+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $DATE in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429DATE=$ac_cv_path_DATE
6430if test -n "$DATE"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6432$as_echo "$DATE" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439          if test "x$DATE" = x; then
6440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6441          fi
6442        else
6443          # Otherwise we believe it is a complete path. Use it as it is.
6444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6445$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6447$as_echo_n "checking for DATE... " >&6; }
6448          if test ! -x "$tool_specified"; then
6449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6450$as_echo "not found" >&6; }
6451            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6452          fi
6453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6454$as_echo "$tool_specified" >&6; }
6455        fi
6456      fi
6457    fi
6458  fi
6459
6460
6461
6462  if test "x$DATE" = x; then
6463    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6464  fi
6465
6466
6467
6468
6469
6470  # Publish this variable in the help.
6471
6472
6473  if [ -z "${DIFF+x}" ]; then
6474    # The variable is not set by user, try to locate tool using the code snippet
6475    for ac_prog in gdiff diff
6476do
6477  # Extract the first word of "$ac_prog", so it can be a program name with args.
6478set dummy $ac_prog; ac_word=$2
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6480$as_echo_n "checking for $ac_word... " >&6; }
6481if ${ac_cv_path_DIFF+:} false; then :
6482  $as_echo_n "(cached) " >&6
6483else
6484  case $DIFF in
6485  [\\/]* | ?:[\\/]*)
6486  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6487  ;;
6488  *)
6489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490for as_dir in $PATH
6491do
6492  IFS=$as_save_IFS
6493  test -z "$as_dir" && as_dir=.
6494    for ac_exec_ext in '' $ac_executable_extensions; do
6495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6496    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6498    break 2
6499  fi
6500done
6501  done
6502IFS=$as_save_IFS
6503
6504  ;;
6505esac
6506fi
6507DIFF=$ac_cv_path_DIFF
6508if test -n "$DIFF"; then
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6510$as_echo "$DIFF" >&6; }
6511else
6512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
6514fi
6515
6516
6517  test -n "$DIFF" && break
6518done
6519
6520  else
6521    # The variable is set, but is it from the command line or the environment?
6522
6523    # Try to remove the string !DIFF! from our list.
6524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6526      # If it failed, the variable was not from the command line. Ignore it,
6527      # but warn the user (except for BASH, which is always set by the calling BASH).
6528      if test "xDIFF" != xBASH; then
6529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6530$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6531      fi
6532      # Try to locate tool using the code snippet
6533      for ac_prog in gdiff diff
6534do
6535  # Extract the first word of "$ac_prog", so it can be a program name with args.
6536set dummy $ac_prog; ac_word=$2
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6538$as_echo_n "checking for $ac_word... " >&6; }
6539if ${ac_cv_path_DIFF+:} false; then :
6540  $as_echo_n "(cached) " >&6
6541else
6542  case $DIFF in
6543  [\\/]* | ?:[\\/]*)
6544  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6545  ;;
6546  *)
6547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6548for as_dir in $PATH
6549do
6550  IFS=$as_save_IFS
6551  test -z "$as_dir" && as_dir=.
6552    for ac_exec_ext in '' $ac_executable_extensions; do
6553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6554    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6556    break 2
6557  fi
6558done
6559  done
6560IFS=$as_save_IFS
6561
6562  ;;
6563esac
6564fi
6565DIFF=$ac_cv_path_DIFF
6566if test -n "$DIFF"; then
6567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6568$as_echo "$DIFF" >&6; }
6569else
6570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
6572fi
6573
6574
6575  test -n "$DIFF" && break
6576done
6577
6578    else
6579      # If it succeeded, then it was overridden by the user. We will use it
6580      # for the tool.
6581
6582      # First remove it from the list of overridden variables, so we can test
6583      # for unknown variables in the end.
6584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6585
6586      # Check if we try to supply an empty value
6587      if test "x$DIFF" = x; then
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6589$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6591$as_echo_n "checking for DIFF... " >&6; }
6592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6593$as_echo "disabled" >&6; }
6594      else
6595        # Check if the provided tool contains a complete path.
6596        tool_specified="$DIFF"
6597        tool_basename="${tool_specified##*/}"
6598        if test "x$tool_basename" = "x$tool_specified"; then
6599          # A command without a complete path is provided, search $PATH.
6600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6601$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6602          # Extract the first word of "$tool_basename", so it can be a program name with args.
6603set dummy $tool_basename; ac_word=$2
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6605$as_echo_n "checking for $ac_word... " >&6; }
6606if ${ac_cv_path_DIFF+:} false; then :
6607  $as_echo_n "(cached) " >&6
6608else
6609  case $DIFF in
6610  [\\/]* | ?:[\\/]*)
6611  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6612  ;;
6613  *)
6614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6615for as_dir in $PATH
6616do
6617  IFS=$as_save_IFS
6618  test -z "$as_dir" && as_dir=.
6619    for ac_exec_ext in '' $ac_executable_extensions; do
6620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6621    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6623    break 2
6624  fi
6625done
6626  done
6627IFS=$as_save_IFS
6628
6629  ;;
6630esac
6631fi
6632DIFF=$ac_cv_path_DIFF
6633if test -n "$DIFF"; then
6634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6635$as_echo "$DIFF" >&6; }
6636else
6637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6638$as_echo "no" >&6; }
6639fi
6640
6641
6642          if test "x$DIFF" = x; then
6643            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6644          fi
6645        else
6646          # Otherwise we believe it is a complete path. Use it as it is.
6647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6648$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6649          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6650$as_echo_n "checking for DIFF... " >&6; }
6651          if test ! -x "$tool_specified"; then
6652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6653$as_echo "not found" >&6; }
6654            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6655          fi
6656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6657$as_echo "$tool_specified" >&6; }
6658        fi
6659      fi
6660    fi
6661  fi
6662
6663
6664
6665  if test "x$DIFF" = x; then
6666    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6667  fi
6668
6669
6670
6671
6672
6673  # Publish this variable in the help.
6674
6675
6676  if [ -z "${DIRNAME+x}" ]; then
6677    # The variable is not set by user, try to locate tool using the code snippet
6678    for ac_prog in dirname
6679do
6680  # Extract the first word of "$ac_prog", so it can be a program name with args.
6681set dummy $ac_prog; ac_word=$2
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683$as_echo_n "checking for $ac_word... " >&6; }
6684if ${ac_cv_path_DIRNAME+:} false; then :
6685  $as_echo_n "(cached) " >&6
6686else
6687  case $DIRNAME in
6688  [\\/]* | ?:[\\/]*)
6689  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6690  ;;
6691  *)
6692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693for as_dir in $PATH
6694do
6695  IFS=$as_save_IFS
6696  test -z "$as_dir" && as_dir=.
6697    for ac_exec_ext in '' $ac_executable_extensions; do
6698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6699    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6701    break 2
6702  fi
6703done
6704  done
6705IFS=$as_save_IFS
6706
6707  ;;
6708esac
6709fi
6710DIRNAME=$ac_cv_path_DIRNAME
6711if test -n "$DIRNAME"; then
6712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6713$as_echo "$DIRNAME" >&6; }
6714else
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716$as_echo "no" >&6; }
6717fi
6718
6719
6720  test -n "$DIRNAME" && break
6721done
6722
6723  else
6724    # The variable is set, but is it from the command line or the environment?
6725
6726    # Try to remove the string !DIRNAME! from our list.
6727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6729      # If it failed, the variable was not from the command line. Ignore it,
6730      # but warn the user (except for BASH, which is always set by the calling BASH).
6731      if test "xDIRNAME" != xBASH; then
6732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6733$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6734      fi
6735      # Try to locate tool using the code snippet
6736      for ac_prog in dirname
6737do
6738  # Extract the first word of "$ac_prog", so it can be a program name with args.
6739set dummy $ac_prog; ac_word=$2
6740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6741$as_echo_n "checking for $ac_word... " >&6; }
6742if ${ac_cv_path_DIRNAME+:} false; then :
6743  $as_echo_n "(cached) " >&6
6744else
6745  case $DIRNAME in
6746  [\\/]* | ?:[\\/]*)
6747  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6748  ;;
6749  *)
6750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6751for as_dir in $PATH
6752do
6753  IFS=$as_save_IFS
6754  test -z "$as_dir" && as_dir=.
6755    for ac_exec_ext in '' $ac_executable_extensions; do
6756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6757    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6759    break 2
6760  fi
6761done
6762  done
6763IFS=$as_save_IFS
6764
6765  ;;
6766esac
6767fi
6768DIRNAME=$ac_cv_path_DIRNAME
6769if test -n "$DIRNAME"; then
6770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6771$as_echo "$DIRNAME" >&6; }
6772else
6773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6774$as_echo "no" >&6; }
6775fi
6776
6777
6778  test -n "$DIRNAME" && break
6779done
6780
6781    else
6782      # If it succeeded, then it was overridden by the user. We will use it
6783      # for the tool.
6784
6785      # First remove it from the list of overridden variables, so we can test
6786      # for unknown variables in the end.
6787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6788
6789      # Check if we try to supply an empty value
6790      if test "x$DIRNAME" = x; then
6791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6792$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6794$as_echo_n "checking for DIRNAME... " >&6; }
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6796$as_echo "disabled" >&6; }
6797      else
6798        # Check if the provided tool contains a complete path.
6799        tool_specified="$DIRNAME"
6800        tool_basename="${tool_specified##*/}"
6801        if test "x$tool_basename" = "x$tool_specified"; then
6802          # A command without a complete path is provided, search $PATH.
6803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6804$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6805          # Extract the first word of "$tool_basename", so it can be a program name with args.
6806set dummy $tool_basename; ac_word=$2
6807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6808$as_echo_n "checking for $ac_word... " >&6; }
6809if ${ac_cv_path_DIRNAME+:} false; then :
6810  $as_echo_n "(cached) " >&6
6811else
6812  case $DIRNAME in
6813  [\\/]* | ?:[\\/]*)
6814  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6815  ;;
6816  *)
6817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6818for as_dir in $PATH
6819do
6820  IFS=$as_save_IFS
6821  test -z "$as_dir" && as_dir=.
6822    for ac_exec_ext in '' $ac_executable_extensions; do
6823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6824    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6826    break 2
6827  fi
6828done
6829  done
6830IFS=$as_save_IFS
6831
6832  ;;
6833esac
6834fi
6835DIRNAME=$ac_cv_path_DIRNAME
6836if test -n "$DIRNAME"; then
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6838$as_echo "$DIRNAME" >&6; }
6839else
6840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6841$as_echo "no" >&6; }
6842fi
6843
6844
6845          if test "x$DIRNAME" = x; then
6846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6847          fi
6848        else
6849          # Otherwise we believe it is a complete path. Use it as it is.
6850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6851$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6853$as_echo_n "checking for DIRNAME... " >&6; }
6854          if test ! -x "$tool_specified"; then
6855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6856$as_echo "not found" >&6; }
6857            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6858          fi
6859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6860$as_echo "$tool_specified" >&6; }
6861        fi
6862      fi
6863    fi
6864  fi
6865
6866
6867
6868  if test "x$DIRNAME" = x; then
6869    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6870  fi
6871
6872
6873
6874
6875
6876  # Publish this variable in the help.
6877
6878
6879  if [ -z "${ECHO+x}" ]; then
6880    # The variable is not set by user, try to locate tool using the code snippet
6881    for ac_prog in echo
6882do
6883  # Extract the first word of "$ac_prog", so it can be a program name with args.
6884set dummy $ac_prog; ac_word=$2
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6886$as_echo_n "checking for $ac_word... " >&6; }
6887if ${ac_cv_path_ECHO+:} false; then :
6888  $as_echo_n "(cached) " >&6
6889else
6890  case $ECHO in
6891  [\\/]* | ?:[\\/]*)
6892  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6893  ;;
6894  *)
6895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6896for as_dir in $PATH
6897do
6898  IFS=$as_save_IFS
6899  test -z "$as_dir" && as_dir=.
6900    for ac_exec_ext in '' $ac_executable_extensions; do
6901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6902    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6904    break 2
6905  fi
6906done
6907  done
6908IFS=$as_save_IFS
6909
6910  ;;
6911esac
6912fi
6913ECHO=$ac_cv_path_ECHO
6914if test -n "$ECHO"; then
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6916$as_echo "$ECHO" >&6; }
6917else
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6919$as_echo "no" >&6; }
6920fi
6921
6922
6923  test -n "$ECHO" && break
6924done
6925
6926  else
6927    # The variable is set, but is it from the command line or the environment?
6928
6929    # Try to remove the string !ECHO! from our list.
6930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6932      # If it failed, the variable was not from the command line. Ignore it,
6933      # but warn the user (except for BASH, which is always set by the calling BASH).
6934      if test "xECHO" != xBASH; then
6935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6936$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6937      fi
6938      # Try to locate tool using the code snippet
6939      for ac_prog in echo
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_ECHO+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $ECHO in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971ECHO=$ac_cv_path_ECHO
6972if test -n "$ECHO"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6974$as_echo "$ECHO" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$ECHO" && break
6982done
6983
6984    else
6985      # If it succeeded, then it was overridden by the user. We will use it
6986      # for the tool.
6987
6988      # First remove it from the list of overridden variables, so we can test
6989      # for unknown variables in the end.
6990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6991
6992      # Check if we try to supply an empty value
6993      if test "x$ECHO" = x; then
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
6995$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6997$as_echo_n "checking for ECHO... " >&6; }
6998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6999$as_echo "disabled" >&6; }
7000      else
7001        # Check if the provided tool contains a complete path.
7002        tool_specified="$ECHO"
7003        tool_basename="${tool_specified##*/}"
7004        if test "x$tool_basename" = "x$tool_specified"; then
7005          # A command without a complete path is provided, search $PATH.
7006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7007$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7008          # Extract the first word of "$tool_basename", so it can be a program name with args.
7009set dummy $tool_basename; ac_word=$2
7010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7011$as_echo_n "checking for $ac_word... " >&6; }
7012if ${ac_cv_path_ECHO+:} false; then :
7013  $as_echo_n "(cached) " >&6
7014else
7015  case $ECHO in
7016  [\\/]* | ?:[\\/]*)
7017  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7018  ;;
7019  *)
7020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7021for as_dir in $PATH
7022do
7023  IFS=$as_save_IFS
7024  test -z "$as_dir" && as_dir=.
7025    for ac_exec_ext in '' $ac_executable_extensions; do
7026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7027    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7029    break 2
7030  fi
7031done
7032  done
7033IFS=$as_save_IFS
7034
7035  ;;
7036esac
7037fi
7038ECHO=$ac_cv_path_ECHO
7039if test -n "$ECHO"; then
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7041$as_echo "$ECHO" >&6; }
7042else
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7044$as_echo "no" >&6; }
7045fi
7046
7047
7048          if test "x$ECHO" = x; then
7049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7050          fi
7051        else
7052          # Otherwise we believe it is a complete path. Use it as it is.
7053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7054$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7056$as_echo_n "checking for ECHO... " >&6; }
7057          if test ! -x "$tool_specified"; then
7058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7059$as_echo "not found" >&6; }
7060            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7061          fi
7062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7063$as_echo "$tool_specified" >&6; }
7064        fi
7065      fi
7066    fi
7067  fi
7068
7069
7070
7071  if test "x$ECHO" = x; then
7072    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7073  fi
7074
7075
7076
7077
7078
7079  # Publish this variable in the help.
7080
7081
7082  if [ -z "${EXPR+x}" ]; then
7083    # The variable is not set by user, try to locate tool using the code snippet
7084    for ac_prog in expr
7085do
7086  # Extract the first word of "$ac_prog", so it can be a program name with args.
7087set dummy $ac_prog; ac_word=$2
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7089$as_echo_n "checking for $ac_word... " >&6; }
7090if ${ac_cv_path_EXPR+:} false; then :
7091  $as_echo_n "(cached) " >&6
7092else
7093  case $EXPR in
7094  [\\/]* | ?:[\\/]*)
7095  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7096  ;;
7097  *)
7098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7099for as_dir in $PATH
7100do
7101  IFS=$as_save_IFS
7102  test -z "$as_dir" && as_dir=.
7103    for ac_exec_ext in '' $ac_executable_extensions; do
7104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7105    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7107    break 2
7108  fi
7109done
7110  done
7111IFS=$as_save_IFS
7112
7113  ;;
7114esac
7115fi
7116EXPR=$ac_cv_path_EXPR
7117if test -n "$EXPR"; then
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7119$as_echo "$EXPR" >&6; }
7120else
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7122$as_echo "no" >&6; }
7123fi
7124
7125
7126  test -n "$EXPR" && break
7127done
7128
7129  else
7130    # The variable is set, but is it from the command line or the environment?
7131
7132    # Try to remove the string !EXPR! from our list.
7133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7135      # If it failed, the variable was not from the command line. Ignore it,
7136      # but warn the user (except for BASH, which is always set by the calling BASH).
7137      if test "xEXPR" != xBASH; then
7138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7139$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7140      fi
7141      # Try to locate tool using the code snippet
7142      for ac_prog in expr
7143do
7144  # Extract the first word of "$ac_prog", so it can be a program name with args.
7145set dummy $ac_prog; ac_word=$2
7146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7147$as_echo_n "checking for $ac_word... " >&6; }
7148if ${ac_cv_path_EXPR+:} false; then :
7149  $as_echo_n "(cached) " >&6
7150else
7151  case $EXPR in
7152  [\\/]* | ?:[\\/]*)
7153  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7154  ;;
7155  *)
7156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7157for as_dir in $PATH
7158do
7159  IFS=$as_save_IFS
7160  test -z "$as_dir" && as_dir=.
7161    for ac_exec_ext in '' $ac_executable_extensions; do
7162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7163    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7165    break 2
7166  fi
7167done
7168  done
7169IFS=$as_save_IFS
7170
7171  ;;
7172esac
7173fi
7174EXPR=$ac_cv_path_EXPR
7175if test -n "$EXPR"; then
7176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7177$as_echo "$EXPR" >&6; }
7178else
7179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7180$as_echo "no" >&6; }
7181fi
7182
7183
7184  test -n "$EXPR" && break
7185done
7186
7187    else
7188      # If it succeeded, then it was overridden by the user. We will use it
7189      # for the tool.
7190
7191      # First remove it from the list of overridden variables, so we can test
7192      # for unknown variables in the end.
7193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7194
7195      # Check if we try to supply an empty value
7196      if test "x$EXPR" = x; then
7197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7198$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7200$as_echo_n "checking for EXPR... " >&6; }
7201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7202$as_echo "disabled" >&6; }
7203      else
7204        # Check if the provided tool contains a complete path.
7205        tool_specified="$EXPR"
7206        tool_basename="${tool_specified##*/}"
7207        if test "x$tool_basename" = "x$tool_specified"; then
7208          # A command without a complete path is provided, search $PATH.
7209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7210$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7211          # Extract the first word of "$tool_basename", so it can be a program name with args.
7212set dummy $tool_basename; ac_word=$2
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214$as_echo_n "checking for $ac_word... " >&6; }
7215if ${ac_cv_path_EXPR+:} false; then :
7216  $as_echo_n "(cached) " >&6
7217else
7218  case $EXPR in
7219  [\\/]* | ?:[\\/]*)
7220  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7221  ;;
7222  *)
7223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7224for as_dir in $PATH
7225do
7226  IFS=$as_save_IFS
7227  test -z "$as_dir" && as_dir=.
7228    for ac_exec_ext in '' $ac_executable_extensions; do
7229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7230    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7232    break 2
7233  fi
7234done
7235  done
7236IFS=$as_save_IFS
7237
7238  ;;
7239esac
7240fi
7241EXPR=$ac_cv_path_EXPR
7242if test -n "$EXPR"; then
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7244$as_echo "$EXPR" >&6; }
7245else
7246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7247$as_echo "no" >&6; }
7248fi
7249
7250
7251          if test "x$EXPR" = x; then
7252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7253          fi
7254        else
7255          # Otherwise we believe it is a complete path. Use it as it is.
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7257$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7259$as_echo_n "checking for EXPR... " >&6; }
7260          if test ! -x "$tool_specified"; then
7261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7262$as_echo "not found" >&6; }
7263            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7264          fi
7265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7266$as_echo "$tool_specified" >&6; }
7267        fi
7268      fi
7269    fi
7270  fi
7271
7272
7273
7274  if test "x$EXPR" = x; then
7275    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7276  fi
7277
7278
7279
7280
7281
7282  # Publish this variable in the help.
7283
7284
7285  if [ -z "${FILE+x}" ]; then
7286    # The variable is not set by user, try to locate tool using the code snippet
7287    for ac_prog in file
7288do
7289  # Extract the first word of "$ac_prog", so it can be a program name with args.
7290set dummy $ac_prog; ac_word=$2
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7292$as_echo_n "checking for $ac_word... " >&6; }
7293if ${ac_cv_path_FILE+:} false; then :
7294  $as_echo_n "(cached) " >&6
7295else
7296  case $FILE in
7297  [\\/]* | ?:[\\/]*)
7298  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7299  ;;
7300  *)
7301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302for as_dir in $PATH
7303do
7304  IFS=$as_save_IFS
7305  test -z "$as_dir" && as_dir=.
7306    for ac_exec_ext in '' $ac_executable_extensions; do
7307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7308    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7310    break 2
7311  fi
7312done
7313  done
7314IFS=$as_save_IFS
7315
7316  ;;
7317esac
7318fi
7319FILE=$ac_cv_path_FILE
7320if test -n "$FILE"; then
7321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7322$as_echo "$FILE" >&6; }
7323else
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7325$as_echo "no" >&6; }
7326fi
7327
7328
7329  test -n "$FILE" && break
7330done
7331
7332  else
7333    # The variable is set, but is it from the command line or the environment?
7334
7335    # Try to remove the string !FILE! from our list.
7336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7338      # If it failed, the variable was not from the command line. Ignore it,
7339      # but warn the user (except for BASH, which is always set by the calling BASH).
7340      if test "xFILE" != xBASH; then
7341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7342$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7343      fi
7344      # Try to locate tool using the code snippet
7345      for ac_prog in file
7346do
7347  # Extract the first word of "$ac_prog", so it can be a program name with args.
7348set dummy $ac_prog; ac_word=$2
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
7351if ${ac_cv_path_FILE+:} false; then :
7352  $as_echo_n "(cached) " >&6
7353else
7354  case $FILE in
7355  [\\/]* | ?:[\\/]*)
7356  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7357  ;;
7358  *)
7359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7360for as_dir in $PATH
7361do
7362  IFS=$as_save_IFS
7363  test -z "$as_dir" && as_dir=.
7364    for ac_exec_ext in '' $ac_executable_extensions; do
7365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7366    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7368    break 2
7369  fi
7370done
7371  done
7372IFS=$as_save_IFS
7373
7374  ;;
7375esac
7376fi
7377FILE=$ac_cv_path_FILE
7378if test -n "$FILE"; then
7379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7380$as_echo "$FILE" >&6; }
7381else
7382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7383$as_echo "no" >&6; }
7384fi
7385
7386
7387  test -n "$FILE" && break
7388done
7389
7390    else
7391      # If it succeeded, then it was overridden by the user. We will use it
7392      # for the tool.
7393
7394      # First remove it from the list of overridden variables, so we can test
7395      # for unknown variables in the end.
7396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7397
7398      # Check if we try to supply an empty value
7399      if test "x$FILE" = x; then
7400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7401$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7403$as_echo_n "checking for FILE... " >&6; }
7404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7405$as_echo "disabled" >&6; }
7406      else
7407        # Check if the provided tool contains a complete path.
7408        tool_specified="$FILE"
7409        tool_basename="${tool_specified##*/}"
7410        if test "x$tool_basename" = "x$tool_specified"; then
7411          # A command without a complete path is provided, search $PATH.
7412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7413$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7414          # Extract the first word of "$tool_basename", so it can be a program name with args.
7415set dummy $tool_basename; ac_word=$2
7416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7417$as_echo_n "checking for $ac_word... " >&6; }
7418if ${ac_cv_path_FILE+:} false; then :
7419  $as_echo_n "(cached) " >&6
7420else
7421  case $FILE in
7422  [\\/]* | ?:[\\/]*)
7423  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7424  ;;
7425  *)
7426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7427for as_dir in $PATH
7428do
7429  IFS=$as_save_IFS
7430  test -z "$as_dir" && as_dir=.
7431    for ac_exec_ext in '' $ac_executable_extensions; do
7432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7433    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7435    break 2
7436  fi
7437done
7438  done
7439IFS=$as_save_IFS
7440
7441  ;;
7442esac
7443fi
7444FILE=$ac_cv_path_FILE
7445if test -n "$FILE"; then
7446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7447$as_echo "$FILE" >&6; }
7448else
7449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
7451fi
7452
7453
7454          if test "x$FILE" = x; then
7455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7456          fi
7457        else
7458          # Otherwise we believe it is a complete path. Use it as it is.
7459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7460$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7462$as_echo_n "checking for FILE... " >&6; }
7463          if test ! -x "$tool_specified"; then
7464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7465$as_echo "not found" >&6; }
7466            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7467          fi
7468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7469$as_echo "$tool_specified" >&6; }
7470        fi
7471      fi
7472    fi
7473  fi
7474
7475
7476
7477  if test "x$FILE" = x; then
7478    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7479  fi
7480
7481
7482
7483
7484
7485  # Publish this variable in the help.
7486
7487
7488  if [ -z "${FIND+x}" ]; then
7489    # The variable is not set by user, try to locate tool using the code snippet
7490    for ac_prog in find
7491do
7492  # Extract the first word of "$ac_prog", so it can be a program name with args.
7493set dummy $ac_prog; ac_word=$2
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7495$as_echo_n "checking for $ac_word... " >&6; }
7496if ${ac_cv_path_FIND+:} false; then :
7497  $as_echo_n "(cached) " >&6
7498else
7499  case $FIND in
7500  [\\/]* | ?:[\\/]*)
7501  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7502  ;;
7503  *)
7504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7505for as_dir in $PATH
7506do
7507  IFS=$as_save_IFS
7508  test -z "$as_dir" && as_dir=.
7509    for ac_exec_ext in '' $ac_executable_extensions; do
7510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7511    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7513    break 2
7514  fi
7515done
7516  done
7517IFS=$as_save_IFS
7518
7519  ;;
7520esac
7521fi
7522FIND=$ac_cv_path_FIND
7523if test -n "$FIND"; then
7524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7525$as_echo "$FIND" >&6; }
7526else
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7528$as_echo "no" >&6; }
7529fi
7530
7531
7532  test -n "$FIND" && break
7533done
7534
7535  else
7536    # The variable is set, but is it from the command line or the environment?
7537
7538    # Try to remove the string !FIND! from our list.
7539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7541      # If it failed, the variable was not from the command line. Ignore it,
7542      # but warn the user (except for BASH, which is always set by the calling BASH).
7543      if test "xFIND" != xBASH; then
7544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7545$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7546      fi
7547      # Try to locate tool using the code snippet
7548      for ac_prog in find
7549do
7550  # Extract the first word of "$ac_prog", so it can be a program name with args.
7551set dummy $ac_prog; ac_word=$2
7552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7553$as_echo_n "checking for $ac_word... " >&6; }
7554if ${ac_cv_path_FIND+:} false; then :
7555  $as_echo_n "(cached) " >&6
7556else
7557  case $FIND in
7558  [\\/]* | ?:[\\/]*)
7559  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7560  ;;
7561  *)
7562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7563for as_dir in $PATH
7564do
7565  IFS=$as_save_IFS
7566  test -z "$as_dir" && as_dir=.
7567    for ac_exec_ext in '' $ac_executable_extensions; do
7568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7569    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7571    break 2
7572  fi
7573done
7574  done
7575IFS=$as_save_IFS
7576
7577  ;;
7578esac
7579fi
7580FIND=$ac_cv_path_FIND
7581if test -n "$FIND"; then
7582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7583$as_echo "$FIND" >&6; }
7584else
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586$as_echo "no" >&6; }
7587fi
7588
7589
7590  test -n "$FIND" && break
7591done
7592
7593    else
7594      # If it succeeded, then it was overridden by the user. We will use it
7595      # for the tool.
7596
7597      # First remove it from the list of overridden variables, so we can test
7598      # for unknown variables in the end.
7599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7600
7601      # Check if we try to supply an empty value
7602      if test "x$FIND" = x; then
7603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7604$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7606$as_echo_n "checking for FIND... " >&6; }
7607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7608$as_echo "disabled" >&6; }
7609      else
7610        # Check if the provided tool contains a complete path.
7611        tool_specified="$FIND"
7612        tool_basename="${tool_specified##*/}"
7613        if test "x$tool_basename" = "x$tool_specified"; then
7614          # A command without a complete path is provided, search $PATH.
7615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7616$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7617          # Extract the first word of "$tool_basename", so it can be a program name with args.
7618set dummy $tool_basename; ac_word=$2
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7620$as_echo_n "checking for $ac_word... " >&6; }
7621if ${ac_cv_path_FIND+:} false; then :
7622  $as_echo_n "(cached) " >&6
7623else
7624  case $FIND in
7625  [\\/]* | ?:[\\/]*)
7626  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7627  ;;
7628  *)
7629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7630for as_dir in $PATH
7631do
7632  IFS=$as_save_IFS
7633  test -z "$as_dir" && as_dir=.
7634    for ac_exec_ext in '' $ac_executable_extensions; do
7635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7636    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7638    break 2
7639  fi
7640done
7641  done
7642IFS=$as_save_IFS
7643
7644  ;;
7645esac
7646fi
7647FIND=$ac_cv_path_FIND
7648if test -n "$FIND"; then
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7650$as_echo "$FIND" >&6; }
7651else
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
7654fi
7655
7656
7657          if test "x$FIND" = x; then
7658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7659          fi
7660        else
7661          # Otherwise we believe it is a complete path. Use it as it is.
7662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7663$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7665$as_echo_n "checking for FIND... " >&6; }
7666          if test ! -x "$tool_specified"; then
7667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7668$as_echo "not found" >&6; }
7669            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7670          fi
7671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7672$as_echo "$tool_specified" >&6; }
7673        fi
7674      fi
7675    fi
7676  fi
7677
7678
7679
7680  if test "x$FIND" = x; then
7681    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7682  fi
7683
7684
7685
7686
7687
7688  # Publish this variable in the help.
7689
7690
7691  if [ -z "${HEAD+x}" ]; then
7692    # The variable is not set by user, try to locate tool using the code snippet
7693    for ac_prog in head
7694do
7695  # Extract the first word of "$ac_prog", so it can be a program name with args.
7696set dummy $ac_prog; ac_word=$2
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7698$as_echo_n "checking for $ac_word... " >&6; }
7699if ${ac_cv_path_HEAD+:} false; then :
7700  $as_echo_n "(cached) " >&6
7701else
7702  case $HEAD in
7703  [\\/]* | ?:[\\/]*)
7704  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7705  ;;
7706  *)
7707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7708for as_dir in $PATH
7709do
7710  IFS=$as_save_IFS
7711  test -z "$as_dir" && as_dir=.
7712    for ac_exec_ext in '' $ac_executable_extensions; do
7713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7714    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7716    break 2
7717  fi
7718done
7719  done
7720IFS=$as_save_IFS
7721
7722  ;;
7723esac
7724fi
7725HEAD=$ac_cv_path_HEAD
7726if test -n "$HEAD"; then
7727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7728$as_echo "$HEAD" >&6; }
7729else
7730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7731$as_echo "no" >&6; }
7732fi
7733
7734
7735  test -n "$HEAD" && break
7736done
7737
7738  else
7739    # The variable is set, but is it from the command line or the environment?
7740
7741    # Try to remove the string !HEAD! from our list.
7742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7744      # If it failed, the variable was not from the command line. Ignore it,
7745      # but warn the user (except for BASH, which is always set by the calling BASH).
7746      if test "xHEAD" != xBASH; then
7747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7748$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7749      fi
7750      # Try to locate tool using the code snippet
7751      for ac_prog in head
7752do
7753  # Extract the first word of "$ac_prog", so it can be a program name with args.
7754set dummy $ac_prog; ac_word=$2
7755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7756$as_echo_n "checking for $ac_word... " >&6; }
7757if ${ac_cv_path_HEAD+:} false; then :
7758  $as_echo_n "(cached) " >&6
7759else
7760  case $HEAD in
7761  [\\/]* | ?:[\\/]*)
7762  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7763  ;;
7764  *)
7765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7766for as_dir in $PATH
7767do
7768  IFS=$as_save_IFS
7769  test -z "$as_dir" && as_dir=.
7770    for ac_exec_ext in '' $ac_executable_extensions; do
7771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7772    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7774    break 2
7775  fi
7776done
7777  done
7778IFS=$as_save_IFS
7779
7780  ;;
7781esac
7782fi
7783HEAD=$ac_cv_path_HEAD
7784if test -n "$HEAD"; then
7785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7786$as_echo "$HEAD" >&6; }
7787else
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789$as_echo "no" >&6; }
7790fi
7791
7792
7793  test -n "$HEAD" && break
7794done
7795
7796    else
7797      # If it succeeded, then it was overridden by the user. We will use it
7798      # for the tool.
7799
7800      # First remove it from the list of overridden variables, so we can test
7801      # for unknown variables in the end.
7802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7803
7804      # Check if we try to supply an empty value
7805      if test "x$HEAD" = x; then
7806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7807$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7809$as_echo_n "checking for HEAD... " >&6; }
7810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7811$as_echo "disabled" >&6; }
7812      else
7813        # Check if the provided tool contains a complete path.
7814        tool_specified="$HEAD"
7815        tool_basename="${tool_specified##*/}"
7816        if test "x$tool_basename" = "x$tool_specified"; then
7817          # A command without a complete path is provided, search $PATH.
7818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7819$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7820          # Extract the first word of "$tool_basename", so it can be a program name with args.
7821set dummy $tool_basename; ac_word=$2
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823$as_echo_n "checking for $ac_word... " >&6; }
7824if ${ac_cv_path_HEAD+:} false; then :
7825  $as_echo_n "(cached) " >&6
7826else
7827  case $HEAD in
7828  [\\/]* | ?:[\\/]*)
7829  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7830  ;;
7831  *)
7832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833for as_dir in $PATH
7834do
7835  IFS=$as_save_IFS
7836  test -z "$as_dir" && as_dir=.
7837    for ac_exec_ext in '' $ac_executable_extensions; do
7838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7839    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7841    break 2
7842  fi
7843done
7844  done
7845IFS=$as_save_IFS
7846
7847  ;;
7848esac
7849fi
7850HEAD=$ac_cv_path_HEAD
7851if test -n "$HEAD"; then
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7853$as_echo "$HEAD" >&6; }
7854else
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856$as_echo "no" >&6; }
7857fi
7858
7859
7860          if test "x$HEAD" = x; then
7861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7862          fi
7863        else
7864          # Otherwise we believe it is a complete path. Use it as it is.
7865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7866$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7868$as_echo_n "checking for HEAD... " >&6; }
7869          if test ! -x "$tool_specified"; then
7870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7871$as_echo "not found" >&6; }
7872            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7873          fi
7874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7875$as_echo "$tool_specified" >&6; }
7876        fi
7877      fi
7878    fi
7879  fi
7880
7881
7882
7883  if test "x$HEAD" = x; then
7884    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7885  fi
7886
7887
7888
7889
7890
7891  # Publish this variable in the help.
7892
7893
7894  if [ -z "${LN+x}" ]; then
7895    # The variable is not set by user, try to locate tool using the code snippet
7896    for ac_prog in ln
7897do
7898  # Extract the first word of "$ac_prog", so it can be a program name with args.
7899set dummy $ac_prog; ac_word=$2
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901$as_echo_n "checking for $ac_word... " >&6; }
7902if ${ac_cv_path_LN+:} false; then :
7903  $as_echo_n "(cached) " >&6
7904else
7905  case $LN in
7906  [\\/]* | ?:[\\/]*)
7907  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7908  ;;
7909  *)
7910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911for as_dir in $PATH
7912do
7913  IFS=$as_save_IFS
7914  test -z "$as_dir" && as_dir=.
7915    for ac_exec_ext in '' $ac_executable_extensions; do
7916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919    break 2
7920  fi
7921done
7922  done
7923IFS=$as_save_IFS
7924
7925  ;;
7926esac
7927fi
7928LN=$ac_cv_path_LN
7929if test -n "$LN"; then
7930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7931$as_echo "$LN" >&6; }
7932else
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934$as_echo "no" >&6; }
7935fi
7936
7937
7938  test -n "$LN" && break
7939done
7940
7941  else
7942    # The variable is set, but is it from the command line or the environment?
7943
7944    # Try to remove the string !LN! from our list.
7945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7947      # If it failed, the variable was not from the command line. Ignore it,
7948      # but warn the user (except for BASH, which is always set by the calling BASH).
7949      if test "xLN" != xBASH; then
7950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7951$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7952      fi
7953      # Try to locate tool using the code snippet
7954      for ac_prog in ln
7955do
7956  # Extract the first word of "$ac_prog", so it can be a program name with args.
7957set dummy $ac_prog; ac_word=$2
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7959$as_echo_n "checking for $ac_word... " >&6; }
7960if ${ac_cv_path_LN+:} false; then :
7961  $as_echo_n "(cached) " >&6
7962else
7963  case $LN in
7964  [\\/]* | ?:[\\/]*)
7965  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7966  ;;
7967  *)
7968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7969for as_dir in $PATH
7970do
7971  IFS=$as_save_IFS
7972  test -z "$as_dir" && as_dir=.
7973    for ac_exec_ext in '' $ac_executable_extensions; do
7974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7975    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7977    break 2
7978  fi
7979done
7980  done
7981IFS=$as_save_IFS
7982
7983  ;;
7984esac
7985fi
7986LN=$ac_cv_path_LN
7987if test -n "$LN"; then
7988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7989$as_echo "$LN" >&6; }
7990else
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7992$as_echo "no" >&6; }
7993fi
7994
7995
7996  test -n "$LN" && break
7997done
7998
7999    else
8000      # If it succeeded, then it was overridden by the user. We will use it
8001      # for the tool.
8002
8003      # First remove it from the list of overridden variables, so we can test
8004      # for unknown variables in the end.
8005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8006
8007      # Check if we try to supply an empty value
8008      if test "x$LN" = x; then
8009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8010$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8012$as_echo_n "checking for LN... " >&6; }
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8014$as_echo "disabled" >&6; }
8015      else
8016        # Check if the provided tool contains a complete path.
8017        tool_specified="$LN"
8018        tool_basename="${tool_specified##*/}"
8019        if test "x$tool_basename" = "x$tool_specified"; then
8020          # A command without a complete path is provided, search $PATH.
8021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8022$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8023          # Extract the first word of "$tool_basename", so it can be a program name with args.
8024set dummy $tool_basename; ac_word=$2
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8026$as_echo_n "checking for $ac_word... " >&6; }
8027if ${ac_cv_path_LN+:} false; then :
8028  $as_echo_n "(cached) " >&6
8029else
8030  case $LN in
8031  [\\/]* | ?:[\\/]*)
8032  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8033  ;;
8034  *)
8035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8036for as_dir in $PATH
8037do
8038  IFS=$as_save_IFS
8039  test -z "$as_dir" && as_dir=.
8040    for ac_exec_ext in '' $ac_executable_extensions; do
8041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8042    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8044    break 2
8045  fi
8046done
8047  done
8048IFS=$as_save_IFS
8049
8050  ;;
8051esac
8052fi
8053LN=$ac_cv_path_LN
8054if test -n "$LN"; then
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8056$as_echo "$LN" >&6; }
8057else
8058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8059$as_echo "no" >&6; }
8060fi
8061
8062
8063          if test "x$LN" = x; then
8064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8065          fi
8066        else
8067          # Otherwise we believe it is a complete path. Use it as it is.
8068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8069$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8071$as_echo_n "checking for LN... " >&6; }
8072          if test ! -x "$tool_specified"; then
8073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8074$as_echo "not found" >&6; }
8075            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8076          fi
8077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8078$as_echo "$tool_specified" >&6; }
8079        fi
8080      fi
8081    fi
8082  fi
8083
8084
8085
8086  if test "x$LN" = x; then
8087    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8088  fi
8089
8090
8091
8092
8093
8094  # Publish this variable in the help.
8095
8096
8097  if [ -z "${LS+x}" ]; then
8098    # The variable is not set by user, try to locate tool using the code snippet
8099    for ac_prog in ls
8100do
8101  # Extract the first word of "$ac_prog", so it can be a program name with args.
8102set dummy $ac_prog; ac_word=$2
8103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8104$as_echo_n "checking for $ac_word... " >&6; }
8105if ${ac_cv_path_LS+:} false; then :
8106  $as_echo_n "(cached) " >&6
8107else
8108  case $LS in
8109  [\\/]* | ?:[\\/]*)
8110  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8111  ;;
8112  *)
8113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8114for as_dir in $PATH
8115do
8116  IFS=$as_save_IFS
8117  test -z "$as_dir" && as_dir=.
8118    for ac_exec_ext in '' $ac_executable_extensions; do
8119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8120    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8122    break 2
8123  fi
8124done
8125  done
8126IFS=$as_save_IFS
8127
8128  ;;
8129esac
8130fi
8131LS=$ac_cv_path_LS
8132if test -n "$LS"; then
8133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8134$as_echo "$LS" >&6; }
8135else
8136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8137$as_echo "no" >&6; }
8138fi
8139
8140
8141  test -n "$LS" && break
8142done
8143
8144  else
8145    # The variable is set, but is it from the command line or the environment?
8146
8147    # Try to remove the string !LS! from our list.
8148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8150      # If it failed, the variable was not from the command line. Ignore it,
8151      # but warn the user (except for BASH, which is always set by the calling BASH).
8152      if test "xLS" != xBASH; then
8153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8154$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8155      fi
8156      # Try to locate tool using the code snippet
8157      for ac_prog in ls
8158do
8159  # Extract the first word of "$ac_prog", so it can be a program name with args.
8160set dummy $ac_prog; ac_word=$2
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8162$as_echo_n "checking for $ac_word... " >&6; }
8163if ${ac_cv_path_LS+:} false; then :
8164  $as_echo_n "(cached) " >&6
8165else
8166  case $LS in
8167  [\\/]* | ?:[\\/]*)
8168  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8169  ;;
8170  *)
8171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8172for as_dir in $PATH
8173do
8174  IFS=$as_save_IFS
8175  test -z "$as_dir" && as_dir=.
8176    for ac_exec_ext in '' $ac_executable_extensions; do
8177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8178    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8180    break 2
8181  fi
8182done
8183  done
8184IFS=$as_save_IFS
8185
8186  ;;
8187esac
8188fi
8189LS=$ac_cv_path_LS
8190if test -n "$LS"; then
8191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8192$as_echo "$LS" >&6; }
8193else
8194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8195$as_echo "no" >&6; }
8196fi
8197
8198
8199  test -n "$LS" && break
8200done
8201
8202    else
8203      # If it succeeded, then it was overridden by the user. We will use it
8204      # for the tool.
8205
8206      # First remove it from the list of overridden variables, so we can test
8207      # for unknown variables in the end.
8208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8209
8210      # Check if we try to supply an empty value
8211      if test "x$LS" = x; then
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8213$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8215$as_echo_n "checking for LS... " >&6; }
8216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8217$as_echo "disabled" >&6; }
8218      else
8219        # Check if the provided tool contains a complete path.
8220        tool_specified="$LS"
8221        tool_basename="${tool_specified##*/}"
8222        if test "x$tool_basename" = "x$tool_specified"; then
8223          # A command without a complete path is provided, search $PATH.
8224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8225$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8226          # Extract the first word of "$tool_basename", so it can be a program name with args.
8227set dummy $tool_basename; ac_word=$2
8228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229$as_echo_n "checking for $ac_word... " >&6; }
8230if ${ac_cv_path_LS+:} false; then :
8231  $as_echo_n "(cached) " >&6
8232else
8233  case $LS in
8234  [\\/]* | ?:[\\/]*)
8235  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8236  ;;
8237  *)
8238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239for as_dir in $PATH
8240do
8241  IFS=$as_save_IFS
8242  test -z "$as_dir" && as_dir=.
8243    for ac_exec_ext in '' $ac_executable_extensions; do
8244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247    break 2
8248  fi
8249done
8250  done
8251IFS=$as_save_IFS
8252
8253  ;;
8254esac
8255fi
8256LS=$ac_cv_path_LS
8257if test -n "$LS"; then
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8259$as_echo "$LS" >&6; }
8260else
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
8263fi
8264
8265
8266          if test "x$LS" = x; then
8267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8268          fi
8269        else
8270          # Otherwise we believe it is a complete path. Use it as it is.
8271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8272$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8274$as_echo_n "checking for LS... " >&6; }
8275          if test ! -x "$tool_specified"; then
8276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8277$as_echo "not found" >&6; }
8278            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8279          fi
8280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8281$as_echo "$tool_specified" >&6; }
8282        fi
8283      fi
8284    fi
8285  fi
8286
8287
8288
8289  if test "x$LS" = x; then
8290    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8291  fi
8292
8293
8294
8295
8296
8297  # Publish this variable in the help.
8298
8299
8300  if [ -z "${MKDIR+x}" ]; then
8301    # The variable is not set by user, try to locate tool using the code snippet
8302    for ac_prog in mkdir
8303do
8304  # Extract the first word of "$ac_prog", so it can be a program name with args.
8305set dummy $ac_prog; ac_word=$2
8306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8307$as_echo_n "checking for $ac_word... " >&6; }
8308if ${ac_cv_path_MKDIR+:} false; then :
8309  $as_echo_n "(cached) " >&6
8310else
8311  case $MKDIR in
8312  [\\/]* | ?:[\\/]*)
8313  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8314  ;;
8315  *)
8316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8317for as_dir in $PATH
8318do
8319  IFS=$as_save_IFS
8320  test -z "$as_dir" && as_dir=.
8321    for ac_exec_ext in '' $ac_executable_extensions; do
8322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8323    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8325    break 2
8326  fi
8327done
8328  done
8329IFS=$as_save_IFS
8330
8331  ;;
8332esac
8333fi
8334MKDIR=$ac_cv_path_MKDIR
8335if test -n "$MKDIR"; then
8336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8337$as_echo "$MKDIR" >&6; }
8338else
8339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8340$as_echo "no" >&6; }
8341fi
8342
8343
8344  test -n "$MKDIR" && break
8345done
8346
8347  else
8348    # The variable is set, but is it from the command line or the environment?
8349
8350    # Try to remove the string !MKDIR! from our list.
8351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8353      # If it failed, the variable was not from the command line. Ignore it,
8354      # but warn the user (except for BASH, which is always set by the calling BASH).
8355      if test "xMKDIR" != xBASH; then
8356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8357$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8358      fi
8359      # Try to locate tool using the code snippet
8360      for ac_prog in mkdir
8361do
8362  # Extract the first word of "$ac_prog", so it can be a program name with args.
8363set dummy $ac_prog; ac_word=$2
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365$as_echo_n "checking for $ac_word... " >&6; }
8366if ${ac_cv_path_MKDIR+:} false; then :
8367  $as_echo_n "(cached) " >&6
8368else
8369  case $MKDIR in
8370  [\\/]* | ?:[\\/]*)
8371  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8372  ;;
8373  *)
8374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375for as_dir in $PATH
8376do
8377  IFS=$as_save_IFS
8378  test -z "$as_dir" && as_dir=.
8379    for ac_exec_ext in '' $ac_executable_extensions; do
8380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8381    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8383    break 2
8384  fi
8385done
8386  done
8387IFS=$as_save_IFS
8388
8389  ;;
8390esac
8391fi
8392MKDIR=$ac_cv_path_MKDIR
8393if test -n "$MKDIR"; then
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8395$as_echo "$MKDIR" >&6; }
8396else
8397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
8399fi
8400
8401
8402  test -n "$MKDIR" && break
8403done
8404
8405    else
8406      # If it succeeded, then it was overridden by the user. We will use it
8407      # for the tool.
8408
8409      # First remove it from the list of overridden variables, so we can test
8410      # for unknown variables in the end.
8411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8412
8413      # Check if we try to supply an empty value
8414      if test "x$MKDIR" = x; then
8415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8416$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8418$as_echo_n "checking for MKDIR... " >&6; }
8419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8420$as_echo "disabled" >&6; }
8421      else
8422        # Check if the provided tool contains a complete path.
8423        tool_specified="$MKDIR"
8424        tool_basename="${tool_specified##*/}"
8425        if test "x$tool_basename" = "x$tool_specified"; then
8426          # A command without a complete path is provided, search $PATH.
8427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8428$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8429          # Extract the first word of "$tool_basename", so it can be a program name with args.
8430set dummy $tool_basename; ac_word=$2
8431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8432$as_echo_n "checking for $ac_word... " >&6; }
8433if ${ac_cv_path_MKDIR+:} false; then :
8434  $as_echo_n "(cached) " >&6
8435else
8436  case $MKDIR in
8437  [\\/]* | ?:[\\/]*)
8438  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8439  ;;
8440  *)
8441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8442for as_dir in $PATH
8443do
8444  IFS=$as_save_IFS
8445  test -z "$as_dir" && as_dir=.
8446    for ac_exec_ext in '' $ac_executable_extensions; do
8447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8448    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8450    break 2
8451  fi
8452done
8453  done
8454IFS=$as_save_IFS
8455
8456  ;;
8457esac
8458fi
8459MKDIR=$ac_cv_path_MKDIR
8460if test -n "$MKDIR"; then
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8462$as_echo "$MKDIR" >&6; }
8463else
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465$as_echo "no" >&6; }
8466fi
8467
8468
8469          if test "x$MKDIR" = x; then
8470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8471          fi
8472        else
8473          # Otherwise we believe it is a complete path. Use it as it is.
8474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8475$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8477$as_echo_n "checking for MKDIR... " >&6; }
8478          if test ! -x "$tool_specified"; then
8479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8480$as_echo "not found" >&6; }
8481            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8482          fi
8483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8484$as_echo "$tool_specified" >&6; }
8485        fi
8486      fi
8487    fi
8488  fi
8489
8490
8491
8492  if test "x$MKDIR" = x; then
8493    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8494  fi
8495
8496
8497
8498
8499
8500  # Publish this variable in the help.
8501
8502
8503  if [ -z "${MKTEMP+x}" ]; then
8504    # The variable is not set by user, try to locate tool using the code snippet
8505    for ac_prog in mktemp
8506do
8507  # Extract the first word of "$ac_prog", so it can be a program name with args.
8508set dummy $ac_prog; ac_word=$2
8509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8510$as_echo_n "checking for $ac_word... " >&6; }
8511if ${ac_cv_path_MKTEMP+:} false; then :
8512  $as_echo_n "(cached) " >&6
8513else
8514  case $MKTEMP in
8515  [\\/]* | ?:[\\/]*)
8516  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8517  ;;
8518  *)
8519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8520for as_dir in $PATH
8521do
8522  IFS=$as_save_IFS
8523  test -z "$as_dir" && as_dir=.
8524    for ac_exec_ext in '' $ac_executable_extensions; do
8525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8526    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8528    break 2
8529  fi
8530done
8531  done
8532IFS=$as_save_IFS
8533
8534  ;;
8535esac
8536fi
8537MKTEMP=$ac_cv_path_MKTEMP
8538if test -n "$MKTEMP"; then
8539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8540$as_echo "$MKTEMP" >&6; }
8541else
8542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8543$as_echo "no" >&6; }
8544fi
8545
8546
8547  test -n "$MKTEMP" && break
8548done
8549
8550  else
8551    # The variable is set, but is it from the command line or the environment?
8552
8553    # Try to remove the string !MKTEMP! from our list.
8554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8556      # If it failed, the variable was not from the command line. Ignore it,
8557      # but warn the user (except for BASH, which is always set by the calling BASH).
8558      if test "xMKTEMP" != xBASH; then
8559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8560$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8561      fi
8562      # Try to locate tool using the code snippet
8563      for ac_prog in mktemp
8564do
8565  # Extract the first word of "$ac_prog", so it can be a program name with args.
8566set dummy $ac_prog; ac_word=$2
8567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8568$as_echo_n "checking for $ac_word... " >&6; }
8569if ${ac_cv_path_MKTEMP+:} false; then :
8570  $as_echo_n "(cached) " >&6
8571else
8572  case $MKTEMP in
8573  [\\/]* | ?:[\\/]*)
8574  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8575  ;;
8576  *)
8577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8578for as_dir in $PATH
8579do
8580  IFS=$as_save_IFS
8581  test -z "$as_dir" && as_dir=.
8582    for ac_exec_ext in '' $ac_executable_extensions; do
8583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8584    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8586    break 2
8587  fi
8588done
8589  done
8590IFS=$as_save_IFS
8591
8592  ;;
8593esac
8594fi
8595MKTEMP=$ac_cv_path_MKTEMP
8596if test -n "$MKTEMP"; then
8597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8598$as_echo "$MKTEMP" >&6; }
8599else
8600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8601$as_echo "no" >&6; }
8602fi
8603
8604
8605  test -n "$MKTEMP" && break
8606done
8607
8608    else
8609      # If it succeeded, then it was overridden by the user. We will use it
8610      # for the tool.
8611
8612      # First remove it from the list of overridden variables, so we can test
8613      # for unknown variables in the end.
8614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8615
8616      # Check if we try to supply an empty value
8617      if test "x$MKTEMP" = x; then
8618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8619$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8621$as_echo_n "checking for MKTEMP... " >&6; }
8622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8623$as_echo "disabled" >&6; }
8624      else
8625        # Check if the provided tool contains a complete path.
8626        tool_specified="$MKTEMP"
8627        tool_basename="${tool_specified##*/}"
8628        if test "x$tool_basename" = "x$tool_specified"; then
8629          # A command without a complete path is provided, search $PATH.
8630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8631$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8632          # Extract the first word of "$tool_basename", so it can be a program name with args.
8633set dummy $tool_basename; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if ${ac_cv_path_MKTEMP+:} false; then :
8637  $as_echo_n "(cached) " >&6
8638else
8639  case $MKTEMP in
8640  [\\/]* | ?:[\\/]*)
8641  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8642  ;;
8643  *)
8644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647  IFS=$as_save_IFS
8648  test -z "$as_dir" && as_dir=.
8649    for ac_exec_ext in '' $ac_executable_extensions; do
8650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653    break 2
8654  fi
8655done
8656  done
8657IFS=$as_save_IFS
8658
8659  ;;
8660esac
8661fi
8662MKTEMP=$ac_cv_path_MKTEMP
8663if test -n "$MKTEMP"; then
8664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8665$as_echo "$MKTEMP" >&6; }
8666else
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668$as_echo "no" >&6; }
8669fi
8670
8671
8672          if test "x$MKTEMP" = x; then
8673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8674          fi
8675        else
8676          # Otherwise we believe it is a complete path. Use it as it is.
8677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8678$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8680$as_echo_n "checking for MKTEMP... " >&6; }
8681          if test ! -x "$tool_specified"; then
8682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8683$as_echo "not found" >&6; }
8684            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8685          fi
8686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8687$as_echo "$tool_specified" >&6; }
8688        fi
8689      fi
8690    fi
8691  fi
8692
8693
8694
8695  if test "x$MKTEMP" = x; then
8696    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8697  fi
8698
8699
8700
8701
8702
8703  # Publish this variable in the help.
8704
8705
8706  if [ -z "${MV+x}" ]; then
8707    # The variable is not set by user, try to locate tool using the code snippet
8708    for ac_prog in mv
8709do
8710  # Extract the first word of "$ac_prog", so it can be a program name with args.
8711set dummy $ac_prog; ac_word=$2
8712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8713$as_echo_n "checking for $ac_word... " >&6; }
8714if ${ac_cv_path_MV+:} false; then :
8715  $as_echo_n "(cached) " >&6
8716else
8717  case $MV in
8718  [\\/]* | ?:[\\/]*)
8719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8720  ;;
8721  *)
8722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8723for as_dir in $PATH
8724do
8725  IFS=$as_save_IFS
8726  test -z "$as_dir" && as_dir=.
8727    for ac_exec_ext in '' $ac_executable_extensions; do
8728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8731    break 2
8732  fi
8733done
8734  done
8735IFS=$as_save_IFS
8736
8737  ;;
8738esac
8739fi
8740MV=$ac_cv_path_MV
8741if test -n "$MV"; then
8742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8743$as_echo "$MV" >&6; }
8744else
8745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8746$as_echo "no" >&6; }
8747fi
8748
8749
8750  test -n "$MV" && break
8751done
8752
8753  else
8754    # The variable is set, but is it from the command line or the environment?
8755
8756    # Try to remove the string !MV! from our list.
8757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8759      # If it failed, the variable was not from the command line. Ignore it,
8760      # but warn the user (except for BASH, which is always set by the calling BASH).
8761      if test "xMV" != xBASH; then
8762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8763$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8764      fi
8765      # Try to locate tool using the code snippet
8766      for ac_prog in mv
8767do
8768  # Extract the first word of "$ac_prog", so it can be a program name with args.
8769set dummy $ac_prog; ac_word=$2
8770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8771$as_echo_n "checking for $ac_word... " >&6; }
8772if ${ac_cv_path_MV+:} false; then :
8773  $as_echo_n "(cached) " >&6
8774else
8775  case $MV in
8776  [\\/]* | ?:[\\/]*)
8777  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8778  ;;
8779  *)
8780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8781for as_dir in $PATH
8782do
8783  IFS=$as_save_IFS
8784  test -z "$as_dir" && as_dir=.
8785    for ac_exec_ext in '' $ac_executable_extensions; do
8786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8787    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8789    break 2
8790  fi
8791done
8792  done
8793IFS=$as_save_IFS
8794
8795  ;;
8796esac
8797fi
8798MV=$ac_cv_path_MV
8799if test -n "$MV"; then
8800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8801$as_echo "$MV" >&6; }
8802else
8803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804$as_echo "no" >&6; }
8805fi
8806
8807
8808  test -n "$MV" && break
8809done
8810
8811    else
8812      # If it succeeded, then it was overridden by the user. We will use it
8813      # for the tool.
8814
8815      # First remove it from the list of overridden variables, so we can test
8816      # for unknown variables in the end.
8817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8818
8819      # Check if we try to supply an empty value
8820      if test "x$MV" = x; then
8821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8822$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8824$as_echo_n "checking for MV... " >&6; }
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8826$as_echo "disabled" >&6; }
8827      else
8828        # Check if the provided tool contains a complete path.
8829        tool_specified="$MV"
8830        tool_basename="${tool_specified##*/}"
8831        if test "x$tool_basename" = "x$tool_specified"; then
8832          # A command without a complete path is provided, search $PATH.
8833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8834$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8835          # Extract the first word of "$tool_basename", so it can be a program name with args.
8836set dummy $tool_basename; ac_word=$2
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838$as_echo_n "checking for $ac_word... " >&6; }
8839if ${ac_cv_path_MV+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  case $MV in
8843  [\\/]* | ?:[\\/]*)
8844  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8845  ;;
8846  *)
8847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848for as_dir in $PATH
8849do
8850  IFS=$as_save_IFS
8851  test -z "$as_dir" && as_dir=.
8852    for ac_exec_ext in '' $ac_executable_extensions; do
8853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8854    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856    break 2
8857  fi
8858done
8859  done
8860IFS=$as_save_IFS
8861
8862  ;;
8863esac
8864fi
8865MV=$ac_cv_path_MV
8866if test -n "$MV"; then
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8868$as_echo "$MV" >&6; }
8869else
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
8872fi
8873
8874
8875          if test "x$MV" = x; then
8876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8877          fi
8878        else
8879          # Otherwise we believe it is a complete path. Use it as it is.
8880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8881$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8883$as_echo_n "checking for MV... " >&6; }
8884          if test ! -x "$tool_specified"; then
8885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8886$as_echo "not found" >&6; }
8887            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8888          fi
8889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8890$as_echo "$tool_specified" >&6; }
8891        fi
8892      fi
8893    fi
8894  fi
8895
8896
8897
8898  if test "x$MV" = x; then
8899    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8900  fi
8901
8902
8903
8904
8905
8906  # Publish this variable in the help.
8907
8908
8909  if [ -z "${NAWK+x}" ]; then
8910    # The variable is not set by user, try to locate tool using the code snippet
8911    for ac_prog in nawk gawk awk
8912do
8913  # Extract the first word of "$ac_prog", so it can be a program name with args.
8914set dummy $ac_prog; ac_word=$2
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916$as_echo_n "checking for $ac_word... " >&6; }
8917if ${ac_cv_path_NAWK+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  case $NAWK in
8921  [\\/]* | ?:[\\/]*)
8922  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8923  ;;
8924  *)
8925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926for as_dir in $PATH
8927do
8928  IFS=$as_save_IFS
8929  test -z "$as_dir" && as_dir=.
8930    for ac_exec_ext in '' $ac_executable_extensions; do
8931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8934    break 2
8935  fi
8936done
8937  done
8938IFS=$as_save_IFS
8939
8940  ;;
8941esac
8942fi
8943NAWK=$ac_cv_path_NAWK
8944if test -n "$NAWK"; then
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8946$as_echo "$NAWK" >&6; }
8947else
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
8950fi
8951
8952
8953  test -n "$NAWK" && break
8954done
8955
8956  else
8957    # The variable is set, but is it from the command line or the environment?
8958
8959    # Try to remove the string !NAWK! from our list.
8960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8962      # If it failed, the variable was not from the command line. Ignore it,
8963      # but warn the user (except for BASH, which is always set by the calling BASH).
8964      if test "xNAWK" != xBASH; then
8965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8966$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8967      fi
8968      # Try to locate tool using the code snippet
8969      for ac_prog in nawk gawk awk
8970do
8971  # Extract the first word of "$ac_prog", so it can be a program name with args.
8972set dummy $ac_prog; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_NAWK+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $NAWK in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001NAWK=$ac_cv_path_NAWK
9002if test -n "$NAWK"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9004$as_echo "$NAWK" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011  test -n "$NAWK" && break
9012done
9013
9014    else
9015      # If it succeeded, then it was overridden by the user. We will use it
9016      # for the tool.
9017
9018      # First remove it from the list of overridden variables, so we can test
9019      # for unknown variables in the end.
9020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9021
9022      # Check if we try to supply an empty value
9023      if test "x$NAWK" = x; then
9024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9025$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9027$as_echo_n "checking for NAWK... " >&6; }
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9029$as_echo "disabled" >&6; }
9030      else
9031        # Check if the provided tool contains a complete path.
9032        tool_specified="$NAWK"
9033        tool_basename="${tool_specified##*/}"
9034        if test "x$tool_basename" = "x$tool_specified"; then
9035          # A command without a complete path is provided, search $PATH.
9036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9037$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9038          # Extract the first word of "$tool_basename", so it can be a program name with args.
9039set dummy $tool_basename; ac_word=$2
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
9042if ${ac_cv_path_NAWK+:} false; then :
9043  $as_echo_n "(cached) " >&6
9044else
9045  case $NAWK in
9046  [\\/]* | ?:[\\/]*)
9047  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9048  ;;
9049  *)
9050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053  IFS=$as_save_IFS
9054  test -z "$as_dir" && as_dir=.
9055    for ac_exec_ext in '' $ac_executable_extensions; do
9056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059    break 2
9060  fi
9061done
9062  done
9063IFS=$as_save_IFS
9064
9065  ;;
9066esac
9067fi
9068NAWK=$ac_cv_path_NAWK
9069if test -n "$NAWK"; then
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9071$as_echo "$NAWK" >&6; }
9072else
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
9076
9077
9078          if test "x$NAWK" = x; then
9079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9080          fi
9081        else
9082          # Otherwise we believe it is a complete path. Use it as it is.
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9084$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9086$as_echo_n "checking for NAWK... " >&6; }
9087          if test ! -x "$tool_specified"; then
9088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9089$as_echo "not found" >&6; }
9090            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9091          fi
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9093$as_echo "$tool_specified" >&6; }
9094        fi
9095      fi
9096    fi
9097  fi
9098
9099
9100
9101  if test "x$NAWK" = x; then
9102    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9103  fi
9104
9105
9106
9107
9108
9109  # Publish this variable in the help.
9110
9111
9112  if [ -z "${PRINTF+x}" ]; then
9113    # The variable is not set by user, try to locate tool using the code snippet
9114    for ac_prog in printf
9115do
9116  # Extract the first word of "$ac_prog", so it can be a program name with args.
9117set dummy $ac_prog; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_path_PRINTF+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  case $PRINTF in
9124  [\\/]* | ?:[\\/]*)
9125  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9126  ;;
9127  *)
9128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129for as_dir in $PATH
9130do
9131  IFS=$as_save_IFS
9132  test -z "$as_dir" && as_dir=.
9133    for ac_exec_ext in '' $ac_executable_extensions; do
9134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137    break 2
9138  fi
9139done
9140  done
9141IFS=$as_save_IFS
9142
9143  ;;
9144esac
9145fi
9146PRINTF=$ac_cv_path_PRINTF
9147if test -n "$PRINTF"; then
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9149$as_echo "$PRINTF" >&6; }
9150else
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153fi
9154
9155
9156  test -n "$PRINTF" && break
9157done
9158
9159  else
9160    # The variable is set, but is it from the command line or the environment?
9161
9162    # Try to remove the string !PRINTF! from our list.
9163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9165      # If it failed, the variable was not from the command line. Ignore it,
9166      # but warn the user (except for BASH, which is always set by the calling BASH).
9167      if test "xPRINTF" != xBASH; then
9168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9169$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9170      fi
9171      # Try to locate tool using the code snippet
9172      for ac_prog in printf
9173do
9174  # Extract the first word of "$ac_prog", so it can be a program name with args.
9175set dummy $ac_prog; ac_word=$2
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9177$as_echo_n "checking for $ac_word... " >&6; }
9178if ${ac_cv_path_PRINTF+:} false; then :
9179  $as_echo_n "(cached) " >&6
9180else
9181  case $PRINTF in
9182  [\\/]* | ?:[\\/]*)
9183  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9184  ;;
9185  *)
9186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9193    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201  ;;
9202esac
9203fi
9204PRINTF=$ac_cv_path_PRINTF
9205if test -n "$PRINTF"; then
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9207$as_echo "$PRINTF" >&6; }
9208else
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
9211fi
9212
9213
9214  test -n "$PRINTF" && break
9215done
9216
9217    else
9218      # If it succeeded, then it was overridden by the user. We will use it
9219      # for the tool.
9220
9221      # First remove it from the list of overridden variables, so we can test
9222      # for unknown variables in the end.
9223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9224
9225      # Check if we try to supply an empty value
9226      if test "x$PRINTF" = x; then
9227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9228$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9230$as_echo_n "checking for PRINTF... " >&6; }
9231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9232$as_echo "disabled" >&6; }
9233      else
9234        # Check if the provided tool contains a complete path.
9235        tool_specified="$PRINTF"
9236        tool_basename="${tool_specified##*/}"
9237        if test "x$tool_basename" = "x$tool_specified"; then
9238          # A command without a complete path is provided, search $PATH.
9239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9240$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9241          # Extract the first word of "$tool_basename", so it can be a program name with args.
9242set dummy $tool_basename; ac_word=$2
9243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9244$as_echo_n "checking for $ac_word... " >&6; }
9245if ${ac_cv_path_PRINTF+:} false; then :
9246  $as_echo_n "(cached) " >&6
9247else
9248  case $PRINTF in
9249  [\\/]* | ?:[\\/]*)
9250  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9251  ;;
9252  *)
9253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9254for as_dir in $PATH
9255do
9256  IFS=$as_save_IFS
9257  test -z "$as_dir" && as_dir=.
9258    for ac_exec_ext in '' $ac_executable_extensions; do
9259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9260    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9262    break 2
9263  fi
9264done
9265  done
9266IFS=$as_save_IFS
9267
9268  ;;
9269esac
9270fi
9271PRINTF=$ac_cv_path_PRINTF
9272if test -n "$PRINTF"; then
9273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9274$as_echo "$PRINTF" >&6; }
9275else
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9277$as_echo "no" >&6; }
9278fi
9279
9280
9281          if test "x$PRINTF" = x; then
9282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9283          fi
9284        else
9285          # Otherwise we believe it is a complete path. Use it as it is.
9286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9287$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9289$as_echo_n "checking for PRINTF... " >&6; }
9290          if test ! -x "$tool_specified"; then
9291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9292$as_echo "not found" >&6; }
9293            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9294          fi
9295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9296$as_echo "$tool_specified" >&6; }
9297        fi
9298      fi
9299    fi
9300  fi
9301
9302
9303
9304  if test "x$PRINTF" = x; then
9305    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9306  fi
9307
9308
9309
9310
9311
9312  # Publish this variable in the help.
9313
9314
9315  if [ -z "${RM+x}" ]; then
9316    # The variable is not set by user, try to locate tool using the code snippet
9317    for ac_prog in rm
9318do
9319  # Extract the first word of "$ac_prog", so it can be a program name with args.
9320set dummy $ac_prog; ac_word=$2
9321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9322$as_echo_n "checking for $ac_word... " >&6; }
9323if ${ac_cv_path_RM+:} false; then :
9324  $as_echo_n "(cached) " >&6
9325else
9326  case $RM in
9327  [\\/]* | ?:[\\/]*)
9328  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9329  ;;
9330  *)
9331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9332for as_dir in $PATH
9333do
9334  IFS=$as_save_IFS
9335  test -z "$as_dir" && as_dir=.
9336    for ac_exec_ext in '' $ac_executable_extensions; do
9337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9338    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9340    break 2
9341  fi
9342done
9343  done
9344IFS=$as_save_IFS
9345
9346  ;;
9347esac
9348fi
9349RM=$ac_cv_path_RM
9350if test -n "$RM"; then
9351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9352$as_echo "$RM" >&6; }
9353else
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
9356fi
9357
9358
9359  test -n "$RM" && break
9360done
9361
9362  else
9363    # The variable is set, but is it from the command line or the environment?
9364
9365    # Try to remove the string !RM! from our list.
9366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9368      # If it failed, the variable was not from the command line. Ignore it,
9369      # but warn the user (except for BASH, which is always set by the calling BASH).
9370      if test "xRM" != xBASH; then
9371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9372$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9373      fi
9374      # Try to locate tool using the code snippet
9375      for ac_prog in rm
9376do
9377  # Extract the first word of "$ac_prog", so it can be a program name with args.
9378set dummy $ac_prog; ac_word=$2
9379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9380$as_echo_n "checking for $ac_word... " >&6; }
9381if ${ac_cv_path_RM+:} false; then :
9382  $as_echo_n "(cached) " >&6
9383else
9384  case $RM in
9385  [\\/]* | ?:[\\/]*)
9386  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9387  ;;
9388  *)
9389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9390for as_dir in $PATH
9391do
9392  IFS=$as_save_IFS
9393  test -z "$as_dir" && as_dir=.
9394    for ac_exec_ext in '' $ac_executable_extensions; do
9395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9396    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9398    break 2
9399  fi
9400done
9401  done
9402IFS=$as_save_IFS
9403
9404  ;;
9405esac
9406fi
9407RM=$ac_cv_path_RM
9408if test -n "$RM"; then
9409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9410$as_echo "$RM" >&6; }
9411else
9412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9413$as_echo "no" >&6; }
9414fi
9415
9416
9417  test -n "$RM" && break
9418done
9419
9420    else
9421      # If it succeeded, then it was overridden by the user. We will use it
9422      # for the tool.
9423
9424      # First remove it from the list of overridden variables, so we can test
9425      # for unknown variables in the end.
9426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9427
9428      # Check if we try to supply an empty value
9429      if test "x$RM" = x; then
9430        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9431$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9433$as_echo_n "checking for RM... " >&6; }
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9435$as_echo "disabled" >&6; }
9436      else
9437        # Check if the provided tool contains a complete path.
9438        tool_specified="$RM"
9439        tool_basename="${tool_specified##*/}"
9440        if test "x$tool_basename" = "x$tool_specified"; then
9441          # A command without a complete path is provided, search $PATH.
9442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9443$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9444          # Extract the first word of "$tool_basename", so it can be a program name with args.
9445set dummy $tool_basename; ac_word=$2
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9447$as_echo_n "checking for $ac_word... " >&6; }
9448if ${ac_cv_path_RM+:} false; then :
9449  $as_echo_n "(cached) " >&6
9450else
9451  case $RM in
9452  [\\/]* | ?:[\\/]*)
9453  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9454  ;;
9455  *)
9456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9457for as_dir in $PATH
9458do
9459  IFS=$as_save_IFS
9460  test -z "$as_dir" && as_dir=.
9461    for ac_exec_ext in '' $ac_executable_extensions; do
9462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9463    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9465    break 2
9466  fi
9467done
9468  done
9469IFS=$as_save_IFS
9470
9471  ;;
9472esac
9473fi
9474RM=$ac_cv_path_RM
9475if test -n "$RM"; then
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9477$as_echo "$RM" >&6; }
9478else
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
9481fi
9482
9483
9484          if test "x$RM" = x; then
9485            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9486          fi
9487        else
9488          # Otherwise we believe it is a complete path. Use it as it is.
9489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9490$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9492$as_echo_n "checking for RM... " >&6; }
9493          if test ! -x "$tool_specified"; then
9494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9495$as_echo "not found" >&6; }
9496            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9497          fi
9498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9499$as_echo "$tool_specified" >&6; }
9500        fi
9501      fi
9502    fi
9503  fi
9504
9505
9506
9507  if test "x$RM" = x; then
9508    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9509  fi
9510
9511
9512
9513
9514
9515  # Publish this variable in the help.
9516
9517
9518  if [ -z "${SH+x}" ]; then
9519    # The variable is not set by user, try to locate tool using the code snippet
9520    for ac_prog in sh
9521do
9522  # Extract the first word of "$ac_prog", so it can be a program name with args.
9523set dummy $ac_prog; ac_word=$2
9524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9525$as_echo_n "checking for $ac_word... " >&6; }
9526if ${ac_cv_path_SH+:} false; then :
9527  $as_echo_n "(cached) " >&6
9528else
9529  case $SH in
9530  [\\/]* | ?:[\\/]*)
9531  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9532  ;;
9533  *)
9534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9535for as_dir in $PATH
9536do
9537  IFS=$as_save_IFS
9538  test -z "$as_dir" && as_dir=.
9539    for ac_exec_ext in '' $ac_executable_extensions; do
9540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9541    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9543    break 2
9544  fi
9545done
9546  done
9547IFS=$as_save_IFS
9548
9549  ;;
9550esac
9551fi
9552SH=$ac_cv_path_SH
9553if test -n "$SH"; then
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9555$as_echo "$SH" >&6; }
9556else
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558$as_echo "no" >&6; }
9559fi
9560
9561
9562  test -n "$SH" && break
9563done
9564
9565  else
9566    # The variable is set, but is it from the command line or the environment?
9567
9568    # Try to remove the string !SH! from our list.
9569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9571      # If it failed, the variable was not from the command line. Ignore it,
9572      # but warn the user (except for BASH, which is always set by the calling BASH).
9573      if test "xSH" != xBASH; then
9574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9575$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9576      fi
9577      # Try to locate tool using the code snippet
9578      for ac_prog in sh
9579do
9580  # Extract the first word of "$ac_prog", so it can be a program name with args.
9581set dummy $ac_prog; ac_word=$2
9582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9583$as_echo_n "checking for $ac_word... " >&6; }
9584if ${ac_cv_path_SH+:} false; then :
9585  $as_echo_n "(cached) " >&6
9586else
9587  case $SH in
9588  [\\/]* | ?:[\\/]*)
9589  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9590  ;;
9591  *)
9592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593for as_dir in $PATH
9594do
9595  IFS=$as_save_IFS
9596  test -z "$as_dir" && as_dir=.
9597    for ac_exec_ext in '' $ac_executable_extensions; do
9598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9599    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9601    break 2
9602  fi
9603done
9604  done
9605IFS=$as_save_IFS
9606
9607  ;;
9608esac
9609fi
9610SH=$ac_cv_path_SH
9611if test -n "$SH"; then
9612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9613$as_echo "$SH" >&6; }
9614else
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9616$as_echo "no" >&6; }
9617fi
9618
9619
9620  test -n "$SH" && break
9621done
9622
9623    else
9624      # If it succeeded, then it was overridden by the user. We will use it
9625      # for the tool.
9626
9627      # First remove it from the list of overridden variables, so we can test
9628      # for unknown variables in the end.
9629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9630
9631      # Check if we try to supply an empty value
9632      if test "x$SH" = x; then
9633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9634$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9636$as_echo_n "checking for SH... " >&6; }
9637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9638$as_echo "disabled" >&6; }
9639      else
9640        # Check if the provided tool contains a complete path.
9641        tool_specified="$SH"
9642        tool_basename="${tool_specified##*/}"
9643        if test "x$tool_basename" = "x$tool_specified"; then
9644          # A command without a complete path is provided, search $PATH.
9645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9646$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9647          # Extract the first word of "$tool_basename", so it can be a program name with args.
9648set dummy $tool_basename; ac_word=$2
9649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9650$as_echo_n "checking for $ac_word... " >&6; }
9651if ${ac_cv_path_SH+:} false; then :
9652  $as_echo_n "(cached) " >&6
9653else
9654  case $SH in
9655  [\\/]* | ?:[\\/]*)
9656  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9657  ;;
9658  *)
9659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660for as_dir in $PATH
9661do
9662  IFS=$as_save_IFS
9663  test -z "$as_dir" && as_dir=.
9664    for ac_exec_ext in '' $ac_executable_extensions; do
9665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9666    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9668    break 2
9669  fi
9670done
9671  done
9672IFS=$as_save_IFS
9673
9674  ;;
9675esac
9676fi
9677SH=$ac_cv_path_SH
9678if test -n "$SH"; then
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9680$as_echo "$SH" >&6; }
9681else
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683$as_echo "no" >&6; }
9684fi
9685
9686
9687          if test "x$SH" = x; then
9688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9689          fi
9690        else
9691          # Otherwise we believe it is a complete path. Use it as it is.
9692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9693$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9695$as_echo_n "checking for SH... " >&6; }
9696          if test ! -x "$tool_specified"; then
9697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9698$as_echo "not found" >&6; }
9699            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9700          fi
9701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9702$as_echo "$tool_specified" >&6; }
9703        fi
9704      fi
9705    fi
9706  fi
9707
9708
9709
9710  if test "x$SH" = x; then
9711    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9712  fi
9713
9714
9715
9716
9717
9718  # Publish this variable in the help.
9719
9720
9721  if [ -z "${SORT+x}" ]; then
9722    # The variable is not set by user, try to locate tool using the code snippet
9723    for ac_prog in sort
9724do
9725  # Extract the first word of "$ac_prog", so it can be a program name with args.
9726set dummy $ac_prog; ac_word=$2
9727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9728$as_echo_n "checking for $ac_word... " >&6; }
9729if ${ac_cv_path_SORT+:} false; then :
9730  $as_echo_n "(cached) " >&6
9731else
9732  case $SORT in
9733  [\\/]* | ?:[\\/]*)
9734  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9735  ;;
9736  *)
9737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9738for as_dir in $PATH
9739do
9740  IFS=$as_save_IFS
9741  test -z "$as_dir" && as_dir=.
9742    for ac_exec_ext in '' $ac_executable_extensions; do
9743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9744    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9746    break 2
9747  fi
9748done
9749  done
9750IFS=$as_save_IFS
9751
9752  ;;
9753esac
9754fi
9755SORT=$ac_cv_path_SORT
9756if test -n "$SORT"; then
9757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9758$as_echo "$SORT" >&6; }
9759else
9760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761$as_echo "no" >&6; }
9762fi
9763
9764
9765  test -n "$SORT" && break
9766done
9767
9768  else
9769    # The variable is set, but is it from the command line or the environment?
9770
9771    # Try to remove the string !SORT! from our list.
9772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9774      # If it failed, the variable was not from the command line. Ignore it,
9775      # but warn the user (except for BASH, which is always set by the calling BASH).
9776      if test "xSORT" != xBASH; then
9777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9778$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9779      fi
9780      # Try to locate tool using the code snippet
9781      for ac_prog in sort
9782do
9783  # Extract the first word of "$ac_prog", so it can be a program name with args.
9784set dummy $ac_prog; ac_word=$2
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9786$as_echo_n "checking for $ac_word... " >&6; }
9787if ${ac_cv_path_SORT+:} false; then :
9788  $as_echo_n "(cached) " >&6
9789else
9790  case $SORT in
9791  [\\/]* | ?:[\\/]*)
9792  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9793  ;;
9794  *)
9795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9796for as_dir in $PATH
9797do
9798  IFS=$as_save_IFS
9799  test -z "$as_dir" && as_dir=.
9800    for ac_exec_ext in '' $ac_executable_extensions; do
9801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9802    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9804    break 2
9805  fi
9806done
9807  done
9808IFS=$as_save_IFS
9809
9810  ;;
9811esac
9812fi
9813SORT=$ac_cv_path_SORT
9814if test -n "$SORT"; then
9815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9816$as_echo "$SORT" >&6; }
9817else
9818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9819$as_echo "no" >&6; }
9820fi
9821
9822
9823  test -n "$SORT" && break
9824done
9825
9826    else
9827      # If it succeeded, then it was overridden by the user. We will use it
9828      # for the tool.
9829
9830      # First remove it from the list of overridden variables, so we can test
9831      # for unknown variables in the end.
9832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9833
9834      # Check if we try to supply an empty value
9835      if test "x$SORT" = x; then
9836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
9837$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
9838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9839$as_echo_n "checking for SORT... " >&6; }
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9841$as_echo "disabled" >&6; }
9842      else
9843        # Check if the provided tool contains a complete path.
9844        tool_specified="$SORT"
9845        tool_basename="${tool_specified##*/}"
9846        if test "x$tool_basename" = "x$tool_specified"; then
9847          # A command without a complete path is provided, search $PATH.
9848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9849$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9850          # Extract the first word of "$tool_basename", so it can be a program name with args.
9851set dummy $tool_basename; ac_word=$2
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9853$as_echo_n "checking for $ac_word... " >&6; }
9854if ${ac_cv_path_SORT+:} false; then :
9855  $as_echo_n "(cached) " >&6
9856else
9857  case $SORT in
9858  [\\/]* | ?:[\\/]*)
9859  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9860  ;;
9861  *)
9862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9863for as_dir in $PATH
9864do
9865  IFS=$as_save_IFS
9866  test -z "$as_dir" && as_dir=.
9867    for ac_exec_ext in '' $ac_executable_extensions; do
9868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9869    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9871    break 2
9872  fi
9873done
9874  done
9875IFS=$as_save_IFS
9876
9877  ;;
9878esac
9879fi
9880SORT=$ac_cv_path_SORT
9881if test -n "$SORT"; then
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9883$as_echo "$SORT" >&6; }
9884else
9885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
9887fi
9888
9889
9890          if test "x$SORT" = x; then
9891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9892          fi
9893        else
9894          # Otherwise we believe it is a complete path. Use it as it is.
9895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9896$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9898$as_echo_n "checking for SORT... " >&6; }
9899          if test ! -x "$tool_specified"; then
9900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9901$as_echo "not found" >&6; }
9902            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9903          fi
9904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9905$as_echo "$tool_specified" >&6; }
9906        fi
9907      fi
9908    fi
9909  fi
9910
9911
9912
9913  if test "x$SORT" = x; then
9914    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9915  fi
9916
9917
9918
9919
9920
9921  # Publish this variable in the help.
9922
9923
9924  if [ -z "${TAIL+x}" ]; then
9925    # The variable is not set by user, try to locate tool using the code snippet
9926    for ac_prog in tail
9927do
9928  # Extract the first word of "$ac_prog", so it can be a program name with args.
9929set dummy $ac_prog; ac_word=$2
9930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9931$as_echo_n "checking for $ac_word... " >&6; }
9932if ${ac_cv_path_TAIL+:} false; then :
9933  $as_echo_n "(cached) " >&6
9934else
9935  case $TAIL in
9936  [\\/]* | ?:[\\/]*)
9937  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9938  ;;
9939  *)
9940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9941for as_dir in $PATH
9942do
9943  IFS=$as_save_IFS
9944  test -z "$as_dir" && as_dir=.
9945    for ac_exec_ext in '' $ac_executable_extensions; do
9946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9947    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9949    break 2
9950  fi
9951done
9952  done
9953IFS=$as_save_IFS
9954
9955  ;;
9956esac
9957fi
9958TAIL=$ac_cv_path_TAIL
9959if test -n "$TAIL"; then
9960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9961$as_echo "$TAIL" >&6; }
9962else
9963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9964$as_echo "no" >&6; }
9965fi
9966
9967
9968  test -n "$TAIL" && break
9969done
9970
9971  else
9972    # The variable is set, but is it from the command line or the environment?
9973
9974    # Try to remove the string !TAIL! from our list.
9975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9977      # If it failed, the variable was not from the command line. Ignore it,
9978      # but warn the user (except for BASH, which is always set by the calling BASH).
9979      if test "xTAIL" != xBASH; then
9980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9981$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9982      fi
9983      # Try to locate tool using the code snippet
9984      for ac_prog in tail
9985do
9986  # Extract the first word of "$ac_prog", so it can be a program name with args.
9987set dummy $ac_prog; ac_word=$2
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9989$as_echo_n "checking for $ac_word... " >&6; }
9990if ${ac_cv_path_TAIL+:} false; then :
9991  $as_echo_n "(cached) " >&6
9992else
9993  case $TAIL in
9994  [\\/]* | ?:[\\/]*)
9995  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9996  ;;
9997  *)
9998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9999for as_dir in $PATH
10000do
10001  IFS=$as_save_IFS
10002  test -z "$as_dir" && as_dir=.
10003    for ac_exec_ext in '' $ac_executable_extensions; do
10004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10005    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10007    break 2
10008  fi
10009done
10010  done
10011IFS=$as_save_IFS
10012
10013  ;;
10014esac
10015fi
10016TAIL=$ac_cv_path_TAIL
10017if test -n "$TAIL"; then
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10019$as_echo "$TAIL" >&6; }
10020else
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022$as_echo "no" >&6; }
10023fi
10024
10025
10026  test -n "$TAIL" && break
10027done
10028
10029    else
10030      # If it succeeded, then it was overridden by the user. We will use it
10031      # for the tool.
10032
10033      # First remove it from the list of overridden variables, so we can test
10034      # for unknown variables in the end.
10035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10036
10037      # Check if we try to supply an empty value
10038      if test "x$TAIL" = x; then
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10040$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10042$as_echo_n "checking for TAIL... " >&6; }
10043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10044$as_echo "disabled" >&6; }
10045      else
10046        # Check if the provided tool contains a complete path.
10047        tool_specified="$TAIL"
10048        tool_basename="${tool_specified##*/}"
10049        if test "x$tool_basename" = "x$tool_specified"; then
10050          # A command without a complete path is provided, search $PATH.
10051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10052$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10053          # Extract the first word of "$tool_basename", so it can be a program name with args.
10054set dummy $tool_basename; ac_word=$2
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056$as_echo_n "checking for $ac_word... " >&6; }
10057if ${ac_cv_path_TAIL+:} false; then :
10058  $as_echo_n "(cached) " >&6
10059else
10060  case $TAIL in
10061  [\\/]* | ?:[\\/]*)
10062  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10063  ;;
10064  *)
10065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10066for as_dir in $PATH
10067do
10068  IFS=$as_save_IFS
10069  test -z "$as_dir" && as_dir=.
10070    for ac_exec_ext in '' $ac_executable_extensions; do
10071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10072    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10074    break 2
10075  fi
10076done
10077  done
10078IFS=$as_save_IFS
10079
10080  ;;
10081esac
10082fi
10083TAIL=$ac_cv_path_TAIL
10084if test -n "$TAIL"; then
10085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10086$as_echo "$TAIL" >&6; }
10087else
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
10093          if test "x$TAIL" = x; then
10094            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10095          fi
10096        else
10097          # Otherwise we believe it is a complete path. Use it as it is.
10098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10099$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10100          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10101$as_echo_n "checking for TAIL... " >&6; }
10102          if test ! -x "$tool_specified"; then
10103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10104$as_echo "not found" >&6; }
10105            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10106          fi
10107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10108$as_echo "$tool_specified" >&6; }
10109        fi
10110      fi
10111    fi
10112  fi
10113
10114
10115
10116  if test "x$TAIL" = x; then
10117    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10118  fi
10119
10120
10121
10122
10123
10124  # Publish this variable in the help.
10125
10126
10127  if [ -z "${TAR+x}" ]; then
10128    # The variable is not set by user, try to locate tool using the code snippet
10129    for ac_prog in tar
10130do
10131  # Extract the first word of "$ac_prog", so it can be a program name with args.
10132set dummy $ac_prog; ac_word=$2
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10134$as_echo_n "checking for $ac_word... " >&6; }
10135if ${ac_cv_path_TAR+:} false; then :
10136  $as_echo_n "(cached) " >&6
10137else
10138  case $TAR in
10139  [\\/]* | ?:[\\/]*)
10140  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10141  ;;
10142  *)
10143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10144for as_dir in $PATH
10145do
10146  IFS=$as_save_IFS
10147  test -z "$as_dir" && as_dir=.
10148    for ac_exec_ext in '' $ac_executable_extensions; do
10149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10150    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10152    break 2
10153  fi
10154done
10155  done
10156IFS=$as_save_IFS
10157
10158  ;;
10159esac
10160fi
10161TAR=$ac_cv_path_TAR
10162if test -n "$TAR"; then
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10164$as_echo "$TAR" >&6; }
10165else
10166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10167$as_echo "no" >&6; }
10168fi
10169
10170
10171  test -n "$TAR" && break
10172done
10173
10174  else
10175    # The variable is set, but is it from the command line or the environment?
10176
10177    # Try to remove the string !TAR! from our list.
10178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10180      # If it failed, the variable was not from the command line. Ignore it,
10181      # but warn the user (except for BASH, which is always set by the calling BASH).
10182      if test "xTAR" != xBASH; then
10183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10184$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10185      fi
10186      # Try to locate tool using the code snippet
10187      for ac_prog in tar
10188do
10189  # Extract the first word of "$ac_prog", so it can be a program name with args.
10190set dummy $ac_prog; ac_word=$2
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10192$as_echo_n "checking for $ac_word... " >&6; }
10193if ${ac_cv_path_TAR+:} false; then :
10194  $as_echo_n "(cached) " >&6
10195else
10196  case $TAR in
10197  [\\/]* | ?:[\\/]*)
10198  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10199  ;;
10200  *)
10201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10202for as_dir in $PATH
10203do
10204  IFS=$as_save_IFS
10205  test -z "$as_dir" && as_dir=.
10206    for ac_exec_ext in '' $ac_executable_extensions; do
10207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10208    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10210    break 2
10211  fi
10212done
10213  done
10214IFS=$as_save_IFS
10215
10216  ;;
10217esac
10218fi
10219TAR=$ac_cv_path_TAR
10220if test -n "$TAR"; then
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10222$as_echo "$TAR" >&6; }
10223else
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10225$as_echo "no" >&6; }
10226fi
10227
10228
10229  test -n "$TAR" && break
10230done
10231
10232    else
10233      # If it succeeded, then it was overridden by the user. We will use it
10234      # for the tool.
10235
10236      # First remove it from the list of overridden variables, so we can test
10237      # for unknown variables in the end.
10238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10239
10240      # Check if we try to supply an empty value
10241      if test "x$TAR" = x; then
10242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10243$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10245$as_echo_n "checking for TAR... " >&6; }
10246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10247$as_echo "disabled" >&6; }
10248      else
10249        # Check if the provided tool contains a complete path.
10250        tool_specified="$TAR"
10251        tool_basename="${tool_specified##*/}"
10252        if test "x$tool_basename" = "x$tool_specified"; then
10253          # A command without a complete path is provided, search $PATH.
10254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10255$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10256          # Extract the first word of "$tool_basename", so it can be a program name with args.
10257set dummy $tool_basename; ac_word=$2
10258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10259$as_echo_n "checking for $ac_word... " >&6; }
10260if ${ac_cv_path_TAR+:} false; then :
10261  $as_echo_n "(cached) " >&6
10262else
10263  case $TAR in
10264  [\\/]* | ?:[\\/]*)
10265  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10266  ;;
10267  *)
10268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10269for as_dir in $PATH
10270do
10271  IFS=$as_save_IFS
10272  test -z "$as_dir" && as_dir=.
10273    for ac_exec_ext in '' $ac_executable_extensions; do
10274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10275    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10277    break 2
10278  fi
10279done
10280  done
10281IFS=$as_save_IFS
10282
10283  ;;
10284esac
10285fi
10286TAR=$ac_cv_path_TAR
10287if test -n "$TAR"; then
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10289$as_echo "$TAR" >&6; }
10290else
10291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10292$as_echo "no" >&6; }
10293fi
10294
10295
10296          if test "x$TAR" = x; then
10297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10298          fi
10299        else
10300          # Otherwise we believe it is a complete path. Use it as it is.
10301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10302$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10304$as_echo_n "checking for TAR... " >&6; }
10305          if test ! -x "$tool_specified"; then
10306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10307$as_echo "not found" >&6; }
10308            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10309          fi
10310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10311$as_echo "$tool_specified" >&6; }
10312        fi
10313      fi
10314    fi
10315  fi
10316
10317
10318
10319  if test "x$TAR" = x; then
10320    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10321  fi
10322
10323
10324
10325
10326
10327  # Publish this variable in the help.
10328
10329
10330  if [ -z "${TEE+x}" ]; then
10331    # The variable is not set by user, try to locate tool using the code snippet
10332    for ac_prog in tee
10333do
10334  # Extract the first word of "$ac_prog", so it can be a program name with args.
10335set dummy $ac_prog; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path_TEE+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $TEE in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364TEE=$ac_cv_path_TEE
10365if test -n "$TEE"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10367$as_echo "$TEE" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374  test -n "$TEE" && break
10375done
10376
10377  else
10378    # The variable is set, but is it from the command line or the environment?
10379
10380    # Try to remove the string !TEE! from our list.
10381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10383      # If it failed, the variable was not from the command line. Ignore it,
10384      # but warn the user (except for BASH, which is always set by the calling BASH).
10385      if test "xTEE" != xBASH; then
10386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10387$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10388      fi
10389      # Try to locate tool using the code snippet
10390      for ac_prog in tee
10391do
10392  # Extract the first word of "$ac_prog", so it can be a program name with args.
10393set dummy $ac_prog; ac_word=$2
10394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10395$as_echo_n "checking for $ac_word... " >&6; }
10396if ${ac_cv_path_TEE+:} false; then :
10397  $as_echo_n "(cached) " >&6
10398else
10399  case $TEE in
10400  [\\/]* | ?:[\\/]*)
10401  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10402  ;;
10403  *)
10404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10405for as_dir in $PATH
10406do
10407  IFS=$as_save_IFS
10408  test -z "$as_dir" && as_dir=.
10409    for ac_exec_ext in '' $ac_executable_extensions; do
10410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10411    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10413    break 2
10414  fi
10415done
10416  done
10417IFS=$as_save_IFS
10418
10419  ;;
10420esac
10421fi
10422TEE=$ac_cv_path_TEE
10423if test -n "$TEE"; then
10424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10425$as_echo "$TEE" >&6; }
10426else
10427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428$as_echo "no" >&6; }
10429fi
10430
10431
10432  test -n "$TEE" && break
10433done
10434
10435    else
10436      # If it succeeded, then it was overridden by the user. We will use it
10437      # for the tool.
10438
10439      # First remove it from the list of overridden variables, so we can test
10440      # for unknown variables in the end.
10441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10442
10443      # Check if we try to supply an empty value
10444      if test "x$TEE" = x; then
10445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10446$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10448$as_echo_n "checking for TEE... " >&6; }
10449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10450$as_echo "disabled" >&6; }
10451      else
10452        # Check if the provided tool contains a complete path.
10453        tool_specified="$TEE"
10454        tool_basename="${tool_specified##*/}"
10455        if test "x$tool_basename" = "x$tool_specified"; then
10456          # A command without a complete path is provided, search $PATH.
10457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10458$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10459          # Extract the first word of "$tool_basename", so it can be a program name with args.
10460set dummy $tool_basename; ac_word=$2
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10462$as_echo_n "checking for $ac_word... " >&6; }
10463if ${ac_cv_path_TEE+:} false; then :
10464  $as_echo_n "(cached) " >&6
10465else
10466  case $TEE in
10467  [\\/]* | ?:[\\/]*)
10468  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10469  ;;
10470  *)
10471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10472for as_dir in $PATH
10473do
10474  IFS=$as_save_IFS
10475  test -z "$as_dir" && as_dir=.
10476    for ac_exec_ext in '' $ac_executable_extensions; do
10477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10478    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10480    break 2
10481  fi
10482done
10483  done
10484IFS=$as_save_IFS
10485
10486  ;;
10487esac
10488fi
10489TEE=$ac_cv_path_TEE
10490if test -n "$TEE"; then
10491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10492$as_echo "$TEE" >&6; }
10493else
10494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495$as_echo "no" >&6; }
10496fi
10497
10498
10499          if test "x$TEE" = x; then
10500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10501          fi
10502        else
10503          # Otherwise we believe it is a complete path. Use it as it is.
10504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10505$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10507$as_echo_n "checking for TEE... " >&6; }
10508          if test ! -x "$tool_specified"; then
10509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10510$as_echo "not found" >&6; }
10511            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10512          fi
10513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10514$as_echo "$tool_specified" >&6; }
10515        fi
10516      fi
10517    fi
10518  fi
10519
10520
10521
10522  if test "x$TEE" = x; then
10523    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10524  fi
10525
10526
10527
10528
10529
10530  # Publish this variable in the help.
10531
10532
10533  if [ -z "${TOUCH+x}" ]; then
10534    # The variable is not set by user, try to locate tool using the code snippet
10535    for ac_prog in touch
10536do
10537  # Extract the first word of "$ac_prog", so it can be a program name with args.
10538set dummy $ac_prog; ac_word=$2
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10540$as_echo_n "checking for $ac_word... " >&6; }
10541if ${ac_cv_path_TOUCH+:} false; then :
10542  $as_echo_n "(cached) " >&6
10543else
10544  case $TOUCH in
10545  [\\/]* | ?:[\\/]*)
10546  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10547  ;;
10548  *)
10549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10550for as_dir in $PATH
10551do
10552  IFS=$as_save_IFS
10553  test -z "$as_dir" && as_dir=.
10554    for ac_exec_ext in '' $ac_executable_extensions; do
10555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10556    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10558    break 2
10559  fi
10560done
10561  done
10562IFS=$as_save_IFS
10563
10564  ;;
10565esac
10566fi
10567TOUCH=$ac_cv_path_TOUCH
10568if test -n "$TOUCH"; then
10569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10570$as_echo "$TOUCH" >&6; }
10571else
10572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10573$as_echo "no" >&6; }
10574fi
10575
10576
10577  test -n "$TOUCH" && break
10578done
10579
10580  else
10581    # The variable is set, but is it from the command line or the environment?
10582
10583    # Try to remove the string !TOUCH! from our list.
10584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10586      # If it failed, the variable was not from the command line. Ignore it,
10587      # but warn the user (except for BASH, which is always set by the calling BASH).
10588      if test "xTOUCH" != xBASH; then
10589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10590$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10591      fi
10592      # Try to locate tool using the code snippet
10593      for ac_prog in touch
10594do
10595  # Extract the first word of "$ac_prog", so it can be a program name with args.
10596set dummy $ac_prog; ac_word=$2
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598$as_echo_n "checking for $ac_word... " >&6; }
10599if ${ac_cv_path_TOUCH+:} false; then :
10600  $as_echo_n "(cached) " >&6
10601else
10602  case $TOUCH in
10603  [\\/]* | ?:[\\/]*)
10604  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10605  ;;
10606  *)
10607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608for as_dir in $PATH
10609do
10610  IFS=$as_save_IFS
10611  test -z "$as_dir" && as_dir=.
10612    for ac_exec_ext in '' $ac_executable_extensions; do
10613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616    break 2
10617  fi
10618done
10619  done
10620IFS=$as_save_IFS
10621
10622  ;;
10623esac
10624fi
10625TOUCH=$ac_cv_path_TOUCH
10626if test -n "$TOUCH"; then
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10628$as_echo "$TOUCH" >&6; }
10629else
10630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631$as_echo "no" >&6; }
10632fi
10633
10634
10635  test -n "$TOUCH" && break
10636done
10637
10638    else
10639      # If it succeeded, then it was overridden by the user. We will use it
10640      # for the tool.
10641
10642      # First remove it from the list of overridden variables, so we can test
10643      # for unknown variables in the end.
10644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10645
10646      # Check if we try to supply an empty value
10647      if test "x$TOUCH" = x; then
10648        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10649$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10651$as_echo_n "checking for TOUCH... " >&6; }
10652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10653$as_echo "disabled" >&6; }
10654      else
10655        # Check if the provided tool contains a complete path.
10656        tool_specified="$TOUCH"
10657        tool_basename="${tool_specified##*/}"
10658        if test "x$tool_basename" = "x$tool_specified"; then
10659          # A command without a complete path is provided, search $PATH.
10660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10661$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10662          # Extract the first word of "$tool_basename", so it can be a program name with args.
10663set dummy $tool_basename; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if ${ac_cv_path_TOUCH+:} false; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $TOUCH in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692TOUCH=$ac_cv_path_TOUCH
10693if test -n "$TOUCH"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10695$as_echo "$TOUCH" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702          if test "x$TOUCH" = x; then
10703            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10704          fi
10705        else
10706          # Otherwise we believe it is a complete path. Use it as it is.
10707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10708$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10709          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10710$as_echo_n "checking for TOUCH... " >&6; }
10711          if test ! -x "$tool_specified"; then
10712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10713$as_echo "not found" >&6; }
10714            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10715          fi
10716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10717$as_echo "$tool_specified" >&6; }
10718        fi
10719      fi
10720    fi
10721  fi
10722
10723
10724
10725  if test "x$TOUCH" = x; then
10726    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10727  fi
10728
10729
10730
10731
10732
10733  # Publish this variable in the help.
10734
10735
10736  if [ -z "${TR+x}" ]; then
10737    # The variable is not set by user, try to locate tool using the code snippet
10738    for ac_prog in tr
10739do
10740  # Extract the first word of "$ac_prog", so it can be a program name with args.
10741set dummy $ac_prog; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_TR+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $TR in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770TR=$ac_cv_path_TR
10771if test -n "$TR"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10773$as_echo "$TR" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780  test -n "$TR" && break
10781done
10782
10783  else
10784    # The variable is set, but is it from the command line or the environment?
10785
10786    # Try to remove the string !TR! from our list.
10787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10789      # If it failed, the variable was not from the command line. Ignore it,
10790      # but warn the user (except for BASH, which is always set by the calling BASH).
10791      if test "xTR" != xBASH; then
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10793$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10794      fi
10795      # Try to locate tool using the code snippet
10796      for ac_prog in tr
10797do
10798  # Extract the first word of "$ac_prog", so it can be a program name with args.
10799set dummy $ac_prog; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_TR+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $TR in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828TR=$ac_cv_path_TR
10829if test -n "$TR"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10831$as_echo "$TR" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838  test -n "$TR" && break
10839done
10840
10841    else
10842      # If it succeeded, then it was overridden by the user. We will use it
10843      # for the tool.
10844
10845      # First remove it from the list of overridden variables, so we can test
10846      # for unknown variables in the end.
10847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10848
10849      # Check if we try to supply an empty value
10850      if test "x$TR" = x; then
10851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
10852$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
10853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10854$as_echo_n "checking for TR... " >&6; }
10855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10856$as_echo "disabled" >&6; }
10857      else
10858        # Check if the provided tool contains a complete path.
10859        tool_specified="$TR"
10860        tool_basename="${tool_specified##*/}"
10861        if test "x$tool_basename" = "x$tool_specified"; then
10862          # A command without a complete path is provided, search $PATH.
10863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10864$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10865          # Extract the first word of "$tool_basename", so it can be a program name with args.
10866set dummy $tool_basename; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_TR+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $TR in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895TR=$ac_cv_path_TR
10896if test -n "$TR"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10898$as_echo "$TR" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905          if test "x$TR" = x; then
10906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10907          fi
10908        else
10909          # Otherwise we believe it is a complete path. Use it as it is.
10910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10911$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10913$as_echo_n "checking for TR... " >&6; }
10914          if test ! -x "$tool_specified"; then
10915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10916$as_echo "not found" >&6; }
10917            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10918          fi
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10920$as_echo "$tool_specified" >&6; }
10921        fi
10922      fi
10923    fi
10924  fi
10925
10926
10927
10928  if test "x$TR" = x; then
10929    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10930  fi
10931
10932
10933
10934
10935
10936  # Publish this variable in the help.
10937
10938
10939  if [ -z "${UNAME+x}" ]; then
10940    # The variable is not set by user, try to locate tool using the code snippet
10941    for ac_prog in uname
10942do
10943  # Extract the first word of "$ac_prog", so it can be a program name with args.
10944set dummy $ac_prog; ac_word=$2
10945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10946$as_echo_n "checking for $ac_word... " >&6; }
10947if ${ac_cv_path_UNAME+:} false; then :
10948  $as_echo_n "(cached) " >&6
10949else
10950  case $UNAME in
10951  [\\/]* | ?:[\\/]*)
10952  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10953  ;;
10954  *)
10955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10956for as_dir in $PATH
10957do
10958  IFS=$as_save_IFS
10959  test -z "$as_dir" && as_dir=.
10960    for ac_exec_ext in '' $ac_executable_extensions; do
10961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10962    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10964    break 2
10965  fi
10966done
10967  done
10968IFS=$as_save_IFS
10969
10970  ;;
10971esac
10972fi
10973UNAME=$ac_cv_path_UNAME
10974if test -n "$UNAME"; then
10975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10976$as_echo "$UNAME" >&6; }
10977else
10978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
10980fi
10981
10982
10983  test -n "$UNAME" && break
10984done
10985
10986  else
10987    # The variable is set, but is it from the command line or the environment?
10988
10989    # Try to remove the string !UNAME! from our list.
10990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10992      # If it failed, the variable was not from the command line. Ignore it,
10993      # but warn the user (except for BASH, which is always set by the calling BASH).
10994      if test "xUNAME" != xBASH; then
10995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10996$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10997      fi
10998      # Try to locate tool using the code snippet
10999      for ac_prog in uname
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_UNAME+:} false; then :
11006  $as_echo_n "(cached) " >&6
11007else
11008  case $UNAME in
11009  [\\/]* | ?:[\\/]*)
11010  ac_cv_path_UNAME="$UNAME" # 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_UNAME="$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
11031UNAME=$ac_cv_path_UNAME
11032if test -n "$UNAME"; then
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11034$as_echo "$UNAME" >&6; }
11035else
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
11038fi
11039
11040
11041  test -n "$UNAME" && break
11042done
11043
11044    else
11045      # If it succeeded, then it was overridden by the user. We will use it
11046      # for the tool.
11047
11048      # First remove it from the list of overridden variables, so we can test
11049      # for unknown variables in the end.
11050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11051
11052      # Check if we try to supply an empty value
11053      if test "x$UNAME" = x; then
11054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11055$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11057$as_echo_n "checking for UNAME... " >&6; }
11058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11059$as_echo "disabled" >&6; }
11060      else
11061        # Check if the provided tool contains a complete path.
11062        tool_specified="$UNAME"
11063        tool_basename="${tool_specified##*/}"
11064        if test "x$tool_basename" = "x$tool_specified"; then
11065          # A command without a complete path is provided, search $PATH.
11066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11067$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11068          # Extract the first word of "$tool_basename", so it can be a program name with args.
11069set dummy $tool_basename; ac_word=$2
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071$as_echo_n "checking for $ac_word... " >&6; }
11072if ${ac_cv_path_UNAME+:} false; then :
11073  $as_echo_n "(cached) " >&6
11074else
11075  case $UNAME in
11076  [\\/]* | ?:[\\/]*)
11077  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11078  ;;
11079  *)
11080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081for as_dir in $PATH
11082do
11083  IFS=$as_save_IFS
11084  test -z "$as_dir" && as_dir=.
11085    for ac_exec_ext in '' $ac_executable_extensions; do
11086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089    break 2
11090  fi
11091done
11092  done
11093IFS=$as_save_IFS
11094
11095  ;;
11096esac
11097fi
11098UNAME=$ac_cv_path_UNAME
11099if test -n "$UNAME"; then
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11101$as_echo "$UNAME" >&6; }
11102else
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
11105fi
11106
11107
11108          if test "x$UNAME" = x; then
11109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11110          fi
11111        else
11112          # Otherwise we believe it is a complete path. Use it as it is.
11113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11114$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11116$as_echo_n "checking for UNAME... " >&6; }
11117          if test ! -x "$tool_specified"; then
11118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11119$as_echo "not found" >&6; }
11120            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11121          fi
11122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11123$as_echo "$tool_specified" >&6; }
11124        fi
11125      fi
11126    fi
11127  fi
11128
11129
11130
11131  if test "x$UNAME" = x; then
11132    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11133  fi
11134
11135
11136
11137
11138
11139  # Publish this variable in the help.
11140
11141
11142  if [ -z "${UNIQ+x}" ]; then
11143    # The variable is not set by user, try to locate tool using the code snippet
11144    for ac_prog in uniq
11145do
11146  # Extract the first word of "$ac_prog", so it can be a program name with args.
11147set dummy $ac_prog; ac_word=$2
11148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11149$as_echo_n "checking for $ac_word... " >&6; }
11150if ${ac_cv_path_UNIQ+:} false; then :
11151  $as_echo_n "(cached) " >&6
11152else
11153  case $UNIQ in
11154  [\\/]* | ?:[\\/]*)
11155  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11156  ;;
11157  *)
11158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11159for as_dir in $PATH
11160do
11161  IFS=$as_save_IFS
11162  test -z "$as_dir" && as_dir=.
11163    for ac_exec_ext in '' $ac_executable_extensions; do
11164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11165    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11167    break 2
11168  fi
11169done
11170  done
11171IFS=$as_save_IFS
11172
11173  ;;
11174esac
11175fi
11176UNIQ=$ac_cv_path_UNIQ
11177if test -n "$UNIQ"; then
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11179$as_echo "$UNIQ" >&6; }
11180else
11181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
11183fi
11184
11185
11186  test -n "$UNIQ" && break
11187done
11188
11189  else
11190    # The variable is set, but is it from the command line or the environment?
11191
11192    # Try to remove the string !UNIQ! from our list.
11193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11195      # If it failed, the variable was not from the command line. Ignore it,
11196      # but warn the user (except for BASH, which is always set by the calling BASH).
11197      if test "xUNIQ" != xBASH; then
11198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11199$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11200      fi
11201      # Try to locate tool using the code snippet
11202      for ac_prog in uniq
11203do
11204  # Extract the first word of "$ac_prog", so it can be a program name with args.
11205set dummy $ac_prog; ac_word=$2
11206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11207$as_echo_n "checking for $ac_word... " >&6; }
11208if ${ac_cv_path_UNIQ+:} false; then :
11209  $as_echo_n "(cached) " >&6
11210else
11211  case $UNIQ in
11212  [\\/]* | ?:[\\/]*)
11213  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11214  ;;
11215  *)
11216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11217for as_dir in $PATH
11218do
11219  IFS=$as_save_IFS
11220  test -z "$as_dir" && as_dir=.
11221    for ac_exec_ext in '' $ac_executable_extensions; do
11222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11223    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11225    break 2
11226  fi
11227done
11228  done
11229IFS=$as_save_IFS
11230
11231  ;;
11232esac
11233fi
11234UNIQ=$ac_cv_path_UNIQ
11235if test -n "$UNIQ"; then
11236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11237$as_echo "$UNIQ" >&6; }
11238else
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240$as_echo "no" >&6; }
11241fi
11242
11243
11244  test -n "$UNIQ" && break
11245done
11246
11247    else
11248      # If it succeeded, then it was overridden by the user. We will use it
11249      # for the tool.
11250
11251      # First remove it from the list of overridden variables, so we can test
11252      # for unknown variables in the end.
11253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11254
11255      # Check if we try to supply an empty value
11256      if test "x$UNIQ" = x; then
11257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11258$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11260$as_echo_n "checking for UNIQ... " >&6; }
11261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11262$as_echo "disabled" >&6; }
11263      else
11264        # Check if the provided tool contains a complete path.
11265        tool_specified="$UNIQ"
11266        tool_basename="${tool_specified##*/}"
11267        if test "x$tool_basename" = "x$tool_specified"; then
11268          # A command without a complete path is provided, search $PATH.
11269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11270$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11271          # Extract the first word of "$tool_basename", so it can be a program name with args.
11272set dummy $tool_basename; ac_word=$2
11273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11274$as_echo_n "checking for $ac_word... " >&6; }
11275if ${ac_cv_path_UNIQ+:} false; then :
11276  $as_echo_n "(cached) " >&6
11277else
11278  case $UNIQ in
11279  [\\/]* | ?:[\\/]*)
11280  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11281  ;;
11282  *)
11283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11284for as_dir in $PATH
11285do
11286  IFS=$as_save_IFS
11287  test -z "$as_dir" && as_dir=.
11288    for ac_exec_ext in '' $ac_executable_extensions; do
11289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11290    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11292    break 2
11293  fi
11294done
11295  done
11296IFS=$as_save_IFS
11297
11298  ;;
11299esac
11300fi
11301UNIQ=$ac_cv_path_UNIQ
11302if test -n "$UNIQ"; then
11303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11304$as_echo "$UNIQ" >&6; }
11305else
11306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
11308fi
11309
11310
11311          if test "x$UNIQ" = x; then
11312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11313          fi
11314        else
11315          # Otherwise we believe it is a complete path. Use it as it is.
11316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11317$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11319$as_echo_n "checking for UNIQ... " >&6; }
11320          if test ! -x "$tool_specified"; then
11321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11322$as_echo "not found" >&6; }
11323            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11324          fi
11325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11326$as_echo "$tool_specified" >&6; }
11327        fi
11328      fi
11329    fi
11330  fi
11331
11332
11333
11334  if test "x$UNIQ" = x; then
11335    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11336  fi
11337
11338
11339
11340
11341
11342  # Publish this variable in the help.
11343
11344
11345  if [ -z "${WC+x}" ]; then
11346    # The variable is not set by user, try to locate tool using the code snippet
11347    for ac_prog in wc
11348do
11349  # Extract the first word of "$ac_prog", so it can be a program name with args.
11350set dummy $ac_prog; ac_word=$2
11351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11352$as_echo_n "checking for $ac_word... " >&6; }
11353if ${ac_cv_path_WC+:} false; then :
11354  $as_echo_n "(cached) " >&6
11355else
11356  case $WC in
11357  [\\/]* | ?:[\\/]*)
11358  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11359  ;;
11360  *)
11361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11362for as_dir in $PATH
11363do
11364  IFS=$as_save_IFS
11365  test -z "$as_dir" && as_dir=.
11366    for ac_exec_ext in '' $ac_executable_extensions; do
11367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11368    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11370    break 2
11371  fi
11372done
11373  done
11374IFS=$as_save_IFS
11375
11376  ;;
11377esac
11378fi
11379WC=$ac_cv_path_WC
11380if test -n "$WC"; then
11381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11382$as_echo "$WC" >&6; }
11383else
11384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
11386fi
11387
11388
11389  test -n "$WC" && break
11390done
11391
11392  else
11393    # The variable is set, but is it from the command line or the environment?
11394
11395    # Try to remove the string !WC! from our list.
11396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11398      # If it failed, the variable was not from the command line. Ignore it,
11399      # but warn the user (except for BASH, which is always set by the calling BASH).
11400      if test "xWC" != xBASH; then
11401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11402$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11403      fi
11404      # Try to locate tool using the code snippet
11405      for ac_prog in wc
11406do
11407  # Extract the first word of "$ac_prog", so it can be a program name with args.
11408set dummy $ac_prog; ac_word=$2
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11410$as_echo_n "checking for $ac_word... " >&6; }
11411if ${ac_cv_path_WC+:} false; then :
11412  $as_echo_n "(cached) " >&6
11413else
11414  case $WC in
11415  [\\/]* | ?:[\\/]*)
11416  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11417  ;;
11418  *)
11419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11420for as_dir in $PATH
11421do
11422  IFS=$as_save_IFS
11423  test -z "$as_dir" && as_dir=.
11424    for ac_exec_ext in '' $ac_executable_extensions; do
11425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11426    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11428    break 2
11429  fi
11430done
11431  done
11432IFS=$as_save_IFS
11433
11434  ;;
11435esac
11436fi
11437WC=$ac_cv_path_WC
11438if test -n "$WC"; then
11439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11440$as_echo "$WC" >&6; }
11441else
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443$as_echo "no" >&6; }
11444fi
11445
11446
11447  test -n "$WC" && break
11448done
11449
11450    else
11451      # If it succeeded, then it was overridden by the user. We will use it
11452      # for the tool.
11453
11454      # First remove it from the list of overridden variables, so we can test
11455      # for unknown variables in the end.
11456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11457
11458      # Check if we try to supply an empty value
11459      if test "x$WC" = x; then
11460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11461$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11463$as_echo_n "checking for WC... " >&6; }
11464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11465$as_echo "disabled" >&6; }
11466      else
11467        # Check if the provided tool contains a complete path.
11468        tool_specified="$WC"
11469        tool_basename="${tool_specified##*/}"
11470        if test "x$tool_basename" = "x$tool_specified"; then
11471          # A command without a complete path is provided, search $PATH.
11472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11473$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11474          # Extract the first word of "$tool_basename", so it can be a program name with args.
11475set dummy $tool_basename; ac_word=$2
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11477$as_echo_n "checking for $ac_word... " >&6; }
11478if ${ac_cv_path_WC+:} false; then :
11479  $as_echo_n "(cached) " >&6
11480else
11481  case $WC in
11482  [\\/]* | ?:[\\/]*)
11483  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11484  ;;
11485  *)
11486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11487for as_dir in $PATH
11488do
11489  IFS=$as_save_IFS
11490  test -z "$as_dir" && as_dir=.
11491    for ac_exec_ext in '' $ac_executable_extensions; do
11492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11493    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11495    break 2
11496  fi
11497done
11498  done
11499IFS=$as_save_IFS
11500
11501  ;;
11502esac
11503fi
11504WC=$ac_cv_path_WC
11505if test -n "$WC"; then
11506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11507$as_echo "$WC" >&6; }
11508else
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
11511fi
11512
11513
11514          if test "x$WC" = x; then
11515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11516          fi
11517        else
11518          # Otherwise we believe it is a complete path. Use it as it is.
11519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11520$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11522$as_echo_n "checking for WC... " >&6; }
11523          if test ! -x "$tool_specified"; then
11524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11525$as_echo "not found" >&6; }
11526            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11527          fi
11528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11529$as_echo "$tool_specified" >&6; }
11530        fi
11531      fi
11532    fi
11533  fi
11534
11535
11536
11537  if test "x$WC" = x; then
11538    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11539  fi
11540
11541
11542
11543
11544
11545  # Publish this variable in the help.
11546
11547
11548  if [ -z "${WHICH+x}" ]; then
11549    # The variable is not set by user, try to locate tool using the code snippet
11550    for ac_prog in which
11551do
11552  # Extract the first word of "$ac_prog", so it can be a program name with args.
11553set dummy $ac_prog; ac_word=$2
11554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11555$as_echo_n "checking for $ac_word... " >&6; }
11556if ${ac_cv_path_WHICH+:} false; then :
11557  $as_echo_n "(cached) " >&6
11558else
11559  case $WHICH in
11560  [\\/]* | ?:[\\/]*)
11561  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11562  ;;
11563  *)
11564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11565for as_dir in $PATH
11566do
11567  IFS=$as_save_IFS
11568  test -z "$as_dir" && as_dir=.
11569    for ac_exec_ext in '' $ac_executable_extensions; do
11570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11571    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11573    break 2
11574  fi
11575done
11576  done
11577IFS=$as_save_IFS
11578
11579  ;;
11580esac
11581fi
11582WHICH=$ac_cv_path_WHICH
11583if test -n "$WHICH"; then
11584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11585$as_echo "$WHICH" >&6; }
11586else
11587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11588$as_echo "no" >&6; }
11589fi
11590
11591
11592  test -n "$WHICH" && break
11593done
11594
11595  else
11596    # The variable is set, but is it from the command line or the environment?
11597
11598    # Try to remove the string !WHICH! from our list.
11599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11601      # If it failed, the variable was not from the command line. Ignore it,
11602      # but warn the user (except for BASH, which is always set by the calling BASH).
11603      if test "xWHICH" != xBASH; then
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11605$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11606      fi
11607      # Try to locate tool using the code snippet
11608      for ac_prog in which
11609do
11610  # Extract the first word of "$ac_prog", so it can be a program name with args.
11611set dummy $ac_prog; ac_word=$2
11612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11613$as_echo_n "checking for $ac_word... " >&6; }
11614if ${ac_cv_path_WHICH+:} false; then :
11615  $as_echo_n "(cached) " >&6
11616else
11617  case $WHICH in
11618  [\\/]* | ?:[\\/]*)
11619  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11620  ;;
11621  *)
11622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11623for as_dir in $PATH
11624do
11625  IFS=$as_save_IFS
11626  test -z "$as_dir" && as_dir=.
11627    for ac_exec_ext in '' $ac_executable_extensions; do
11628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11629    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11631    break 2
11632  fi
11633done
11634  done
11635IFS=$as_save_IFS
11636
11637  ;;
11638esac
11639fi
11640WHICH=$ac_cv_path_WHICH
11641if test -n "$WHICH"; then
11642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11643$as_echo "$WHICH" >&6; }
11644else
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11646$as_echo "no" >&6; }
11647fi
11648
11649
11650  test -n "$WHICH" && break
11651done
11652
11653    else
11654      # If it succeeded, then it was overridden by the user. We will use it
11655      # for the tool.
11656
11657      # First remove it from the list of overridden variables, so we can test
11658      # for unknown variables in the end.
11659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11660
11661      # Check if we try to supply an empty value
11662      if test "x$WHICH" = x; then
11663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11664$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11666$as_echo_n "checking for WHICH... " >&6; }
11667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11668$as_echo "disabled" >&6; }
11669      else
11670        # Check if the provided tool contains a complete path.
11671        tool_specified="$WHICH"
11672        tool_basename="${tool_specified##*/}"
11673        if test "x$tool_basename" = "x$tool_specified"; then
11674          # A command without a complete path is provided, search $PATH.
11675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11676$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11677          # Extract the first word of "$tool_basename", so it can be a program name with args.
11678set dummy $tool_basename; ac_word=$2
11679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11680$as_echo_n "checking for $ac_word... " >&6; }
11681if ${ac_cv_path_WHICH+:} false; then :
11682  $as_echo_n "(cached) " >&6
11683else
11684  case $WHICH in
11685  [\\/]* | ?:[\\/]*)
11686  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11687  ;;
11688  *)
11689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11690for as_dir in $PATH
11691do
11692  IFS=$as_save_IFS
11693  test -z "$as_dir" && as_dir=.
11694    for ac_exec_ext in '' $ac_executable_extensions; do
11695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11696    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11698    break 2
11699  fi
11700done
11701  done
11702IFS=$as_save_IFS
11703
11704  ;;
11705esac
11706fi
11707WHICH=$ac_cv_path_WHICH
11708if test -n "$WHICH"; then
11709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11710$as_echo "$WHICH" >&6; }
11711else
11712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
11714fi
11715
11716
11717          if test "x$WHICH" = x; then
11718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11719          fi
11720        else
11721          # Otherwise we believe it is a complete path. Use it as it is.
11722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11723$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11725$as_echo_n "checking for WHICH... " >&6; }
11726          if test ! -x "$tool_specified"; then
11727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11728$as_echo "not found" >&6; }
11729            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11730          fi
11731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11732$as_echo "$tool_specified" >&6; }
11733        fi
11734      fi
11735    fi
11736  fi
11737
11738
11739
11740  if test "x$WHICH" = x; then
11741    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11742  fi
11743
11744
11745
11746
11747
11748  # Publish this variable in the help.
11749
11750
11751  if [ -z "${XARGS+x}" ]; then
11752    # The variable is not set by user, try to locate tool using the code snippet
11753    for ac_prog in xargs
11754do
11755  # Extract the first word of "$ac_prog", so it can be a program name with args.
11756set dummy $ac_prog; ac_word=$2
11757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11758$as_echo_n "checking for $ac_word... " >&6; }
11759if ${ac_cv_path_XARGS+:} false; then :
11760  $as_echo_n "(cached) " >&6
11761else
11762  case $XARGS in
11763  [\\/]* | ?:[\\/]*)
11764  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11765  ;;
11766  *)
11767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11768for as_dir in $PATH
11769do
11770  IFS=$as_save_IFS
11771  test -z "$as_dir" && as_dir=.
11772    for ac_exec_ext in '' $ac_executable_extensions; do
11773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11774    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11776    break 2
11777  fi
11778done
11779  done
11780IFS=$as_save_IFS
11781
11782  ;;
11783esac
11784fi
11785XARGS=$ac_cv_path_XARGS
11786if test -n "$XARGS"; then
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11788$as_echo "$XARGS" >&6; }
11789else
11790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
11792fi
11793
11794
11795  test -n "$XARGS" && break
11796done
11797
11798  else
11799    # The variable is set, but is it from the command line or the environment?
11800
11801    # Try to remove the string !XARGS! from our list.
11802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11804      # If it failed, the variable was not from the command line. Ignore it,
11805      # but warn the user (except for BASH, which is always set by the calling BASH).
11806      if test "xXARGS" != xBASH; then
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11808$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11809      fi
11810      # Try to locate tool using the code snippet
11811      for ac_prog in xargs
11812do
11813  # Extract the first word of "$ac_prog", so it can be a program name with args.
11814set dummy $ac_prog; ac_word=$2
11815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11816$as_echo_n "checking for $ac_word... " >&6; }
11817if ${ac_cv_path_XARGS+:} false; then :
11818  $as_echo_n "(cached) " >&6
11819else
11820  case $XARGS in
11821  [\\/]* | ?:[\\/]*)
11822  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11823  ;;
11824  *)
11825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11826for as_dir in $PATH
11827do
11828  IFS=$as_save_IFS
11829  test -z "$as_dir" && as_dir=.
11830    for ac_exec_ext in '' $ac_executable_extensions; do
11831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11832    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11834    break 2
11835  fi
11836done
11837  done
11838IFS=$as_save_IFS
11839
11840  ;;
11841esac
11842fi
11843XARGS=$ac_cv_path_XARGS
11844if test -n "$XARGS"; then
11845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11846$as_echo "$XARGS" >&6; }
11847else
11848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11849$as_echo "no" >&6; }
11850fi
11851
11852
11853  test -n "$XARGS" && break
11854done
11855
11856    else
11857      # If it succeeded, then it was overridden by the user. We will use it
11858      # for the tool.
11859
11860      # First remove it from the list of overridden variables, so we can test
11861      # for unknown variables in the end.
11862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11863
11864      # Check if we try to supply an empty value
11865      if test "x$XARGS" = x; then
11866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
11867$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
11868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11869$as_echo_n "checking for XARGS... " >&6; }
11870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11871$as_echo "disabled" >&6; }
11872      else
11873        # Check if the provided tool contains a complete path.
11874        tool_specified="$XARGS"
11875        tool_basename="${tool_specified##*/}"
11876        if test "x$tool_basename" = "x$tool_specified"; then
11877          # A command without a complete path is provided, search $PATH.
11878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11879$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11880          # Extract the first word of "$tool_basename", so it can be a program name with args.
11881set dummy $tool_basename; ac_word=$2
11882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11883$as_echo_n "checking for $ac_word... " >&6; }
11884if ${ac_cv_path_XARGS+:} false; then :
11885  $as_echo_n "(cached) " >&6
11886else
11887  case $XARGS in
11888  [\\/]* | ?:[\\/]*)
11889  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11890  ;;
11891  *)
11892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11893for as_dir in $PATH
11894do
11895  IFS=$as_save_IFS
11896  test -z "$as_dir" && as_dir=.
11897    for ac_exec_ext in '' $ac_executable_extensions; do
11898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11899    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11901    break 2
11902  fi
11903done
11904  done
11905IFS=$as_save_IFS
11906
11907  ;;
11908esac
11909fi
11910XARGS=$ac_cv_path_XARGS
11911if test -n "$XARGS"; then
11912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11913$as_echo "$XARGS" >&6; }
11914else
11915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11916$as_echo "no" >&6; }
11917fi
11918
11919
11920          if test "x$XARGS" = x; then
11921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11922          fi
11923        else
11924          # Otherwise we believe it is a complete path. Use it as it is.
11925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11926$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11928$as_echo_n "checking for XARGS... " >&6; }
11929          if test ! -x "$tool_specified"; then
11930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11931$as_echo "not found" >&6; }
11932            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11933          fi
11934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11935$as_echo "$tool_specified" >&6; }
11936        fi
11937      fi
11938    fi
11939  fi
11940
11941
11942
11943  if test "x$XARGS" = x; then
11944    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11945  fi
11946
11947
11948
11949  # Then required tools that require some special treatment.
11950
11951
11952  # Publish this variable in the help.
11953
11954
11955  if [ -z "${AWK+x}" ]; then
11956    # The variable is not set by user, try to locate tool using the code snippet
11957    for ac_prog in gawk mawk nawk awk
11958do
11959  # Extract the first word of "$ac_prog", so it can be a program name with args.
11960set dummy $ac_prog; ac_word=$2
11961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11962$as_echo_n "checking for $ac_word... " >&6; }
11963if ${ac_cv_prog_AWK+:} false; then :
11964  $as_echo_n "(cached) " >&6
11965else
11966  if test -n "$AWK"; then
11967  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11968else
11969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11970for as_dir in $PATH
11971do
11972  IFS=$as_save_IFS
11973  test -z "$as_dir" && as_dir=.
11974    for ac_exec_ext in '' $ac_executable_extensions; do
11975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11976    ac_cv_prog_AWK="$ac_prog"
11977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11978    break 2
11979  fi
11980done
11981  done
11982IFS=$as_save_IFS
11983
11984fi
11985fi
11986AWK=$ac_cv_prog_AWK
11987if test -n "$AWK"; then
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11989$as_echo "$AWK" >&6; }
11990else
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
11993fi
11994
11995
11996  test -n "$AWK" && break
11997done
11998
11999  else
12000    # The variable is set, but is it from the command line or the environment?
12001
12002    # Try to remove the string !AWK! from our list.
12003    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12004    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12005      # If it failed, the variable was not from the command line. Ignore it,
12006      # but warn the user (except for BASH, which is always set by the calling BASH).
12007      if test "xAWK" != xBASH; then
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12009$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12010      fi
12011      # Try to locate tool using the code snippet
12012      for ac_prog in gawk mawk nawk awk
12013do
12014  # Extract the first word of "$ac_prog", so it can be a program name with args.
12015set dummy $ac_prog; ac_word=$2
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12017$as_echo_n "checking for $ac_word... " >&6; }
12018if ${ac_cv_prog_AWK+:} false; then :
12019  $as_echo_n "(cached) " >&6
12020else
12021  if test -n "$AWK"; then
12022  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12023else
12024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12025for as_dir in $PATH
12026do
12027  IFS=$as_save_IFS
12028  test -z "$as_dir" && as_dir=.
12029    for ac_exec_ext in '' $ac_executable_extensions; do
12030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12031    ac_cv_prog_AWK="$ac_prog"
12032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12033    break 2
12034  fi
12035done
12036  done
12037IFS=$as_save_IFS
12038
12039fi
12040fi
12041AWK=$ac_cv_prog_AWK
12042if test -n "$AWK"; then
12043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12044$as_echo "$AWK" >&6; }
12045else
12046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12047$as_echo "no" >&6; }
12048fi
12049
12050
12051  test -n "$AWK" && break
12052done
12053
12054    else
12055      # If it succeeded, then it was overridden by the user. We will use it
12056      # for the tool.
12057
12058      # First remove it from the list of overridden variables, so we can test
12059      # for unknown variables in the end.
12060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12061
12062      # Check if we try to supply an empty value
12063      if test "x$AWK" = x; then
12064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12065$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12067$as_echo_n "checking for AWK... " >&6; }
12068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12069$as_echo "disabled" >&6; }
12070      else
12071        # Check if the provided tool contains a complete path.
12072        tool_specified="$AWK"
12073        tool_basename="${tool_specified##*/}"
12074        if test "x$tool_basename" = "x$tool_specified"; then
12075          # A command without a complete path is provided, search $PATH.
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12077$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12078          # Extract the first word of "$tool_basename", so it can be a program name with args.
12079set dummy $tool_basename; ac_word=$2
12080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12081$as_echo_n "checking for $ac_word... " >&6; }
12082if ${ac_cv_path_AWK+:} false; then :
12083  $as_echo_n "(cached) " >&6
12084else
12085  case $AWK in
12086  [\\/]* | ?:[\\/]*)
12087  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12088  ;;
12089  *)
12090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12091for as_dir in $PATH
12092do
12093  IFS=$as_save_IFS
12094  test -z "$as_dir" && as_dir=.
12095    for ac_exec_ext in '' $ac_executable_extensions; do
12096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12097    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12099    break 2
12100  fi
12101done
12102  done
12103IFS=$as_save_IFS
12104
12105  ;;
12106esac
12107fi
12108AWK=$ac_cv_path_AWK
12109if test -n "$AWK"; then
12110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12111$as_echo "$AWK" >&6; }
12112else
12113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12114$as_echo "no" >&6; }
12115fi
12116
12117
12118          if test "x$AWK" = x; then
12119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12120          fi
12121        else
12122          # Otherwise we believe it is a complete path. Use it as it is.
12123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12124$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12126$as_echo_n "checking for AWK... " >&6; }
12127          if test ! -x "$tool_specified"; then
12128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12129$as_echo "not found" >&6; }
12130            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12131          fi
12132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12133$as_echo "$tool_specified" >&6; }
12134        fi
12135      fi
12136    fi
12137  fi
12138
12139
12140  if test "x$AWK" = x; then
12141    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12142  fi
12143
12144
12145
12146
12147  # Publish this variable in the help.
12148
12149
12150  if [ -z "${GREP+x}" ]; then
12151    # The variable is not set by user, try to locate tool using the code snippet
12152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12153$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12154if ${ac_cv_path_GREP+:} false; then :
12155  $as_echo_n "(cached) " >&6
12156else
12157  if test -z "$GREP"; then
12158  ac_path_GREP_found=false
12159  # Loop through the user's path and test for each of PROGNAME-LIST
12160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12161for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12162do
12163  IFS=$as_save_IFS
12164  test -z "$as_dir" && as_dir=.
12165    for ac_prog in grep ggrep; do
12166    for ac_exec_ext in '' $ac_executable_extensions; do
12167      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12168      as_fn_executable_p "$ac_path_GREP" || continue
12169# Check for GNU ac_path_GREP and select it if it is found.
12170  # Check for GNU $ac_path_GREP
12171case `"$ac_path_GREP" --version 2>&1` in
12172*GNU*)
12173  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12174*)
12175  ac_count=0
12176  $as_echo_n 0123456789 >"conftest.in"
12177  while :
12178  do
12179    cat "conftest.in" "conftest.in" >"conftest.tmp"
12180    mv "conftest.tmp" "conftest.in"
12181    cp "conftest.in" "conftest.nl"
12182    $as_echo 'GREP' >> "conftest.nl"
12183    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12184    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12185    as_fn_arith $ac_count + 1 && ac_count=$as_val
12186    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12187      # Best one so far, save it but keep looking for a better one
12188      ac_cv_path_GREP="$ac_path_GREP"
12189      ac_path_GREP_max=$ac_count
12190    fi
12191    # 10*(2^10) chars as input seems more than enough
12192    test $ac_count -gt 10 && break
12193  done
12194  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12195esac
12196
12197      $ac_path_GREP_found && break 3
12198    done
12199  done
12200  done
12201IFS=$as_save_IFS
12202  if test -z "$ac_cv_path_GREP"; then
12203    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12204  fi
12205else
12206  ac_cv_path_GREP=$GREP
12207fi
12208
12209fi
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12211$as_echo "$ac_cv_path_GREP" >&6; }
12212 GREP="$ac_cv_path_GREP"
12213
12214
12215  else
12216    # The variable is set, but is it from the command line or the environment?
12217
12218    # Try to remove the string !GREP! from our list.
12219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12221      # If it failed, the variable was not from the command line. Ignore it,
12222      # but warn the user (except for BASH, which is always set by the calling BASH).
12223      if test "xGREP" != xBASH; then
12224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12225$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12226      fi
12227      # Try to locate tool using the code snippet
12228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12229$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12230if ${ac_cv_path_GREP+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  if test -z "$GREP"; then
12234  ac_path_GREP_found=false
12235  # Loop through the user's path and test for each of PROGNAME-LIST
12236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12237for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12238do
12239  IFS=$as_save_IFS
12240  test -z "$as_dir" && as_dir=.
12241    for ac_prog in grep ggrep; do
12242    for ac_exec_ext in '' $ac_executable_extensions; do
12243      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12244      as_fn_executable_p "$ac_path_GREP" || continue
12245# Check for GNU ac_path_GREP and select it if it is found.
12246  # Check for GNU $ac_path_GREP
12247case `"$ac_path_GREP" --version 2>&1` in
12248*GNU*)
12249  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12250*)
12251  ac_count=0
12252  $as_echo_n 0123456789 >"conftest.in"
12253  while :
12254  do
12255    cat "conftest.in" "conftest.in" >"conftest.tmp"
12256    mv "conftest.tmp" "conftest.in"
12257    cp "conftest.in" "conftest.nl"
12258    $as_echo 'GREP' >> "conftest.nl"
12259    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12260    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12261    as_fn_arith $ac_count + 1 && ac_count=$as_val
12262    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12263      # Best one so far, save it but keep looking for a better one
12264      ac_cv_path_GREP="$ac_path_GREP"
12265      ac_path_GREP_max=$ac_count
12266    fi
12267    # 10*(2^10) chars as input seems more than enough
12268    test $ac_count -gt 10 && break
12269  done
12270  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12271esac
12272
12273      $ac_path_GREP_found && break 3
12274    done
12275  done
12276  done
12277IFS=$as_save_IFS
12278  if test -z "$ac_cv_path_GREP"; then
12279    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12280  fi
12281else
12282  ac_cv_path_GREP=$GREP
12283fi
12284
12285fi
12286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12287$as_echo "$ac_cv_path_GREP" >&6; }
12288 GREP="$ac_cv_path_GREP"
12289
12290
12291    else
12292      # If it succeeded, then it was overridden by the user. We will use it
12293      # for the tool.
12294
12295      # First remove it from the list of overridden variables, so we can test
12296      # for unknown variables in the end.
12297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12298
12299      # Check if we try to supply an empty value
12300      if test "x$GREP" = x; then
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12302$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12304$as_echo_n "checking for GREP... " >&6; }
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12306$as_echo "disabled" >&6; }
12307      else
12308        # Check if the provided tool contains a complete path.
12309        tool_specified="$GREP"
12310        tool_basename="${tool_specified##*/}"
12311        if test "x$tool_basename" = "x$tool_specified"; then
12312          # A command without a complete path is provided, search $PATH.
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12314$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12315          # Extract the first word of "$tool_basename", so it can be a program name with args.
12316set dummy $tool_basename; ac_word=$2
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12318$as_echo_n "checking for $ac_word... " >&6; }
12319if ${ac_cv_path_GREP+:} false; then :
12320  $as_echo_n "(cached) " >&6
12321else
12322  case $GREP in
12323  [\\/]* | ?:[\\/]*)
12324  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12325  ;;
12326  *)
12327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12328for as_dir in $PATH
12329do
12330  IFS=$as_save_IFS
12331  test -z "$as_dir" && as_dir=.
12332    for ac_exec_ext in '' $ac_executable_extensions; do
12333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12334    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12336    break 2
12337  fi
12338done
12339  done
12340IFS=$as_save_IFS
12341
12342  ;;
12343esac
12344fi
12345GREP=$ac_cv_path_GREP
12346if test -n "$GREP"; then
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12348$as_echo "$GREP" >&6; }
12349else
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
12352fi
12353
12354
12355          if test "x$GREP" = x; then
12356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12357          fi
12358        else
12359          # Otherwise we believe it is a complete path. Use it as it is.
12360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12361$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12363$as_echo_n "checking for GREP... " >&6; }
12364          if test ! -x "$tool_specified"; then
12365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12366$as_echo "not found" >&6; }
12367            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12368          fi
12369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12370$as_echo "$tool_specified" >&6; }
12371        fi
12372      fi
12373    fi
12374  fi
12375
12376
12377  if test "x$GREP" = x; then
12378    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12379  fi
12380
12381
12382
12383
12384  # Publish this variable in the help.
12385
12386
12387  if [ -z "${EGREP+x}" ]; then
12388    # The variable is not set by user, try to locate tool using the code snippet
12389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12390$as_echo_n "checking for egrep... " >&6; }
12391if ${ac_cv_path_EGREP+:} false; then :
12392  $as_echo_n "(cached) " >&6
12393else
12394  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12395   then ac_cv_path_EGREP="$GREP -E"
12396   else
12397     if test -z "$EGREP"; then
12398  ac_path_EGREP_found=false
12399  # Loop through the user's path and test for each of PROGNAME-LIST
12400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12402do
12403  IFS=$as_save_IFS
12404  test -z "$as_dir" && as_dir=.
12405    for ac_prog in egrep; do
12406    for ac_exec_ext in '' $ac_executable_extensions; do
12407      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12408      as_fn_executable_p "$ac_path_EGREP" || continue
12409# Check for GNU ac_path_EGREP and select it if it is found.
12410  # Check for GNU $ac_path_EGREP
12411case `"$ac_path_EGREP" --version 2>&1` in
12412*GNU*)
12413  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12414*)
12415  ac_count=0
12416  $as_echo_n 0123456789 >"conftest.in"
12417  while :
12418  do
12419    cat "conftest.in" "conftest.in" >"conftest.tmp"
12420    mv "conftest.tmp" "conftest.in"
12421    cp "conftest.in" "conftest.nl"
12422    $as_echo 'EGREP' >> "conftest.nl"
12423    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12425    as_fn_arith $ac_count + 1 && ac_count=$as_val
12426    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12427      # Best one so far, save it but keep looking for a better one
12428      ac_cv_path_EGREP="$ac_path_EGREP"
12429      ac_path_EGREP_max=$ac_count
12430    fi
12431    # 10*(2^10) chars as input seems more than enough
12432    test $ac_count -gt 10 && break
12433  done
12434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12435esac
12436
12437      $ac_path_EGREP_found && break 3
12438    done
12439  done
12440  done
12441IFS=$as_save_IFS
12442  if test -z "$ac_cv_path_EGREP"; then
12443    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12444  fi
12445else
12446  ac_cv_path_EGREP=$EGREP
12447fi
12448
12449   fi
12450fi
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12452$as_echo "$ac_cv_path_EGREP" >&6; }
12453 EGREP="$ac_cv_path_EGREP"
12454
12455
12456  else
12457    # The variable is set, but is it from the command line or the environment?
12458
12459    # Try to remove the string !EGREP! from our list.
12460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12462      # If it failed, the variable was not from the command line. Ignore it,
12463      # but warn the user (except for BASH, which is always set by the calling BASH).
12464      if test "xEGREP" != xBASH; then
12465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12466$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12467      fi
12468      # Try to locate tool using the code snippet
12469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12470$as_echo_n "checking for egrep... " >&6; }
12471if ${ac_cv_path_EGREP+:} false; then :
12472  $as_echo_n "(cached) " >&6
12473else
12474  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12475   then ac_cv_path_EGREP="$GREP -E"
12476   else
12477     if test -z "$EGREP"; then
12478  ac_path_EGREP_found=false
12479  # Loop through the user's path and test for each of PROGNAME-LIST
12480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12481for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12482do
12483  IFS=$as_save_IFS
12484  test -z "$as_dir" && as_dir=.
12485    for ac_prog in egrep; do
12486    for ac_exec_ext in '' $ac_executable_extensions; do
12487      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12488      as_fn_executable_p "$ac_path_EGREP" || continue
12489# Check for GNU ac_path_EGREP and select it if it is found.
12490  # Check for GNU $ac_path_EGREP
12491case `"$ac_path_EGREP" --version 2>&1` in
12492*GNU*)
12493  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12494*)
12495  ac_count=0
12496  $as_echo_n 0123456789 >"conftest.in"
12497  while :
12498  do
12499    cat "conftest.in" "conftest.in" >"conftest.tmp"
12500    mv "conftest.tmp" "conftest.in"
12501    cp "conftest.in" "conftest.nl"
12502    $as_echo 'EGREP' >> "conftest.nl"
12503    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12504    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12505    as_fn_arith $ac_count + 1 && ac_count=$as_val
12506    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12507      # Best one so far, save it but keep looking for a better one
12508      ac_cv_path_EGREP="$ac_path_EGREP"
12509      ac_path_EGREP_max=$ac_count
12510    fi
12511    # 10*(2^10) chars as input seems more than enough
12512    test $ac_count -gt 10 && break
12513  done
12514  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12515esac
12516
12517      $ac_path_EGREP_found && break 3
12518    done
12519  done
12520  done
12521IFS=$as_save_IFS
12522  if test -z "$ac_cv_path_EGREP"; then
12523    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12524  fi
12525else
12526  ac_cv_path_EGREP=$EGREP
12527fi
12528
12529   fi
12530fi
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12532$as_echo "$ac_cv_path_EGREP" >&6; }
12533 EGREP="$ac_cv_path_EGREP"
12534
12535
12536    else
12537      # If it succeeded, then it was overridden by the user. We will use it
12538      # for the tool.
12539
12540      # First remove it from the list of overridden variables, so we can test
12541      # for unknown variables in the end.
12542      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12543
12544      # Check if we try to supply an empty value
12545      if test "x$EGREP" = x; then
12546        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12547$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12548        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12549$as_echo_n "checking for EGREP... " >&6; }
12550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12551$as_echo "disabled" >&6; }
12552      else
12553        # Check if the provided tool contains a complete path.
12554        tool_specified="$EGREP"
12555        tool_basename="${tool_specified##*/}"
12556        if test "x$tool_basename" = "x$tool_specified"; then
12557          # A command without a complete path is provided, search $PATH.
12558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12559$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12560          # Extract the first word of "$tool_basename", so it can be a program name with args.
12561set dummy $tool_basename; ac_word=$2
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12563$as_echo_n "checking for $ac_word... " >&6; }
12564if ${ac_cv_path_EGREP+:} false; then :
12565  $as_echo_n "(cached) " >&6
12566else
12567  case $EGREP in
12568  [\\/]* | ?:[\\/]*)
12569  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12570  ;;
12571  *)
12572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12573for as_dir in $PATH
12574do
12575  IFS=$as_save_IFS
12576  test -z "$as_dir" && as_dir=.
12577    for ac_exec_ext in '' $ac_executable_extensions; do
12578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12579    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12581    break 2
12582  fi
12583done
12584  done
12585IFS=$as_save_IFS
12586
12587  ;;
12588esac
12589fi
12590EGREP=$ac_cv_path_EGREP
12591if test -n "$EGREP"; then
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12593$as_echo "$EGREP" >&6; }
12594else
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598
12599
12600          if test "x$EGREP" = x; then
12601            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12602          fi
12603        else
12604          # Otherwise we believe it is a complete path. Use it as it is.
12605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12606$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12607          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12608$as_echo_n "checking for EGREP... " >&6; }
12609          if test ! -x "$tool_specified"; then
12610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12611$as_echo "not found" >&6; }
12612            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12613          fi
12614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12615$as_echo "$tool_specified" >&6; }
12616        fi
12617      fi
12618    fi
12619  fi
12620
12621
12622  if test "x$EGREP" = x; then
12623    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12624  fi
12625
12626
12627
12628
12629  # Publish this variable in the help.
12630
12631
12632  if [ -z "${FGREP+x}" ]; then
12633    # The variable is not set by user, try to locate tool using the code snippet
12634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12635$as_echo_n "checking for fgrep... " >&6; }
12636if ${ac_cv_path_FGREP+:} false; then :
12637  $as_echo_n "(cached) " >&6
12638else
12639  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12640   then ac_cv_path_FGREP="$GREP -F"
12641   else
12642     if test -z "$FGREP"; then
12643  ac_path_FGREP_found=false
12644  # Loop through the user's path and test for each of PROGNAME-LIST
12645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12647do
12648  IFS=$as_save_IFS
12649  test -z "$as_dir" && as_dir=.
12650    for ac_prog in fgrep; do
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12653      as_fn_executable_p "$ac_path_FGREP" || continue
12654# Check for GNU ac_path_FGREP and select it if it is found.
12655  # Check for GNU $ac_path_FGREP
12656case `"$ac_path_FGREP" --version 2>&1` in
12657*GNU*)
12658  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12659*)
12660  ac_count=0
12661  $as_echo_n 0123456789 >"conftest.in"
12662  while :
12663  do
12664    cat "conftest.in" "conftest.in" >"conftest.tmp"
12665    mv "conftest.tmp" "conftest.in"
12666    cp "conftest.in" "conftest.nl"
12667    $as_echo 'FGREP' >> "conftest.nl"
12668    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12669    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12670    as_fn_arith $ac_count + 1 && ac_count=$as_val
12671    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12672      # Best one so far, save it but keep looking for a better one
12673      ac_cv_path_FGREP="$ac_path_FGREP"
12674      ac_path_FGREP_max=$ac_count
12675    fi
12676    # 10*(2^10) chars as input seems more than enough
12677    test $ac_count -gt 10 && break
12678  done
12679  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12680esac
12681
12682      $ac_path_FGREP_found && break 3
12683    done
12684  done
12685  done
12686IFS=$as_save_IFS
12687  if test -z "$ac_cv_path_FGREP"; then
12688    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12689  fi
12690else
12691  ac_cv_path_FGREP=$FGREP
12692fi
12693
12694   fi
12695fi
12696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12697$as_echo "$ac_cv_path_FGREP" >&6; }
12698 FGREP="$ac_cv_path_FGREP"
12699
12700
12701  else
12702    # The variable is set, but is it from the command line or the environment?
12703
12704    # Try to remove the string !FGREP! from our list.
12705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12707      # If it failed, the variable was not from the command line. Ignore it,
12708      # but warn the user (except for BASH, which is always set by the calling BASH).
12709      if test "xFGREP" != xBASH; then
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12711$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12712      fi
12713      # Try to locate tool using the code snippet
12714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12715$as_echo_n "checking for fgrep... " >&6; }
12716if ${ac_cv_path_FGREP+:} false; then :
12717  $as_echo_n "(cached) " >&6
12718else
12719  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12720   then ac_cv_path_FGREP="$GREP -F"
12721   else
12722     if test -z "$FGREP"; then
12723  ac_path_FGREP_found=false
12724  # Loop through the user's path and test for each of PROGNAME-LIST
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_prog in fgrep; do
12731    for ac_exec_ext in '' $ac_executable_extensions; do
12732      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12733      as_fn_executable_p "$ac_path_FGREP" || continue
12734# Check for GNU ac_path_FGREP and select it if it is found.
12735  # Check for GNU $ac_path_FGREP
12736case `"$ac_path_FGREP" --version 2>&1` in
12737*GNU*)
12738  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12739*)
12740  ac_count=0
12741  $as_echo_n 0123456789 >"conftest.in"
12742  while :
12743  do
12744    cat "conftest.in" "conftest.in" >"conftest.tmp"
12745    mv "conftest.tmp" "conftest.in"
12746    cp "conftest.in" "conftest.nl"
12747    $as_echo 'FGREP' >> "conftest.nl"
12748    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12749    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12750    as_fn_arith $ac_count + 1 && ac_count=$as_val
12751    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12752      # Best one so far, save it but keep looking for a better one
12753      ac_cv_path_FGREP="$ac_path_FGREP"
12754      ac_path_FGREP_max=$ac_count
12755    fi
12756    # 10*(2^10) chars as input seems more than enough
12757    test $ac_count -gt 10 && break
12758  done
12759  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12760esac
12761
12762      $ac_path_FGREP_found && break 3
12763    done
12764  done
12765  done
12766IFS=$as_save_IFS
12767  if test -z "$ac_cv_path_FGREP"; then
12768    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12769  fi
12770else
12771  ac_cv_path_FGREP=$FGREP
12772fi
12773
12774   fi
12775fi
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12777$as_echo "$ac_cv_path_FGREP" >&6; }
12778 FGREP="$ac_cv_path_FGREP"
12779
12780
12781    else
12782      # If it succeeded, then it was overridden by the user. We will use it
12783      # for the tool.
12784
12785      # First remove it from the list of overridden variables, so we can test
12786      # for unknown variables in the end.
12787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12788
12789      # Check if we try to supply an empty value
12790      if test "x$FGREP" = x; then
12791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
12792$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
12793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12794$as_echo_n "checking for FGREP... " >&6; }
12795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12796$as_echo "disabled" >&6; }
12797      else
12798        # Check if the provided tool contains a complete path.
12799        tool_specified="$FGREP"
12800        tool_basename="${tool_specified##*/}"
12801        if test "x$tool_basename" = "x$tool_specified"; then
12802          # A command without a complete path is provided, search $PATH.
12803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12804$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12805          # Extract the first word of "$tool_basename", so it can be a program name with args.
12806set dummy $tool_basename; ac_word=$2
12807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12808$as_echo_n "checking for $ac_word... " >&6; }
12809if ${ac_cv_path_FGREP+:} false; then :
12810  $as_echo_n "(cached) " >&6
12811else
12812  case $FGREP in
12813  [\\/]* | ?:[\\/]*)
12814  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12815  ;;
12816  *)
12817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12818for as_dir in $PATH
12819do
12820  IFS=$as_save_IFS
12821  test -z "$as_dir" && as_dir=.
12822    for ac_exec_ext in '' $ac_executable_extensions; do
12823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12824    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12826    break 2
12827  fi
12828done
12829  done
12830IFS=$as_save_IFS
12831
12832  ;;
12833esac
12834fi
12835FGREP=$ac_cv_path_FGREP
12836if test -n "$FGREP"; then
12837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12838$as_echo "$FGREP" >&6; }
12839else
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12841$as_echo "no" >&6; }
12842fi
12843
12844
12845          if test "x$FGREP" = x; then
12846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12847          fi
12848        else
12849          # Otherwise we believe it is a complete path. Use it as it is.
12850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12851$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12853$as_echo_n "checking for FGREP... " >&6; }
12854          if test ! -x "$tool_specified"; then
12855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12856$as_echo "not found" >&6; }
12857            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12858          fi
12859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12860$as_echo "$tool_specified" >&6; }
12861        fi
12862      fi
12863    fi
12864  fi
12865
12866
12867  if test "x$FGREP" = x; then
12868    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12869  fi
12870
12871
12872
12873
12874  # Publish this variable in the help.
12875
12876
12877  if [ -z "${SED+x}" ]; then
12878    # The variable is not set by user, try to locate tool using the code snippet
12879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12880$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12881if ${ac_cv_path_SED+:} false; then :
12882  $as_echo_n "(cached) " >&6
12883else
12884            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12885     for ac_i in 1 2 3 4 5 6 7; do
12886       ac_script="$ac_script$as_nl$ac_script"
12887     done
12888     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12889     { ac_script=; unset ac_script;}
12890     if test -z "$SED"; then
12891  ac_path_SED_found=false
12892  # Loop through the user's path and test for each of PROGNAME-LIST
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_prog in sed gsed; do
12899    for ac_exec_ext in '' $ac_executable_extensions; do
12900      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12901      as_fn_executable_p "$ac_path_SED" || continue
12902# Check for GNU ac_path_SED and select it if it is found.
12903  # Check for GNU $ac_path_SED
12904case `"$ac_path_SED" --version 2>&1` in
12905*GNU*)
12906  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12907*)
12908  ac_count=0
12909  $as_echo_n 0123456789 >"conftest.in"
12910  while :
12911  do
12912    cat "conftest.in" "conftest.in" >"conftest.tmp"
12913    mv "conftest.tmp" "conftest.in"
12914    cp "conftest.in" "conftest.nl"
12915    $as_echo '' >> "conftest.nl"
12916    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12917    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12918    as_fn_arith $ac_count + 1 && ac_count=$as_val
12919    if test $ac_count -gt ${ac_path_SED_max-0}; then
12920      # Best one so far, save it but keep looking for a better one
12921      ac_cv_path_SED="$ac_path_SED"
12922      ac_path_SED_max=$ac_count
12923    fi
12924    # 10*(2^10) chars as input seems more than enough
12925    test $ac_count -gt 10 && break
12926  done
12927  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12928esac
12929
12930      $ac_path_SED_found && break 3
12931    done
12932  done
12933  done
12934IFS=$as_save_IFS
12935  if test -z "$ac_cv_path_SED"; then
12936    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12937  fi
12938else
12939  ac_cv_path_SED=$SED
12940fi
12941
12942fi
12943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12944$as_echo "$ac_cv_path_SED" >&6; }
12945 SED="$ac_cv_path_SED"
12946  rm -f conftest.sed
12947
12948  else
12949    # The variable is set, but is it from the command line or the environment?
12950
12951    # Try to remove the string !SED! from our list.
12952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12954      # If it failed, the variable was not from the command line. Ignore it,
12955      # but warn the user (except for BASH, which is always set by the calling BASH).
12956      if test "xSED" != xBASH; then
12957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12958$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12959      fi
12960      # Try to locate tool using the code snippet
12961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12962$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12963if ${ac_cv_path_SED+:} false; then :
12964  $as_echo_n "(cached) " >&6
12965else
12966            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12967     for ac_i in 1 2 3 4 5 6 7; do
12968       ac_script="$ac_script$as_nl$ac_script"
12969     done
12970     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12971     { ac_script=; unset ac_script;}
12972     if test -z "$SED"; then
12973  ac_path_SED_found=false
12974  # Loop through the user's path and test for each of PROGNAME-LIST
12975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976for as_dir in $PATH
12977do
12978  IFS=$as_save_IFS
12979  test -z "$as_dir" && as_dir=.
12980    for ac_prog in sed gsed; do
12981    for ac_exec_ext in '' $ac_executable_extensions; do
12982      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12983      as_fn_executable_p "$ac_path_SED" || continue
12984# Check for GNU ac_path_SED and select it if it is found.
12985  # Check for GNU $ac_path_SED
12986case `"$ac_path_SED" --version 2>&1` in
12987*GNU*)
12988  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12989*)
12990  ac_count=0
12991  $as_echo_n 0123456789 >"conftest.in"
12992  while :
12993  do
12994    cat "conftest.in" "conftest.in" >"conftest.tmp"
12995    mv "conftest.tmp" "conftest.in"
12996    cp "conftest.in" "conftest.nl"
12997    $as_echo '' >> "conftest.nl"
12998    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12999    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13000    as_fn_arith $ac_count + 1 && ac_count=$as_val
13001    if test $ac_count -gt ${ac_path_SED_max-0}; then
13002      # Best one so far, save it but keep looking for a better one
13003      ac_cv_path_SED="$ac_path_SED"
13004      ac_path_SED_max=$ac_count
13005    fi
13006    # 10*(2^10) chars as input seems more than enough
13007    test $ac_count -gt 10 && break
13008  done
13009  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13010esac
13011
13012      $ac_path_SED_found && break 3
13013    done
13014  done
13015  done
13016IFS=$as_save_IFS
13017  if test -z "$ac_cv_path_SED"; then
13018    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13019  fi
13020else
13021  ac_cv_path_SED=$SED
13022fi
13023
13024fi
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13026$as_echo "$ac_cv_path_SED" >&6; }
13027 SED="$ac_cv_path_SED"
13028  rm -f conftest.sed
13029
13030    else
13031      # If it succeeded, then it was overridden by the user. We will use it
13032      # for the tool.
13033
13034      # First remove it from the list of overridden variables, so we can test
13035      # for unknown variables in the end.
13036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13037
13038      # Check if we try to supply an empty value
13039      if test "x$SED" = x; then
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13041$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13043$as_echo_n "checking for SED... " >&6; }
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13045$as_echo "disabled" >&6; }
13046      else
13047        # Check if the provided tool contains a complete path.
13048        tool_specified="$SED"
13049        tool_basename="${tool_specified##*/}"
13050        if test "x$tool_basename" = "x$tool_specified"; then
13051          # A command without a complete path is provided, search $PATH.
13052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13053$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13054          # Extract the first word of "$tool_basename", so it can be a program name with args.
13055set dummy $tool_basename; ac_word=$2
13056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13057$as_echo_n "checking for $ac_word... " >&6; }
13058if ${ac_cv_path_SED+:} false; then :
13059  $as_echo_n "(cached) " >&6
13060else
13061  case $SED in
13062  [\\/]* | ?:[\\/]*)
13063  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13064  ;;
13065  *)
13066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13067for as_dir in $PATH
13068do
13069  IFS=$as_save_IFS
13070  test -z "$as_dir" && as_dir=.
13071    for ac_exec_ext in '' $ac_executable_extensions; do
13072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13073    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13075    break 2
13076  fi
13077done
13078  done
13079IFS=$as_save_IFS
13080
13081  ;;
13082esac
13083fi
13084SED=$ac_cv_path_SED
13085if test -n "$SED"; then
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13087$as_echo "$SED" >&6; }
13088else
13089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13090$as_echo "no" >&6; }
13091fi
13092
13093
13094          if test "x$SED" = x; then
13095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13096          fi
13097        else
13098          # Otherwise we believe it is a complete path. Use it as it is.
13099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13100$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13102$as_echo_n "checking for SED... " >&6; }
13103          if test ! -x "$tool_specified"; then
13104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13105$as_echo "not found" >&6; }
13106            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13107          fi
13108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13109$as_echo "$tool_specified" >&6; }
13110        fi
13111      fi
13112    fi
13113  fi
13114
13115
13116  if test "x$SED" = x; then
13117    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13118  fi
13119
13120
13121
13122  # Always force rm.
13123  RM="$RM -f"
13124
13125  # pwd behaves differently on various platforms and some don't support the -L flag.
13126  # Always use the bash builtin pwd to get uniform behavior.
13127  THEPWDCMD=pwd
13128
13129  # These are not required on all platforms
13130
13131
13132  # Publish this variable in the help.
13133
13134
13135  if [ -z "${CYGPATH+x}" ]; then
13136    # The variable is not set by user, try to locate tool using the code snippet
13137    for ac_prog in cygpath
13138do
13139  # Extract the first word of "$ac_prog", so it can be a program name with args.
13140set dummy $ac_prog; ac_word=$2
13141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13142$as_echo_n "checking for $ac_word... " >&6; }
13143if ${ac_cv_path_CYGPATH+:} false; then :
13144  $as_echo_n "(cached) " >&6
13145else
13146  case $CYGPATH in
13147  [\\/]* | ?:[\\/]*)
13148  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13149  ;;
13150  *)
13151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13152for as_dir in $PATH
13153do
13154  IFS=$as_save_IFS
13155  test -z "$as_dir" && as_dir=.
13156    for ac_exec_ext in '' $ac_executable_extensions; do
13157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13158    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13160    break 2
13161  fi
13162done
13163  done
13164IFS=$as_save_IFS
13165
13166  ;;
13167esac
13168fi
13169CYGPATH=$ac_cv_path_CYGPATH
13170if test -n "$CYGPATH"; then
13171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13172$as_echo "$CYGPATH" >&6; }
13173else
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175$as_echo "no" >&6; }
13176fi
13177
13178
13179  test -n "$CYGPATH" && break
13180done
13181
13182  else
13183    # The variable is set, but is it from the command line or the environment?
13184
13185    # Try to remove the string !CYGPATH! from our list.
13186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13188      # If it failed, the variable was not from the command line. Ignore it,
13189      # but warn the user (except for BASH, which is always set by the calling BASH).
13190      if test "xCYGPATH" != xBASH; then
13191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13192$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13193      fi
13194      # Try to locate tool using the code snippet
13195      for ac_prog in cygpath
13196do
13197  # Extract the first word of "$ac_prog", so it can be a program name with args.
13198set dummy $ac_prog; ac_word=$2
13199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13200$as_echo_n "checking for $ac_word... " >&6; }
13201if ${ac_cv_path_CYGPATH+:} false; then :
13202  $as_echo_n "(cached) " >&6
13203else
13204  case $CYGPATH in
13205  [\\/]* | ?:[\\/]*)
13206  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13207  ;;
13208  *)
13209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210for as_dir in $PATH
13211do
13212  IFS=$as_save_IFS
13213  test -z "$as_dir" && as_dir=.
13214    for ac_exec_ext in '' $ac_executable_extensions; do
13215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218    break 2
13219  fi
13220done
13221  done
13222IFS=$as_save_IFS
13223
13224  ;;
13225esac
13226fi
13227CYGPATH=$ac_cv_path_CYGPATH
13228if test -n "$CYGPATH"; then
13229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13230$as_echo "$CYGPATH" >&6; }
13231else
13232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233$as_echo "no" >&6; }
13234fi
13235
13236
13237  test -n "$CYGPATH" && break
13238done
13239
13240    else
13241      # If it succeeded, then it was overridden by the user. We will use it
13242      # for the tool.
13243
13244      # First remove it from the list of overridden variables, so we can test
13245      # for unknown variables in the end.
13246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247
13248      # Check if we try to supply an empty value
13249      if test "x$CYGPATH" = x; then
13250        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13251$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13253$as_echo_n "checking for CYGPATH... " >&6; }
13254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13255$as_echo "disabled" >&6; }
13256      else
13257        # Check if the provided tool contains a complete path.
13258        tool_specified="$CYGPATH"
13259        tool_basename="${tool_specified##*/}"
13260        if test "x$tool_basename" = "x$tool_specified"; then
13261          # A command without a complete path is provided, search $PATH.
13262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13263$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13264          # Extract the first word of "$tool_basename", so it can be a program name with args.
13265set dummy $tool_basename; ac_word=$2
13266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13267$as_echo_n "checking for $ac_word... " >&6; }
13268if ${ac_cv_path_CYGPATH+:} false; then :
13269  $as_echo_n "(cached) " >&6
13270else
13271  case $CYGPATH in
13272  [\\/]* | ?:[\\/]*)
13273  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13274  ;;
13275  *)
13276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13277for as_dir in $PATH
13278do
13279  IFS=$as_save_IFS
13280  test -z "$as_dir" && as_dir=.
13281    for ac_exec_ext in '' $ac_executable_extensions; do
13282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13283    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13285    break 2
13286  fi
13287done
13288  done
13289IFS=$as_save_IFS
13290
13291  ;;
13292esac
13293fi
13294CYGPATH=$ac_cv_path_CYGPATH
13295if test -n "$CYGPATH"; then
13296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13297$as_echo "$CYGPATH" >&6; }
13298else
13299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13300$as_echo "no" >&6; }
13301fi
13302
13303
13304          if test "x$CYGPATH" = x; then
13305            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13306          fi
13307        else
13308          # Otherwise we believe it is a complete path. Use it as it is.
13309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13310$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13311          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13312$as_echo_n "checking for CYGPATH... " >&6; }
13313          if test ! -x "$tool_specified"; then
13314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13315$as_echo "not found" >&6; }
13316            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13317          fi
13318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13319$as_echo "$tool_specified" >&6; }
13320        fi
13321      fi
13322    fi
13323  fi
13324
13325
13326
13327
13328  # Publish this variable in the help.
13329
13330
13331  if [ -z "${READLINK+x}" ]; then
13332    # The variable is not set by user, try to locate tool using the code snippet
13333    for ac_prog in greadlink readlink
13334do
13335  # Extract the first word of "$ac_prog", so it can be a program name with args.
13336set dummy $ac_prog; ac_word=$2
13337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13338$as_echo_n "checking for $ac_word... " >&6; }
13339if ${ac_cv_path_READLINK+:} false; then :
13340  $as_echo_n "(cached) " >&6
13341else
13342  case $READLINK in
13343  [\\/]* | ?:[\\/]*)
13344  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13345  ;;
13346  *)
13347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13348for as_dir in $PATH
13349do
13350  IFS=$as_save_IFS
13351  test -z "$as_dir" && as_dir=.
13352    for ac_exec_ext in '' $ac_executable_extensions; do
13353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13354    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13356    break 2
13357  fi
13358done
13359  done
13360IFS=$as_save_IFS
13361
13362  ;;
13363esac
13364fi
13365READLINK=$ac_cv_path_READLINK
13366if test -n "$READLINK"; then
13367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13368$as_echo "$READLINK" >&6; }
13369else
13370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13371$as_echo "no" >&6; }
13372fi
13373
13374
13375  test -n "$READLINK" && break
13376done
13377
13378  else
13379    # The variable is set, but is it from the command line or the environment?
13380
13381    # Try to remove the string !READLINK! from our list.
13382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13384      # If it failed, the variable was not from the command line. Ignore it,
13385      # but warn the user (except for BASH, which is always set by the calling BASH).
13386      if test "xREADLINK" != xBASH; then
13387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13388$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13389      fi
13390      # Try to locate tool using the code snippet
13391      for ac_prog in greadlink readlink
13392do
13393  # Extract the first word of "$ac_prog", so it can be a program name with args.
13394set dummy $ac_prog; ac_word=$2
13395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13396$as_echo_n "checking for $ac_word... " >&6; }
13397if ${ac_cv_path_READLINK+:} false; then :
13398  $as_echo_n "(cached) " >&6
13399else
13400  case $READLINK in
13401  [\\/]* | ?:[\\/]*)
13402  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13403  ;;
13404  *)
13405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13406for as_dir in $PATH
13407do
13408  IFS=$as_save_IFS
13409  test -z "$as_dir" && as_dir=.
13410    for ac_exec_ext in '' $ac_executable_extensions; do
13411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13412    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13414    break 2
13415  fi
13416done
13417  done
13418IFS=$as_save_IFS
13419
13420  ;;
13421esac
13422fi
13423READLINK=$ac_cv_path_READLINK
13424if test -n "$READLINK"; then
13425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13426$as_echo "$READLINK" >&6; }
13427else
13428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13429$as_echo "no" >&6; }
13430fi
13431
13432
13433  test -n "$READLINK" && break
13434done
13435
13436    else
13437      # If it succeeded, then it was overridden by the user. We will use it
13438      # for the tool.
13439
13440      # First remove it from the list of overridden variables, so we can test
13441      # for unknown variables in the end.
13442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13443
13444      # Check if we try to supply an empty value
13445      if test "x$READLINK" = x; then
13446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13447$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13449$as_echo_n "checking for READLINK... " >&6; }
13450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13451$as_echo "disabled" >&6; }
13452      else
13453        # Check if the provided tool contains a complete path.
13454        tool_specified="$READLINK"
13455        tool_basename="${tool_specified##*/}"
13456        if test "x$tool_basename" = "x$tool_specified"; then
13457          # A command without a complete path is provided, search $PATH.
13458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13459$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13460          # Extract the first word of "$tool_basename", so it can be a program name with args.
13461set dummy $tool_basename; ac_word=$2
13462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13463$as_echo_n "checking for $ac_word... " >&6; }
13464if ${ac_cv_path_READLINK+:} false; then :
13465  $as_echo_n "(cached) " >&6
13466else
13467  case $READLINK in
13468  [\\/]* | ?:[\\/]*)
13469  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13470  ;;
13471  *)
13472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13473for as_dir in $PATH
13474do
13475  IFS=$as_save_IFS
13476  test -z "$as_dir" && as_dir=.
13477    for ac_exec_ext in '' $ac_executable_extensions; do
13478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13479    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13481    break 2
13482  fi
13483done
13484  done
13485IFS=$as_save_IFS
13486
13487  ;;
13488esac
13489fi
13490READLINK=$ac_cv_path_READLINK
13491if test -n "$READLINK"; then
13492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13493$as_echo "$READLINK" >&6; }
13494else
13495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13496$as_echo "no" >&6; }
13497fi
13498
13499
13500          if test "x$READLINK" = x; then
13501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13502          fi
13503        else
13504          # Otherwise we believe it is a complete path. Use it as it is.
13505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13506$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13508$as_echo_n "checking for READLINK... " >&6; }
13509          if test ! -x "$tool_specified"; then
13510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13511$as_echo "not found" >&6; }
13512            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13513          fi
13514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13515$as_echo "$tool_specified" >&6; }
13516        fi
13517      fi
13518    fi
13519  fi
13520
13521
13522
13523
13524  # Publish this variable in the help.
13525
13526
13527  if [ -z "${DF+x}" ]; then
13528    # The variable is not set by user, try to locate tool using the code snippet
13529    for ac_prog in df
13530do
13531  # Extract the first word of "$ac_prog", so it can be a program name with args.
13532set dummy $ac_prog; ac_word=$2
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13534$as_echo_n "checking for $ac_word... " >&6; }
13535if ${ac_cv_path_DF+:} false; then :
13536  $as_echo_n "(cached) " >&6
13537else
13538  case $DF in
13539  [\\/]* | ?:[\\/]*)
13540  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13541  ;;
13542  *)
13543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13544for as_dir in $PATH
13545do
13546  IFS=$as_save_IFS
13547  test -z "$as_dir" && as_dir=.
13548    for ac_exec_ext in '' $ac_executable_extensions; do
13549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13550    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13552    break 2
13553  fi
13554done
13555  done
13556IFS=$as_save_IFS
13557
13558  ;;
13559esac
13560fi
13561DF=$ac_cv_path_DF
13562if test -n "$DF"; then
13563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13564$as_echo "$DF" >&6; }
13565else
13566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13567$as_echo "no" >&6; }
13568fi
13569
13570
13571  test -n "$DF" && break
13572done
13573
13574  else
13575    # The variable is set, but is it from the command line or the environment?
13576
13577    # Try to remove the string !DF! from our list.
13578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13580      # If it failed, the variable was not from the command line. Ignore it,
13581      # but warn the user (except for BASH, which is always set by the calling BASH).
13582      if test "xDF" != xBASH; then
13583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13584$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13585      fi
13586      # Try to locate tool using the code snippet
13587      for ac_prog in df
13588do
13589  # Extract the first word of "$ac_prog", so it can be a program name with args.
13590set dummy $ac_prog; ac_word=$2
13591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13592$as_echo_n "checking for $ac_word... " >&6; }
13593if ${ac_cv_path_DF+:} false; then :
13594  $as_echo_n "(cached) " >&6
13595else
13596  case $DF in
13597  [\\/]* | ?:[\\/]*)
13598  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13599  ;;
13600  *)
13601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13602for as_dir in $PATH
13603do
13604  IFS=$as_save_IFS
13605  test -z "$as_dir" && as_dir=.
13606    for ac_exec_ext in '' $ac_executable_extensions; do
13607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13608    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13610    break 2
13611  fi
13612done
13613  done
13614IFS=$as_save_IFS
13615
13616  ;;
13617esac
13618fi
13619DF=$ac_cv_path_DF
13620if test -n "$DF"; then
13621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13622$as_echo "$DF" >&6; }
13623else
13624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13625$as_echo "no" >&6; }
13626fi
13627
13628
13629  test -n "$DF" && break
13630done
13631
13632    else
13633      # If it succeeded, then it was overridden by the user. We will use it
13634      # for the tool.
13635
13636      # First remove it from the list of overridden variables, so we can test
13637      # for unknown variables in the end.
13638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13639
13640      # Check if we try to supply an empty value
13641      if test "x$DF" = x; then
13642        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13643$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13645$as_echo_n "checking for DF... " >&6; }
13646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13647$as_echo "disabled" >&6; }
13648      else
13649        # Check if the provided tool contains a complete path.
13650        tool_specified="$DF"
13651        tool_basename="${tool_specified##*/}"
13652        if test "x$tool_basename" = "x$tool_specified"; then
13653          # A command without a complete path is provided, search $PATH.
13654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13655$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13656          # Extract the first word of "$tool_basename", so it can be a program name with args.
13657set dummy $tool_basename; ac_word=$2
13658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13659$as_echo_n "checking for $ac_word... " >&6; }
13660if ${ac_cv_path_DF+:} false; then :
13661  $as_echo_n "(cached) " >&6
13662else
13663  case $DF in
13664  [\\/]* | ?:[\\/]*)
13665  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13666  ;;
13667  *)
13668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13669for as_dir in $PATH
13670do
13671  IFS=$as_save_IFS
13672  test -z "$as_dir" && as_dir=.
13673    for ac_exec_ext in '' $ac_executable_extensions; do
13674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13675    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13677    break 2
13678  fi
13679done
13680  done
13681IFS=$as_save_IFS
13682
13683  ;;
13684esac
13685fi
13686DF=$ac_cv_path_DF
13687if test -n "$DF"; then
13688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13689$as_echo "$DF" >&6; }
13690else
13691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13692$as_echo "no" >&6; }
13693fi
13694
13695
13696          if test "x$DF" = x; then
13697            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13698          fi
13699        else
13700          # Otherwise we believe it is a complete path. Use it as it is.
13701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13702$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13703          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13704$as_echo_n "checking for DF... " >&6; }
13705          if test ! -x "$tool_specified"; then
13706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13707$as_echo "not found" >&6; }
13708            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13709          fi
13710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13711$as_echo "$tool_specified" >&6; }
13712        fi
13713      fi
13714    fi
13715  fi
13716
13717
13718
13719
13720  # Publish this variable in the help.
13721
13722
13723  if [ -z "${CPIO+x}" ]; then
13724    # The variable is not set by user, try to locate tool using the code snippet
13725    for ac_prog in cpio bsdcpio
13726do
13727  # Extract the first word of "$ac_prog", so it can be a program name with args.
13728set dummy $ac_prog; ac_word=$2
13729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13730$as_echo_n "checking for $ac_word... " >&6; }
13731if ${ac_cv_path_CPIO+:} false; then :
13732  $as_echo_n "(cached) " >&6
13733else
13734  case $CPIO in
13735  [\\/]* | ?:[\\/]*)
13736  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13737  ;;
13738  *)
13739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13740for as_dir in $PATH
13741do
13742  IFS=$as_save_IFS
13743  test -z "$as_dir" && as_dir=.
13744    for ac_exec_ext in '' $ac_executable_extensions; do
13745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13746    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13748    break 2
13749  fi
13750done
13751  done
13752IFS=$as_save_IFS
13753
13754  ;;
13755esac
13756fi
13757CPIO=$ac_cv_path_CPIO
13758if test -n "$CPIO"; then
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13760$as_echo "$CPIO" >&6; }
13761else
13762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13763$as_echo "no" >&6; }
13764fi
13765
13766
13767  test -n "$CPIO" && break
13768done
13769
13770  else
13771    # The variable is set, but is it from the command line or the environment?
13772
13773    # Try to remove the string !CPIO! from our list.
13774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13776      # If it failed, the variable was not from the command line. Ignore it,
13777      # but warn the user (except for BASH, which is always set by the calling BASH).
13778      if test "xCPIO" != xBASH; then
13779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13780$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13781      fi
13782      # Try to locate tool using the code snippet
13783      for ac_prog in cpio bsdcpio
13784do
13785  # Extract the first word of "$ac_prog", so it can be a program name with args.
13786set dummy $ac_prog; ac_word=$2
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13788$as_echo_n "checking for $ac_word... " >&6; }
13789if ${ac_cv_path_CPIO+:} false; then :
13790  $as_echo_n "(cached) " >&6
13791else
13792  case $CPIO in
13793  [\\/]* | ?:[\\/]*)
13794  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13795  ;;
13796  *)
13797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13798for as_dir in $PATH
13799do
13800  IFS=$as_save_IFS
13801  test -z "$as_dir" && as_dir=.
13802    for ac_exec_ext in '' $ac_executable_extensions; do
13803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13804    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13806    break 2
13807  fi
13808done
13809  done
13810IFS=$as_save_IFS
13811
13812  ;;
13813esac
13814fi
13815CPIO=$ac_cv_path_CPIO
13816if test -n "$CPIO"; then
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13818$as_echo "$CPIO" >&6; }
13819else
13820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13821$as_echo "no" >&6; }
13822fi
13823
13824
13825  test -n "$CPIO" && break
13826done
13827
13828    else
13829      # If it succeeded, then it was overridden by the user. We will use it
13830      # for the tool.
13831
13832      # First remove it from the list of overridden variables, so we can test
13833      # for unknown variables in the end.
13834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13835
13836      # Check if we try to supply an empty value
13837      if test "x$CPIO" = x; then
13838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
13839$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
13840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13841$as_echo_n "checking for CPIO... " >&6; }
13842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13843$as_echo "disabled" >&6; }
13844      else
13845        # Check if the provided tool contains a complete path.
13846        tool_specified="$CPIO"
13847        tool_basename="${tool_specified##*/}"
13848        if test "x$tool_basename" = "x$tool_specified"; then
13849          # A command without a complete path is provided, search $PATH.
13850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13851$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13852          # Extract the first word of "$tool_basename", so it can be a program name with args.
13853set dummy $tool_basename; ac_word=$2
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13855$as_echo_n "checking for $ac_word... " >&6; }
13856if ${ac_cv_path_CPIO+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  case $CPIO in
13860  [\\/]* | ?:[\\/]*)
13861  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13862  ;;
13863  *)
13864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13865for as_dir in $PATH
13866do
13867  IFS=$as_save_IFS
13868  test -z "$as_dir" && as_dir=.
13869    for ac_exec_ext in '' $ac_executable_extensions; do
13870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13871    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13873    break 2
13874  fi
13875done
13876  done
13877IFS=$as_save_IFS
13878
13879  ;;
13880esac
13881fi
13882CPIO=$ac_cv_path_CPIO
13883if test -n "$CPIO"; then
13884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13885$as_echo "$CPIO" >&6; }
13886else
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; }
13889fi
13890
13891
13892          if test "x$CPIO" = x; then
13893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13894          fi
13895        else
13896          # Otherwise we believe it is a complete path. Use it as it is.
13897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13898$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13900$as_echo_n "checking for CPIO... " >&6; }
13901          if test ! -x "$tool_specified"; then
13902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13903$as_echo "not found" >&6; }
13904            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13905          fi
13906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13907$as_echo "$tool_specified" >&6; }
13908        fi
13909      fi
13910    fi
13911  fi
13912
13913
13914
13915
13916  # Publish this variable in the help.
13917
13918
13919  if [ -z "${NICE+x}" ]; then
13920    # The variable is not set by user, try to locate tool using the code snippet
13921    for ac_prog in nice
13922do
13923  # Extract the first word of "$ac_prog", so it can be a program name with args.
13924set dummy $ac_prog; ac_word=$2
13925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13926$as_echo_n "checking for $ac_word... " >&6; }
13927if ${ac_cv_path_NICE+:} false; then :
13928  $as_echo_n "(cached) " >&6
13929else
13930  case $NICE in
13931  [\\/]* | ?:[\\/]*)
13932  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
13933  ;;
13934  *)
13935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13936for as_dir in $PATH
13937do
13938  IFS=$as_save_IFS
13939  test -z "$as_dir" && as_dir=.
13940    for ac_exec_ext in '' $ac_executable_extensions; do
13941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13942    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
13943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13944    break 2
13945  fi
13946done
13947  done
13948IFS=$as_save_IFS
13949
13950  ;;
13951esac
13952fi
13953NICE=$ac_cv_path_NICE
13954if test -n "$NICE"; then
13955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
13956$as_echo "$NICE" >&6; }
13957else
13958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13959$as_echo "no" >&6; }
13960fi
13961
13962
13963  test -n "$NICE" && break
13964done
13965
13966  else
13967    # The variable is set, but is it from the command line or the environment?
13968
13969    # Try to remove the string !NICE! from our list.
13970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
13971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13972      # If it failed, the variable was not from the command line. Ignore it,
13973      # but warn the user (except for BASH, which is always set by the calling BASH).
13974      if test "xNICE" != xBASH; then
13975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
13976$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
13977      fi
13978      # Try to locate tool using the code snippet
13979      for ac_prog in nice
13980do
13981  # Extract the first word of "$ac_prog", so it can be a program name with args.
13982set dummy $ac_prog; ac_word=$2
13983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13984$as_echo_n "checking for $ac_word... " >&6; }
13985if ${ac_cv_path_NICE+:} false; then :
13986  $as_echo_n "(cached) " >&6
13987else
13988  case $NICE in
13989  [\\/]* | ?:[\\/]*)
13990  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
13991  ;;
13992  *)
13993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13994for as_dir in $PATH
13995do
13996  IFS=$as_save_IFS
13997  test -z "$as_dir" && as_dir=.
13998    for ac_exec_ext in '' $ac_executable_extensions; do
13999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14000    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14002    break 2
14003  fi
14004done
14005  done
14006IFS=$as_save_IFS
14007
14008  ;;
14009esac
14010fi
14011NICE=$ac_cv_path_NICE
14012if test -n "$NICE"; then
14013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14014$as_echo "$NICE" >&6; }
14015else
14016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14017$as_echo "no" >&6; }
14018fi
14019
14020
14021  test -n "$NICE" && break
14022done
14023
14024    else
14025      # If it succeeded, then it was overridden by the user. We will use it
14026      # for the tool.
14027
14028      # First remove it from the list of overridden variables, so we can test
14029      # for unknown variables in the end.
14030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14031
14032      # Check if we try to supply an empty value
14033      if test "x$NICE" = x; then
14034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14035$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14037$as_echo_n "checking for NICE... " >&6; }
14038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14039$as_echo "disabled" >&6; }
14040      else
14041        # Check if the provided tool contains a complete path.
14042        tool_specified="$NICE"
14043        tool_basename="${tool_specified##*/}"
14044        if test "x$tool_basename" = "x$tool_specified"; then
14045          # A command without a complete path is provided, search $PATH.
14046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14047$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14048          # Extract the first word of "$tool_basename", so it can be a program name with args.
14049set dummy $tool_basename; ac_word=$2
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14051$as_echo_n "checking for $ac_word... " >&6; }
14052if ${ac_cv_path_NICE+:} false; then :
14053  $as_echo_n "(cached) " >&6
14054else
14055  case $NICE in
14056  [\\/]* | ?:[\\/]*)
14057  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14058  ;;
14059  *)
14060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14061for as_dir in $PATH
14062do
14063  IFS=$as_save_IFS
14064  test -z "$as_dir" && as_dir=.
14065    for ac_exec_ext in '' $ac_executable_extensions; do
14066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14067    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14069    break 2
14070  fi
14071done
14072  done
14073IFS=$as_save_IFS
14074
14075  ;;
14076esac
14077fi
14078NICE=$ac_cv_path_NICE
14079if test -n "$NICE"; then
14080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14081$as_echo "$NICE" >&6; }
14082else
14083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14084$as_echo "no" >&6; }
14085fi
14086
14087
14088          if test "x$NICE" = x; then
14089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14090          fi
14091        else
14092          # Otherwise we believe it is a complete path. Use it as it is.
14093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14094$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14096$as_echo_n "checking for NICE... " >&6; }
14097          if test ! -x "$tool_specified"; then
14098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14099$as_echo "not found" >&6; }
14100            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14101          fi
14102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14103$as_echo "$tool_specified" >&6; }
14104        fi
14105      fi
14106    fi
14107  fi
14108
14109
14110
14111
14112# Now we can determine OpenJDK build and target platforms. This is required to
14113# have early on.
14114# Make sure we can run config.sub.
14115$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14116  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14117
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14119$as_echo_n "checking build system type... " >&6; }
14120if ${ac_cv_build+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123  ac_build_alias=$build_alias
14124test "x$ac_build_alias" = x &&
14125  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14126test "x$ac_build_alias" = x &&
14127  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14128ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14129  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14130
14131fi
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14133$as_echo "$ac_cv_build" >&6; }
14134case $ac_cv_build in
14135*-*-*) ;;
14136*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14137esac
14138build=$ac_cv_build
14139ac_save_IFS=$IFS; IFS='-'
14140set x $ac_cv_build
14141shift
14142build_cpu=$1
14143build_vendor=$2
14144shift; shift
14145# Remember, the first character of IFS is used to create $*,
14146# except with old shells:
14147build_os=$*
14148IFS=$ac_save_IFS
14149case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14150
14151
14152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14153$as_echo_n "checking host system type... " >&6; }
14154if ${ac_cv_host+:} false; then :
14155  $as_echo_n "(cached) " >&6
14156else
14157  if test "x$host_alias" = x; then
14158  ac_cv_host=$ac_cv_build
14159else
14160  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14161    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14162fi
14163
14164fi
14165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14166$as_echo "$ac_cv_host" >&6; }
14167case $ac_cv_host in
14168*-*-*) ;;
14169*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14170esac
14171host=$ac_cv_host
14172ac_save_IFS=$IFS; IFS='-'
14173set x $ac_cv_host
14174shift
14175host_cpu=$1
14176host_vendor=$2
14177shift; shift
14178# Remember, the first character of IFS is used to create $*,
14179# except with old shells:
14180host_os=$*
14181IFS=$ac_save_IFS
14182case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14183
14184
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14186$as_echo_n "checking target system type... " >&6; }
14187if ${ac_cv_target+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190  if test "x$target_alias" = x; then
14191  ac_cv_target=$ac_cv_host
14192else
14193  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14194    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14195fi
14196
14197fi
14198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14199$as_echo "$ac_cv_target" >&6; }
14200case $ac_cv_target in
14201*-*-*) ;;
14202*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14203esac
14204target=$ac_cv_target
14205ac_save_IFS=$IFS; IFS='-'
14206set x $ac_cv_target
14207shift
14208target_cpu=$1
14209target_vendor=$2
14210shift; shift
14211# Remember, the first character of IFS is used to create $*,
14212# except with old shells:
14213target_os=$*
14214IFS=$ac_save_IFS
14215case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14216
14217
14218# The aliases save the names the user supplied, while $host etc.
14219# will get canonicalized.
14220test -n "$target_alias" &&
14221  test "$program_prefix$program_suffix$program_transform_name" = \
14222    NONENONEs,x,x, &&
14223  program_prefix=${target_alias}-
14224
14225  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14226  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14227  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14228  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14229  # to use the configure naming style.
14230
14231
14232
14233
14234
14235  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14236  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14237  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14238  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14239  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14240  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14241
14242
14243
14244  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14245
14246  case "$build_os" in
14247    *linux*)
14248      VAR_OS=linux
14249      VAR_OS_TYPE=unix
14250      ;;
14251    *solaris*)
14252      VAR_OS=solaris
14253      VAR_OS_TYPE=unix
14254      ;;
14255    *darwin*)
14256      VAR_OS=macosx
14257      VAR_OS_TYPE=unix
14258      ;;
14259    *bsd*)
14260      VAR_OS=bsd
14261      VAR_OS_TYPE=unix
14262      ;;
14263    *cygwin*)
14264      VAR_OS=windows
14265      VAR_OS_ENV=windows.cygwin
14266      ;;
14267    *mingw*)
14268      VAR_OS=windows
14269      VAR_OS_ENV=windows.msys
14270      ;;
14271    *aix*)
14272      VAR_OS=aix
14273      VAR_OS_TYPE=unix
14274      ;;
14275    *)
14276      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14277      ;;
14278  esac
14279
14280
14281  # First argument is the cpu name from the trip/quad
14282  case "$build_cpu" in
14283    x86_64)
14284      VAR_CPU=x86_64
14285      VAR_CPU_ARCH=x86
14286      VAR_CPU_BITS=64
14287      VAR_CPU_ENDIAN=little
14288      ;;
14289    i?86)
14290      VAR_CPU=x86
14291      VAR_CPU_ARCH=x86
14292      VAR_CPU_BITS=32
14293      VAR_CPU_ENDIAN=little
14294      ;;
14295    arm*)
14296      VAR_CPU=arm
14297      VAR_CPU_ARCH=arm
14298      VAR_CPU_BITS=32
14299      VAR_CPU_ENDIAN=little
14300      ;;
14301    aarch64)
14302      VAR_CPU=aarch64
14303      VAR_CPU_ARCH=aarch64
14304      VAR_CPU_BITS=64
14305      VAR_CPU_ENDIAN=little
14306      ;;
14307    powerpc)
14308      VAR_CPU=ppc
14309      VAR_CPU_ARCH=ppc
14310      VAR_CPU_BITS=32
14311      VAR_CPU_ENDIAN=big
14312      ;;
14313    powerpc64)
14314      VAR_CPU=ppc64
14315      VAR_CPU_ARCH=ppc
14316      VAR_CPU_BITS=64
14317      VAR_CPU_ENDIAN=big
14318      ;;
14319    powerpc64le)
14320      VAR_CPU=ppc64
14321      VAR_CPU_ARCH=ppc
14322      VAR_CPU_BITS=64
14323      VAR_CPU_ENDIAN=little
14324      ;;
14325    s390)
14326      VAR_CPU=s390
14327      VAR_CPU_ARCH=s390
14328      VAR_CPU_BITS=32
14329      VAR_CPU_ENDIAN=big
14330      ;;
14331    s390x)
14332      VAR_CPU=s390x
14333      VAR_CPU_ARCH=s390
14334      VAR_CPU_BITS=64
14335      VAR_CPU_ENDIAN=big
14336      ;;
14337    sparc)
14338      VAR_CPU=sparc
14339      VAR_CPU_ARCH=sparc
14340      VAR_CPU_BITS=32
14341      VAR_CPU_ENDIAN=big
14342      ;;
14343    sparcv9|sparc64)
14344      VAR_CPU=sparcv9
14345      VAR_CPU_ARCH=sparc
14346      VAR_CPU_BITS=64
14347      VAR_CPU_ENDIAN=big
14348      ;;
14349    *)
14350      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14351      ;;
14352  esac
14353
14354  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14355  OPENJDK_BUILD_OS="$VAR_OS"
14356  if test "x$VAR_OS_TYPE" != x; then
14357    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14358  else
14359    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14360  fi
14361  if test "x$VAR_OS_ENV" != x; then
14362    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14363  else
14364    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14365  fi
14366  OPENJDK_BUILD_CPU="$VAR_CPU"
14367  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14368  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14369  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14370
14371
14372
14373
14374
14375
14376
14377
14378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14379$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14381$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14382
14383  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14384
14385  case "$host_os" in
14386    *linux*)
14387      VAR_OS=linux
14388      VAR_OS_TYPE=unix
14389      ;;
14390    *solaris*)
14391      VAR_OS=solaris
14392      VAR_OS_TYPE=unix
14393      ;;
14394    *darwin*)
14395      VAR_OS=macosx
14396      VAR_OS_TYPE=unix
14397      ;;
14398    *bsd*)
14399      VAR_OS=bsd
14400      VAR_OS_TYPE=unix
14401      ;;
14402    *cygwin*)
14403      VAR_OS=windows
14404      VAR_OS_ENV=windows.cygwin
14405      ;;
14406    *mingw*)
14407      VAR_OS=windows
14408      VAR_OS_ENV=windows.msys
14409      ;;
14410    *aix*)
14411      VAR_OS=aix
14412      VAR_OS_TYPE=unix
14413      ;;
14414    *)
14415      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14416      ;;
14417  esac
14418
14419
14420  # First argument is the cpu name from the trip/quad
14421  case "$host_cpu" in
14422    x86_64)
14423      VAR_CPU=x86_64
14424      VAR_CPU_ARCH=x86
14425      VAR_CPU_BITS=64
14426      VAR_CPU_ENDIAN=little
14427      ;;
14428    i?86)
14429      VAR_CPU=x86
14430      VAR_CPU_ARCH=x86
14431      VAR_CPU_BITS=32
14432      VAR_CPU_ENDIAN=little
14433      ;;
14434    arm*)
14435      VAR_CPU=arm
14436      VAR_CPU_ARCH=arm
14437      VAR_CPU_BITS=32
14438      VAR_CPU_ENDIAN=little
14439      ;;
14440    aarch64)
14441      VAR_CPU=aarch64
14442      VAR_CPU_ARCH=aarch64
14443      VAR_CPU_BITS=64
14444      VAR_CPU_ENDIAN=little
14445      ;;
14446    powerpc)
14447      VAR_CPU=ppc
14448      VAR_CPU_ARCH=ppc
14449      VAR_CPU_BITS=32
14450      VAR_CPU_ENDIAN=big
14451      ;;
14452    powerpc64)
14453      VAR_CPU=ppc64
14454      VAR_CPU_ARCH=ppc
14455      VAR_CPU_BITS=64
14456      VAR_CPU_ENDIAN=big
14457      ;;
14458    powerpc64le)
14459      VAR_CPU=ppc64
14460      VAR_CPU_ARCH=ppc
14461      VAR_CPU_BITS=64
14462      VAR_CPU_ENDIAN=little
14463      ;;
14464    s390)
14465      VAR_CPU=s390
14466      VAR_CPU_ARCH=s390
14467      VAR_CPU_BITS=32
14468      VAR_CPU_ENDIAN=big
14469      ;;
14470    s390x)
14471      VAR_CPU=s390x
14472      VAR_CPU_ARCH=s390
14473      VAR_CPU_BITS=64
14474      VAR_CPU_ENDIAN=big
14475      ;;
14476    sparc)
14477      VAR_CPU=sparc
14478      VAR_CPU_ARCH=sparc
14479      VAR_CPU_BITS=32
14480      VAR_CPU_ENDIAN=big
14481      ;;
14482    sparcv9|sparc64)
14483      VAR_CPU=sparcv9
14484      VAR_CPU_ARCH=sparc
14485      VAR_CPU_BITS=64
14486      VAR_CPU_ENDIAN=big
14487      ;;
14488    *)
14489      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14490      ;;
14491  esac
14492
14493  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14494  OPENJDK_TARGET_OS="$VAR_OS"
14495  if test "x$VAR_OS_TYPE" != x; then
14496    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14497  else
14498    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14499  fi
14500  if test "x$VAR_OS_ENV" != x; then
14501    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14502  else
14503    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14504  fi
14505  OPENJDK_TARGET_CPU="$VAR_CPU"
14506  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14507  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14508  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14509
14510
14511
14512
14513
14514
14515
14516
14517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14518$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14520$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14521
14522
14523
14524# Check whether --with-target-bits was given.
14525if test "${with_target_bits+set}" = set; then :
14526  withval=$with_target_bits;
14527fi
14528
14529
14530  # We have three types of compiles:
14531  # native  == normal compilation, target system == build system
14532  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14533  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14534  #
14535  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14536    # We're doing a proper cross-compilation
14537    COMPILE_TYPE="cross"
14538  else
14539    COMPILE_TYPE="native"
14540  fi
14541
14542  if test "x$with_target_bits" != x; then
14543    if test "x$COMPILE_TYPE" = "xcross"; then
14544      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14545    fi
14546
14547    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14548      # A reduced build is requested
14549      COMPILE_TYPE="reduced"
14550      OPENJDK_TARGET_CPU_BITS=32
14551      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14552        OPENJDK_TARGET_CPU=x86
14553      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14554        OPENJDK_TARGET_CPU=sparc
14555      else
14556        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14557      fi
14558    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14559      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
14560    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14561      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14562$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14563    else
14564      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14565    fi
14566  fi
14567
14568
14569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14570$as_echo_n "checking compilation type... " >&6; }
14571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14572$as_echo "$COMPILE_TYPE" >&6; }
14573
14574
14575  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14576    REQUIRED_OS_NAME=SunOS
14577    REQUIRED_OS_VERSION=5.10
14578  fi
14579  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14580    REQUIRED_OS_NAME=Linux
14581    REQUIRED_OS_VERSION=2.6
14582  fi
14583  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14584    REQUIRED_OS_NAME=Windows
14585    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14586      REQUIRED_OS_VERSION=5.2
14587    else
14588      REQUIRED_OS_VERSION=5.1
14589    fi
14590  fi
14591  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14592    REQUIRED_OS_NAME=Darwin
14593    REQUIRED_OS_VERSION=11.2
14594  fi
14595
14596
14597
14598
14599
14600  # Also store the legacy naming of the cpu.
14601  # Ie i586 and amd64 instead of x86 and x86_64
14602  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14603  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14604    OPENJDK_TARGET_CPU_LEGACY="i586"
14605  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14606    # On all platforms except MacOSX replace x86_64 with amd64.
14607    OPENJDK_TARGET_CPU_LEGACY="amd64"
14608  fi
14609
14610
14611  # And the second legacy naming of the cpu.
14612  # Ie i386 and amd64 instead of x86 and x86_64.
14613  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14614  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14615    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14616  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14617    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14618  fi
14619
14620
14621  # This is the name of the cpu (but using i386 and amd64 instead of
14622  # x86 and x86_64, respectively), preceeded by a /, to be used when
14623  # locating libraries. On macosx, it's empty, though.
14624  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14625  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14626    OPENJDK_TARGET_CPU_LIBDIR=""
14627  fi
14628
14629
14630  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14631  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14632  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14633  OPENJDK_TARGET_CPU_ISADIR=""
14634  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14635    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14636      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14637    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14638      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14639    fi
14640  fi
14641
14642
14643  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14644  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14645  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14646    # On linux only, we replace x86 with i386.
14647    OPENJDK_TARGET_CPU_OSARCH="i386"
14648  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14649    # On all platforms except macosx, we replace x86_64 with amd64.
14650    OPENJDK_TARGET_CPU_OSARCH="amd64"
14651  fi
14652
14653
14654  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14655  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14656    OPENJDK_TARGET_CPU_JLI="i386"
14657  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14658    # On all platforms except macosx, we replace x86_64 with amd64.
14659    OPENJDK_TARGET_CPU_JLI="amd64"
14660  fi
14661  # Now setup the -D flags for building libjli.
14662  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14663  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14664    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14665      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14666    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14667      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14668    fi
14669  fi
14670
14671
14672  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14673      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14674  else
14675      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14676  fi
14677
14678
14679  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14680    A_LP64="LP64:="
14681    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14682    # unpack200.exe
14683    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14684      ADD_LP64="-D_LP64=1"
14685    fi
14686  fi
14687  LP64=$A_LP64
14688
14689
14690  if test "x$COMPILE_TYPE" = "xcross"; then
14691    # FIXME: ... or should this include reduced builds..?
14692    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14693  else
14694    DEFINE_CROSS_COMPILE_ARCH=""
14695  fi
14696
14697
14698  # ZERO_ARCHDEF is used to enable architecture-specific code
14699  case "${OPENJDK_TARGET_CPU}" in
14700    ppc)     ZERO_ARCHDEF=PPC32 ;;
14701    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14702    s390*)   ZERO_ARCHDEF=S390  ;;
14703    sparc*)  ZERO_ARCHDEF=SPARC ;;
14704    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14705    x86)     ZERO_ARCHDEF=IA32  ;;
14706    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14707  esac
14708
14709
14710
14711
14712# Continue setting up basic stuff. Most remaining code require fundamental tools.
14713
14714  # Save the current directory this script was started from
14715  CURDIR="$PWD"
14716
14717  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14718  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14719  # was not available at that time.
14720  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14721  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14722    ORIGINAL_PATH="$REWRITTEN_PATH"
14723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14724$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14725  fi
14726
14727  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14728    PATH_SEP=";"
14729
14730  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14731  if test $SRC_ROOT_LENGTH -gt 100; then
14732    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14733  fi
14734
14735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14737$as_echo_n "checking cygwin release... " >&6; }
14738    CYGWIN_VERSION=`$UNAME -r`
14739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14740$as_echo "$CYGWIN_VERSION" >&6; }
14741    WINDOWS_ENV_VENDOR='cygwin'
14742    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14743
14744    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14745    if test "x$CYGWIN_VERSION_OLD" != x; then
14746      { $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
14747$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;}
14748      as_fn_error $? "Cannot continue" "$LINENO" 5
14749    fi
14750    if test "x$CYGPATH" = x; then
14751      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14752    fi
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14754$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14755    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14756    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14757    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14758    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14760$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14761    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14762    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14763    if test "x$test_cygdrive_prefix" = x; then
14764      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14765    fi
14766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14768$as_echo_n "checking msys release... " >&6; }
14769    MSYS_VERSION=`$UNAME -r`
14770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14771$as_echo "$MSYS_VERSION" >&6; }
14772
14773    WINDOWS_ENV_VENDOR='msys'
14774    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14775
14776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14777$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14778    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14779    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14780
14781  windows_path="$MSYS_ROOT_PATH"
14782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14783    unix_path=`$CYGPATH -u "$windows_path"`
14784    MSYS_ROOT_PATH="$unix_path"
14785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14787    MSYS_ROOT_PATH="$unix_path"
14788  fi
14789
14790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14791$as_echo "$MSYS_ROOT_PATH" >&6; }
14792    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14793  else
14794    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14795  fi
14796
14797  # Test if windows or unix (cygwin/msys) find is first in path.
14798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14799$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14800  FIND_BINARY_OUTPUT=`find --version 2>&1`
14801  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14803$as_echo "unix style" >&6; }
14804  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14806$as_echo "Windows" >&6; }
14807    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14808$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14809    { $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
14810$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14811    as_fn_error $? "Cannot continue" "$LINENO" 5
14812  else
14813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14814$as_echo "unknown" >&6; }
14815    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14816$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14817  fi
14818
14819  else
14820    PATH_SEP=":"
14821  fi
14822
14823
14824  # We get the top-level directory from the supporting wrappers.
14825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14826$as_echo_n "checking for top-level directory... " >&6; }
14827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14828$as_echo "$TOPDIR" >&6; }
14829
14830
14831  # Save the original version of TOPDIR for string comparisons
14832  ORIGINAL_TOPDIR="$TOPDIR"
14833
14834
14835  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14836
14837  # Only process if variable expands to non-empty
14838
14839  if test "x$CURDIR" != x; then
14840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14841
14842  # Input might be given as Windows format, start by converting to
14843  # unix format.
14844  path="$CURDIR"
14845  new_path=`$CYGPATH -u "$path"`
14846
14847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14850  # "foo.exe" is OK but "foo" is an error.
14851  #
14852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14853  # It is also a way to make sure we got the proper file name for the real test later on.
14854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14855  if test "x$test_shortpath" = x; then
14856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14857$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14858    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14859  fi
14860
14861  # Call helper function which possibly converts this using DOS-style short mode.
14862  # If so, the updated path is stored in $new_path.
14863
14864  input_path="$new_path"
14865  # Check if we need to convert this using DOS-style short mode. If the path
14866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14867  # take no chances and rewrite it.
14868  # Note: m4 eats our [], so we need to use [ and ] instead.
14869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14870  if test "x$has_forbidden_chars" != x; then
14871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14875      # Going to short mode and back again did indeed matter. Since short mode is
14876      # case insensitive, let's make it lowercase to improve readability.
14877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14878      # Now convert it back to Unix-style (cygpath)
14879      input_path=`$CYGPATH -u "$shortmode_path"`
14880      new_path="$input_path"
14881    fi
14882  fi
14883
14884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14885  if test "x$test_cygdrive_prefix" = x; then
14886    # As a simple fix, exclude /usr/bin since it's not a real path.
14887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14889      # a path prefixed by /cygdrive for fixpath to work.
14890      new_path="$CYGWIN_ROOT_PATH$input_path"
14891    fi
14892  fi
14893
14894
14895  if test "x$path" != "x$new_path"; then
14896    CURDIR="$new_path"
14897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14898$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14899  fi
14900
14901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14902
14903  path="$CURDIR"
14904  has_colon=`$ECHO $path | $GREP ^.:`
14905  new_path="$path"
14906  if test "x$has_colon" = x; then
14907    # Not in mixed or Windows style, start by that.
14908    new_path=`cmd //c echo $path`
14909  fi
14910
14911
14912  input_path="$new_path"
14913  # Check if we need to convert this using DOS-style short mode. If the path
14914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14915  # take no chances and rewrite it.
14916  # Note: m4 eats our [], so we need to use [ and ] instead.
14917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14918  if test "x$has_forbidden_chars" != x; then
14919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14921  fi
14922
14923
14924  windows_path="$new_path"
14925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14926    unix_path=`$CYGPATH -u "$windows_path"`
14927    new_path="$unix_path"
14928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14930    new_path="$unix_path"
14931  fi
14932
14933  if test "x$path" != "x$new_path"; then
14934    CURDIR="$new_path"
14935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14936$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14937  fi
14938
14939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14941
14942    else
14943      # We're on a unix platform. Hooray! :)
14944      path="$CURDIR"
14945      has_space=`$ECHO "$path" | $GREP " "`
14946      if test "x$has_space" != x; then
14947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14948$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14950      fi
14951
14952      # Use eval to expand a potential ~
14953      eval path="$path"
14954      if test ! -f "$path" && test ! -d "$path"; then
14955        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14956      fi
14957
14958      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14959    fi
14960  fi
14961
14962
14963  # Only process if variable expands to non-empty
14964
14965  if test "x$TOPDIR" != x; then
14966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14967
14968  # Input might be given as Windows format, start by converting to
14969  # unix format.
14970  path="$TOPDIR"
14971  new_path=`$CYGPATH -u "$path"`
14972
14973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14976  # "foo.exe" is OK but "foo" is an error.
14977  #
14978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14979  # It is also a way to make sure we got the proper file name for the real test later on.
14980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14981  if test "x$test_shortpath" = x; then
14982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14983$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14984    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14985  fi
14986
14987  # Call helper function which possibly converts this using DOS-style short mode.
14988  # If so, the updated path is stored in $new_path.
14989
14990  input_path="$new_path"
14991  # Check if we need to convert this using DOS-style short mode. If the path
14992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14993  # take no chances and rewrite it.
14994  # Note: m4 eats our [], so we need to use [ and ] instead.
14995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14996  if test "x$has_forbidden_chars" != x; then
14997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15001      # Going to short mode and back again did indeed matter. Since short mode is
15002      # case insensitive, let's make it lowercase to improve readability.
15003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15004      # Now convert it back to Unix-style (cygpath)
15005      input_path=`$CYGPATH -u "$shortmode_path"`
15006      new_path="$input_path"
15007    fi
15008  fi
15009
15010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15011  if test "x$test_cygdrive_prefix" = x; then
15012    # As a simple fix, exclude /usr/bin since it's not a real path.
15013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15015      # a path prefixed by /cygdrive for fixpath to work.
15016      new_path="$CYGWIN_ROOT_PATH$input_path"
15017    fi
15018  fi
15019
15020
15021  if test "x$path" != "x$new_path"; then
15022    TOPDIR="$new_path"
15023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15024$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15025  fi
15026
15027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15028
15029  path="$TOPDIR"
15030  has_colon=`$ECHO $path | $GREP ^.:`
15031  new_path="$path"
15032  if test "x$has_colon" = x; then
15033    # Not in mixed or Windows style, start by that.
15034    new_path=`cmd //c echo $path`
15035  fi
15036
15037
15038  input_path="$new_path"
15039  # Check if we need to convert this using DOS-style short mode. If the path
15040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15041  # take no chances and rewrite it.
15042  # Note: m4 eats our [], so we need to use [ and ] instead.
15043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15044  if test "x$has_forbidden_chars" != x; then
15045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15047  fi
15048
15049
15050  windows_path="$new_path"
15051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15052    unix_path=`$CYGPATH -u "$windows_path"`
15053    new_path="$unix_path"
15054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15056    new_path="$unix_path"
15057  fi
15058
15059  if test "x$path" != "x$new_path"; then
15060    TOPDIR="$new_path"
15061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15062$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15063  fi
15064
15065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15067
15068    else
15069      # We're on a unix platform. Hooray! :)
15070      path="$TOPDIR"
15071      has_space=`$ECHO "$path" | $GREP " "`
15072      if test "x$has_space" != x; then
15073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15074$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15076      fi
15077
15078      # Use eval to expand a potential ~
15079      eval path="$path"
15080      if test ! -f "$path" && test ! -d "$path"; then
15081        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15082      fi
15083
15084      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15085    fi
15086  fi
15087
15088  # SRC_ROOT is a traditional alias for TOPDIR.
15089  SRC_ROOT=$TOPDIR
15090
15091  # Calculate a canonical version of TOPDIR for string comparisons
15092  CANONICAL_TOPDIR=$TOPDIR
15093
15094  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15095    # Follow a chain of symbolic links. Use readlink
15096    # where it exists, else fall back to horribly
15097    # complicated shell code.
15098    if test "x$READLINK_TESTED" != yes; then
15099      # On MacOSX there is a readlink tool with a different
15100      # purpose than the GNU readlink tool. Check the found readlink.
15101      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15102      if test "x$ISGNU" = x; then
15103        # A readlink that we do not know how to use.
15104        # Are there other non-GNU readlinks out there?
15105        READLINK_TESTED=yes
15106        READLINK=
15107      fi
15108    fi
15109
15110    if test "x$READLINK" != x; then
15111      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15112    else
15113      # Save the current directory for restoring afterwards
15114      STARTDIR=$PWD
15115      COUNTER=0
15116      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15117      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15118      cd $sym_link_dir
15119      # Use -P flag to resolve symlinks in directories.
15120      cd `$THEPWDCMD -P`
15121      sym_link_dir=`$THEPWDCMD -P`
15122      # Resolve file symlinks
15123      while test $COUNTER -lt 20; do
15124        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15125        if test "x$ISLINK" == x; then
15126          # This is not a symbolic link! We are done!
15127          break
15128        fi
15129        # Again resolve directory symlinks since the target of the just found
15130        # link could be in a different directory
15131        cd `$DIRNAME $ISLINK`
15132        sym_link_dir=`$THEPWDCMD -P`
15133        sym_link_file=`$BASENAME $ISLINK`
15134        let COUNTER=COUNTER+1
15135      done
15136      cd $STARTDIR
15137      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15138    fi
15139  fi
15140
15141
15142
15143  # Locate the directory of this script.
15144  AUTOCONF_DIR=$TOPDIR/common/autoconf
15145
15146
15147# Check if it's a pure open build or if custom sources are to be used.
15148
15149  # Check whether --enable-openjdk-only was given.
15150if test "${enable_openjdk_only+set}" = set; then :
15151  enableval=$enable_openjdk_only;
15152else
15153  enable_openjdk_only="no"
15154fi
15155
15156
15157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15158$as_echo_n "checking for presence of closed sources... " >&6; }
15159  if test -d "$SRC_ROOT/jdk/src/closed"; then
15160    CLOSED_SOURCE_PRESENT=yes
15161  else
15162    CLOSED_SOURCE_PRESENT=no
15163  fi
15164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15165$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15166
15167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15168$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15169  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15171$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15172
15173  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15174    OPENJDK=true
15175    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15176      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15177$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15178    fi
15179  else
15180    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15181      OPENJDK=true
15182    else
15183      OPENJDK=false
15184    fi
15185  fi
15186
15187  if test "x$OPENJDK" = "xtrue"; then
15188    SET_OPENJDK="OPENJDK=true"
15189  fi
15190
15191
15192
15193  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15194  # the IncludeCustomExtension macro.
15195
15196
15197# Check whether --with-custom-make-dir was given.
15198if test "${with_custom_make_dir+set}" = set; then :
15199  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
15200$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15201fi
15202
15203
15204
15205
15206# These are needed to be able to create a configuration name (and thus the output directory)
15207
15208  ###############################################################################
15209  #
15210  # Check which variant of the JDK that we want to build.
15211  # Currently we have:
15212  #    normal:   standard edition
15213  # but the custom make system may add other variants
15214  #
15215  # Effectively the JDK variant gives a name to a specific set of
15216  # modules to compile into the JDK. In the future, these modules
15217  # might even be Jigsaw modules.
15218  #
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15220$as_echo_n "checking which variant of the JDK to build... " >&6; }
15221
15222# Check whether --with-jdk-variant was given.
15223if test "${with_jdk_variant+set}" = set; then :
15224  withval=$with_jdk_variant;
15225fi
15226
15227
15228  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15229    JDK_VARIANT="normal"
15230  else
15231    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15232  fi
15233
15234
15235
15236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15237$as_echo "$JDK_VARIANT" >&6; }
15238
15239
15240###############################################################################
15241#
15242# Check which interpreter of the JVM we want to build.
15243# Currently we have:
15244#    template: Template interpreter (the default)
15245#    cpp     : C++ interpreter
15246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15247$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15248
15249# Check whether --with-jvm-interpreter was given.
15250if test "${with_jvm_interpreter+set}" = set; then :
15251  withval=$with_jvm_interpreter;
15252fi
15253
15254
15255if test "x$with_jvm_interpreter" = x; then
15256     with_jvm_interpreter="template"
15257fi
15258
15259JVM_INTERPRETER="$with_jvm_interpreter"
15260
15261if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15262   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15263fi
15264
15265
15266
15267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15268$as_echo "$with_jvm_interpreter" >&6; }
15269
15270
15271
15272  ###############################################################################
15273  #
15274  # Check which variants of the JVM that we want to build.
15275  # Currently we have:
15276  #    server: normal interpreter and a tiered C1/C2 compiler
15277  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15278  #    minimal1: reduced form of client with optional VM services and features stripped out
15279  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15280  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15281  #    zero: no machine code interpreter, no compiler
15282  #    zeroshark: zero interpreter and shark/llvm compiler backend
15283#    core: interpreter only, no compiler (only works on some platforms)
15284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15285$as_echo_n "checking which variants of the JVM to build... " >&6; }
15286
15287# Check whether --with-jvm-variants was given.
15288if test "${with_jvm_variants+set}" = set; then :
15289  withval=$with_jvm_variants;
15290fi
15291
15292
15293  if test "x$with_jvm_variants" = x; then
15294    with_jvm_variants="server"
15295  fi
15296
15297  JVM_VARIANTS=",$with_jvm_variants,"
15298  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,//'`
15299
15300  if test "x$TEST_VARIANTS" != "x,"; then
15301     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15302  fi
15303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15304$as_echo "$with_jvm_variants" >&6; }
15305
15306  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15307  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15308  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15309  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15310  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15311  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15312  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15313
15314  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15315    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15316      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15317    fi
15318  fi
15319  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15320    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15321      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15322    fi
15323  fi
15324  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15325    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15326      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15327    fi
15328  fi
15329
15330  # Replace the commas with AND for use in the build directory name.
15331  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15332  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/'`
15333  if test "x$COUNT_VARIANTS" != "x,1"; then
15334    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15335  else
15336    BUILDING_MULTIPLE_JVM_VARIANTS=no
15337  fi
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348  INCLUDE_SA=true
15349  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15350    INCLUDE_SA=false
15351  fi
15352  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15353    INCLUDE_SA=false
15354  fi
15355  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15356    INCLUDE_SA=false
15357  fi
15358  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15359    INCLUDE_SA=false
15360  fi
15361
15362
15363  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15364    MACOSX_UNIVERSAL="true"
15365  fi
15366
15367
15368
15369
15370  ###############################################################################
15371  #
15372  # Set the debug level
15373  #    release: no debug information, all optimizations, no asserts.
15374  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15375  #    fastdebug: debug information (-g), all optimizations, all asserts
15376  #    slowdebug: debug information (-g), no optimizations, all asserts
15377  #
15378  DEBUG_LEVEL="release"
15379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15380$as_echo_n "checking which debug level to use... " >&6; }
15381  # Check whether --enable-debug was given.
15382if test "${enable_debug+set}" = set; then :
15383  enableval=$enable_debug;
15384        ENABLE_DEBUG="${enableval}"
15385        DEBUG_LEVEL="fastdebug"
15386
15387else
15388  ENABLE_DEBUG="no"
15389fi
15390
15391
15392
15393# Check whether --with-debug-level was given.
15394if test "${with_debug_level+set}" = set; then :
15395  withval=$with_debug_level;
15396        DEBUG_LEVEL="${withval}"
15397        if test "x$ENABLE_DEBUG" = xyes; then
15398          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15399        fi
15400
15401fi
15402
15403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15404$as_echo "$DEBUG_LEVEL" >&6; }
15405
15406  if test "x$DEBUG_LEVEL" != xrelease && \
15407      test "x$DEBUG_LEVEL" != xoptimized && \
15408      test "x$DEBUG_LEVEL" != xfastdebug && \
15409      test "x$DEBUG_LEVEL" != xslowdebug; then
15410    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15411  fi
15412
15413
15414  ###############################################################################
15415  #
15416  # Setup legacy vars/targets and new vars to deal with different debug levels.
15417  #
15418
15419  case $DEBUG_LEVEL in
15420    release )
15421      VARIANT="OPT"
15422      FASTDEBUG="false"
15423      DEBUG_CLASSFILES="false"
15424      BUILD_VARIANT_RELEASE=""
15425      HOTSPOT_DEBUG_LEVEL="product"
15426      HOTSPOT_EXPORT="product"
15427      ;;
15428    fastdebug )
15429      VARIANT="DBG"
15430      FASTDEBUG="true"
15431      DEBUG_CLASSFILES="true"
15432      BUILD_VARIANT_RELEASE="-fastdebug"
15433      HOTSPOT_DEBUG_LEVEL="fastdebug"
15434      HOTSPOT_EXPORT="fastdebug"
15435      ;;
15436    slowdebug )
15437      VARIANT="DBG"
15438      FASTDEBUG="false"
15439      DEBUG_CLASSFILES="true"
15440      BUILD_VARIANT_RELEASE="-debug"
15441      HOTSPOT_DEBUG_LEVEL="debug"
15442      HOTSPOT_EXPORT="debug"
15443      ;;
15444    optimized )
15445      VARIANT="OPT"
15446      FASTDEBUG="false"
15447      DEBUG_CLASSFILES="false"
15448      BUILD_VARIANT_RELEASE="-optimized"
15449      HOTSPOT_DEBUG_LEVEL="optimized"
15450      HOTSPOT_EXPORT="optimized"
15451      ;;
15452  esac
15453
15454  # The debug level 'optimized' is a little special because it is currently only
15455  # applicable to the HotSpot build where it means to build a completely
15456  # optimized version of the VM without any debugging code (like for the
15457  # 'release' debug level which is called 'product' in the HotSpot build) but
15458  # with the exception that it can contain additional code which is otherwise
15459  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15460  # test new and/or experimental features which are not intended for customer
15461  # shipment. Because these new features need to be tested and benchmarked in
15462  # real world scenarios, we want to build the containing JDK at the 'release'
15463  # debug level.
15464  if test "x$DEBUG_LEVEL" = xoptimized; then
15465    DEBUG_LEVEL="release"
15466  fi
15467
15468  #####
15469  # Generate the legacy makefile targets for hotspot.
15470  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15471  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15472  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15473  # But until then ...
15474  HOTSPOT_TARGET=""
15475
15476  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15477    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15478  fi
15479
15480  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15481    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15482  fi
15483
15484  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15485    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15486  fi
15487
15488  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15489    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15490  fi
15491
15492  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15493    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15494  fi
15495
15496  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15497    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15498  fi
15499
15500  if test "x$JVM_VARIANT_CORE" = xtrue; then
15501    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15502  fi
15503
15504  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15505
15506  # On Macosx universal binaries are produced, but they only contain
15507  # 64 bit intel. This invalidates control of which jvms are built
15508  # from configure, but only server is valid anyway. Fix this
15509  # when hotspot makefiles are rewritten.
15510  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15511    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15512  fi
15513
15514  #####
15515
15516
15517
15518
15519
15520
15521
15522
15523# With basic setup done, call the custom early hook.
15524
15525
15526# Check if we have devkits, extra paths or sysroot set.
15527
15528
15529# Check whether --with-devkit was given.
15530if test "${with_devkit+set}" = set; then :
15531  withval=$with_devkit;
15532
15533  # Only process if variable expands to non-empty
15534
15535  if test "x$with_devkit" != x; then
15536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15537
15538  # Input might be given as Windows format, start by converting to
15539  # unix format.
15540  path="$with_devkit"
15541  new_path=`$CYGPATH -u "$path"`
15542
15543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15546  # "foo.exe" is OK but "foo" is an error.
15547  #
15548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15549  # It is also a way to make sure we got the proper file name for the real test later on.
15550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15551  if test "x$test_shortpath" = x; then
15552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15553$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15554    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15555  fi
15556
15557  # Call helper function which possibly converts this using DOS-style short mode.
15558  # If so, the updated path is stored in $new_path.
15559
15560  input_path="$new_path"
15561  # Check if we need to convert this using DOS-style short mode. If the path
15562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15563  # take no chances and rewrite it.
15564  # Note: m4 eats our [], so we need to use [ and ] instead.
15565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15566  if test "x$has_forbidden_chars" != x; then
15567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15571      # Going to short mode and back again did indeed matter. Since short mode is
15572      # case insensitive, let's make it lowercase to improve readability.
15573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15574      # Now convert it back to Unix-style (cygpath)
15575      input_path=`$CYGPATH -u "$shortmode_path"`
15576      new_path="$input_path"
15577    fi
15578  fi
15579
15580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15581  if test "x$test_cygdrive_prefix" = x; then
15582    # As a simple fix, exclude /usr/bin since it's not a real path.
15583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15585      # a path prefixed by /cygdrive for fixpath to work.
15586      new_path="$CYGWIN_ROOT_PATH$input_path"
15587    fi
15588  fi
15589
15590
15591  if test "x$path" != "x$new_path"; then
15592    with_devkit="$new_path"
15593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15594$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15595  fi
15596
15597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15598
15599  path="$with_devkit"
15600  has_colon=`$ECHO $path | $GREP ^.:`
15601  new_path="$path"
15602  if test "x$has_colon" = x; then
15603    # Not in mixed or Windows style, start by that.
15604    new_path=`cmd //c echo $path`
15605  fi
15606
15607
15608  input_path="$new_path"
15609  # Check if we need to convert this using DOS-style short mode. If the path
15610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15611  # take no chances and rewrite it.
15612  # Note: m4 eats our [], so we need to use [ and ] instead.
15613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15614  if test "x$has_forbidden_chars" != x; then
15615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15617  fi
15618
15619
15620  windows_path="$new_path"
15621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15622    unix_path=`$CYGPATH -u "$windows_path"`
15623    new_path="$unix_path"
15624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15626    new_path="$unix_path"
15627  fi
15628
15629  if test "x$path" != "x$new_path"; then
15630    with_devkit="$new_path"
15631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15632$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15633  fi
15634
15635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15637
15638    else
15639      # We're on a unix platform. Hooray! :)
15640      path="$with_devkit"
15641      has_space=`$ECHO "$path" | $GREP " "`
15642      if test "x$has_space" != x; then
15643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15644$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15646      fi
15647
15648      # Use eval to expand a potential ~
15649      eval path="$path"
15650      if test ! -f "$path" && test ! -d "$path"; then
15651        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15652      fi
15653
15654      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15655    fi
15656  fi
15657
15658        DEVKIT_ROOT="$with_devkit"
15659        # Check for a meta data info file in the root of the devkit
15660        if test -f "$DEVKIT_ROOT/devkit.info"; then
15661          . $DEVKIT_ROOT/devkit.info
15662          # This potentially sets the following:
15663          # A descriptive name of the devkit
15664
15665  if test "x$DEVKIT_NAME" = x; then
15666    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15667  fi
15668
15669          # Corresponds to --with-extra-path
15670
15671  if test "x$DEVKIT_EXTRA_PATH" = x; then
15672    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15673  fi
15674
15675          # Corresponds to --with-toolchain-path
15676
15677  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15678    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15679  fi
15680
15681          # Corresponds to --with-sysroot
15682
15683  if test "x$DEVKIT_SYSROOT" = x; then
15684    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15685  fi
15686
15687
15688          # Identifies the Visual Studio version in the devkit
15689
15690  if test "x$DEVKIT_VS_VERSION" = x; then
15691    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15692  fi
15693
15694          # The Visual Studio include environment variable
15695
15696  if test "x$DEVKIT_VS_INCLUDE" = x; then
15697    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15698  fi
15699
15700          # The Visual Studio lib environment variable
15701
15702  if test "x$DEVKIT_VS_LIB" = x; then
15703    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15704  fi
15705
15706          # Corresponds to --with-msvcr-dll
15707
15708  if test "x$DEVKIT_MSVCR_DLL" = x; then
15709    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15710  fi
15711
15712          # Corresponds to --with-msvcp-dll
15713
15714  if test "x$DEVKIT_MSVCP_DLL" = x; then
15715    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15716  fi
15717
15718        fi
15719
15720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15721$as_echo_n "checking for devkit... " >&6; }
15722        if test "x$DEVKIT_NAME" != x; then
15723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15724$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15725        else
15726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15727$as_echo "$DEVKIT_ROOT" >&6; }
15728        fi
15729
15730
15731  if test "x$DEVKIT_EXTRA_PATH" != x; then
15732    if test "x$EXTRA_PATH" = x; then
15733      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15734    else
15735      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15736    fi
15737  fi
15738
15739
15740        # Fallback default of just /bin if DEVKIT_PATH is not defined
15741        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15742          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15743        fi
15744
15745  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15746    if test "x$TOOLCHAIN_PATH" = x; then
15747      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15748    else
15749      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15750    fi
15751  fi
15752
15753
15754        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15755        # places for backwards compatiblity.
15756        if test "x$DEVKIT_SYSROOT" != x; then
15757          SYSROOT="$DEVKIT_SYSROOT"
15758        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15759          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15760        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15761          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15762        fi
15763
15764
15765fi
15766
15767
15768  # You can force the sysroot if the sysroot encoded into the compiler tools
15769  # is not correct.
15770
15771# Check whether --with-sys-root was given.
15772if test "${with_sys_root+set}" = set; then :
15773  withval=$with_sys_root; SYSROOT=$with_sys_root
15774
15775fi
15776
15777
15778
15779# Check whether --with-sysroot was given.
15780if test "${with_sysroot+set}" = set; then :
15781  withval=$with_sysroot; SYSROOT=$with_sysroot
15782
15783fi
15784
15785
15786
15787# Check whether --with-tools-dir was given.
15788if test "${with_tools_dir+set}" = set; then :
15789  withval=$with_tools_dir;
15790  if test "x$with_tools_dir" != x; then
15791    if test "x$TOOLCHAIN_PATH" = x; then
15792      TOOLCHAIN_PATH="$with_tools_dir"
15793    else
15794      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15795    fi
15796  fi
15797
15798
15799fi
15800
15801
15802
15803# Check whether --with-toolchain-path was given.
15804if test "${with_toolchain_path+set}" = set; then :
15805  withval=$with_toolchain_path;
15806  if test "x$with_toolchain_path" != x; then
15807    if test "x$TOOLCHAIN_PATH" = x; then
15808      TOOLCHAIN_PATH="$with_toolchain_path"
15809    else
15810      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15811    fi
15812  fi
15813
15814
15815fi
15816
15817
15818
15819# Check whether --with-extra-path was given.
15820if test "${with_extra_path+set}" = set; then :
15821  withval=$with_extra_path;
15822  if test "x$with_extra_path" != x; then
15823    if test "x$EXTRA_PATH" = x; then
15824      EXTRA_PATH="$with_extra_path"
15825    else
15826      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15827    fi
15828  fi
15829
15830
15831fi
15832
15833
15834  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15835    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15836    # If not, detect if Xcode is installed by running xcodebuild -version
15837    # if no Xcode installed, xcodebuild exits with 1
15838    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15839    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15840      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15841      # fall back on the stub binary in /usr/bin/xcodebuild
15842      # Extract the first word of "xcodebuild", so it can be a program name with args.
15843set dummy xcodebuild; ac_word=$2
15844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15845$as_echo_n "checking for $ac_word... " >&6; }
15846if ${ac_cv_path_XCODEBUILD+:} false; then :
15847  $as_echo_n "(cached) " >&6
15848else
15849  case $XCODEBUILD in
15850  [\\/]* | ?:[\\/]*)
15851  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15852  ;;
15853  *)
15854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15855for as_dir in $TOOLCHAIN_PATH
15856do
15857  IFS=$as_save_IFS
15858  test -z "$as_dir" && as_dir=.
15859    for ac_exec_ext in '' $ac_executable_extensions; do
15860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15861    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15863    break 2
15864  fi
15865done
15866  done
15867IFS=$as_save_IFS
15868
15869  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15870  ;;
15871esac
15872fi
15873XCODEBUILD=$ac_cv_path_XCODEBUILD
15874if test -n "$XCODEBUILD"; then
15875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15876$as_echo "$XCODEBUILD" >&6; }
15877else
15878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15879$as_echo "no" >&6; }
15880fi
15881
15882
15883    else
15884      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15885      # when only the command line tools are installed there are no SDKs, so headers
15886      # are copied into the system frameworks
15887      XCODEBUILD=
15888
15889    fi
15890
15891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15892$as_echo_n "checking for sdk name... " >&6; }
15893
15894# Check whether --with-sdk-name was given.
15895if test "${with_sdk_name+set}" = set; then :
15896  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15897
15898fi
15899
15900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15901$as_echo "$SDKNAME" >&6; }
15902
15903    # if toolchain path is specified then don't rely on system headers, they may not compile
15904    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15905    test -z "$TOOLCHAIN_PATH" && \
15906      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15907
15908    if test -z "$SYSROOT"; then
15909      if test -n "$XCODEBUILD"; then
15910        # if we don't have system headers, use default SDK name (last resort)
15911        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15912          SDKNAME=${SDKNAME:-macosx}
15913        fi
15914
15915        if test -n "$SDKNAME"; then
15916          # Call xcodebuild to determine SYSROOT
15917          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15918        fi
15919      else
15920        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15921          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
15922        fi
15923      fi
15924    else
15925      # warn user if --with-sdk-name was also set
15926      if test -n "$with_sdk_name"; then
15927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15928$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15929      fi
15930    fi
15931
15932    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15933      # If no system framework headers, then SYSROOT must be set, or we won't build
15934      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
15935    fi
15936
15937    # Perform a basic sanity test
15938    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15939      if test -z "$SYSROOT"; then
15940        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
15941      else
15942        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15943      fi
15944    fi
15945
15946    # set SDKROOT too, Xcode tools will pick it up
15947    SDKROOT=$SYSROOT
15948
15949  fi
15950
15951  # Prepend the extra path to the global path
15952
15953  if test "x$EXTRA_PATH" != x; then
15954    if test "x$PATH" = x; then
15955      PATH="$EXTRA_PATH"
15956    else
15957      PATH="$EXTRA_PATH:$PATH"
15958    fi
15959  fi
15960
15961
15962  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15963    # Add extra search paths on solaris for utilities like ar and as etc...
15964    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15965  fi
15966
15967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15968$as_echo_n "checking for sysroot... " >&6; }
15969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15970$as_echo "$SYSROOT" >&6; }
15971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15972$as_echo_n "checking for toolchain path... " >&6; }
15973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15974$as_echo "$TOOLCHAIN_PATH" >&6; }
15975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15976$as_echo_n "checking for extra path... " >&6; }
15977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15978$as_echo "$EXTRA_PATH" >&6; }
15979
15980
15981# To properly create a configuration name, we need to have the OpenJDK target
15982# and options (variants and debug level) parsed.
15983
15984
15985
15986# Check whether --with-conf-name was given.
15987if test "${with_conf_name+set}" = set; then :
15988  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15989fi
15990
15991
15992  # Test from where we are running configure, in or outside of src root.
15993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15994$as_echo_n "checking where to store configuration... " >&6; }
15995  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15996      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15997      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15998    # We are running configure from the src root.
15999    # Create a default ./build/target-variant-debuglevel output root.
16000    if test "x${CONF_NAME}" = x; then
16001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16002$as_echo "in default location" >&6; }
16003      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16004    else
16005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16006$as_echo "in build directory with custom name" >&6; }
16007    fi
16008    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16009    $MKDIR -p "$OUTPUT_ROOT"
16010    if test ! -d "$OUTPUT_ROOT"; then
16011      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16012    fi
16013  else
16014    # We are running configure from outside of the src dir.
16015    # Then use the current directory as output dir!
16016    # If configuration is situated in normal build directory, just use the build
16017    # directory name as configuration name, otherwise use the complete path.
16018    if test "x${CONF_NAME}" = x; then
16019      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16020    fi
16021    OUTPUT_ROOT="$CURDIR"
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16023$as_echo "in current directory" >&6; }
16024
16025    # WARNING: This might be a bad thing to do. You need to be sure you want to
16026    # have a configuration in this directory. Do some sanity checks!
16027
16028    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16029      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16030      # other files
16031      files_present=`$LS $OUTPUT_ROOT`
16032      # Configure has already touched config.log and confdefs.h in the current dir when this check
16033      # is performed.
16034      filtered_files=`$ECHO "$files_present" \
16035          | $SED -e 's/config.log//g' \
16036              -e 's/configure.log//g' \
16037              -e 's/confdefs.h//g' \
16038              -e 's/ //g' \
16039          | $TR -d '\n'`
16040      if test "x$filtered_files" != x; then
16041        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16042$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16043        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16044$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16045        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16046$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16047        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16048$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16049        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16050$as_echo "$as_me: seriously mess up just about everything." >&6;}
16051        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16052$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16053        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16054$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16055        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16056      fi
16057    fi
16058  fi
16059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16060$as_echo_n "checking what configuration name to use... " >&6; }
16061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16062$as_echo "$CONF_NAME" >&6; }
16063
16064
16065  # Only process if variable expands to non-empty
16066
16067  if test "x$OUTPUT_ROOT" != x; then
16068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16069
16070  # Input might be given as Windows format, start by converting to
16071  # unix format.
16072  path="$OUTPUT_ROOT"
16073  new_path=`$CYGPATH -u "$path"`
16074
16075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16078  # "foo.exe" is OK but "foo" is an error.
16079  #
16080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16081  # It is also a way to make sure we got the proper file name for the real test later on.
16082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16083  if test "x$test_shortpath" = x; then
16084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16085$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16086    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16087  fi
16088
16089  # Call helper function which possibly converts this using DOS-style short mode.
16090  # If so, the updated path is stored in $new_path.
16091
16092  input_path="$new_path"
16093  # Check if we need to convert this using DOS-style short mode. If the path
16094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16095  # take no chances and rewrite it.
16096  # Note: m4 eats our [], so we need to use [ and ] instead.
16097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16098  if test "x$has_forbidden_chars" != x; then
16099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16103      # Going to short mode and back again did indeed matter. Since short mode is
16104      # case insensitive, let's make it lowercase to improve readability.
16105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16106      # Now convert it back to Unix-style (cygpath)
16107      input_path=`$CYGPATH -u "$shortmode_path"`
16108      new_path="$input_path"
16109    fi
16110  fi
16111
16112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16113  if test "x$test_cygdrive_prefix" = x; then
16114    # As a simple fix, exclude /usr/bin since it's not a real path.
16115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16117      # a path prefixed by /cygdrive for fixpath to work.
16118      new_path="$CYGWIN_ROOT_PATH$input_path"
16119    fi
16120  fi
16121
16122
16123  if test "x$path" != "x$new_path"; then
16124    OUTPUT_ROOT="$new_path"
16125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16126$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16127  fi
16128
16129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16130
16131  path="$OUTPUT_ROOT"
16132  has_colon=`$ECHO $path | $GREP ^.:`
16133  new_path="$path"
16134  if test "x$has_colon" = x; then
16135    # Not in mixed or Windows style, start by that.
16136    new_path=`cmd //c echo $path`
16137  fi
16138
16139
16140  input_path="$new_path"
16141  # Check if we need to convert this using DOS-style short mode. If the path
16142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16143  # take no chances and rewrite it.
16144  # Note: m4 eats our [], so we need to use [ and ] instead.
16145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16146  if test "x$has_forbidden_chars" != x; then
16147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16149  fi
16150
16151
16152  windows_path="$new_path"
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154    unix_path=`$CYGPATH -u "$windows_path"`
16155    new_path="$unix_path"
16156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16158    new_path="$unix_path"
16159  fi
16160
16161  if test "x$path" != "x$new_path"; then
16162    OUTPUT_ROOT="$new_path"
16163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16164$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16165  fi
16166
16167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16169
16170    else
16171      # We're on a unix platform. Hooray! :)
16172      path="$OUTPUT_ROOT"
16173      has_space=`$ECHO "$path" | $GREP " "`
16174      if test "x$has_space" != x; then
16175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16176$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16178      fi
16179
16180      # Use eval to expand a potential ~
16181      eval path="$path"
16182      if test ! -f "$path" && test ! -d "$path"; then
16183        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16184      fi
16185
16186      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16187    fi
16188  fi
16189
16190
16191  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16192  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16193
16194  SPEC=$OUTPUT_ROOT/spec.gmk
16195
16196  CONF_NAME=$CONF_NAME
16197
16198  OUTPUT_ROOT=$OUTPUT_ROOT
16199
16200
16201
16202  # The spec.gmk file contains all variables for the make system.
16203  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16204
16205  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16206  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16207
16208  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16209  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16210
16211  # The compare.sh is used to compare the build output to other builds.
16212  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16213
16214  # The generated Makefile knows where the spec.gmk is and where the source is.
16215  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16216  # which will look for generated configurations
16217  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16218
16219
16220
16221# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16222
16223  for ac_prog in apt-get yum port pkgutil pkgadd
16224do
16225  # Extract the first word of "$ac_prog", so it can be a program name with args.
16226set dummy $ac_prog; ac_word=$2
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16228$as_echo_n "checking for $ac_word... " >&6; }
16229if ${ac_cv_prog_PKGHANDLER+:} false; then :
16230  $as_echo_n "(cached) " >&6
16231else
16232  if test -n "$PKGHANDLER"; then
16233  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16234else
16235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16236for as_dir in $PATH
16237do
16238  IFS=$as_save_IFS
16239  test -z "$as_dir" && as_dir=.
16240    for ac_exec_ext in '' $ac_executable_extensions; do
16241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16242    ac_cv_prog_PKGHANDLER="$ac_prog"
16243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16244    break 2
16245  fi
16246done
16247  done
16248IFS=$as_save_IFS
16249
16250fi
16251fi
16252PKGHANDLER=$ac_cv_prog_PKGHANDLER
16253if test -n "$PKGHANDLER"; then
16254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16255$as_echo "$PKGHANDLER" >&6; }
16256else
16257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16258$as_echo "no" >&6; }
16259fi
16260
16261
16262  test -n "$PKGHANDLER" && break
16263done
16264
16265
16266
16267# Setup tools that requires more complex handling, or that is not needed by the configure script.
16268
16269
16270  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
16271  if test "x$MAKE" != x; then
16272    # User has supplied a make, test it.
16273    if test ! -f "$MAKE"; then
16274      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
16275    fi
16276
16277  MAKE_CANDIDATE=""$MAKE""
16278  DESCRIPTION="user supplied MAKE=$MAKE"
16279
16280  # On Cygwin, we require a newer version of make than on other platforms
16281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16282    MAKE_VERSION_EXPR="-e 4\."
16283    MAKE_REQUIRED_VERSION="4.0"
16284   else
16285    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16286    MAKE_REQUIRED_VERSION="3.81"
16287  fi
16288
16289  if test "x$MAKE_CANDIDATE" != x; then
16290    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16291$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16292    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16293    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16294    if test "x$IS_GNU_MAKE" = x; then
16295      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16296$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16297    else
16298      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16299      if test "x$IS_MODERN_MAKE" = x; then
16300        { $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
16301$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;}
16302      else
16303        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16304          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16305            MAKE_EXPECTED_ENV='cygwin'
16306          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16307            MAKE_EXPECTED_ENV='msys'
16308          else
16309            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16310          fi
16311          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16312          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16313        else
16314          # Not relevant for non-Windows
16315          IS_MAKE_CORRECT_ENV=true
16316        fi
16317        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16318          { $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
16319$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;}
16320        else
16321          FOUND_MAKE=$MAKE_CANDIDATE
16322
16323  # Only process if variable expands to non-empty
16324
16325  if test "x$FOUND_MAKE" != x; then
16326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16327
16328  # First separate the path from the arguments. This will split at the first
16329  # space.
16330  complete="$FOUND_MAKE"
16331  path="${complete%% *}"
16332  tmp="$complete EOL"
16333  arguments="${tmp#* }"
16334
16335  # Input might be given as Windows format, start by converting to
16336  # unix format.
16337  new_path=`$CYGPATH -u "$path"`
16338
16339  # Now try to locate executable using which
16340  new_path=`$WHICH "$new_path" 2> /dev/null`
16341  # bat and cmd files are not always considered executable in cygwin causing which
16342  # to not find them
16343  if test "x$new_path" = x \
16344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16346    new_path=`$CYGPATH -u "$path"`
16347  fi
16348  if test "x$new_path" = x; then
16349    # Oops. Which didn't find the executable.
16350    # The splitting of arguments from the executable at a space might have been incorrect,
16351    # since paths with space are more likely in Windows. Give it another try with the whole
16352    # argument.
16353    path="$complete"
16354    arguments="EOL"
16355    new_path=`$CYGPATH -u "$path"`
16356    new_path=`$WHICH "$new_path" 2> /dev/null`
16357    # bat and cmd files are not always considered executable in cygwin causing which
16358    # to not find them
16359    if test "x$new_path" = x \
16360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16362      new_path=`$CYGPATH -u "$path"`
16363    fi
16364    if test "x$new_path" = x; then
16365      # It's still not found. Now this is an unrecoverable error.
16366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16368      has_space=`$ECHO "$complete" | $GREP " "`
16369      if test "x$has_space" != x; then
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16372      fi
16373      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16374    fi
16375  fi
16376
16377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16380  # "foo.exe" is OK but "foo" is an error.
16381  #
16382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16383  # It is also a way to make sure we got the proper file name for the real test later on.
16384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16385  if test "x$test_shortpath" = x; then
16386    # Short path failed, file does not exist as specified.
16387    # Try adding .exe or .cmd
16388    if test -f "${new_path}.exe"; then
16389      input_to_shortpath="${new_path}.exe"
16390    elif test -f "${new_path}.cmd"; then
16391      input_to_shortpath="${new_path}.cmd"
16392    else
16393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16394$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16398    fi
16399  else
16400    input_to_shortpath="$new_path"
16401  fi
16402
16403  # Call helper function which possibly converts this using DOS-style short mode.
16404  # If so, the updated path is stored in $new_path.
16405  new_path="$input_to_shortpath"
16406
16407  input_path="$input_to_shortpath"
16408  # Check if we need to convert this using DOS-style short mode. If the path
16409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16410  # take no chances and rewrite it.
16411  # Note: m4 eats our [], so we need to use [ and ] instead.
16412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16413  if test "x$has_forbidden_chars" != x; then
16414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16418      # Going to short mode and back again did indeed matter. Since short mode is
16419      # case insensitive, let's make it lowercase to improve readability.
16420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16421      # Now convert it back to Unix-style (cygpath)
16422      input_path=`$CYGPATH -u "$shortmode_path"`
16423      new_path="$input_path"
16424    fi
16425  fi
16426
16427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16428  if test "x$test_cygdrive_prefix" = x; then
16429    # As a simple fix, exclude /usr/bin since it's not a real path.
16430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16432      # a path prefixed by /cygdrive for fixpath to work.
16433      new_path="$CYGWIN_ROOT_PATH$input_path"
16434    fi
16435  fi
16436
16437  # remove trailing .exe if any
16438  new_path="${new_path/%.exe/}"
16439
16440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16441
16442  # First separate the path from the arguments. This will split at the first
16443  # space.
16444  complete="$FOUND_MAKE"
16445  path="${complete%% *}"
16446  tmp="$complete EOL"
16447  arguments="${tmp#* }"
16448
16449  # Input might be given as Windows format, start by converting to
16450  # unix format.
16451  new_path="$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
16463  # Now try to locate executable using which
16464  new_path=`$WHICH "$new_path" 2> /dev/null`
16465
16466  if test "x$new_path" = x; then
16467    # Oops. Which didn't find the executable.
16468    # The splitting of arguments from the executable at a space might have been incorrect,
16469    # since paths with space are more likely in Windows. Give it another try with the whole
16470    # argument.
16471    path="$complete"
16472    arguments="EOL"
16473    new_path="$path"
16474
16475  windows_path="$new_path"
16476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16477    unix_path=`$CYGPATH -u "$windows_path"`
16478    new_path="$unix_path"
16479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16481    new_path="$unix_path"
16482  fi
16483
16484
16485    new_path=`$WHICH "$new_path" 2> /dev/null`
16486    # bat and cmd files are not always considered executable in MSYS causing which
16487    # to not find them
16488    if test "x$new_path" = x \
16489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16491      new_path="$path"
16492
16493  windows_path="$new_path"
16494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16495    unix_path=`$CYGPATH -u "$windows_path"`
16496    new_path="$unix_path"
16497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16499    new_path="$unix_path"
16500  fi
16501
16502    fi
16503
16504    if test "x$new_path" = x; then
16505      # It's still not found. Now this is an unrecoverable error.
16506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16508      has_space=`$ECHO "$complete" | $GREP " "`
16509      if test "x$has_space" != x; then
16510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16512      fi
16513      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16514    fi
16515  fi
16516
16517  # Now new_path has a complete unix path to the binary
16518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16519    # Keep paths in /bin as-is, but remove trailing .exe if any
16520    new_path="${new_path/%.exe/}"
16521    # Do not save /bin paths to all_fixpath_prefixes!
16522  else
16523    # Not in mixed or Windows style, start by that.
16524    new_path=`cmd //c echo $new_path`
16525
16526  input_path="$new_path"
16527  # Check if we need to convert this using DOS-style short mode. If the path
16528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16529  # take no chances and rewrite it.
16530  # Note: m4 eats our [], so we need to use [ and ] instead.
16531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16532  if test "x$has_forbidden_chars" != x; then
16533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16535  fi
16536
16537    # Output is in $new_path
16538
16539  windows_path="$new_path"
16540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16541    unix_path=`$CYGPATH -u "$windows_path"`
16542    new_path="$unix_path"
16543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16545    new_path="$unix_path"
16546  fi
16547
16548    # remove trailing .exe if any
16549    new_path="${new_path/%.exe/}"
16550
16551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16553  fi
16554
16555    else
16556      # We're on a unix platform. Hooray! :)
16557      # First separate the path from the arguments. This will split at the first
16558      # space.
16559      complete="$FOUND_MAKE"
16560      path="${complete%% *}"
16561      tmp="$complete EOL"
16562      arguments="${tmp#* }"
16563
16564      # Cannot rely on the command "which" here since it doesn't always work.
16565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16566      if test -z "$is_absolute_path"; then
16567        # Path to executable is not absolute. Find it.
16568        IFS_save="$IFS"
16569        IFS=:
16570        for p in $PATH; do
16571          if test -f "$p/$path" && test -x "$p/$path"; then
16572            new_path="$p/$path"
16573            break
16574          fi
16575        done
16576        IFS="$IFS_save"
16577      else
16578        # This is an absolute path, we can use it without further modifications.
16579        new_path="$path"
16580      fi
16581
16582      if test "x$new_path" = x; then
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16584$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16585        has_space=`$ECHO "$complete" | $GREP " "`
16586        if test "x$has_space" != x; then
16587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16589        fi
16590        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16591      fi
16592    fi
16593
16594    # Now join together the path and the arguments once again
16595    if test "x$arguments" != xEOL; then
16596      new_complete="$new_path ${arguments% *}"
16597    else
16598      new_complete="$new_path"
16599    fi
16600
16601    if test "x$complete" != "x$new_complete"; then
16602      FOUND_MAKE="$new_complete"
16603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16604$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16605    fi
16606  fi
16607
16608        fi
16609      fi
16610    fi
16611  fi
16612
16613    if test "x$FOUND_MAKE" = x; then
16614      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
16615    fi
16616  else
16617    # Try our hardest to locate a correct version of GNU make
16618    for ac_prog in gmake
16619do
16620  # Extract the first word of "$ac_prog", so it can be a program name with args.
16621set dummy $ac_prog; ac_word=$2
16622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16623$as_echo_n "checking for $ac_word... " >&6; }
16624if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16625  $as_echo_n "(cached) " >&6
16626else
16627  case $CHECK_GMAKE in
16628  [\\/]* | ?:[\\/]*)
16629  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16630  ;;
16631  *)
16632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16633for as_dir in $PATH
16634do
16635  IFS=$as_save_IFS
16636  test -z "$as_dir" && as_dir=.
16637    for ac_exec_ext in '' $ac_executable_extensions; do
16638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16639    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16641    break 2
16642  fi
16643done
16644  done
16645IFS=$as_save_IFS
16646
16647  ;;
16648esac
16649fi
16650CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16651if test -n "$CHECK_GMAKE"; then
16652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16653$as_echo "$CHECK_GMAKE" >&6; }
16654else
16655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16656$as_echo "no" >&6; }
16657fi
16658
16659
16660  test -n "$CHECK_GMAKE" && break
16661done
16662
16663
16664  MAKE_CANDIDATE=""$CHECK_GMAKE""
16665  DESCRIPTION="gmake in PATH"
16666
16667  # On Cygwin, we require a newer version of make than on other platforms
16668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16669    MAKE_VERSION_EXPR="-e 4\."
16670    MAKE_REQUIRED_VERSION="4.0"
16671   else
16672    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16673    MAKE_REQUIRED_VERSION="3.81"
16674  fi
16675
16676  if test "x$MAKE_CANDIDATE" != x; then
16677    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16678$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16679    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16680    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16681    if test "x$IS_GNU_MAKE" = x; then
16682      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16683$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16684    else
16685      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16686      if test "x$IS_MODERN_MAKE" = x; then
16687        { $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
16688$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;}
16689      else
16690        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16691          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16692            MAKE_EXPECTED_ENV='cygwin'
16693          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16694            MAKE_EXPECTED_ENV='msys'
16695          else
16696            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16697          fi
16698          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16699          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16700        else
16701          # Not relevant for non-Windows
16702          IS_MAKE_CORRECT_ENV=true
16703        fi
16704        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16705          { $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
16706$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;}
16707        else
16708          FOUND_MAKE=$MAKE_CANDIDATE
16709
16710  # Only process if variable expands to non-empty
16711
16712  if test "x$FOUND_MAKE" != x; then
16713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16714
16715  # First separate the path from the arguments. This will split at the first
16716  # space.
16717  complete="$FOUND_MAKE"
16718  path="${complete%% *}"
16719  tmp="$complete EOL"
16720  arguments="${tmp#* }"
16721
16722  # Input might be given as Windows format, start by converting to
16723  # unix format.
16724  new_path=`$CYGPATH -u "$path"`
16725
16726  # Now try to locate executable using which
16727  new_path=`$WHICH "$new_path" 2> /dev/null`
16728  # bat and cmd files are not always considered executable in cygwin causing which
16729  # to not find them
16730  if test "x$new_path" = x \
16731      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16732      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16733    new_path=`$CYGPATH -u "$path"`
16734  fi
16735  if test "x$new_path" = x; then
16736    # Oops. Which didn't find the executable.
16737    # The splitting of arguments from the executable at a space might have been incorrect,
16738    # since paths with space are more likely in Windows. Give it another try with the whole
16739    # argument.
16740    path="$complete"
16741    arguments="EOL"
16742    new_path=`$CYGPATH -u "$path"`
16743    new_path=`$WHICH "$new_path" 2> /dev/null`
16744    # bat and cmd files are not always considered executable in cygwin causing which
16745    # to not find them
16746    if test "x$new_path" = x \
16747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16749      new_path=`$CYGPATH -u "$path"`
16750    fi
16751    if test "x$new_path" = x; then
16752      # It's still not found. Now this is an unrecoverable error.
16753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16754$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16755      has_space=`$ECHO "$complete" | $GREP " "`
16756      if test "x$has_space" != x; then
16757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16759      fi
16760      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16761    fi
16762  fi
16763
16764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16767  # "foo.exe" is OK but "foo" is an error.
16768  #
16769  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16770  # It is also a way to make sure we got the proper file name for the real test later on.
16771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16772  if test "x$test_shortpath" = x; then
16773    # Short path failed, file does not exist as specified.
16774    # Try adding .exe or .cmd
16775    if test -f "${new_path}.exe"; then
16776      input_to_shortpath="${new_path}.exe"
16777    elif test -f "${new_path}.cmd"; then
16778      input_to_shortpath="${new_path}.cmd"
16779    else
16780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16781$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16784      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16785    fi
16786  else
16787    input_to_shortpath="$new_path"
16788  fi
16789
16790  # Call helper function which possibly converts this using DOS-style short mode.
16791  # If so, the updated path is stored in $new_path.
16792  new_path="$input_to_shortpath"
16793
16794  input_path="$input_to_shortpath"
16795  # Check if we need to convert this using DOS-style short mode. If the path
16796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16797  # take no chances and rewrite it.
16798  # Note: m4 eats our [], so we need to use [ and ] instead.
16799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16800  if test "x$has_forbidden_chars" != x; then
16801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16805      # Going to short mode and back again did indeed matter. Since short mode is
16806      # case insensitive, let's make it lowercase to improve readability.
16807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16808      # Now convert it back to Unix-style (cygpath)
16809      input_path=`$CYGPATH -u "$shortmode_path"`
16810      new_path="$input_path"
16811    fi
16812  fi
16813
16814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16815  if test "x$test_cygdrive_prefix" = x; then
16816    # As a simple fix, exclude /usr/bin since it's not a real path.
16817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16819      # a path prefixed by /cygdrive for fixpath to work.
16820      new_path="$CYGWIN_ROOT_PATH$input_path"
16821    fi
16822  fi
16823
16824  # remove trailing .exe if any
16825  new_path="${new_path/%.exe/}"
16826
16827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16828
16829  # First separate the path from the arguments. This will split at the first
16830  # space.
16831  complete="$FOUND_MAKE"
16832  path="${complete%% *}"
16833  tmp="$complete EOL"
16834  arguments="${tmp#* }"
16835
16836  # Input might be given as Windows format, start by converting to
16837  # unix format.
16838  new_path="$path"
16839
16840  windows_path="$new_path"
16841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16842    unix_path=`$CYGPATH -u "$windows_path"`
16843    new_path="$unix_path"
16844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16846    new_path="$unix_path"
16847  fi
16848
16849
16850  # Now try to locate executable using which
16851  new_path=`$WHICH "$new_path" 2> /dev/null`
16852
16853  if test "x$new_path" = x; then
16854    # Oops. Which didn't find the executable.
16855    # The splitting of arguments from the executable at a space might have been incorrect,
16856    # since paths with space are more likely in Windows. Give it another try with the whole
16857    # argument.
16858    path="$complete"
16859    arguments="EOL"
16860    new_path="$path"
16861
16862  windows_path="$new_path"
16863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16864    unix_path=`$CYGPATH -u "$windows_path"`
16865    new_path="$unix_path"
16866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16868    new_path="$unix_path"
16869  fi
16870
16871
16872    new_path=`$WHICH "$new_path" 2> /dev/null`
16873    # bat and cmd files are not always considered executable in MSYS causing which
16874    # to not find them
16875    if test "x$new_path" = x \
16876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16878      new_path="$path"
16879
16880  windows_path="$new_path"
16881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16882    unix_path=`$CYGPATH -u "$windows_path"`
16883    new_path="$unix_path"
16884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16886    new_path="$unix_path"
16887  fi
16888
16889    fi
16890
16891    if test "x$new_path" = x; then
16892      # It's still not found. Now this is an unrecoverable error.
16893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16894$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16895      has_space=`$ECHO "$complete" | $GREP " "`
16896      if test "x$has_space" != x; then
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16899      fi
16900      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16901    fi
16902  fi
16903
16904  # Now new_path has a complete unix path to the binary
16905  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16906    # Keep paths in /bin as-is, but remove trailing .exe if any
16907    new_path="${new_path/%.exe/}"
16908    # Do not save /bin paths to all_fixpath_prefixes!
16909  else
16910    # Not in mixed or Windows style, start by that.
16911    new_path=`cmd //c echo $new_path`
16912
16913  input_path="$new_path"
16914  # Check if we need to convert this using DOS-style short mode. If the path
16915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16916  # take no chances and rewrite it.
16917  # Note: m4 eats our [], so we need to use [ and ] instead.
16918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16919  if test "x$has_forbidden_chars" != x; then
16920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16922  fi
16923
16924    # Output is in $new_path
16925
16926  windows_path="$new_path"
16927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16928    unix_path=`$CYGPATH -u "$windows_path"`
16929    new_path="$unix_path"
16930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16932    new_path="$unix_path"
16933  fi
16934
16935    # remove trailing .exe if any
16936    new_path="${new_path/%.exe/}"
16937
16938    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16939    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16940  fi
16941
16942    else
16943      # We're on a unix platform. Hooray! :)
16944      # First separate the path from the arguments. This will split at the first
16945      # space.
16946      complete="$FOUND_MAKE"
16947      path="${complete%% *}"
16948      tmp="$complete EOL"
16949      arguments="${tmp#* }"
16950
16951      # Cannot rely on the command "which" here since it doesn't always work.
16952      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16953      if test -z "$is_absolute_path"; then
16954        # Path to executable is not absolute. Find it.
16955        IFS_save="$IFS"
16956        IFS=:
16957        for p in $PATH; do
16958          if test -f "$p/$path" && test -x "$p/$path"; then
16959            new_path="$p/$path"
16960            break
16961          fi
16962        done
16963        IFS="$IFS_save"
16964      else
16965        # This is an absolute path, we can use it without further modifications.
16966        new_path="$path"
16967      fi
16968
16969      if test "x$new_path" = x; then
16970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16971$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16972        has_space=`$ECHO "$complete" | $GREP " "`
16973        if test "x$has_space" != x; then
16974          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16976        fi
16977        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16978      fi
16979    fi
16980
16981    # Now join together the path and the arguments once again
16982    if test "x$arguments" != xEOL; then
16983      new_complete="$new_path ${arguments% *}"
16984    else
16985      new_complete="$new_path"
16986    fi
16987
16988    if test "x$complete" != "x$new_complete"; then
16989      FOUND_MAKE="$new_complete"
16990      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16991$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16992    fi
16993  fi
16994
16995        fi
16996      fi
16997    fi
16998  fi
16999
17000
17001    if test "x$FOUND_MAKE" = x; then
17002      for ac_prog in make
17003do
17004  # Extract the first word of "$ac_prog", so it can be a program name with args.
17005set dummy $ac_prog; ac_word=$2
17006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17007$as_echo_n "checking for $ac_word... " >&6; }
17008if ${ac_cv_path_CHECK_MAKE+:} false; then :
17009  $as_echo_n "(cached) " >&6
17010else
17011  case $CHECK_MAKE in
17012  [\\/]* | ?:[\\/]*)
17013  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17014  ;;
17015  *)
17016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17017for as_dir in $PATH
17018do
17019  IFS=$as_save_IFS
17020  test -z "$as_dir" && as_dir=.
17021    for ac_exec_ext in '' $ac_executable_extensions; do
17022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17023    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17025    break 2
17026  fi
17027done
17028  done
17029IFS=$as_save_IFS
17030
17031  ;;
17032esac
17033fi
17034CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17035if test -n "$CHECK_MAKE"; then
17036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17037$as_echo "$CHECK_MAKE" >&6; }
17038else
17039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17040$as_echo "no" >&6; }
17041fi
17042
17043
17044  test -n "$CHECK_MAKE" && break
17045done
17046
17047
17048  MAKE_CANDIDATE=""$CHECK_MAKE""
17049  DESCRIPTION="make in PATH"
17050
17051  # On Cygwin, we require a newer version of make than on other platforms
17052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17053    MAKE_VERSION_EXPR="-e 4\."
17054    MAKE_REQUIRED_VERSION="4.0"
17055   else
17056    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17057    MAKE_REQUIRED_VERSION="3.81"
17058  fi
17059
17060  if test "x$MAKE_CANDIDATE" != x; then
17061    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17062$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17063    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17064    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17065    if test "x$IS_GNU_MAKE" = x; then
17066      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17067$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17068    else
17069      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17070      if test "x$IS_MODERN_MAKE" = x; then
17071        { $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
17072$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;}
17073      else
17074        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17075          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17076            MAKE_EXPECTED_ENV='cygwin'
17077          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17078            MAKE_EXPECTED_ENV='msys'
17079          else
17080            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17081          fi
17082          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17083          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17084        else
17085          # Not relevant for non-Windows
17086          IS_MAKE_CORRECT_ENV=true
17087        fi
17088        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17089          { $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
17090$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;}
17091        else
17092          FOUND_MAKE=$MAKE_CANDIDATE
17093
17094  # Only process if variable expands to non-empty
17095
17096  if test "x$FOUND_MAKE" != x; then
17097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17098
17099  # First separate the path from the arguments. This will split at the first
17100  # space.
17101  complete="$FOUND_MAKE"
17102  path="${complete%% *}"
17103  tmp="$complete EOL"
17104  arguments="${tmp#* }"
17105
17106  # Input might be given as Windows format, start by converting to
17107  # unix format.
17108  new_path=`$CYGPATH -u "$path"`
17109
17110  # Now try to locate executable using which
17111  new_path=`$WHICH "$new_path" 2> /dev/null`
17112  # bat and cmd files are not always considered executable in cygwin causing which
17113  # to not find them
17114  if test "x$new_path" = x \
17115      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17116      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17117    new_path=`$CYGPATH -u "$path"`
17118  fi
17119  if test "x$new_path" = x; then
17120    # Oops. Which didn't find the executable.
17121    # The splitting of arguments from the executable at a space might have been incorrect,
17122    # since paths with space are more likely in Windows. Give it another try with the whole
17123    # argument.
17124    path="$complete"
17125    arguments="EOL"
17126    new_path=`$CYGPATH -u "$path"`
17127    new_path=`$WHICH "$new_path" 2> /dev/null`
17128    # bat and cmd files are not always considered executable in cygwin causing which
17129    # to not find them
17130    if test "x$new_path" = x \
17131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17133      new_path=`$CYGPATH -u "$path"`
17134    fi
17135    if test "x$new_path" = x; then
17136      # It's still not found. Now this is an unrecoverable error.
17137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17139      has_space=`$ECHO "$complete" | $GREP " "`
17140      if test "x$has_space" != x; then
17141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17143      fi
17144      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17145    fi
17146  fi
17147
17148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17151  # "foo.exe" is OK but "foo" is an error.
17152  #
17153  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17154  # It is also a way to make sure we got the proper file name for the real test later on.
17155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17156  if test "x$test_shortpath" = x; then
17157    # Short path failed, file does not exist as specified.
17158    # Try adding .exe or .cmd
17159    if test -f "${new_path}.exe"; then
17160      input_to_shortpath="${new_path}.exe"
17161    elif test -f "${new_path}.cmd"; then
17162      input_to_shortpath="${new_path}.cmd"
17163    else
17164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17165$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17166      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17167$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17168      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17169    fi
17170  else
17171    input_to_shortpath="$new_path"
17172  fi
17173
17174  # Call helper function which possibly converts this using DOS-style short mode.
17175  # If so, the updated path is stored in $new_path.
17176  new_path="$input_to_shortpath"
17177
17178  input_path="$input_to_shortpath"
17179  # Check if we need to convert this using DOS-style short mode. If the path
17180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17181  # take no chances and rewrite it.
17182  # Note: m4 eats our [], so we need to use [ and ] instead.
17183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17184  if test "x$has_forbidden_chars" != x; then
17185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17189      # Going to short mode and back again did indeed matter. Since short mode is
17190      # case insensitive, let's make it lowercase to improve readability.
17191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17192      # Now convert it back to Unix-style (cygpath)
17193      input_path=`$CYGPATH -u "$shortmode_path"`
17194      new_path="$input_path"
17195    fi
17196  fi
17197
17198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17199  if test "x$test_cygdrive_prefix" = x; then
17200    # As a simple fix, exclude /usr/bin since it's not a real path.
17201    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17203      # a path prefixed by /cygdrive for fixpath to work.
17204      new_path="$CYGWIN_ROOT_PATH$input_path"
17205    fi
17206  fi
17207
17208  # remove trailing .exe if any
17209  new_path="${new_path/%.exe/}"
17210
17211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17212
17213  # First separate the path from the arguments. This will split at the first
17214  # space.
17215  complete="$FOUND_MAKE"
17216  path="${complete%% *}"
17217  tmp="$complete EOL"
17218  arguments="${tmp#* }"
17219
17220  # Input might be given as Windows format, start by converting to
17221  # unix format.
17222  new_path="$path"
17223
17224  windows_path="$new_path"
17225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17226    unix_path=`$CYGPATH -u "$windows_path"`
17227    new_path="$unix_path"
17228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17230    new_path="$unix_path"
17231  fi
17232
17233
17234  # Now try to locate executable using which
17235  new_path=`$WHICH "$new_path" 2> /dev/null`
17236
17237  if test "x$new_path" = x; then
17238    # Oops. Which didn't find the executable.
17239    # The splitting of arguments from the executable at a space might have been incorrect,
17240    # since paths with space are more likely in Windows. Give it another try with the whole
17241    # argument.
17242    path="$complete"
17243    arguments="EOL"
17244    new_path="$path"
17245
17246  windows_path="$new_path"
17247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17248    unix_path=`$CYGPATH -u "$windows_path"`
17249    new_path="$unix_path"
17250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17252    new_path="$unix_path"
17253  fi
17254
17255
17256    new_path=`$WHICH "$new_path" 2> /dev/null`
17257    # bat and cmd files are not always considered executable in MSYS causing which
17258    # to not find them
17259    if test "x$new_path" = x \
17260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17262      new_path="$path"
17263
17264  windows_path="$new_path"
17265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17266    unix_path=`$CYGPATH -u "$windows_path"`
17267    new_path="$unix_path"
17268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17270    new_path="$unix_path"
17271  fi
17272
17273    fi
17274
17275    if test "x$new_path" = x; then
17276      # It's still not found. Now this is an unrecoverable error.
17277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17279      has_space=`$ECHO "$complete" | $GREP " "`
17280      if test "x$has_space" != x; then
17281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17283      fi
17284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17285    fi
17286  fi
17287
17288  # Now new_path has a complete unix path to the binary
17289  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17290    # Keep paths in /bin as-is, but remove trailing .exe if any
17291    new_path="${new_path/%.exe/}"
17292    # Do not save /bin paths to all_fixpath_prefixes!
17293  else
17294    # Not in mixed or Windows style, start by that.
17295    new_path=`cmd //c echo $new_path`
17296
17297  input_path="$new_path"
17298  # Check if we need to convert this using DOS-style short mode. If the path
17299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17300  # take no chances and rewrite it.
17301  # Note: m4 eats our [], so we need to use [ and ] instead.
17302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17303  if test "x$has_forbidden_chars" != x; then
17304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17306  fi
17307
17308    # Output is in $new_path
17309
17310  windows_path="$new_path"
17311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17312    unix_path=`$CYGPATH -u "$windows_path"`
17313    new_path="$unix_path"
17314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17316    new_path="$unix_path"
17317  fi
17318
17319    # remove trailing .exe if any
17320    new_path="${new_path/%.exe/}"
17321
17322    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17323    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17324  fi
17325
17326    else
17327      # We're on a unix platform. Hooray! :)
17328      # First separate the path from the arguments. This will split at the first
17329      # space.
17330      complete="$FOUND_MAKE"
17331      path="${complete%% *}"
17332      tmp="$complete EOL"
17333      arguments="${tmp#* }"
17334
17335      # Cannot rely on the command "which" here since it doesn't always work.
17336      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17337      if test -z "$is_absolute_path"; then
17338        # Path to executable is not absolute. Find it.
17339        IFS_save="$IFS"
17340        IFS=:
17341        for p in $PATH; do
17342          if test -f "$p/$path" && test -x "$p/$path"; then
17343            new_path="$p/$path"
17344            break
17345          fi
17346        done
17347        IFS="$IFS_save"
17348      else
17349        # This is an absolute path, we can use it without further modifications.
17350        new_path="$path"
17351      fi
17352
17353      if test "x$new_path" = x; then
17354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17355$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17356        has_space=`$ECHO "$complete" | $GREP " "`
17357        if test "x$has_space" != x; then
17358          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17359$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17360        fi
17361        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17362      fi
17363    fi
17364
17365    # Now join together the path and the arguments once again
17366    if test "x$arguments" != xEOL; then
17367      new_complete="$new_path ${arguments% *}"
17368    else
17369      new_complete="$new_path"
17370    fi
17371
17372    if test "x$complete" != "x$new_complete"; then
17373      FOUND_MAKE="$new_complete"
17374      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17375$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17376    fi
17377  fi
17378
17379        fi
17380      fi
17381    fi
17382  fi
17383
17384    fi
17385
17386    if test "x$FOUND_MAKE" = x; then
17387      if test "x$TOOLCHAIN_PATH" != x; then
17388        # We have a toolchain path, check that as well before giving up.
17389        OLD_PATH=$PATH
17390        PATH=$TOOLCHAIN_PATH:$PATH
17391        for ac_prog in gmake
17392do
17393  # Extract the first word of "$ac_prog", so it can be a program name with args.
17394set dummy $ac_prog; ac_word=$2
17395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17396$as_echo_n "checking for $ac_word... " >&6; }
17397if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17398  $as_echo_n "(cached) " >&6
17399else
17400  case $CHECK_TOOLSDIR_GMAKE in
17401  [\\/]* | ?:[\\/]*)
17402  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17403  ;;
17404  *)
17405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17406for as_dir in $PATH
17407do
17408  IFS=$as_save_IFS
17409  test -z "$as_dir" && as_dir=.
17410    for ac_exec_ext in '' $ac_executable_extensions; do
17411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17412    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17414    break 2
17415  fi
17416done
17417  done
17418IFS=$as_save_IFS
17419
17420  ;;
17421esac
17422fi
17423CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17424if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17426$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17427else
17428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17429$as_echo "no" >&6; }
17430fi
17431
17432
17433  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17434done
17435
17436
17437  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17438  DESCRIPTION="gmake in tools-dir"
17439
17440  # On Cygwin, we require a newer version of make than on other platforms
17441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17442    MAKE_VERSION_EXPR="-e 4\."
17443    MAKE_REQUIRED_VERSION="4.0"
17444   else
17445    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17446    MAKE_REQUIRED_VERSION="3.81"
17447  fi
17448
17449  if test "x$MAKE_CANDIDATE" != x; then
17450    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17451$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17452    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17453    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17454    if test "x$IS_GNU_MAKE" = x; then
17455      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17456$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17457    else
17458      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17459      if test "x$IS_MODERN_MAKE" = x; then
17460        { $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
17461$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;}
17462      else
17463        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17464          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17465            MAKE_EXPECTED_ENV='cygwin'
17466          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17467            MAKE_EXPECTED_ENV='msys'
17468          else
17469            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17470          fi
17471          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17472          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17473        else
17474          # Not relevant for non-Windows
17475          IS_MAKE_CORRECT_ENV=true
17476        fi
17477        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17478          { $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
17479$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;}
17480        else
17481          FOUND_MAKE=$MAKE_CANDIDATE
17482
17483  # Only process if variable expands to non-empty
17484
17485  if test "x$FOUND_MAKE" != x; then
17486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17487
17488  # First separate the path from the arguments. This will split at the first
17489  # space.
17490  complete="$FOUND_MAKE"
17491  path="${complete%% *}"
17492  tmp="$complete EOL"
17493  arguments="${tmp#* }"
17494
17495  # Input might be given as Windows format, start by converting to
17496  # unix format.
17497  new_path=`$CYGPATH -u "$path"`
17498
17499  # Now try to locate executable using which
17500  new_path=`$WHICH "$new_path" 2> /dev/null`
17501  # bat and cmd files are not always considered executable in cygwin causing which
17502  # to not find them
17503  if test "x$new_path" = x \
17504      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17505      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17506    new_path=`$CYGPATH -u "$path"`
17507  fi
17508  if test "x$new_path" = x; then
17509    # Oops. Which didn't find the executable.
17510    # The splitting of arguments from the executable at a space might have been incorrect,
17511    # since paths with space are more likely in Windows. Give it another try with the whole
17512    # argument.
17513    path="$complete"
17514    arguments="EOL"
17515    new_path=`$CYGPATH -u "$path"`
17516    new_path=`$WHICH "$new_path" 2> /dev/null`
17517    # bat and cmd files are not always considered executable in cygwin causing which
17518    # to not find them
17519    if test "x$new_path" = x \
17520        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17521        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17522      new_path=`$CYGPATH -u "$path"`
17523    fi
17524    if test "x$new_path" = x; then
17525      # It's still not found. Now this is an unrecoverable error.
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17528      has_space=`$ECHO "$complete" | $GREP " "`
17529      if test "x$has_space" != x; then
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17532      fi
17533      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17534    fi
17535  fi
17536
17537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17540  # "foo.exe" is OK but "foo" is an error.
17541  #
17542  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17543  # It is also a way to make sure we got the proper file name for the real test later on.
17544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17545  if test "x$test_shortpath" = x; then
17546    # Short path failed, file does not exist as specified.
17547    # Try adding .exe or .cmd
17548    if test -f "${new_path}.exe"; then
17549      input_to_shortpath="${new_path}.exe"
17550    elif test -f "${new_path}.cmd"; then
17551      input_to_shortpath="${new_path}.cmd"
17552    else
17553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17554$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17557      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17558    fi
17559  else
17560    input_to_shortpath="$new_path"
17561  fi
17562
17563  # Call helper function which possibly converts this using DOS-style short mode.
17564  # If so, the updated path is stored in $new_path.
17565  new_path="$input_to_shortpath"
17566
17567  input_path="$input_to_shortpath"
17568  # Check if we need to convert this using DOS-style short mode. If the path
17569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17570  # take no chances and rewrite it.
17571  # Note: m4 eats our [], so we need to use [ and ] instead.
17572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17573  if test "x$has_forbidden_chars" != x; then
17574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17578      # Going to short mode and back again did indeed matter. Since short mode is
17579      # case insensitive, let's make it lowercase to improve readability.
17580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17581      # Now convert it back to Unix-style (cygpath)
17582      input_path=`$CYGPATH -u "$shortmode_path"`
17583      new_path="$input_path"
17584    fi
17585  fi
17586
17587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17588  if test "x$test_cygdrive_prefix" = x; then
17589    # As a simple fix, exclude /usr/bin since it's not a real path.
17590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17592      # a path prefixed by /cygdrive for fixpath to work.
17593      new_path="$CYGWIN_ROOT_PATH$input_path"
17594    fi
17595  fi
17596
17597  # remove trailing .exe if any
17598  new_path="${new_path/%.exe/}"
17599
17600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17601
17602  # First separate the path from the arguments. This will split at the first
17603  # space.
17604  complete="$FOUND_MAKE"
17605  path="${complete%% *}"
17606  tmp="$complete EOL"
17607  arguments="${tmp#* }"
17608
17609  # Input might be given as Windows format, start by converting to
17610  # unix format.
17611  new_path="$path"
17612
17613  windows_path="$new_path"
17614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17615    unix_path=`$CYGPATH -u "$windows_path"`
17616    new_path="$unix_path"
17617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17619    new_path="$unix_path"
17620  fi
17621
17622
17623  # Now try to locate executable using which
17624  new_path=`$WHICH "$new_path" 2> /dev/null`
17625
17626  if test "x$new_path" = x; then
17627    # Oops. Which didn't find the executable.
17628    # The splitting of arguments from the executable at a space might have been incorrect,
17629    # since paths with space are more likely in Windows. Give it another try with the whole
17630    # argument.
17631    path="$complete"
17632    arguments="EOL"
17633    new_path="$path"
17634
17635  windows_path="$new_path"
17636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17637    unix_path=`$CYGPATH -u "$windows_path"`
17638    new_path="$unix_path"
17639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17641    new_path="$unix_path"
17642  fi
17643
17644
17645    new_path=`$WHICH "$new_path" 2> /dev/null`
17646    # bat and cmd files are not always considered executable in MSYS causing which
17647    # to not find them
17648    if test "x$new_path" = x \
17649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17651      new_path="$path"
17652
17653  windows_path="$new_path"
17654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17655    unix_path=`$CYGPATH -u "$windows_path"`
17656    new_path="$unix_path"
17657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17659    new_path="$unix_path"
17660  fi
17661
17662    fi
17663
17664    if test "x$new_path" = x; then
17665      # It's still not found. Now this is an unrecoverable error.
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668      has_space=`$ECHO "$complete" | $GREP " "`
17669      if test "x$has_space" != x; then
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17672      fi
17673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674    fi
17675  fi
17676
17677  # Now new_path has a complete unix path to the binary
17678  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17679    # Keep paths in /bin as-is, but remove trailing .exe if any
17680    new_path="${new_path/%.exe/}"
17681    # Do not save /bin paths to all_fixpath_prefixes!
17682  else
17683    # Not in mixed or Windows style, start by that.
17684    new_path=`cmd //c echo $new_path`
17685
17686  input_path="$new_path"
17687  # Check if we need to convert this using DOS-style short mode. If the path
17688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17689  # take no chances and rewrite it.
17690  # Note: m4 eats our [], so we need to use [ and ] instead.
17691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17692  if test "x$has_forbidden_chars" != x; then
17693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17695  fi
17696
17697    # Output is in $new_path
17698
17699  windows_path="$new_path"
17700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17701    unix_path=`$CYGPATH -u "$windows_path"`
17702    new_path="$unix_path"
17703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17705    new_path="$unix_path"
17706  fi
17707
17708    # remove trailing .exe if any
17709    new_path="${new_path/%.exe/}"
17710
17711    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17712    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17713  fi
17714
17715    else
17716      # We're on a unix platform. Hooray! :)
17717      # First separate the path from the arguments. This will split at the first
17718      # space.
17719      complete="$FOUND_MAKE"
17720      path="${complete%% *}"
17721      tmp="$complete EOL"
17722      arguments="${tmp#* }"
17723
17724      # Cannot rely on the command "which" here since it doesn't always work.
17725      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17726      if test -z "$is_absolute_path"; then
17727        # Path to executable is not absolute. Find it.
17728        IFS_save="$IFS"
17729        IFS=:
17730        for p in $PATH; do
17731          if test -f "$p/$path" && test -x "$p/$path"; then
17732            new_path="$p/$path"
17733            break
17734          fi
17735        done
17736        IFS="$IFS_save"
17737      else
17738        # This is an absolute path, we can use it without further modifications.
17739        new_path="$path"
17740      fi
17741
17742      if test "x$new_path" = x; then
17743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17744$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17745        has_space=`$ECHO "$complete" | $GREP " "`
17746        if test "x$has_space" != x; then
17747          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17749        fi
17750        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17751      fi
17752    fi
17753
17754    # Now join together the path and the arguments once again
17755    if test "x$arguments" != xEOL; then
17756      new_complete="$new_path ${arguments% *}"
17757    else
17758      new_complete="$new_path"
17759    fi
17760
17761    if test "x$complete" != "x$new_complete"; then
17762      FOUND_MAKE="$new_complete"
17763      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17764$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17765    fi
17766  fi
17767
17768        fi
17769      fi
17770    fi
17771  fi
17772
17773        if test "x$FOUND_MAKE" = x; then
17774          for ac_prog in make
17775do
17776  # Extract the first word of "$ac_prog", so it can be a program name with args.
17777set dummy $ac_prog; ac_word=$2
17778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17779$as_echo_n "checking for $ac_word... " >&6; }
17780if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17781  $as_echo_n "(cached) " >&6
17782else
17783  case $CHECK_TOOLSDIR_MAKE in
17784  [\\/]* | ?:[\\/]*)
17785  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17786  ;;
17787  *)
17788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17789for as_dir in $PATH
17790do
17791  IFS=$as_save_IFS
17792  test -z "$as_dir" && as_dir=.
17793    for ac_exec_ext in '' $ac_executable_extensions; do
17794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17795    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17797    break 2
17798  fi
17799done
17800  done
17801IFS=$as_save_IFS
17802
17803  ;;
17804esac
17805fi
17806CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17807if test -n "$CHECK_TOOLSDIR_MAKE"; then
17808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17809$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17810else
17811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17812$as_echo "no" >&6; }
17813fi
17814
17815
17816  test -n "$CHECK_TOOLSDIR_MAKE" && break
17817done
17818
17819
17820  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17821  DESCRIPTION="make in tools-dir"
17822
17823  # On Cygwin, we require a newer version of make than on other platforms
17824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17825    MAKE_VERSION_EXPR="-e 4\."
17826    MAKE_REQUIRED_VERSION="4.0"
17827   else
17828    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17829    MAKE_REQUIRED_VERSION="3.81"
17830  fi
17831
17832  if test "x$MAKE_CANDIDATE" != x; then
17833    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17834$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17835    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17836    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17837    if test "x$IS_GNU_MAKE" = x; then
17838      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17839$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17840    else
17841      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17842      if test "x$IS_MODERN_MAKE" = x; then
17843        { $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
17844$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;}
17845      else
17846        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17847          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17848            MAKE_EXPECTED_ENV='cygwin'
17849          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17850            MAKE_EXPECTED_ENV='msys'
17851          else
17852            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17853          fi
17854          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17855          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17856        else
17857          # Not relevant for non-Windows
17858          IS_MAKE_CORRECT_ENV=true
17859        fi
17860        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17861          { $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
17862$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;}
17863        else
17864          FOUND_MAKE=$MAKE_CANDIDATE
17865
17866  # Only process if variable expands to non-empty
17867
17868  if test "x$FOUND_MAKE" != x; then
17869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17870
17871  # First separate the path from the arguments. This will split at the first
17872  # space.
17873  complete="$FOUND_MAKE"
17874  path="${complete%% *}"
17875  tmp="$complete EOL"
17876  arguments="${tmp#* }"
17877
17878  # Input might be given as Windows format, start by converting to
17879  # unix format.
17880  new_path=`$CYGPATH -u "$path"`
17881
17882  # Now try to locate executable using which
17883  new_path=`$WHICH "$new_path" 2> /dev/null`
17884  # bat and cmd files are not always considered executable in cygwin causing which
17885  # to not find them
17886  if test "x$new_path" = x \
17887      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17888      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17889    new_path=`$CYGPATH -u "$path"`
17890  fi
17891  if test "x$new_path" = x; then
17892    # Oops. Which didn't find the executable.
17893    # The splitting of arguments from the executable at a space might have been incorrect,
17894    # since paths with space are more likely in Windows. Give it another try with the whole
17895    # argument.
17896    path="$complete"
17897    arguments="EOL"
17898    new_path=`$CYGPATH -u "$path"`
17899    new_path=`$WHICH "$new_path" 2> /dev/null`
17900    # bat and cmd files are not always considered executable in cygwin causing which
17901    # to not find them
17902    if test "x$new_path" = x \
17903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17905      new_path=`$CYGPATH -u "$path"`
17906    fi
17907    if test "x$new_path" = x; then
17908      # It's still not found. Now this is an unrecoverable error.
17909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17910$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17911      has_space=`$ECHO "$complete" | $GREP " "`
17912      if test "x$has_space" != x; then
17913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17915      fi
17916      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17917    fi
17918  fi
17919
17920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17923  # "foo.exe" is OK but "foo" is an error.
17924  #
17925  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17926  # It is also a way to make sure we got the proper file name for the real test later on.
17927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17928  if test "x$test_shortpath" = x; then
17929    # Short path failed, file does not exist as specified.
17930    # Try adding .exe or .cmd
17931    if test -f "${new_path}.exe"; then
17932      input_to_shortpath="${new_path}.exe"
17933    elif test -f "${new_path}.cmd"; then
17934      input_to_shortpath="${new_path}.cmd"
17935    else
17936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17937$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17938      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17939$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17940      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17941    fi
17942  else
17943    input_to_shortpath="$new_path"
17944  fi
17945
17946  # Call helper function which possibly converts this using DOS-style short mode.
17947  # If so, the updated path is stored in $new_path.
17948  new_path="$input_to_shortpath"
17949
17950  input_path="$input_to_shortpath"
17951  # Check if we need to convert this using DOS-style short mode. If the path
17952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17953  # take no chances and rewrite it.
17954  # Note: m4 eats our [], so we need to use [ and ] instead.
17955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17956  if test "x$has_forbidden_chars" != x; then
17957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17961      # Going to short mode and back again did indeed matter. Since short mode is
17962      # case insensitive, let's make it lowercase to improve readability.
17963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17964      # Now convert it back to Unix-style (cygpath)
17965      input_path=`$CYGPATH -u "$shortmode_path"`
17966      new_path="$input_path"
17967    fi
17968  fi
17969
17970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17971  if test "x$test_cygdrive_prefix" = x; then
17972    # As a simple fix, exclude /usr/bin since it's not a real path.
17973    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17975      # a path prefixed by /cygdrive for fixpath to work.
17976      new_path="$CYGWIN_ROOT_PATH$input_path"
17977    fi
17978  fi
17979
17980  # remove trailing .exe if any
17981  new_path="${new_path/%.exe/}"
17982
17983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17984
17985  # First separate the path from the arguments. This will split at the first
17986  # space.
17987  complete="$FOUND_MAKE"
17988  path="${complete%% *}"
17989  tmp="$complete EOL"
17990  arguments="${tmp#* }"
17991
17992  # Input might be given as Windows format, start by converting to
17993  # unix format.
17994  new_path="$path"
17995
17996  windows_path="$new_path"
17997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17998    unix_path=`$CYGPATH -u "$windows_path"`
17999    new_path="$unix_path"
18000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18002    new_path="$unix_path"
18003  fi
18004
18005
18006  # Now try to locate executable using which
18007  new_path=`$WHICH "$new_path" 2> /dev/null`
18008
18009  if test "x$new_path" = x; then
18010    # Oops. Which didn't find the executable.
18011    # The splitting of arguments from the executable at a space might have been incorrect,
18012    # since paths with space are more likely in Windows. Give it another try with the whole
18013    # argument.
18014    path="$complete"
18015    arguments="EOL"
18016    new_path="$path"
18017
18018  windows_path="$new_path"
18019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18020    unix_path=`$CYGPATH -u "$windows_path"`
18021    new_path="$unix_path"
18022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18024    new_path="$unix_path"
18025  fi
18026
18027
18028    new_path=`$WHICH "$new_path" 2> /dev/null`
18029    # bat and cmd files are not always considered executable in MSYS causing which
18030    # to not find them
18031    if test "x$new_path" = x \
18032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18034      new_path="$path"
18035
18036  windows_path="$new_path"
18037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038    unix_path=`$CYGPATH -u "$windows_path"`
18039    new_path="$unix_path"
18040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18042    new_path="$unix_path"
18043  fi
18044
18045    fi
18046
18047    if test "x$new_path" = x; then
18048      # It's still not found. Now this is an unrecoverable error.
18049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18051      has_space=`$ECHO "$complete" | $GREP " "`
18052      if test "x$has_space" != x; then
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18055      fi
18056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18057    fi
18058  fi
18059
18060  # Now new_path has a complete unix path to the binary
18061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18062    # Keep paths in /bin as-is, but remove trailing .exe if any
18063    new_path="${new_path/%.exe/}"
18064    # Do not save /bin paths to all_fixpath_prefixes!
18065  else
18066    # Not in mixed or Windows style, start by that.
18067    new_path=`cmd //c echo $new_path`
18068
18069  input_path="$new_path"
18070  # Check if we need to convert this using DOS-style short mode. If the path
18071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18072  # take no chances and rewrite it.
18073  # Note: m4 eats our [], so we need to use [ and ] instead.
18074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18075  if test "x$has_forbidden_chars" != x; then
18076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18078  fi
18079
18080    # Output is in $new_path
18081
18082  windows_path="$new_path"
18083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18084    unix_path=`$CYGPATH -u "$windows_path"`
18085    new_path="$unix_path"
18086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18088    new_path="$unix_path"
18089  fi
18090
18091    # remove trailing .exe if any
18092    new_path="${new_path/%.exe/}"
18093
18094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18096  fi
18097
18098    else
18099      # We're on a unix platform. Hooray! :)
18100      # First separate the path from the arguments. This will split at the first
18101      # space.
18102      complete="$FOUND_MAKE"
18103      path="${complete%% *}"
18104      tmp="$complete EOL"
18105      arguments="${tmp#* }"
18106
18107      # Cannot rely on the command "which" here since it doesn't always work.
18108      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18109      if test -z "$is_absolute_path"; then
18110        # Path to executable is not absolute. Find it.
18111        IFS_save="$IFS"
18112        IFS=:
18113        for p in $PATH; do
18114          if test -f "$p/$path" && test -x "$p/$path"; then
18115            new_path="$p/$path"
18116            break
18117          fi
18118        done
18119        IFS="$IFS_save"
18120      else
18121        # This is an absolute path, we can use it without further modifications.
18122        new_path="$path"
18123      fi
18124
18125      if test "x$new_path" = x; then
18126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18127$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18128        has_space=`$ECHO "$complete" | $GREP " "`
18129        if test "x$has_space" != x; then
18130          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18131$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18132        fi
18133        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18134      fi
18135    fi
18136
18137    # Now join together the path and the arguments once again
18138    if test "x$arguments" != xEOL; then
18139      new_complete="$new_path ${arguments% *}"
18140    else
18141      new_complete="$new_path"
18142    fi
18143
18144    if test "x$complete" != "x$new_complete"; then
18145      FOUND_MAKE="$new_complete"
18146      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18147$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18148    fi
18149  fi
18150
18151        fi
18152      fi
18153    fi
18154  fi
18155
18156        fi
18157        PATH=$OLD_PATH
18158      fi
18159    fi
18160
18161    if test "x$FOUND_MAKE" = x; then
18162      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
18163    fi
18164  fi
18165
18166  MAKE=$FOUND_MAKE
18167
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
18169$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
18170
18171
18172  # Check if make supports the output sync option and if so, setup using it.
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
18174$as_echo_n "checking if make --output-sync is supported... " >&6; }
18175  if $MAKE --version -O > /dev/null 2>&1; then
18176    OUTPUT_SYNC_SUPPORTED=true
18177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18178$as_echo "yes" >&6; }
18179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
18180$as_echo_n "checking for output-sync value... " >&6; }
18181
18182# Check whether --with-output-sync was given.
18183if test "${with_output_sync+set}" = set; then :
18184  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
18185fi
18186
18187    if test "x$OUTPUT_SYNC" = "x"; then
18188      OUTPUT_SYNC=none
18189    fi
18190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
18191$as_echo "$OUTPUT_SYNC" >&6; }
18192    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
18193      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
18194    fi
18195  else
18196    OUTPUT_SYNC_SUPPORTED=false
18197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18198$as_echo "no" >&6; }
18199  fi
18200
18201
18202
18203
18204
18205
18206  # Test if find supports -delete
18207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
18208$as_echo_n "checking if find supports -delete... " >&6; }
18209  FIND_DELETE="-delete"
18210
18211  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
18212
18213  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
18214
18215  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
18216  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
18217    # No, it does not.
18218    rm $DELETEDIR/TestIfFindSupportsDelete
18219    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
18220      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
18221      FIND_DELETE="-print | xargs rm"
18222    else
18223      FIND_DELETE="-exec rm \{\} \+"
18224    fi
18225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18226$as_echo "no" >&6; }
18227  else
18228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18229$as_echo "yes" >&6; }
18230  fi
18231  rmdir $DELETEDIR
18232
18233
18234
18235  # These tools might not be installed by default,
18236  # need hint on how to install them.
18237
18238
18239
18240  # Publish this variable in the help.
18241
18242
18243  if [ -z "${UNZIP+x}" ]; then
18244    # The variable is not set by user, try to locate tool using the code snippet
18245    for ac_prog in unzip
18246do
18247  # Extract the first word of "$ac_prog", so it can be a program name with args.
18248set dummy $ac_prog; ac_word=$2
18249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18250$as_echo_n "checking for $ac_word... " >&6; }
18251if ${ac_cv_path_UNZIP+:} false; then :
18252  $as_echo_n "(cached) " >&6
18253else
18254  case $UNZIP in
18255  [\\/]* | ?:[\\/]*)
18256  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18257  ;;
18258  *)
18259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18260for as_dir in $PATH
18261do
18262  IFS=$as_save_IFS
18263  test -z "$as_dir" && as_dir=.
18264    for ac_exec_ext in '' $ac_executable_extensions; do
18265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18266    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18268    break 2
18269  fi
18270done
18271  done
18272IFS=$as_save_IFS
18273
18274  ;;
18275esac
18276fi
18277UNZIP=$ac_cv_path_UNZIP
18278if test -n "$UNZIP"; then
18279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18280$as_echo "$UNZIP" >&6; }
18281else
18282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18283$as_echo "no" >&6; }
18284fi
18285
18286
18287  test -n "$UNZIP" && break
18288done
18289
18290  else
18291    # The variable is set, but is it from the command line or the environment?
18292
18293    # Try to remove the string !UNZIP! from our list.
18294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
18295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18296      # If it failed, the variable was not from the command line. Ignore it,
18297      # but warn the user (except for BASH, which is always set by the calling BASH).
18298      if test "xUNZIP" != xBASH; then
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
18300$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
18301      fi
18302      # Try to locate tool using the code snippet
18303      for ac_prog in unzip
18304do
18305  # Extract the first word of "$ac_prog", so it can be a program name with args.
18306set dummy $ac_prog; ac_word=$2
18307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18308$as_echo_n "checking for $ac_word... " >&6; }
18309if ${ac_cv_path_UNZIP+:} false; then :
18310  $as_echo_n "(cached) " >&6
18311else
18312  case $UNZIP in
18313  [\\/]* | ?:[\\/]*)
18314  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18315  ;;
18316  *)
18317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18318for as_dir in $PATH
18319do
18320  IFS=$as_save_IFS
18321  test -z "$as_dir" && as_dir=.
18322    for ac_exec_ext in '' $ac_executable_extensions; do
18323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18324    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18326    break 2
18327  fi
18328done
18329  done
18330IFS=$as_save_IFS
18331
18332  ;;
18333esac
18334fi
18335UNZIP=$ac_cv_path_UNZIP
18336if test -n "$UNZIP"; then
18337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18338$as_echo "$UNZIP" >&6; }
18339else
18340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18341$as_echo "no" >&6; }
18342fi
18343
18344
18345  test -n "$UNZIP" && break
18346done
18347
18348    else
18349      # If it succeeded, then it was overridden by the user. We will use it
18350      # for the tool.
18351
18352      # First remove it from the list of overridden variables, so we can test
18353      # for unknown variables in the end.
18354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18355
18356      # Check if we try to supply an empty value
18357      if test "x$UNZIP" = x; then
18358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
18359$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
18360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18361$as_echo_n "checking for UNZIP... " >&6; }
18362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18363$as_echo "disabled" >&6; }
18364      else
18365        # Check if the provided tool contains a complete path.
18366        tool_specified="$UNZIP"
18367        tool_basename="${tool_specified##*/}"
18368        if test "x$tool_basename" = "x$tool_specified"; then
18369          # A command without a complete path is provided, search $PATH.
18370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
18371$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
18372          # Extract the first word of "$tool_basename", so it can be a program name with args.
18373set dummy $tool_basename; ac_word=$2
18374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18375$as_echo_n "checking for $ac_word... " >&6; }
18376if ${ac_cv_path_UNZIP+:} false; then :
18377  $as_echo_n "(cached) " >&6
18378else
18379  case $UNZIP in
18380  [\\/]* | ?:[\\/]*)
18381  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18382  ;;
18383  *)
18384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18385for as_dir in $PATH
18386do
18387  IFS=$as_save_IFS
18388  test -z "$as_dir" && as_dir=.
18389    for ac_exec_ext in '' $ac_executable_extensions; do
18390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18391    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18393    break 2
18394  fi
18395done
18396  done
18397IFS=$as_save_IFS
18398
18399  ;;
18400esac
18401fi
18402UNZIP=$ac_cv_path_UNZIP
18403if test -n "$UNZIP"; then
18404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18405$as_echo "$UNZIP" >&6; }
18406else
18407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18408$as_echo "no" >&6; }
18409fi
18410
18411
18412          if test "x$UNZIP" = x; then
18413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18414          fi
18415        else
18416          # Otherwise we believe it is a complete path. Use it as it is.
18417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
18418$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
18419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18420$as_echo_n "checking for UNZIP... " >&6; }
18421          if test ! -x "$tool_specified"; then
18422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18423$as_echo "not found" >&6; }
18424            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18425          fi
18426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18427$as_echo "$tool_specified" >&6; }
18428        fi
18429      fi
18430    fi
18431  fi
18432
18433
18434
18435  if test "x$UNZIP" = x; then
18436    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
18437  fi
18438
18439
18440
18441
18442
18443  # Publish this variable in the help.
18444
18445
18446  if [ -z "${ZIP+x}" ]; then
18447    # The variable is not set by user, try to locate tool using the code snippet
18448    for ac_prog in zip
18449do
18450  # Extract the first word of "$ac_prog", so it can be a program name with args.
18451set dummy $ac_prog; ac_word=$2
18452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18453$as_echo_n "checking for $ac_word... " >&6; }
18454if ${ac_cv_path_ZIP+:} false; then :
18455  $as_echo_n "(cached) " >&6
18456else
18457  case $ZIP in
18458  [\\/]* | ?:[\\/]*)
18459  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18460  ;;
18461  *)
18462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18463for as_dir in $PATH
18464do
18465  IFS=$as_save_IFS
18466  test -z "$as_dir" && as_dir=.
18467    for ac_exec_ext in '' $ac_executable_extensions; do
18468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18469    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18471    break 2
18472  fi
18473done
18474  done
18475IFS=$as_save_IFS
18476
18477  ;;
18478esac
18479fi
18480ZIP=$ac_cv_path_ZIP
18481if test -n "$ZIP"; then
18482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18483$as_echo "$ZIP" >&6; }
18484else
18485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18486$as_echo "no" >&6; }
18487fi
18488
18489
18490  test -n "$ZIP" && break
18491done
18492
18493  else
18494    # The variable is set, but is it from the command line or the environment?
18495
18496    # Try to remove the string !ZIP! from our list.
18497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
18498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18499      # If it failed, the variable was not from the command line. Ignore it,
18500      # but warn the user (except for BASH, which is always set by the calling BASH).
18501      if test "xZIP" != xBASH; then
18502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
18503$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
18504      fi
18505      # Try to locate tool using the code snippet
18506      for ac_prog in zip
18507do
18508  # Extract the first word of "$ac_prog", so it can be a program name with args.
18509set dummy $ac_prog; ac_word=$2
18510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18511$as_echo_n "checking for $ac_word... " >&6; }
18512if ${ac_cv_path_ZIP+:} false; then :
18513  $as_echo_n "(cached) " >&6
18514else
18515  case $ZIP in
18516  [\\/]* | ?:[\\/]*)
18517  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18518  ;;
18519  *)
18520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18521for as_dir in $PATH
18522do
18523  IFS=$as_save_IFS
18524  test -z "$as_dir" && as_dir=.
18525    for ac_exec_ext in '' $ac_executable_extensions; do
18526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18527    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18529    break 2
18530  fi
18531done
18532  done
18533IFS=$as_save_IFS
18534
18535  ;;
18536esac
18537fi
18538ZIP=$ac_cv_path_ZIP
18539if test -n "$ZIP"; then
18540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18541$as_echo "$ZIP" >&6; }
18542else
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18544$as_echo "no" >&6; }
18545fi
18546
18547
18548  test -n "$ZIP" && break
18549done
18550
18551    else
18552      # If it succeeded, then it was overridden by the user. We will use it
18553      # for the tool.
18554
18555      # First remove it from the list of overridden variables, so we can test
18556      # for unknown variables in the end.
18557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18558
18559      # Check if we try to supply an empty value
18560      if test "x$ZIP" = x; then
18561        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
18562$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
18563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18564$as_echo_n "checking for ZIP... " >&6; }
18565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18566$as_echo "disabled" >&6; }
18567      else
18568        # Check if the provided tool contains a complete path.
18569        tool_specified="$ZIP"
18570        tool_basename="${tool_specified##*/}"
18571        if test "x$tool_basename" = "x$tool_specified"; then
18572          # A command without a complete path is provided, search $PATH.
18573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
18574$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
18575          # Extract the first word of "$tool_basename", so it can be a program name with args.
18576set dummy $tool_basename; ac_word=$2
18577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18578$as_echo_n "checking for $ac_word... " >&6; }
18579if ${ac_cv_path_ZIP+:} false; then :
18580  $as_echo_n "(cached) " >&6
18581else
18582  case $ZIP in
18583  [\\/]* | ?:[\\/]*)
18584  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18585  ;;
18586  *)
18587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18588for as_dir in $PATH
18589do
18590  IFS=$as_save_IFS
18591  test -z "$as_dir" && as_dir=.
18592    for ac_exec_ext in '' $ac_executable_extensions; do
18593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18594    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18596    break 2
18597  fi
18598done
18599  done
18600IFS=$as_save_IFS
18601
18602  ;;
18603esac
18604fi
18605ZIP=$ac_cv_path_ZIP
18606if test -n "$ZIP"; then
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18608$as_echo "$ZIP" >&6; }
18609else
18610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18611$as_echo "no" >&6; }
18612fi
18613
18614
18615          if test "x$ZIP" = x; then
18616            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18617          fi
18618        else
18619          # Otherwise we believe it is a complete path. Use it as it is.
18620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
18621$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
18622          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18623$as_echo_n "checking for ZIP... " >&6; }
18624          if test ! -x "$tool_specified"; then
18625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18626$as_echo "not found" >&6; }
18627            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18628          fi
18629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18630$as_echo "$tool_specified" >&6; }
18631        fi
18632      fi
18633    fi
18634  fi
18635
18636
18637
18638  if test "x$ZIP" = x; then
18639    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18640  fi
18641
18642
18643
18644  # Non-required basic tools
18645
18646
18647
18648  # Publish this variable in the help.
18649
18650
18651  if [ -z "${LDD+x}" ]; then
18652    # The variable is not set by user, try to locate tool using the code snippet
18653    for ac_prog in ldd
18654do
18655  # Extract the first word of "$ac_prog", so it can be a program name with args.
18656set dummy $ac_prog; ac_word=$2
18657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18658$as_echo_n "checking for $ac_word... " >&6; }
18659if ${ac_cv_path_LDD+:} false; then :
18660  $as_echo_n "(cached) " >&6
18661else
18662  case $LDD in
18663  [\\/]* | ?:[\\/]*)
18664  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18665  ;;
18666  *)
18667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18668for as_dir in $PATH
18669do
18670  IFS=$as_save_IFS
18671  test -z "$as_dir" && as_dir=.
18672    for ac_exec_ext in '' $ac_executable_extensions; do
18673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18674    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18676    break 2
18677  fi
18678done
18679  done
18680IFS=$as_save_IFS
18681
18682  ;;
18683esac
18684fi
18685LDD=$ac_cv_path_LDD
18686if test -n "$LDD"; then
18687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18688$as_echo "$LDD" >&6; }
18689else
18690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18691$as_echo "no" >&6; }
18692fi
18693
18694
18695  test -n "$LDD" && break
18696done
18697
18698  else
18699    # The variable is set, but is it from the command line or the environment?
18700
18701    # Try to remove the string !LDD! from our list.
18702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18704      # If it failed, the variable was not from the command line. Ignore it,
18705      # but warn the user (except for BASH, which is always set by the calling BASH).
18706      if test "xLDD" != xBASH; then
18707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18708$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18709      fi
18710      # Try to locate tool using the code snippet
18711      for ac_prog in ldd
18712do
18713  # Extract the first word of "$ac_prog", so it can be a program name with args.
18714set dummy $ac_prog; ac_word=$2
18715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18716$as_echo_n "checking for $ac_word... " >&6; }
18717if ${ac_cv_path_LDD+:} false; then :
18718  $as_echo_n "(cached) " >&6
18719else
18720  case $LDD in
18721  [\\/]* | ?:[\\/]*)
18722  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18723  ;;
18724  *)
18725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18726for as_dir in $PATH
18727do
18728  IFS=$as_save_IFS
18729  test -z "$as_dir" && as_dir=.
18730    for ac_exec_ext in '' $ac_executable_extensions; do
18731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18732    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18734    break 2
18735  fi
18736done
18737  done
18738IFS=$as_save_IFS
18739
18740  ;;
18741esac
18742fi
18743LDD=$ac_cv_path_LDD
18744if test -n "$LDD"; then
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18746$as_echo "$LDD" >&6; }
18747else
18748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18749$as_echo "no" >&6; }
18750fi
18751
18752
18753  test -n "$LDD" && break
18754done
18755
18756    else
18757      # If it succeeded, then it was overridden by the user. We will use it
18758      # for the tool.
18759
18760      # First remove it from the list of overridden variables, so we can test
18761      # for unknown variables in the end.
18762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18763
18764      # Check if we try to supply an empty value
18765      if test "x$LDD" = x; then
18766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
18767$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
18768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18769$as_echo_n "checking for LDD... " >&6; }
18770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18771$as_echo "disabled" >&6; }
18772      else
18773        # Check if the provided tool contains a complete path.
18774        tool_specified="$LDD"
18775        tool_basename="${tool_specified##*/}"
18776        if test "x$tool_basename" = "x$tool_specified"; then
18777          # A command without a complete path is provided, search $PATH.
18778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18779$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18780          # Extract the first word of "$tool_basename", so it can be a program name with args.
18781set dummy $tool_basename; ac_word=$2
18782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18783$as_echo_n "checking for $ac_word... " >&6; }
18784if ${ac_cv_path_LDD+:} false; then :
18785  $as_echo_n "(cached) " >&6
18786else
18787  case $LDD in
18788  [\\/]* | ?:[\\/]*)
18789  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18790  ;;
18791  *)
18792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18793for as_dir in $PATH
18794do
18795  IFS=$as_save_IFS
18796  test -z "$as_dir" && as_dir=.
18797    for ac_exec_ext in '' $ac_executable_extensions; do
18798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18799    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18801    break 2
18802  fi
18803done
18804  done
18805IFS=$as_save_IFS
18806
18807  ;;
18808esac
18809fi
18810LDD=$ac_cv_path_LDD
18811if test -n "$LDD"; then
18812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18813$as_echo "$LDD" >&6; }
18814else
18815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18816$as_echo "no" >&6; }
18817fi
18818
18819
18820          if test "x$LDD" = x; then
18821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18822          fi
18823        else
18824          # Otherwise we believe it is a complete path. Use it as it is.
18825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18826$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18828$as_echo_n "checking for LDD... " >&6; }
18829          if test ! -x "$tool_specified"; then
18830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18831$as_echo "not found" >&6; }
18832            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18833          fi
18834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18835$as_echo "$tool_specified" >&6; }
18836        fi
18837      fi
18838    fi
18839  fi
18840
18841
18842  if test "x$LDD" = "x"; then
18843    # List shared lib dependencies is used for
18844    # debug output and checking for forbidden dependencies.
18845    # We can build without it.
18846    LDD="true"
18847  fi
18848
18849
18850  # Publish this variable in the help.
18851
18852
18853  if [ -z "${OTOOL+x}" ]; then
18854    # The variable is not set by user, try to locate tool using the code snippet
18855    for ac_prog in otool
18856do
18857  # Extract the first word of "$ac_prog", so it can be a program name with args.
18858set dummy $ac_prog; ac_word=$2
18859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18860$as_echo_n "checking for $ac_word... " >&6; }
18861if ${ac_cv_path_OTOOL+:} false; then :
18862  $as_echo_n "(cached) " >&6
18863else
18864  case $OTOOL in
18865  [\\/]* | ?:[\\/]*)
18866  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18867  ;;
18868  *)
18869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18870for as_dir in $PATH
18871do
18872  IFS=$as_save_IFS
18873  test -z "$as_dir" && as_dir=.
18874    for ac_exec_ext in '' $ac_executable_extensions; do
18875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18876    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18878    break 2
18879  fi
18880done
18881  done
18882IFS=$as_save_IFS
18883
18884  ;;
18885esac
18886fi
18887OTOOL=$ac_cv_path_OTOOL
18888if test -n "$OTOOL"; then
18889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18890$as_echo "$OTOOL" >&6; }
18891else
18892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18893$as_echo "no" >&6; }
18894fi
18895
18896
18897  test -n "$OTOOL" && break
18898done
18899
18900  else
18901    # The variable is set, but is it from the command line or the environment?
18902
18903    # Try to remove the string !OTOOL! from our list.
18904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18906      # If it failed, the variable was not from the command line. Ignore it,
18907      # but warn the user (except for BASH, which is always set by the calling BASH).
18908      if test "xOTOOL" != xBASH; then
18909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18910$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18911      fi
18912      # Try to locate tool using the code snippet
18913      for ac_prog in otool
18914do
18915  # Extract the first word of "$ac_prog", so it can be a program name with args.
18916set dummy $ac_prog; ac_word=$2
18917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18918$as_echo_n "checking for $ac_word... " >&6; }
18919if ${ac_cv_path_OTOOL+:} false; then :
18920  $as_echo_n "(cached) " >&6
18921else
18922  case $OTOOL in
18923  [\\/]* | ?:[\\/]*)
18924  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18925  ;;
18926  *)
18927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18928for as_dir in $PATH
18929do
18930  IFS=$as_save_IFS
18931  test -z "$as_dir" && as_dir=.
18932    for ac_exec_ext in '' $ac_executable_extensions; do
18933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18934    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18936    break 2
18937  fi
18938done
18939  done
18940IFS=$as_save_IFS
18941
18942  ;;
18943esac
18944fi
18945OTOOL=$ac_cv_path_OTOOL
18946if test -n "$OTOOL"; then
18947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18948$as_echo "$OTOOL" >&6; }
18949else
18950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18951$as_echo "no" >&6; }
18952fi
18953
18954
18955  test -n "$OTOOL" && break
18956done
18957
18958    else
18959      # If it succeeded, then it was overridden by the user. We will use it
18960      # for the tool.
18961
18962      # First remove it from the list of overridden variables, so we can test
18963      # for unknown variables in the end.
18964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18965
18966      # Check if we try to supply an empty value
18967      if test "x$OTOOL" = x; then
18968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
18969$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
18970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18971$as_echo_n "checking for OTOOL... " >&6; }
18972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18973$as_echo "disabled" >&6; }
18974      else
18975        # Check if the provided tool contains a complete path.
18976        tool_specified="$OTOOL"
18977        tool_basename="${tool_specified##*/}"
18978        if test "x$tool_basename" = "x$tool_specified"; then
18979          # A command without a complete path is provided, search $PATH.
18980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18981$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18982          # Extract the first word of "$tool_basename", so it can be a program name with args.
18983set dummy $tool_basename; ac_word=$2
18984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18985$as_echo_n "checking for $ac_word... " >&6; }
18986if ${ac_cv_path_OTOOL+:} false; then :
18987  $as_echo_n "(cached) " >&6
18988else
18989  case $OTOOL in
18990  [\\/]* | ?:[\\/]*)
18991  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18992  ;;
18993  *)
18994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18995for as_dir in $PATH
18996do
18997  IFS=$as_save_IFS
18998  test -z "$as_dir" && as_dir=.
18999    for ac_exec_ext in '' $ac_executable_extensions; do
19000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19001    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19003    break 2
19004  fi
19005done
19006  done
19007IFS=$as_save_IFS
19008
19009  ;;
19010esac
19011fi
19012OTOOL=$ac_cv_path_OTOOL
19013if test -n "$OTOOL"; then
19014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19015$as_echo "$OTOOL" >&6; }
19016else
19017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19018$as_echo "no" >&6; }
19019fi
19020
19021
19022          if test "x$OTOOL" = x; then
19023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19024          fi
19025        else
19026          # Otherwise we believe it is a complete path. Use it as it is.
19027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
19028$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
19029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
19030$as_echo_n "checking for OTOOL... " >&6; }
19031          if test ! -x "$tool_specified"; then
19032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19033$as_echo "not found" >&6; }
19034            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
19035          fi
19036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19037$as_echo "$tool_specified" >&6; }
19038        fi
19039      fi
19040    fi
19041  fi
19042
19043
19044  if test "x$OTOOL" = "x"; then
19045    OTOOL="true"
19046  fi
19047
19048
19049  # Publish this variable in the help.
19050
19051
19052  if [ -z "${READELF+x}" ]; then
19053    # The variable is not set by user, try to locate tool using the code snippet
19054    for ac_prog in greadelf readelf
19055do
19056  # Extract the first word of "$ac_prog", so it can be a program name with args.
19057set dummy $ac_prog; ac_word=$2
19058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19059$as_echo_n "checking for $ac_word... " >&6; }
19060if ${ac_cv_path_READELF+:} false; then :
19061  $as_echo_n "(cached) " >&6
19062else
19063  case $READELF in
19064  [\\/]* | ?:[\\/]*)
19065  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19066  ;;
19067  *)
19068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19069for as_dir in $PATH
19070do
19071  IFS=$as_save_IFS
19072  test -z "$as_dir" && as_dir=.
19073    for ac_exec_ext in '' $ac_executable_extensions; do
19074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19075    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19077    break 2
19078  fi
19079done
19080  done
19081IFS=$as_save_IFS
19082
19083  ;;
19084esac
19085fi
19086READELF=$ac_cv_path_READELF
19087if test -n "$READELF"; then
19088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19089$as_echo "$READELF" >&6; }
19090else
19091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19092$as_echo "no" >&6; }
19093fi
19094
19095
19096  test -n "$READELF" && break
19097done
19098
19099  else
19100    # The variable is set, but is it from the command line or the environment?
19101
19102    # Try to remove the string !READELF! from our list.
19103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
19104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19105      # If it failed, the variable was not from the command line. Ignore it,
19106      # but warn the user (except for BASH, which is always set by the calling BASH).
19107      if test "xREADELF" != xBASH; then
19108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
19109$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
19110      fi
19111      # Try to locate tool using the code snippet
19112      for ac_prog in greadelf readelf
19113do
19114  # Extract the first word of "$ac_prog", so it can be a program name with args.
19115set dummy $ac_prog; ac_word=$2
19116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19117$as_echo_n "checking for $ac_word... " >&6; }
19118if ${ac_cv_path_READELF+:} false; then :
19119  $as_echo_n "(cached) " >&6
19120else
19121  case $READELF in
19122  [\\/]* | ?:[\\/]*)
19123  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19124  ;;
19125  *)
19126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19127for as_dir in $PATH
19128do
19129  IFS=$as_save_IFS
19130  test -z "$as_dir" && as_dir=.
19131    for ac_exec_ext in '' $ac_executable_extensions; do
19132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19133    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19135    break 2
19136  fi
19137done
19138  done
19139IFS=$as_save_IFS
19140
19141  ;;
19142esac
19143fi
19144READELF=$ac_cv_path_READELF
19145if test -n "$READELF"; then
19146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19147$as_echo "$READELF" >&6; }
19148else
19149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19150$as_echo "no" >&6; }
19151fi
19152
19153
19154  test -n "$READELF" && break
19155done
19156
19157    else
19158      # If it succeeded, then it was overridden by the user. We will use it
19159      # for the tool.
19160
19161      # First remove it from the list of overridden variables, so we can test
19162      # for unknown variables in the end.
19163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19164
19165      # Check if we try to supply an empty value
19166      if test "x$READELF" = x; then
19167        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
19168$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
19169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19170$as_echo_n "checking for READELF... " >&6; }
19171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19172$as_echo "disabled" >&6; }
19173      else
19174        # Check if the provided tool contains a complete path.
19175        tool_specified="$READELF"
19176        tool_basename="${tool_specified##*/}"
19177        if test "x$tool_basename" = "x$tool_specified"; then
19178          # A command without a complete path is provided, search $PATH.
19179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
19180$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
19181          # Extract the first word of "$tool_basename", so it can be a program name with args.
19182set dummy $tool_basename; ac_word=$2
19183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19184$as_echo_n "checking for $ac_word... " >&6; }
19185if ${ac_cv_path_READELF+:} false; then :
19186  $as_echo_n "(cached) " >&6
19187else
19188  case $READELF in
19189  [\\/]* | ?:[\\/]*)
19190  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19191  ;;
19192  *)
19193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19194for as_dir in $PATH
19195do
19196  IFS=$as_save_IFS
19197  test -z "$as_dir" && as_dir=.
19198    for ac_exec_ext in '' $ac_executable_extensions; do
19199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19200    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19202    break 2
19203  fi
19204done
19205  done
19206IFS=$as_save_IFS
19207
19208  ;;
19209esac
19210fi
19211READELF=$ac_cv_path_READELF
19212if test -n "$READELF"; then
19213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19214$as_echo "$READELF" >&6; }
19215else
19216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19217$as_echo "no" >&6; }
19218fi
19219
19220
19221          if test "x$READELF" = x; then
19222            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19223          fi
19224        else
19225          # Otherwise we believe it is a complete path. Use it as it is.
19226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
19227$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
19228          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19229$as_echo_n "checking for READELF... " >&6; }
19230          if test ! -x "$tool_specified"; then
19231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19232$as_echo "not found" >&6; }
19233            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
19234          fi
19235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19236$as_echo "$tool_specified" >&6; }
19237        fi
19238      fi
19239    fi
19240  fi
19241
19242
19243
19244
19245  # Publish this variable in the help.
19246
19247
19248  if [ -z "${HG+x}" ]; then
19249    # The variable is not set by user, try to locate tool using the code snippet
19250    for ac_prog in hg
19251do
19252  # Extract the first word of "$ac_prog", so it can be a program name with args.
19253set dummy $ac_prog; ac_word=$2
19254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19255$as_echo_n "checking for $ac_word... " >&6; }
19256if ${ac_cv_path_HG+:} false; then :
19257  $as_echo_n "(cached) " >&6
19258else
19259  case $HG in
19260  [\\/]* | ?:[\\/]*)
19261  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19262  ;;
19263  *)
19264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19265for as_dir in $PATH
19266do
19267  IFS=$as_save_IFS
19268  test -z "$as_dir" && as_dir=.
19269    for ac_exec_ext in '' $ac_executable_extensions; do
19270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19271    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19273    break 2
19274  fi
19275done
19276  done
19277IFS=$as_save_IFS
19278
19279  ;;
19280esac
19281fi
19282HG=$ac_cv_path_HG
19283if test -n "$HG"; then
19284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19285$as_echo "$HG" >&6; }
19286else
19287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19288$as_echo "no" >&6; }
19289fi
19290
19291
19292  test -n "$HG" && break
19293done
19294
19295  else
19296    # The variable is set, but is it from the command line or the environment?
19297
19298    # Try to remove the string !HG! from our list.
19299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
19300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19301      # If it failed, the variable was not from the command line. Ignore it,
19302      # but warn the user (except for BASH, which is always set by the calling BASH).
19303      if test "xHG" != xBASH; then
19304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
19305$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
19306      fi
19307      # Try to locate tool using the code snippet
19308      for ac_prog in hg
19309do
19310  # Extract the first word of "$ac_prog", so it can be a program name with args.
19311set dummy $ac_prog; ac_word=$2
19312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19313$as_echo_n "checking for $ac_word... " >&6; }
19314if ${ac_cv_path_HG+:} false; then :
19315  $as_echo_n "(cached) " >&6
19316else
19317  case $HG in
19318  [\\/]* | ?:[\\/]*)
19319  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19320  ;;
19321  *)
19322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19323for as_dir in $PATH
19324do
19325  IFS=$as_save_IFS
19326  test -z "$as_dir" && as_dir=.
19327    for ac_exec_ext in '' $ac_executable_extensions; do
19328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19329    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19331    break 2
19332  fi
19333done
19334  done
19335IFS=$as_save_IFS
19336
19337  ;;
19338esac
19339fi
19340HG=$ac_cv_path_HG
19341if test -n "$HG"; then
19342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19343$as_echo "$HG" >&6; }
19344else
19345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19346$as_echo "no" >&6; }
19347fi
19348
19349
19350  test -n "$HG" && break
19351done
19352
19353    else
19354      # If it succeeded, then it was overridden by the user. We will use it
19355      # for the tool.
19356
19357      # First remove it from the list of overridden variables, so we can test
19358      # for unknown variables in the end.
19359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19360
19361      # Check if we try to supply an empty value
19362      if test "x$HG" = x; then
19363        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
19364$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
19365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19366$as_echo_n "checking for HG... " >&6; }
19367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19368$as_echo "disabled" >&6; }
19369      else
19370        # Check if the provided tool contains a complete path.
19371        tool_specified="$HG"
19372        tool_basename="${tool_specified##*/}"
19373        if test "x$tool_basename" = "x$tool_specified"; then
19374          # A command without a complete path is provided, search $PATH.
19375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
19376$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
19377          # Extract the first word of "$tool_basename", so it can be a program name with args.
19378set dummy $tool_basename; ac_word=$2
19379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19380$as_echo_n "checking for $ac_word... " >&6; }
19381if ${ac_cv_path_HG+:} false; then :
19382  $as_echo_n "(cached) " >&6
19383else
19384  case $HG in
19385  [\\/]* | ?:[\\/]*)
19386  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19387  ;;
19388  *)
19389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19390for as_dir in $PATH
19391do
19392  IFS=$as_save_IFS
19393  test -z "$as_dir" && as_dir=.
19394    for ac_exec_ext in '' $ac_executable_extensions; do
19395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19396    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19398    break 2
19399  fi
19400done
19401  done
19402IFS=$as_save_IFS
19403
19404  ;;
19405esac
19406fi
19407HG=$ac_cv_path_HG
19408if test -n "$HG"; then
19409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19410$as_echo "$HG" >&6; }
19411else
19412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19413$as_echo "no" >&6; }
19414fi
19415
19416
19417          if test "x$HG" = x; then
19418            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19419          fi
19420        else
19421          # Otherwise we believe it is a complete path. Use it as it is.
19422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
19423$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
19424          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19425$as_echo_n "checking for HG... " >&6; }
19426          if test ! -x "$tool_specified"; then
19427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19428$as_echo "not found" >&6; }
19429            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
19430          fi
19431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19432$as_echo "$tool_specified" >&6; }
19433        fi
19434      fi
19435    fi
19436  fi
19437
19438
19439
19440
19441  # Publish this variable in the help.
19442
19443
19444  if [ -z "${STAT+x}" ]; then
19445    # The variable is not set by user, try to locate tool using the code snippet
19446    for ac_prog in stat
19447do
19448  # Extract the first word of "$ac_prog", so it can be a program name with args.
19449set dummy $ac_prog; ac_word=$2
19450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19451$as_echo_n "checking for $ac_word... " >&6; }
19452if ${ac_cv_path_STAT+:} false; then :
19453  $as_echo_n "(cached) " >&6
19454else
19455  case $STAT in
19456  [\\/]* | ?:[\\/]*)
19457  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19458  ;;
19459  *)
19460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19461for as_dir in $PATH
19462do
19463  IFS=$as_save_IFS
19464  test -z "$as_dir" && as_dir=.
19465    for ac_exec_ext in '' $ac_executable_extensions; do
19466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19467    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19469    break 2
19470  fi
19471done
19472  done
19473IFS=$as_save_IFS
19474
19475  ;;
19476esac
19477fi
19478STAT=$ac_cv_path_STAT
19479if test -n "$STAT"; then
19480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19481$as_echo "$STAT" >&6; }
19482else
19483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19484$as_echo "no" >&6; }
19485fi
19486
19487
19488  test -n "$STAT" && break
19489done
19490
19491  else
19492    # The variable is set, but is it from the command line or the environment?
19493
19494    # Try to remove the string !STAT! from our list.
19495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
19496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19497      # If it failed, the variable was not from the command line. Ignore it,
19498      # but warn the user (except for BASH, which is always set by the calling BASH).
19499      if test "xSTAT" != xBASH; then
19500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
19501$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
19502      fi
19503      # Try to locate tool using the code snippet
19504      for ac_prog in stat
19505do
19506  # Extract the first word of "$ac_prog", so it can be a program name with args.
19507set dummy $ac_prog; ac_word=$2
19508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19509$as_echo_n "checking for $ac_word... " >&6; }
19510if ${ac_cv_path_STAT+:} false; then :
19511  $as_echo_n "(cached) " >&6
19512else
19513  case $STAT in
19514  [\\/]* | ?:[\\/]*)
19515  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19516  ;;
19517  *)
19518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19519for as_dir in $PATH
19520do
19521  IFS=$as_save_IFS
19522  test -z "$as_dir" && as_dir=.
19523    for ac_exec_ext in '' $ac_executable_extensions; do
19524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19525    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19527    break 2
19528  fi
19529done
19530  done
19531IFS=$as_save_IFS
19532
19533  ;;
19534esac
19535fi
19536STAT=$ac_cv_path_STAT
19537if test -n "$STAT"; then
19538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19539$as_echo "$STAT" >&6; }
19540else
19541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19542$as_echo "no" >&6; }
19543fi
19544
19545
19546  test -n "$STAT" && break
19547done
19548
19549    else
19550      # If it succeeded, then it was overridden by the user. We will use it
19551      # for the tool.
19552
19553      # First remove it from the list of overridden variables, so we can test
19554      # for unknown variables in the end.
19555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19556
19557      # Check if we try to supply an empty value
19558      if test "x$STAT" = x; then
19559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
19560$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
19561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19562$as_echo_n "checking for STAT... " >&6; }
19563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19564$as_echo "disabled" >&6; }
19565      else
19566        # Check if the provided tool contains a complete path.
19567        tool_specified="$STAT"
19568        tool_basename="${tool_specified##*/}"
19569        if test "x$tool_basename" = "x$tool_specified"; then
19570          # A command without a complete path is provided, search $PATH.
19571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
19572$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
19573          # Extract the first word of "$tool_basename", so it can be a program name with args.
19574set dummy $tool_basename; ac_word=$2
19575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19576$as_echo_n "checking for $ac_word... " >&6; }
19577if ${ac_cv_path_STAT+:} false; then :
19578  $as_echo_n "(cached) " >&6
19579else
19580  case $STAT in
19581  [\\/]* | ?:[\\/]*)
19582  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19583  ;;
19584  *)
19585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19586for as_dir in $PATH
19587do
19588  IFS=$as_save_IFS
19589  test -z "$as_dir" && as_dir=.
19590    for ac_exec_ext in '' $ac_executable_extensions; do
19591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19592    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19594    break 2
19595  fi
19596done
19597  done
19598IFS=$as_save_IFS
19599
19600  ;;
19601esac
19602fi
19603STAT=$ac_cv_path_STAT
19604if test -n "$STAT"; then
19605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19606$as_echo "$STAT" >&6; }
19607else
19608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19609$as_echo "no" >&6; }
19610fi
19611
19612
19613          if test "x$STAT" = x; then
19614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19615          fi
19616        else
19617          # Otherwise we believe it is a complete path. Use it as it is.
19618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
19619$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
19620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19621$as_echo_n "checking for STAT... " >&6; }
19622          if test ! -x "$tool_specified"; then
19623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19624$as_echo "not found" >&6; }
19625            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
19626          fi
19627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19628$as_echo "$tool_specified" >&6; }
19629        fi
19630      fi
19631    fi
19632  fi
19633
19634
19635
19636
19637  # Publish this variable in the help.
19638
19639
19640  if [ -z "${TIME+x}" ]; then
19641    # The variable is not set by user, try to locate tool using the code snippet
19642    for ac_prog in time
19643do
19644  # Extract the first word of "$ac_prog", so it can be a program name with args.
19645set dummy $ac_prog; ac_word=$2
19646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19647$as_echo_n "checking for $ac_word... " >&6; }
19648if ${ac_cv_path_TIME+:} false; then :
19649  $as_echo_n "(cached) " >&6
19650else
19651  case $TIME in
19652  [\\/]* | ?:[\\/]*)
19653  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19654  ;;
19655  *)
19656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19657for as_dir in $PATH
19658do
19659  IFS=$as_save_IFS
19660  test -z "$as_dir" && as_dir=.
19661    for ac_exec_ext in '' $ac_executable_extensions; do
19662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19663    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19665    break 2
19666  fi
19667done
19668  done
19669IFS=$as_save_IFS
19670
19671  ;;
19672esac
19673fi
19674TIME=$ac_cv_path_TIME
19675if test -n "$TIME"; then
19676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19677$as_echo "$TIME" >&6; }
19678else
19679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19680$as_echo "no" >&6; }
19681fi
19682
19683
19684  test -n "$TIME" && break
19685done
19686
19687  else
19688    # The variable is set, but is it from the command line or the environment?
19689
19690    # Try to remove the string !TIME! from our list.
19691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19693      # If it failed, the variable was not from the command line. Ignore it,
19694      # but warn the user (except for BASH, which is always set by the calling BASH).
19695      if test "xTIME" != xBASH; then
19696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19697$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19698      fi
19699      # Try to locate tool using the code snippet
19700      for ac_prog in time
19701do
19702  # Extract the first word of "$ac_prog", so it can be a program name with args.
19703set dummy $ac_prog; ac_word=$2
19704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19705$as_echo_n "checking for $ac_word... " >&6; }
19706if ${ac_cv_path_TIME+:} false; then :
19707  $as_echo_n "(cached) " >&6
19708else
19709  case $TIME in
19710  [\\/]* | ?:[\\/]*)
19711  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19712  ;;
19713  *)
19714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19715for as_dir in $PATH
19716do
19717  IFS=$as_save_IFS
19718  test -z "$as_dir" && as_dir=.
19719    for ac_exec_ext in '' $ac_executable_extensions; do
19720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19721    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19723    break 2
19724  fi
19725done
19726  done
19727IFS=$as_save_IFS
19728
19729  ;;
19730esac
19731fi
19732TIME=$ac_cv_path_TIME
19733if test -n "$TIME"; then
19734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19735$as_echo "$TIME" >&6; }
19736else
19737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19738$as_echo "no" >&6; }
19739fi
19740
19741
19742  test -n "$TIME" && break
19743done
19744
19745    else
19746      # If it succeeded, then it was overridden by the user. We will use it
19747      # for the tool.
19748
19749      # First remove it from the list of overridden variables, so we can test
19750      # for unknown variables in the end.
19751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19752
19753      # Check if we try to supply an empty value
19754      if test "x$TIME" = x; then
19755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
19756$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
19757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19758$as_echo_n "checking for TIME... " >&6; }
19759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19760$as_echo "disabled" >&6; }
19761      else
19762        # Check if the provided tool contains a complete path.
19763        tool_specified="$TIME"
19764        tool_basename="${tool_specified##*/}"
19765        if test "x$tool_basename" = "x$tool_specified"; then
19766          # A command without a complete path is provided, search $PATH.
19767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19768$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19769          # Extract the first word of "$tool_basename", so it can be a program name with args.
19770set dummy $tool_basename; ac_word=$2
19771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19772$as_echo_n "checking for $ac_word... " >&6; }
19773if ${ac_cv_path_TIME+:} false; then :
19774  $as_echo_n "(cached) " >&6
19775else
19776  case $TIME in
19777  [\\/]* | ?:[\\/]*)
19778  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19779  ;;
19780  *)
19781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19782for as_dir in $PATH
19783do
19784  IFS=$as_save_IFS
19785  test -z "$as_dir" && as_dir=.
19786    for ac_exec_ext in '' $ac_executable_extensions; do
19787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19788    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19790    break 2
19791  fi
19792done
19793  done
19794IFS=$as_save_IFS
19795
19796  ;;
19797esac
19798fi
19799TIME=$ac_cv_path_TIME
19800if test -n "$TIME"; then
19801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19802$as_echo "$TIME" >&6; }
19803else
19804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19805$as_echo "no" >&6; }
19806fi
19807
19808
19809          if test "x$TIME" = x; then
19810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19811          fi
19812        else
19813          # Otherwise we believe it is a complete path. Use it as it is.
19814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19815$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19817$as_echo_n "checking for TIME... " >&6; }
19818          if test ! -x "$tool_specified"; then
19819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19820$as_echo "not found" >&6; }
19821            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19822          fi
19823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19824$as_echo "$tool_specified" >&6; }
19825        fi
19826      fi
19827    fi
19828  fi
19829
19830
19831
19832
19833  # Publish this variable in the help.
19834
19835
19836  if [ -z "${PATCH+x}" ]; then
19837    # The variable is not set by user, try to locate tool using the code snippet
19838    for ac_prog in gpatch patch
19839do
19840  # Extract the first word of "$ac_prog", so it can be a program name with args.
19841set dummy $ac_prog; ac_word=$2
19842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19843$as_echo_n "checking for $ac_word... " >&6; }
19844if ${ac_cv_path_PATCH+:} false; then :
19845  $as_echo_n "(cached) " >&6
19846else
19847  case $PATCH in
19848  [\\/]* | ?:[\\/]*)
19849  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19850  ;;
19851  *)
19852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19853for as_dir in $PATH
19854do
19855  IFS=$as_save_IFS
19856  test -z "$as_dir" && as_dir=.
19857    for ac_exec_ext in '' $ac_executable_extensions; do
19858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19859    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19861    break 2
19862  fi
19863done
19864  done
19865IFS=$as_save_IFS
19866
19867  ;;
19868esac
19869fi
19870PATCH=$ac_cv_path_PATCH
19871if test -n "$PATCH"; then
19872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19873$as_echo "$PATCH" >&6; }
19874else
19875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19876$as_echo "no" >&6; }
19877fi
19878
19879
19880  test -n "$PATCH" && break
19881done
19882
19883  else
19884    # The variable is set, but is it from the command line or the environment?
19885
19886    # Try to remove the string !PATCH! from our list.
19887    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
19888    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19889      # If it failed, the variable was not from the command line. Ignore it,
19890      # but warn the user (except for BASH, which is always set by the calling BASH).
19891      if test "xPATCH" != xBASH; then
19892        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
19893$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
19894      fi
19895      # Try to locate tool using the code snippet
19896      for ac_prog in gpatch patch
19897do
19898  # Extract the first word of "$ac_prog", so it can be a program name with args.
19899set dummy $ac_prog; ac_word=$2
19900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19901$as_echo_n "checking for $ac_word... " >&6; }
19902if ${ac_cv_path_PATCH+:} false; then :
19903  $as_echo_n "(cached) " >&6
19904else
19905  case $PATCH in
19906  [\\/]* | ?:[\\/]*)
19907  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19908  ;;
19909  *)
19910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19911for as_dir in $PATH
19912do
19913  IFS=$as_save_IFS
19914  test -z "$as_dir" && as_dir=.
19915    for ac_exec_ext in '' $ac_executable_extensions; do
19916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19917    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19919    break 2
19920  fi
19921done
19922  done
19923IFS=$as_save_IFS
19924
19925  ;;
19926esac
19927fi
19928PATCH=$ac_cv_path_PATCH
19929if test -n "$PATCH"; then
19930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19931$as_echo "$PATCH" >&6; }
19932else
19933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19934$as_echo "no" >&6; }
19935fi
19936
19937
19938  test -n "$PATCH" && break
19939done
19940
19941    else
19942      # If it succeeded, then it was overridden by the user. We will use it
19943      # for the tool.
19944
19945      # First remove it from the list of overridden variables, so we can test
19946      # for unknown variables in the end.
19947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19948
19949      # Check if we try to supply an empty value
19950      if test "x$PATCH" = x; then
19951        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
19952$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
19953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19954$as_echo_n "checking for PATCH... " >&6; }
19955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19956$as_echo "disabled" >&6; }
19957      else
19958        # Check if the provided tool contains a complete path.
19959        tool_specified="$PATCH"
19960        tool_basename="${tool_specified##*/}"
19961        if test "x$tool_basename" = "x$tool_specified"; then
19962          # A command without a complete path is provided, search $PATH.
19963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19964$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19965          # Extract the first word of "$tool_basename", so it can be a program name with args.
19966set dummy $tool_basename; ac_word=$2
19967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19968$as_echo_n "checking for $ac_word... " >&6; }
19969if ${ac_cv_path_PATCH+:} false; then :
19970  $as_echo_n "(cached) " >&6
19971else
19972  case $PATCH in
19973  [\\/]* | ?:[\\/]*)
19974  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19975  ;;
19976  *)
19977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19978for as_dir in $PATH
19979do
19980  IFS=$as_save_IFS
19981  test -z "$as_dir" && as_dir=.
19982    for ac_exec_ext in '' $ac_executable_extensions; do
19983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19984    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19986    break 2
19987  fi
19988done
19989  done
19990IFS=$as_save_IFS
19991
19992  ;;
19993esac
19994fi
19995PATCH=$ac_cv_path_PATCH
19996if test -n "$PATCH"; then
19997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19998$as_echo "$PATCH" >&6; }
19999else
20000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20001$as_echo "no" >&6; }
20002fi
20003
20004
20005          if test "x$PATCH" = x; then
20006            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20007          fi
20008        else
20009          # Otherwise we believe it is a complete path. Use it as it is.
20010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
20011$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
20012          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
20013$as_echo_n "checking for PATCH... " >&6; }
20014          if test ! -x "$tool_specified"; then
20015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20016$as_echo "not found" >&6; }
20017            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
20018          fi
20019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20020$as_echo "$tool_specified" >&6; }
20021        fi
20022      fi
20023    fi
20024  fi
20025
20026
20027  # Check if it's GNU time
20028  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
20029  if test "x$IS_GNU_TIME" != x; then
20030    IS_GNU_TIME=yes
20031  else
20032    IS_GNU_TIME=no
20033  fi
20034
20035
20036  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
20037
20038
20039
20040  # Publish this variable in the help.
20041
20042
20043  if [ -z "${DSYMUTIL+x}" ]; then
20044    # The variable is not set by user, try to locate tool using the code snippet
20045    for ac_prog in dsymutil
20046do
20047  # Extract the first word of "$ac_prog", so it can be a program name with args.
20048set dummy $ac_prog; ac_word=$2
20049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20050$as_echo_n "checking for $ac_word... " >&6; }
20051if ${ac_cv_path_DSYMUTIL+:} false; then :
20052  $as_echo_n "(cached) " >&6
20053else
20054  case $DSYMUTIL in
20055  [\\/]* | ?:[\\/]*)
20056  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20057  ;;
20058  *)
20059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20060for as_dir in $PATH
20061do
20062  IFS=$as_save_IFS
20063  test -z "$as_dir" && as_dir=.
20064    for ac_exec_ext in '' $ac_executable_extensions; do
20065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20066    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20068    break 2
20069  fi
20070done
20071  done
20072IFS=$as_save_IFS
20073
20074  ;;
20075esac
20076fi
20077DSYMUTIL=$ac_cv_path_DSYMUTIL
20078if test -n "$DSYMUTIL"; then
20079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20080$as_echo "$DSYMUTIL" >&6; }
20081else
20082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20083$as_echo "no" >&6; }
20084fi
20085
20086
20087  test -n "$DSYMUTIL" && break
20088done
20089
20090  else
20091    # The variable is set, but is it from the command line or the environment?
20092
20093    # Try to remove the string !DSYMUTIL! from our list.
20094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
20095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20096      # If it failed, the variable was not from the command line. Ignore it,
20097      # but warn the user (except for BASH, which is always set by the calling BASH).
20098      if test "xDSYMUTIL" != xBASH; then
20099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
20100$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
20101      fi
20102      # Try to locate tool using the code snippet
20103      for ac_prog in dsymutil
20104do
20105  # Extract the first word of "$ac_prog", so it can be a program name with args.
20106set dummy $ac_prog; ac_word=$2
20107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20108$as_echo_n "checking for $ac_word... " >&6; }
20109if ${ac_cv_path_DSYMUTIL+:} false; then :
20110  $as_echo_n "(cached) " >&6
20111else
20112  case $DSYMUTIL in
20113  [\\/]* | ?:[\\/]*)
20114  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20115  ;;
20116  *)
20117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20118for as_dir in $PATH
20119do
20120  IFS=$as_save_IFS
20121  test -z "$as_dir" && as_dir=.
20122    for ac_exec_ext in '' $ac_executable_extensions; do
20123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20124    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20126    break 2
20127  fi
20128done
20129  done
20130IFS=$as_save_IFS
20131
20132  ;;
20133esac
20134fi
20135DSYMUTIL=$ac_cv_path_DSYMUTIL
20136if test -n "$DSYMUTIL"; then
20137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20138$as_echo "$DSYMUTIL" >&6; }
20139else
20140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20141$as_echo "no" >&6; }
20142fi
20143
20144
20145  test -n "$DSYMUTIL" && break
20146done
20147
20148    else
20149      # If it succeeded, then it was overridden by the user. We will use it
20150      # for the tool.
20151
20152      # First remove it from the list of overridden variables, so we can test
20153      # for unknown variables in the end.
20154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20155
20156      # Check if we try to supply an empty value
20157      if test "x$DSYMUTIL" = x; then
20158        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
20159$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
20160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20161$as_echo_n "checking for DSYMUTIL... " >&6; }
20162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20163$as_echo "disabled" >&6; }
20164      else
20165        # Check if the provided tool contains a complete path.
20166        tool_specified="$DSYMUTIL"
20167        tool_basename="${tool_specified##*/}"
20168        if test "x$tool_basename" = "x$tool_specified"; then
20169          # A command without a complete path is provided, search $PATH.
20170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
20171$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
20172          # Extract the first word of "$tool_basename", so it can be a program name with args.
20173set dummy $tool_basename; ac_word=$2
20174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20175$as_echo_n "checking for $ac_word... " >&6; }
20176if ${ac_cv_path_DSYMUTIL+:} false; then :
20177  $as_echo_n "(cached) " >&6
20178else
20179  case $DSYMUTIL in
20180  [\\/]* | ?:[\\/]*)
20181  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20182  ;;
20183  *)
20184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20185for as_dir in $PATH
20186do
20187  IFS=$as_save_IFS
20188  test -z "$as_dir" && as_dir=.
20189    for ac_exec_ext in '' $ac_executable_extensions; do
20190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20191    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20193    break 2
20194  fi
20195done
20196  done
20197IFS=$as_save_IFS
20198
20199  ;;
20200esac
20201fi
20202DSYMUTIL=$ac_cv_path_DSYMUTIL
20203if test -n "$DSYMUTIL"; then
20204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20205$as_echo "$DSYMUTIL" >&6; }
20206else
20207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20208$as_echo "no" >&6; }
20209fi
20210
20211
20212          if test "x$DSYMUTIL" = x; then
20213            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20214          fi
20215        else
20216          # Otherwise we believe it is a complete path. Use it as it is.
20217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
20218$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
20219          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20220$as_echo_n "checking for DSYMUTIL... " >&6; }
20221          if test ! -x "$tool_specified"; then
20222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20223$as_echo "not found" >&6; }
20224            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
20225          fi
20226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20227$as_echo "$tool_specified" >&6; }
20228        fi
20229      fi
20230    fi
20231  fi
20232
20233
20234
20235  if test "x$DSYMUTIL" = x; then
20236    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
20237  fi
20238
20239
20240
20241
20242
20243  # Publish this variable in the help.
20244
20245
20246  if [ -z "${XATTR+x}" ]; then
20247    # The variable is not set by user, try to locate tool using the code snippet
20248    for ac_prog in xattr
20249do
20250  # Extract the first word of "$ac_prog", so it can be a program name with args.
20251set dummy $ac_prog; ac_word=$2
20252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20253$as_echo_n "checking for $ac_word... " >&6; }
20254if ${ac_cv_path_XATTR+:} false; then :
20255  $as_echo_n "(cached) " >&6
20256else
20257  case $XATTR in
20258  [\\/]* | ?:[\\/]*)
20259  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20260  ;;
20261  *)
20262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20263for as_dir in $PATH
20264do
20265  IFS=$as_save_IFS
20266  test -z "$as_dir" && as_dir=.
20267    for ac_exec_ext in '' $ac_executable_extensions; do
20268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20269    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20271    break 2
20272  fi
20273done
20274  done
20275IFS=$as_save_IFS
20276
20277  ;;
20278esac
20279fi
20280XATTR=$ac_cv_path_XATTR
20281if test -n "$XATTR"; then
20282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20283$as_echo "$XATTR" >&6; }
20284else
20285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20286$as_echo "no" >&6; }
20287fi
20288
20289
20290  test -n "$XATTR" && break
20291done
20292
20293  else
20294    # The variable is set, but is it from the command line or the environment?
20295
20296    # Try to remove the string !XATTR! from our list.
20297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
20298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20299      # If it failed, the variable was not from the command line. Ignore it,
20300      # but warn the user (except for BASH, which is always set by the calling BASH).
20301      if test "xXATTR" != xBASH; then
20302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
20303$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
20304      fi
20305      # Try to locate tool using the code snippet
20306      for ac_prog in xattr
20307do
20308  # Extract the first word of "$ac_prog", so it can be a program name with args.
20309set dummy $ac_prog; ac_word=$2
20310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20311$as_echo_n "checking for $ac_word... " >&6; }
20312if ${ac_cv_path_XATTR+:} false; then :
20313  $as_echo_n "(cached) " >&6
20314else
20315  case $XATTR in
20316  [\\/]* | ?:[\\/]*)
20317  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20318  ;;
20319  *)
20320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20321for as_dir in $PATH
20322do
20323  IFS=$as_save_IFS
20324  test -z "$as_dir" && as_dir=.
20325    for ac_exec_ext in '' $ac_executable_extensions; do
20326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20327    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20329    break 2
20330  fi
20331done
20332  done
20333IFS=$as_save_IFS
20334
20335  ;;
20336esac
20337fi
20338XATTR=$ac_cv_path_XATTR
20339if test -n "$XATTR"; then
20340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20341$as_echo "$XATTR" >&6; }
20342else
20343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20344$as_echo "no" >&6; }
20345fi
20346
20347
20348  test -n "$XATTR" && break
20349done
20350
20351    else
20352      # If it succeeded, then it was overridden by the user. We will use it
20353      # for the tool.
20354
20355      # First remove it from the list of overridden variables, so we can test
20356      # for unknown variables in the end.
20357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20358
20359      # Check if we try to supply an empty value
20360      if test "x$XATTR" = x; then
20361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
20362$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
20363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20364$as_echo_n "checking for XATTR... " >&6; }
20365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20366$as_echo "disabled" >&6; }
20367      else
20368        # Check if the provided tool contains a complete path.
20369        tool_specified="$XATTR"
20370        tool_basename="${tool_specified##*/}"
20371        if test "x$tool_basename" = "x$tool_specified"; then
20372          # A command without a complete path is provided, search $PATH.
20373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
20374$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
20375          # Extract the first word of "$tool_basename", so it can be a program name with args.
20376set dummy $tool_basename; ac_word=$2
20377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20378$as_echo_n "checking for $ac_word... " >&6; }
20379if ${ac_cv_path_XATTR+:} false; then :
20380  $as_echo_n "(cached) " >&6
20381else
20382  case $XATTR in
20383  [\\/]* | ?:[\\/]*)
20384  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20385  ;;
20386  *)
20387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20388for as_dir in $PATH
20389do
20390  IFS=$as_save_IFS
20391  test -z "$as_dir" && as_dir=.
20392    for ac_exec_ext in '' $ac_executable_extensions; do
20393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20394    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20396    break 2
20397  fi
20398done
20399  done
20400IFS=$as_save_IFS
20401
20402  ;;
20403esac
20404fi
20405XATTR=$ac_cv_path_XATTR
20406if test -n "$XATTR"; then
20407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20408$as_echo "$XATTR" >&6; }
20409else
20410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20411$as_echo "no" >&6; }
20412fi
20413
20414
20415          if test "x$XATTR" = x; then
20416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20417          fi
20418        else
20419          # Otherwise we believe it is a complete path. Use it as it is.
20420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
20421$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
20422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20423$as_echo_n "checking for XATTR... " >&6; }
20424          if test ! -x "$tool_specified"; then
20425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20426$as_echo "not found" >&6; }
20427            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
20428          fi
20429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20430$as_echo "$tool_specified" >&6; }
20431        fi
20432      fi
20433    fi
20434  fi
20435
20436
20437
20438  if test "x$XATTR" = x; then
20439    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
20440  fi
20441
20442
20443
20444
20445  # Publish this variable in the help.
20446
20447
20448  if [ -z "${CODESIGN+x}" ]; then
20449    # The variable is not set by user, try to locate tool using the code snippet
20450    for ac_prog in codesign
20451do
20452  # Extract the first word of "$ac_prog", so it can be a program name with args.
20453set dummy $ac_prog; ac_word=$2
20454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20455$as_echo_n "checking for $ac_word... " >&6; }
20456if ${ac_cv_path_CODESIGN+:} false; then :
20457  $as_echo_n "(cached) " >&6
20458else
20459  case $CODESIGN in
20460  [\\/]* | ?:[\\/]*)
20461  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20462  ;;
20463  *)
20464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20465for as_dir in $PATH
20466do
20467  IFS=$as_save_IFS
20468  test -z "$as_dir" && as_dir=.
20469    for ac_exec_ext in '' $ac_executable_extensions; do
20470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20471    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20473    break 2
20474  fi
20475done
20476  done
20477IFS=$as_save_IFS
20478
20479  ;;
20480esac
20481fi
20482CODESIGN=$ac_cv_path_CODESIGN
20483if test -n "$CODESIGN"; then
20484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20485$as_echo "$CODESIGN" >&6; }
20486else
20487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20488$as_echo "no" >&6; }
20489fi
20490
20491
20492  test -n "$CODESIGN" && break
20493done
20494
20495  else
20496    # The variable is set, but is it from the command line or the environment?
20497
20498    # Try to remove the string !CODESIGN! from our list.
20499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
20500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20501      # If it failed, the variable was not from the command line. Ignore it,
20502      # but warn the user (except for BASH, which is always set by the calling BASH).
20503      if test "xCODESIGN" != xBASH; then
20504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
20505$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
20506      fi
20507      # Try to locate tool using the code snippet
20508      for ac_prog in codesign
20509do
20510  # Extract the first word of "$ac_prog", so it can be a program name with args.
20511set dummy $ac_prog; ac_word=$2
20512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20513$as_echo_n "checking for $ac_word... " >&6; }
20514if ${ac_cv_path_CODESIGN+:} false; then :
20515  $as_echo_n "(cached) " >&6
20516else
20517  case $CODESIGN in
20518  [\\/]* | ?:[\\/]*)
20519  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20520  ;;
20521  *)
20522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20523for as_dir in $PATH
20524do
20525  IFS=$as_save_IFS
20526  test -z "$as_dir" && as_dir=.
20527    for ac_exec_ext in '' $ac_executable_extensions; do
20528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20529    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20531    break 2
20532  fi
20533done
20534  done
20535IFS=$as_save_IFS
20536
20537  ;;
20538esac
20539fi
20540CODESIGN=$ac_cv_path_CODESIGN
20541if test -n "$CODESIGN"; then
20542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20543$as_echo "$CODESIGN" >&6; }
20544else
20545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20546$as_echo "no" >&6; }
20547fi
20548
20549
20550  test -n "$CODESIGN" && break
20551done
20552
20553    else
20554      # If it succeeded, then it was overridden by the user. We will use it
20555      # for the tool.
20556
20557      # First remove it from the list of overridden variables, so we can test
20558      # for unknown variables in the end.
20559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20560
20561      # Check if we try to supply an empty value
20562      if test "x$CODESIGN" = x; then
20563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
20564$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
20565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20566$as_echo_n "checking for CODESIGN... " >&6; }
20567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20568$as_echo "disabled" >&6; }
20569      else
20570        # Check if the provided tool contains a complete path.
20571        tool_specified="$CODESIGN"
20572        tool_basename="${tool_specified##*/}"
20573        if test "x$tool_basename" = "x$tool_specified"; then
20574          # A command without a complete path is provided, search $PATH.
20575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
20576$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
20577          # Extract the first word of "$tool_basename", so it can be a program name with args.
20578set dummy $tool_basename; ac_word=$2
20579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20580$as_echo_n "checking for $ac_word... " >&6; }
20581if ${ac_cv_path_CODESIGN+:} false; then :
20582  $as_echo_n "(cached) " >&6
20583else
20584  case $CODESIGN in
20585  [\\/]* | ?:[\\/]*)
20586  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20587  ;;
20588  *)
20589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20590for as_dir in $PATH
20591do
20592  IFS=$as_save_IFS
20593  test -z "$as_dir" && as_dir=.
20594    for ac_exec_ext in '' $ac_executable_extensions; do
20595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20596    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20598    break 2
20599  fi
20600done
20601  done
20602IFS=$as_save_IFS
20603
20604  ;;
20605esac
20606fi
20607CODESIGN=$ac_cv_path_CODESIGN
20608if test -n "$CODESIGN"; then
20609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20610$as_echo "$CODESIGN" >&6; }
20611else
20612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20613$as_echo "no" >&6; }
20614fi
20615
20616
20617          if test "x$CODESIGN" = x; then
20618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20619          fi
20620        else
20621          # Otherwise we believe it is a complete path. Use it as it is.
20622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
20623$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
20624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20625$as_echo_n "checking for CODESIGN... " >&6; }
20626          if test ! -x "$tool_specified"; then
20627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20628$as_echo "not found" >&6; }
20629            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
20630          fi
20631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20632$as_echo "$tool_specified" >&6; }
20633        fi
20634      fi
20635    fi
20636  fi
20637
20638
20639    if test "x$CODESIGN" != "x"; then
20640      # Verify that the openjdk_codesign certificate is present
20641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
20642$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
20643      rm -f codesign-testfile
20644      touch codesign-testfile
20645      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
20646      rm -f codesign-testfile
20647      if test "x$CODESIGN" = x; then
20648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20649$as_echo "no" >&6; }
20650      else
20651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20652$as_echo "yes" >&6; }
20653      fi
20654    fi
20655
20656
20657
20658  # Publish this variable in the help.
20659
20660
20661  if [ -z "${SETFILE+x}" ]; then
20662    # The variable is not set by user, try to locate tool using the code snippet
20663    for ac_prog in SetFile
20664do
20665  # Extract the first word of "$ac_prog", so it can be a program name with args.
20666set dummy $ac_prog; ac_word=$2
20667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20668$as_echo_n "checking for $ac_word... " >&6; }
20669if ${ac_cv_path_SETFILE+:} false; then :
20670  $as_echo_n "(cached) " >&6
20671else
20672  case $SETFILE in
20673  [\\/]* | ?:[\\/]*)
20674  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20675  ;;
20676  *)
20677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20678for as_dir in $PATH
20679do
20680  IFS=$as_save_IFS
20681  test -z "$as_dir" && as_dir=.
20682    for ac_exec_ext in '' $ac_executable_extensions; do
20683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20684    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20686    break 2
20687  fi
20688done
20689  done
20690IFS=$as_save_IFS
20691
20692  ;;
20693esac
20694fi
20695SETFILE=$ac_cv_path_SETFILE
20696if test -n "$SETFILE"; then
20697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20698$as_echo "$SETFILE" >&6; }
20699else
20700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20701$as_echo "no" >&6; }
20702fi
20703
20704
20705  test -n "$SETFILE" && break
20706done
20707
20708  else
20709    # The variable is set, but is it from the command line or the environment?
20710
20711    # Try to remove the string !SETFILE! from our list.
20712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
20713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20714      # If it failed, the variable was not from the command line. Ignore it,
20715      # but warn the user (except for BASH, which is always set by the calling BASH).
20716      if test "xSETFILE" != xBASH; then
20717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
20718$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
20719      fi
20720      # Try to locate tool using the code snippet
20721      for ac_prog in SetFile
20722do
20723  # Extract the first word of "$ac_prog", so it can be a program name with args.
20724set dummy $ac_prog; ac_word=$2
20725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20726$as_echo_n "checking for $ac_word... " >&6; }
20727if ${ac_cv_path_SETFILE+:} false; then :
20728  $as_echo_n "(cached) " >&6
20729else
20730  case $SETFILE in
20731  [\\/]* | ?:[\\/]*)
20732  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20733  ;;
20734  *)
20735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20736for as_dir in $PATH
20737do
20738  IFS=$as_save_IFS
20739  test -z "$as_dir" && as_dir=.
20740    for ac_exec_ext in '' $ac_executable_extensions; do
20741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20742    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20744    break 2
20745  fi
20746done
20747  done
20748IFS=$as_save_IFS
20749
20750  ;;
20751esac
20752fi
20753SETFILE=$ac_cv_path_SETFILE
20754if test -n "$SETFILE"; then
20755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20756$as_echo "$SETFILE" >&6; }
20757else
20758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20759$as_echo "no" >&6; }
20760fi
20761
20762
20763  test -n "$SETFILE" && break
20764done
20765
20766    else
20767      # If it succeeded, then it was overridden by the user. We will use it
20768      # for the tool.
20769
20770      # First remove it from the list of overridden variables, so we can test
20771      # for unknown variables in the end.
20772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20773
20774      # Check if we try to supply an empty value
20775      if test "x$SETFILE" = x; then
20776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
20777$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
20778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
20779$as_echo_n "checking for SETFILE... " >&6; }
20780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20781$as_echo "disabled" >&6; }
20782      else
20783        # Check if the provided tool contains a complete path.
20784        tool_specified="$SETFILE"
20785        tool_basename="${tool_specified##*/}"
20786        if test "x$tool_basename" = "x$tool_specified"; then
20787          # A command without a complete path is provided, search $PATH.
20788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
20789$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
20790          # Extract the first word of "$tool_basename", so it can be a program name with args.
20791set dummy $tool_basename; ac_word=$2
20792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20793$as_echo_n "checking for $ac_word... " >&6; }
20794if ${ac_cv_path_SETFILE+:} false; then :
20795  $as_echo_n "(cached) " >&6
20796else
20797  case $SETFILE in
20798  [\\/]* | ?:[\\/]*)
20799  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20800  ;;
20801  *)
20802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20803for as_dir in $PATH
20804do
20805  IFS=$as_save_IFS
20806  test -z "$as_dir" && as_dir=.
20807    for ac_exec_ext in '' $ac_executable_extensions; do
20808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20809    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20811    break 2
20812  fi
20813done
20814  done
20815IFS=$as_save_IFS
20816
20817  ;;
20818esac
20819fi
20820SETFILE=$ac_cv_path_SETFILE
20821if test -n "$SETFILE"; then
20822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20823$as_echo "$SETFILE" >&6; }
20824else
20825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20826$as_echo "no" >&6; }
20827fi
20828
20829
20830          if test "x$SETFILE" = x; then
20831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20832          fi
20833        else
20834          # Otherwise we believe it is a complete path. Use it as it is.
20835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
20836$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
20837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
20838$as_echo_n "checking for SETFILE... " >&6; }
20839          if test ! -x "$tool_specified"; then
20840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20841$as_echo "not found" >&6; }
20842            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
20843          fi
20844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20845$as_echo "$tool_specified" >&6; }
20846        fi
20847      fi
20848    fi
20849  fi
20850
20851
20852
20853  if test "x$SETFILE" = x; then
20854    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
20855  fi
20856
20857
20858  fi
20859
20860
20861  # Test if bash supports pipefail.
20862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
20863$as_echo_n "checking if bash supports pipefail... " >&6; }
20864  if ${BASH} -c 'set -o pipefail'; then
20865    BASH_ARGS="$BASH_ARGS -o pipefail"
20866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20867$as_echo "yes" >&6; }
20868  else
20869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20870$as_echo "no" >&6; }
20871  fi
20872
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
20874$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
20875  if ${BASH} -e -c 'true'; then
20876    BASH_ARGS="$BASH_ARGS -e"
20877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20878$as_echo "yes" >&6; }
20879  else
20880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20881$as_echo "no" >&6; }
20882  fi
20883
20884
20885
20886
20887# Check if pkg-config is available.
20888
20889
20890if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
20891	if test -n "$ac_tool_prefix"; then
20892  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
20893set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
20894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20895$as_echo_n "checking for $ac_word... " >&6; }
20896if ${ac_cv_path_PKG_CONFIG+:} false; then :
20897  $as_echo_n "(cached) " >&6
20898else
20899  case $PKG_CONFIG in
20900  [\\/]* | ?:[\\/]*)
20901  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
20902  ;;
20903  *)
20904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20905for as_dir in $PATH
20906do
20907  IFS=$as_save_IFS
20908  test -z "$as_dir" && as_dir=.
20909    for ac_exec_ext in '' $ac_executable_extensions; do
20910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20911    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20913    break 2
20914  fi
20915done
20916  done
20917IFS=$as_save_IFS
20918
20919  ;;
20920esac
20921fi
20922PKG_CONFIG=$ac_cv_path_PKG_CONFIG
20923if test -n "$PKG_CONFIG"; then
20924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
20925$as_echo "$PKG_CONFIG" >&6; }
20926else
20927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20928$as_echo "no" >&6; }
20929fi
20930
20931
20932fi
20933if test -z "$ac_cv_path_PKG_CONFIG"; then
20934  ac_pt_PKG_CONFIG=$PKG_CONFIG
20935  # Extract the first word of "pkg-config", so it can be a program name with args.
20936set dummy pkg-config; ac_word=$2
20937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20938$as_echo_n "checking for $ac_word... " >&6; }
20939if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
20940  $as_echo_n "(cached) " >&6
20941else
20942  case $ac_pt_PKG_CONFIG in
20943  [\\/]* | ?:[\\/]*)
20944  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
20945  ;;
20946  *)
20947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20948for as_dir in $PATH
20949do
20950  IFS=$as_save_IFS
20951  test -z "$as_dir" && as_dir=.
20952    for ac_exec_ext in '' $ac_executable_extensions; do
20953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20954    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20956    break 2
20957  fi
20958done
20959  done
20960IFS=$as_save_IFS
20961
20962  ;;
20963esac
20964fi
20965ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
20966if test -n "$ac_pt_PKG_CONFIG"; then
20967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
20968$as_echo "$ac_pt_PKG_CONFIG" >&6; }
20969else
20970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20971$as_echo "no" >&6; }
20972fi
20973
20974  if test "x$ac_pt_PKG_CONFIG" = x; then
20975    PKG_CONFIG=""
20976  else
20977    case $cross_compiling:$ac_tool_warned in
20978yes:)
20979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20981ac_tool_warned=yes ;;
20982esac
20983    PKG_CONFIG=$ac_pt_PKG_CONFIG
20984  fi
20985else
20986  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
20987fi
20988
20989fi
20990if test -n "$PKG_CONFIG"; then
20991	_pkg_min_version=0.9.0
20992	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
20993$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
20994	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
20995		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20996$as_echo "yes" >&6; }
20997	else
20998		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20999$as_echo "no" >&6; }
21000		PKG_CONFIG=""
21001	fi
21002
21003fi
21004
21005# After basic tools have been setup, we can check build os specific details.
21006
21007  ###############################################################################
21008
21009  # Note that this is the build platform OS version!
21010
21011  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
21012  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
21013  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
21014  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
21015
21016
21017
21018
21019
21020###############################################################################
21021#
21022# Determine OpenJDK variants, options and version numbers.
21023#
21024###############################################################################
21025
21026# We need build & target for this.
21027
21028
21029  ###############################################################################
21030  #
21031  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
21032  # We always build headless support.
21033  #
21034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
21035$as_echo_n "checking headful support... " >&6; }
21036  # Check whether --enable-headful was given.
21037if test "${enable_headful+set}" = set; then :
21038  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
21039else
21040  SUPPORT_HEADFUL=yes
21041fi
21042
21043
21044  SUPPORT_HEADLESS=yes
21045  BUILD_HEADLESS="BUILD_HEADLESS:=true"
21046
21047  if test "x$SUPPORT_HEADFUL" = xyes; then
21048    # We are building both headful and headless.
21049    headful_msg="include support for both headful and headless"
21050  fi
21051
21052  if test "x$SUPPORT_HEADFUL" = xno; then
21053    # Thus we are building headless only.
21054    BUILD_HEADLESS="BUILD_HEADLESS:=true"
21055    headful_msg="headless only"
21056  fi
21057
21058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
21059$as_echo "$headful_msg" >&6; }
21060
21061
21062
21063
21064
21065  # Control wether Hotspot runs Queens test after build.
21066  # Check whether --enable-hotspot-test-in-build was given.
21067if test "${enable_hotspot_test_in_build+set}" = set; then :
21068  enableval=$enable_hotspot_test_in_build;
21069else
21070  enable_hotspot_test_in_build=no
21071fi
21072
21073  if test "x$enable_hotspot_test_in_build" = "xyes"; then
21074    TEST_IN_BUILD=true
21075  else
21076    TEST_IN_BUILD=false
21077  fi
21078
21079
21080  ###############################################################################
21081  #
21082  # Choose cacerts source file
21083  #
21084
21085# Check whether --with-cacerts-file was given.
21086if test "${with_cacerts_file+set}" = set; then :
21087  withval=$with_cacerts_file;
21088fi
21089
21090  if test "x$with_cacerts_file" != x; then
21091    CACERTS_FILE=$with_cacerts_file
21092  fi
21093
21094
21095  ###############################################################################
21096  #
21097  # Enable or disable unlimited crypto
21098  #
21099  # Check whether --enable-unlimited-crypto was given.
21100if test "${enable_unlimited_crypto+set}" = set; then :
21101  enableval=$enable_unlimited_crypto;
21102else
21103  enable_unlimited_crypto=no
21104fi
21105
21106  if test "x$enable_unlimited_crypto" = "xyes"; then
21107    UNLIMITED_CRYPTO=true
21108  else
21109    UNLIMITED_CRYPTO=false
21110  fi
21111
21112
21113  ###############################################################################
21114  #
21115  # Enable or disable the elliptic curve crypto implementation
21116  #
21117
21118
21119  ###############################################################################
21120  #
21121  # Compress jars
21122  #
21123  COMPRESS_JARS=false
21124
21125
21126
21127
21128  # Source the version numbers
21129  . $AUTOCONF_DIR/version-numbers
21130
21131  # Get the settings from parameters
21132
21133# Check whether --with-milestone was given.
21134if test "${with_milestone+set}" = set; then :
21135  withval=$with_milestone;
21136fi
21137
21138  if test "x$with_milestone" = xyes; then
21139    as_fn_error $? "Milestone must have a value" "$LINENO" 5
21140  elif test "x$with_milestone" != x; then
21141    MILESTONE="$with_milestone"
21142  fi
21143  if test "x$MILESTONE" = x; then
21144    MILESTONE=internal
21145  fi
21146
21147
21148# Check whether --with-update-version was given.
21149if test "${with_update_version+set}" = set; then :
21150  withval=$with_update_version;
21151fi
21152
21153  if test "x$with_update_version" = xyes; then
21154    as_fn_error $? "Update version must have a value" "$LINENO" 5
21155  elif test "x$with_update_version" != x; then
21156    JDK_UPDATE_VERSION="$with_update_version"
21157    # On macosx 10.7, it's not possible to set --with-update-version=0X due
21158    # to a bug in expr (which reduces it to just X). To work around this, we
21159    # always add a 0 to one digit update versions.
21160    if test "${#JDK_UPDATE_VERSION}" = "1"; then
21161      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
21162    fi
21163  fi
21164
21165
21166# Check whether --with-user-release-suffix was given.
21167if test "${with_user_release_suffix+set}" = set; then :
21168  withval=$with_user_release_suffix;
21169fi
21170
21171  if test "x$with_user_release_suffix" = xyes; then
21172    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
21173  elif test "x$with_user_release_suffix" != x; then
21174    USER_RELEASE_SUFFIX="$with_user_release_suffix"
21175  fi
21176
21177
21178# Check whether --with-build-number was given.
21179if test "${with_build_number+set}" = set; then :
21180  withval=$with_build_number;
21181fi
21182
21183  if test "x$with_build_number" = xyes; then
21184    as_fn_error $? "Build number must have a value" "$LINENO" 5
21185  elif test "x$with_build_number" != x; then
21186    JDK_BUILD_NUMBER="$with_build_number"
21187  fi
21188  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
21189  if test "x$JDK_BUILD_NUMBER" = x; then
21190    JDK_BUILD_NUMBER=b00
21191    if test "x$USER_RELEASE_SUFFIX" = x; then
21192      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
21193      # Avoid [:alnum:] since it depends on the locale.
21194      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
21195      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21196    fi
21197  fi
21198
21199  # Now set the JDK version, milestone, build number etc.
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216# Check whether --with-copyright-year was given.
21217if test "${with_copyright_year+set}" = set; then :
21218  withval=$with_copyright_year;
21219fi
21220
21221  if test "x$with_copyright_year" = xyes; then
21222    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
21223  elif test "x$with_copyright_year" != x; then
21224    COPYRIGHT_YEAR="$with_copyright_year"
21225  else
21226    COPYRIGHT_YEAR=`date +'%Y'`
21227  fi
21228
21229
21230  if test "x$JDK_UPDATE_VERSION" != x; then
21231    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
21232  else
21233    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
21234  fi
21235
21236
21237  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
21238
21239
21240
21241###############################################################################
21242#
21243# Setup BootJDK, used to bootstrap the build.
21244#
21245###############################################################################
21246
21247
21248  BOOT_JDK_FOUND=no
21249
21250# Check whether --with-boot-jdk was given.
21251if test "${with_boot_jdk+set}" = set; then :
21252  withval=$with_boot_jdk;
21253fi
21254
21255
21256  # We look for the Boot JDK through various means, going from more certain to
21257  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
21258  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
21259  # must check if this is indeed valid; otherwise we'll continue looking.
21260
21261  # Test: Is bootjdk explicitely set by command line arguments?
21262
21263  if test "x$BOOT_JDK_FOUND" = xno; then
21264    # Now execute the test
21265
21266  if test "x$with_boot_jdk" != x; then
21267    BOOT_JDK=$with_boot_jdk
21268    BOOT_JDK_FOUND=maybe
21269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
21270$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
21271  fi
21272
21273
21274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21276      # Do we have a bin/java?
21277      if test ! -x "$BOOT_JDK/bin/java"; then
21278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21280        BOOT_JDK_FOUND=no
21281      else
21282        # Do we have a bin/javac?
21283        if test ! -x "$BOOT_JDK/bin/javac"; then
21284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21288          BOOT_JDK_FOUND=no
21289        else
21290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21292
21293          # Extra M4 quote needed to protect [] in grep expression.
21294          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21295          if test "x$FOUND_CORRECT_VERSION" = x; then
21296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21300            BOOT_JDK_FOUND=no
21301          else
21302            # We're done! :-)
21303            BOOT_JDK_FOUND=yes
21304
21305  # Only process if variable expands to non-empty
21306
21307  if test "x$BOOT_JDK" != x; then
21308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21309
21310  # Input might be given as Windows format, start by converting to
21311  # unix format.
21312  path="$BOOT_JDK"
21313  new_path=`$CYGPATH -u "$path"`
21314
21315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21318  # "foo.exe" is OK but "foo" is an error.
21319  #
21320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21321  # It is also a way to make sure we got the proper file name for the real test later on.
21322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21323  if test "x$test_shortpath" = x; then
21324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21327  fi
21328
21329  # Call helper function which possibly converts this using DOS-style short mode.
21330  # If so, the updated path is stored in $new_path.
21331
21332  input_path="$new_path"
21333  # Check if we need to convert this using DOS-style short mode. If the path
21334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21335  # take no chances and rewrite it.
21336  # Note: m4 eats our [], so we need to use [ and ] instead.
21337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21338  if test "x$has_forbidden_chars" != x; then
21339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21343      # Going to short mode and back again did indeed matter. Since short mode is
21344      # case insensitive, let's make it lowercase to improve readability.
21345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21346      # Now convert it back to Unix-style (cygpath)
21347      input_path=`$CYGPATH -u "$shortmode_path"`
21348      new_path="$input_path"
21349    fi
21350  fi
21351
21352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21353  if test "x$test_cygdrive_prefix" = x; then
21354    # As a simple fix, exclude /usr/bin since it's not a real path.
21355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21357      # a path prefixed by /cygdrive for fixpath to work.
21358      new_path="$CYGWIN_ROOT_PATH$input_path"
21359    fi
21360  fi
21361
21362
21363  if test "x$path" != "x$new_path"; then
21364    BOOT_JDK="$new_path"
21365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21367  fi
21368
21369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21370
21371  path="$BOOT_JDK"
21372  has_colon=`$ECHO $path | $GREP ^.:`
21373  new_path="$path"
21374  if test "x$has_colon" = x; then
21375    # Not in mixed or Windows style, start by that.
21376    new_path=`cmd //c echo $path`
21377  fi
21378
21379
21380  input_path="$new_path"
21381  # Check if we need to convert this using DOS-style short mode. If the path
21382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21383  # take no chances and rewrite it.
21384  # Note: m4 eats our [], so we need to use [ and ] instead.
21385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21386  if test "x$has_forbidden_chars" != x; then
21387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21389  fi
21390
21391
21392  windows_path="$new_path"
21393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21394    unix_path=`$CYGPATH -u "$windows_path"`
21395    new_path="$unix_path"
21396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21398    new_path="$unix_path"
21399  fi
21400
21401  if test "x$path" != "x$new_path"; then
21402    BOOT_JDK="$new_path"
21403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21405  fi
21406
21407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21409
21410    else
21411      # We're on a unix platform. Hooray! :)
21412      path="$BOOT_JDK"
21413      has_space=`$ECHO "$path" | $GREP " "`
21414      if test "x$has_space" != x; then
21415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21418      fi
21419
21420      # Use eval to expand a potential ~
21421      eval path="$path"
21422      if test ! -f "$path" && test ! -d "$path"; then
21423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21424      fi
21425
21426      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21427    fi
21428  fi
21429
21430            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21431$as_echo_n "checking for Boot JDK... " >&6; }
21432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21433$as_echo "$BOOT_JDK" >&6; }
21434            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21435$as_echo_n "checking Boot JDK version... " >&6; }
21436            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21438$as_echo "$BOOT_JDK_VERSION" >&6; }
21439          fi # end check jdk version
21440        fi # end check javac
21441      fi # end check java
21442    fi # end check boot jdk found
21443  fi
21444
21445  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
21446    # Having specified an argument which is incorrect will produce an instant failure;
21447    # we should not go on looking
21448    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
21449  fi
21450
21451  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21452
21453  if test "x$BOOT_JDK_FOUND" = xno; then
21454    # Now execute the test
21455
21456  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21457    # First check at user selected default
21458
21459  if test "x$BOOT_JDK_FOUND" = xno; then
21460    # Now execute the test
21461
21462  if test -x /usr/libexec/java_home; then
21463    BOOT_JDK=`/usr/libexec/java_home `
21464    BOOT_JDK_FOUND=maybe
21465    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21466$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21467  fi
21468
21469
21470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21472      # Do we have a bin/java?
21473      if test ! -x "$BOOT_JDK/bin/java"; then
21474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21476        BOOT_JDK_FOUND=no
21477      else
21478        # Do we have a bin/javac?
21479        if test ! -x "$BOOT_JDK/bin/javac"; then
21480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21484          BOOT_JDK_FOUND=no
21485        else
21486          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21487          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21488
21489          # Extra M4 quote needed to protect [] in grep expression.
21490          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21491          if test "x$FOUND_CORRECT_VERSION" = x; then
21492            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21494            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21495$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21496            BOOT_JDK_FOUND=no
21497          else
21498            # We're done! :-)
21499            BOOT_JDK_FOUND=yes
21500
21501  # Only process if variable expands to non-empty
21502
21503  if test "x$BOOT_JDK" != x; then
21504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21505
21506  # Input might be given as Windows format, start by converting to
21507  # unix format.
21508  path="$BOOT_JDK"
21509  new_path=`$CYGPATH -u "$path"`
21510
21511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21514  # "foo.exe" is OK but "foo" is an error.
21515  #
21516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21517  # It is also a way to make sure we got the proper file name for the real test later on.
21518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21519  if test "x$test_shortpath" = x; then
21520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21523  fi
21524
21525  # Call helper function which possibly converts this using DOS-style short mode.
21526  # If so, the updated path is stored in $new_path.
21527
21528  input_path="$new_path"
21529  # Check if we need to convert this using DOS-style short mode. If the path
21530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21531  # take no chances and rewrite it.
21532  # Note: m4 eats our [], so we need to use [ and ] instead.
21533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21534  if test "x$has_forbidden_chars" != x; then
21535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21539      # Going to short mode and back again did indeed matter. Since short mode is
21540      # case insensitive, let's make it lowercase to improve readability.
21541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21542      # Now convert it back to Unix-style (cygpath)
21543      input_path=`$CYGPATH -u "$shortmode_path"`
21544      new_path="$input_path"
21545    fi
21546  fi
21547
21548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21549  if test "x$test_cygdrive_prefix" = x; then
21550    # As a simple fix, exclude /usr/bin since it's not a real path.
21551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21553      # a path prefixed by /cygdrive for fixpath to work.
21554      new_path="$CYGWIN_ROOT_PATH$input_path"
21555    fi
21556  fi
21557
21558
21559  if test "x$path" != "x$new_path"; then
21560    BOOT_JDK="$new_path"
21561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21563  fi
21564
21565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21566
21567  path="$BOOT_JDK"
21568  has_colon=`$ECHO $path | $GREP ^.:`
21569  new_path="$path"
21570  if test "x$has_colon" = x; then
21571    # Not in mixed or Windows style, start by that.
21572    new_path=`cmd //c echo $path`
21573  fi
21574
21575
21576  input_path="$new_path"
21577  # Check if we need to convert this using DOS-style short mode. If the path
21578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21579  # take no chances and rewrite it.
21580  # Note: m4 eats our [], so we need to use [ and ] instead.
21581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21582  if test "x$has_forbidden_chars" != x; then
21583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21585  fi
21586
21587
21588  windows_path="$new_path"
21589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21590    unix_path=`$CYGPATH -u "$windows_path"`
21591    new_path="$unix_path"
21592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21594    new_path="$unix_path"
21595  fi
21596
21597  if test "x$path" != "x$new_path"; then
21598    BOOT_JDK="$new_path"
21599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21601  fi
21602
21603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21605
21606    else
21607      # We're on a unix platform. Hooray! :)
21608      path="$BOOT_JDK"
21609      has_space=`$ECHO "$path" | $GREP " "`
21610      if test "x$has_space" != x; then
21611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21614      fi
21615
21616      # Use eval to expand a potential ~
21617      eval path="$path"
21618      if test ! -f "$path" && test ! -d "$path"; then
21619        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21620      fi
21621
21622      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21623    fi
21624  fi
21625
21626            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21627$as_echo_n "checking for Boot JDK... " >&6; }
21628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21629$as_echo "$BOOT_JDK" >&6; }
21630            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21631$as_echo_n "checking Boot JDK version... " >&6; }
21632            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21634$as_echo "$BOOT_JDK_VERSION" >&6; }
21635          fi # end check jdk version
21636        fi # end check javac
21637      fi # end check java
21638    fi # end check boot jdk found
21639  fi
21640
21641    # If that did not work out (e.g. too old), try explicit versions instead
21642
21643  if test "x$BOOT_JDK_FOUND" = xno; then
21644    # Now execute the test
21645
21646  if test -x /usr/libexec/java_home; then
21647    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21648    BOOT_JDK_FOUND=maybe
21649    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21650$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21651  fi
21652
21653
21654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21656      # Do we have a bin/java?
21657      if test ! -x "$BOOT_JDK/bin/java"; then
21658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21660        BOOT_JDK_FOUND=no
21661      else
21662        # Do we have a bin/javac?
21663        if test ! -x "$BOOT_JDK/bin/javac"; then
21664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21668          BOOT_JDK_FOUND=no
21669        else
21670          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21671          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21672
21673          # Extra M4 quote needed to protect [] in grep expression.
21674          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21675          if test "x$FOUND_CORRECT_VERSION" = x; then
21676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21678            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21679$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21680            BOOT_JDK_FOUND=no
21681          else
21682            # We're done! :-)
21683            BOOT_JDK_FOUND=yes
21684
21685  # Only process if variable expands to non-empty
21686
21687  if test "x$BOOT_JDK" != x; then
21688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21689
21690  # Input might be given as Windows format, start by converting to
21691  # unix format.
21692  path="$BOOT_JDK"
21693  new_path=`$CYGPATH -u "$path"`
21694
21695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21698  # "foo.exe" is OK but "foo" is an error.
21699  #
21700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21701  # It is also a way to make sure we got the proper file name for the real test later on.
21702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21703  if test "x$test_shortpath" = x; then
21704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21707  fi
21708
21709  # Call helper function which possibly converts this using DOS-style short mode.
21710  # If so, the updated path is stored in $new_path.
21711
21712  input_path="$new_path"
21713  # Check if we need to convert this using DOS-style short mode. If the path
21714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21715  # take no chances and rewrite it.
21716  # Note: m4 eats our [], so we need to use [ and ] instead.
21717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21718  if test "x$has_forbidden_chars" != x; then
21719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21723      # Going to short mode and back again did indeed matter. Since short mode is
21724      # case insensitive, let's make it lowercase to improve readability.
21725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21726      # Now convert it back to Unix-style (cygpath)
21727      input_path=`$CYGPATH -u "$shortmode_path"`
21728      new_path="$input_path"
21729    fi
21730  fi
21731
21732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21733  if test "x$test_cygdrive_prefix" = x; then
21734    # As a simple fix, exclude /usr/bin since it's not a real path.
21735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21737      # a path prefixed by /cygdrive for fixpath to work.
21738      new_path="$CYGWIN_ROOT_PATH$input_path"
21739    fi
21740  fi
21741
21742
21743  if test "x$path" != "x$new_path"; then
21744    BOOT_JDK="$new_path"
21745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21747  fi
21748
21749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21750
21751  path="$BOOT_JDK"
21752  has_colon=`$ECHO $path | $GREP ^.:`
21753  new_path="$path"
21754  if test "x$has_colon" = x; then
21755    # Not in mixed or Windows style, start by that.
21756    new_path=`cmd //c echo $path`
21757  fi
21758
21759
21760  input_path="$new_path"
21761  # Check if we need to convert this using DOS-style short mode. If the path
21762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21763  # take no chances and rewrite it.
21764  # Note: m4 eats our [], so we need to use [ and ] instead.
21765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21766  if test "x$has_forbidden_chars" != x; then
21767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21769  fi
21770
21771
21772  windows_path="$new_path"
21773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21774    unix_path=`$CYGPATH -u "$windows_path"`
21775    new_path="$unix_path"
21776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21778    new_path="$unix_path"
21779  fi
21780
21781  if test "x$path" != "x$new_path"; then
21782    BOOT_JDK="$new_path"
21783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21785  fi
21786
21787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21789
21790    else
21791      # We're on a unix platform. Hooray! :)
21792      path="$BOOT_JDK"
21793      has_space=`$ECHO "$path" | $GREP " "`
21794      if test "x$has_space" != x; then
21795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21798      fi
21799
21800      # Use eval to expand a potential ~
21801      eval path="$path"
21802      if test ! -f "$path" && test ! -d "$path"; then
21803        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21804      fi
21805
21806      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21807    fi
21808  fi
21809
21810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21811$as_echo_n "checking for Boot JDK... " >&6; }
21812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21813$as_echo "$BOOT_JDK" >&6; }
21814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21815$as_echo_n "checking Boot JDK version... " >&6; }
21816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21818$as_echo "$BOOT_JDK_VERSION" >&6; }
21819          fi # end check jdk version
21820        fi # end check javac
21821      fi # end check java
21822    fi # end check boot jdk found
21823  fi
21824
21825
21826  if test "x$BOOT_JDK_FOUND" = xno; then
21827    # Now execute the test
21828
21829  if test -x /usr/libexec/java_home; then
21830    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21831    BOOT_JDK_FOUND=maybe
21832    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21833$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21834  fi
21835
21836
21837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21839      # Do we have a bin/java?
21840      if test ! -x "$BOOT_JDK/bin/java"; then
21841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21843        BOOT_JDK_FOUND=no
21844      else
21845        # Do we have a bin/javac?
21846        if test ! -x "$BOOT_JDK/bin/javac"; then
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21851          BOOT_JDK_FOUND=no
21852        else
21853          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21854          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21855
21856          # Extra M4 quote needed to protect [] in grep expression.
21857          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21858          if test "x$FOUND_CORRECT_VERSION" = x; then
21859            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21861            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21862$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21863            BOOT_JDK_FOUND=no
21864          else
21865            # We're done! :-)
21866            BOOT_JDK_FOUND=yes
21867
21868  # Only process if variable expands to non-empty
21869
21870  if test "x$BOOT_JDK" != x; then
21871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21872
21873  # Input might be given as Windows format, start by converting to
21874  # unix format.
21875  path="$BOOT_JDK"
21876  new_path=`$CYGPATH -u "$path"`
21877
21878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21881  # "foo.exe" is OK but "foo" is an error.
21882  #
21883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21884  # It is also a way to make sure we got the proper file name for the real test later on.
21885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21886  if test "x$test_shortpath" = x; then
21887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21889    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21890  fi
21891
21892  # Call helper function which possibly converts this using DOS-style short mode.
21893  # If so, the updated path is stored in $new_path.
21894
21895  input_path="$new_path"
21896  # Check if we need to convert this using DOS-style short mode. If the path
21897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21898  # take no chances and rewrite it.
21899  # Note: m4 eats our [], so we need to use [ and ] instead.
21900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21901  if test "x$has_forbidden_chars" != x; then
21902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21906      # Going to short mode and back again did indeed matter. Since short mode is
21907      # case insensitive, let's make it lowercase to improve readability.
21908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21909      # Now convert it back to Unix-style (cygpath)
21910      input_path=`$CYGPATH -u "$shortmode_path"`
21911      new_path="$input_path"
21912    fi
21913  fi
21914
21915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21916  if test "x$test_cygdrive_prefix" = x; then
21917    # As a simple fix, exclude /usr/bin since it's not a real path.
21918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21920      # a path prefixed by /cygdrive for fixpath to work.
21921      new_path="$CYGWIN_ROOT_PATH$input_path"
21922    fi
21923  fi
21924
21925
21926  if test "x$path" != "x$new_path"; then
21927    BOOT_JDK="$new_path"
21928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21930  fi
21931
21932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21933
21934  path="$BOOT_JDK"
21935  has_colon=`$ECHO $path | $GREP ^.:`
21936  new_path="$path"
21937  if test "x$has_colon" = x; then
21938    # Not in mixed or Windows style, start by that.
21939    new_path=`cmd //c echo $path`
21940  fi
21941
21942
21943  input_path="$new_path"
21944  # Check if we need to convert this using DOS-style short mode. If the path
21945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21946  # take no chances and rewrite it.
21947  # Note: m4 eats our [], so we need to use [ and ] instead.
21948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21949  if test "x$has_forbidden_chars" != x; then
21950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21952  fi
21953
21954
21955  windows_path="$new_path"
21956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21957    unix_path=`$CYGPATH -u "$windows_path"`
21958    new_path="$unix_path"
21959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21961    new_path="$unix_path"
21962  fi
21963
21964  if test "x$path" != "x$new_path"; then
21965    BOOT_JDK="$new_path"
21966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21968  fi
21969
21970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21972
21973    else
21974      # We're on a unix platform. Hooray! :)
21975      path="$BOOT_JDK"
21976      has_space=`$ECHO "$path" | $GREP " "`
21977      if test "x$has_space" != x; then
21978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21981      fi
21982
21983      # Use eval to expand a potential ~
21984      eval path="$path"
21985      if test ! -f "$path" && test ! -d "$path"; then
21986        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21987      fi
21988
21989      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21990    fi
21991  fi
21992
21993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21994$as_echo_n "checking for Boot JDK... " >&6; }
21995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21996$as_echo "$BOOT_JDK" >&6; }
21997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21998$as_echo_n "checking Boot JDK version... " >&6; }
21999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22001$as_echo "$BOOT_JDK_VERSION" >&6; }
22002          fi # end check jdk version
22003        fi # end check javac
22004      fi # end check java
22005    fi # end check boot jdk found
22006  fi
22007
22008
22009  if test "x$BOOT_JDK_FOUND" = xno; then
22010    # Now execute the test
22011
22012  if test -x /usr/libexec/java_home; then
22013    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
22014    BOOT_JDK_FOUND=maybe
22015    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
22016$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
22017  fi
22018
22019
22020    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22021    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22022      # Do we have a bin/java?
22023      if test ! -x "$BOOT_JDK/bin/java"; then
22024        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22026        BOOT_JDK_FOUND=no
22027      else
22028        # Do we have a bin/javac?
22029        if test ! -x "$BOOT_JDK/bin/javac"; then
22030          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22032          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22033$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22034          BOOT_JDK_FOUND=no
22035        else
22036          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22037          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22038
22039          # Extra M4 quote needed to protect [] in grep expression.
22040          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22041          if test "x$FOUND_CORRECT_VERSION" = x; then
22042            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22044            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22045$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22046            BOOT_JDK_FOUND=no
22047          else
22048            # We're done! :-)
22049            BOOT_JDK_FOUND=yes
22050
22051  # Only process if variable expands to non-empty
22052
22053  if test "x$BOOT_JDK" != x; then
22054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22055
22056  # Input might be given as Windows format, start by converting to
22057  # unix format.
22058  path="$BOOT_JDK"
22059  new_path=`$CYGPATH -u "$path"`
22060
22061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22064  # "foo.exe" is OK but "foo" is an error.
22065  #
22066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22067  # It is also a way to make sure we got the proper file name for the real test later on.
22068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22069  if test "x$test_shortpath" = x; then
22070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22072    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22073  fi
22074
22075  # Call helper function which possibly converts this using DOS-style short mode.
22076  # If so, the updated path is stored in $new_path.
22077
22078  input_path="$new_path"
22079  # Check if we need to convert this using DOS-style short mode. If the path
22080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22081  # take no chances and rewrite it.
22082  # Note: m4 eats our [], so we need to use [ and ] instead.
22083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22084  if test "x$has_forbidden_chars" != x; then
22085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22089      # Going to short mode and back again did indeed matter. Since short mode is
22090      # case insensitive, let's make it lowercase to improve readability.
22091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22092      # Now convert it back to Unix-style (cygpath)
22093      input_path=`$CYGPATH -u "$shortmode_path"`
22094      new_path="$input_path"
22095    fi
22096  fi
22097
22098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22099  if test "x$test_cygdrive_prefix" = x; then
22100    # As a simple fix, exclude /usr/bin since it's not a real path.
22101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22103      # a path prefixed by /cygdrive for fixpath to work.
22104      new_path="$CYGWIN_ROOT_PATH$input_path"
22105    fi
22106  fi
22107
22108
22109  if test "x$path" != "x$new_path"; then
22110    BOOT_JDK="$new_path"
22111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22113  fi
22114
22115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22116
22117  path="$BOOT_JDK"
22118  has_colon=`$ECHO $path | $GREP ^.:`
22119  new_path="$path"
22120  if test "x$has_colon" = x; then
22121    # Not in mixed or Windows style, start by that.
22122    new_path=`cmd //c echo $path`
22123  fi
22124
22125
22126  input_path="$new_path"
22127  # Check if we need to convert this using DOS-style short mode. If the path
22128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22129  # take no chances and rewrite it.
22130  # Note: m4 eats our [], so we need to use [ and ] instead.
22131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22132  if test "x$has_forbidden_chars" != x; then
22133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22135  fi
22136
22137
22138  windows_path="$new_path"
22139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22140    unix_path=`$CYGPATH -u "$windows_path"`
22141    new_path="$unix_path"
22142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22144    new_path="$unix_path"
22145  fi
22146
22147  if test "x$path" != "x$new_path"; then
22148    BOOT_JDK="$new_path"
22149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22151  fi
22152
22153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22155
22156    else
22157      # We're on a unix platform. Hooray! :)
22158      path="$BOOT_JDK"
22159      has_space=`$ECHO "$path" | $GREP " "`
22160      if test "x$has_space" != x; then
22161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22164      fi
22165
22166      # Use eval to expand a potential ~
22167      eval path="$path"
22168      if test ! -f "$path" && test ! -d "$path"; then
22169        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22170      fi
22171
22172      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22173    fi
22174  fi
22175
22176            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22177$as_echo_n "checking for Boot JDK... " >&6; }
22178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22179$as_echo "$BOOT_JDK" >&6; }
22180            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22181$as_echo_n "checking Boot JDK version... " >&6; }
22182            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22184$as_echo "$BOOT_JDK_VERSION" >&6; }
22185          fi # end check jdk version
22186        fi # end check javac
22187      fi # end check java
22188    fi # end check boot jdk found
22189  fi
22190
22191  fi
22192
22193
22194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22196      # Do we have a bin/java?
22197      if test ! -x "$BOOT_JDK/bin/java"; then
22198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22200        BOOT_JDK_FOUND=no
22201      else
22202        # Do we have a bin/javac?
22203        if test ! -x "$BOOT_JDK/bin/javac"; then
22204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22208          BOOT_JDK_FOUND=no
22209        else
22210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22212
22213          # Extra M4 quote needed to protect [] in grep expression.
22214          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22215          if test "x$FOUND_CORRECT_VERSION" = x; then
22216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22220            BOOT_JDK_FOUND=no
22221          else
22222            # We're done! :-)
22223            BOOT_JDK_FOUND=yes
22224
22225  # Only process if variable expands to non-empty
22226
22227  if test "x$BOOT_JDK" != x; then
22228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22229
22230  # Input might be given as Windows format, start by converting to
22231  # unix format.
22232  path="$BOOT_JDK"
22233  new_path=`$CYGPATH -u "$path"`
22234
22235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22238  # "foo.exe" is OK but "foo" is an error.
22239  #
22240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22241  # It is also a way to make sure we got the proper file name for the real test later on.
22242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22243  if test "x$test_shortpath" = x; then
22244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22247  fi
22248
22249  # Call helper function which possibly converts this using DOS-style short mode.
22250  # If so, the updated path is stored in $new_path.
22251
22252  input_path="$new_path"
22253  # Check if we need to convert this using DOS-style short mode. If the path
22254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22255  # take no chances and rewrite it.
22256  # Note: m4 eats our [], so we need to use [ and ] instead.
22257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22258  if test "x$has_forbidden_chars" != x; then
22259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22263      # Going to short mode and back again did indeed matter. Since short mode is
22264      # case insensitive, let's make it lowercase to improve readability.
22265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22266      # Now convert it back to Unix-style (cygpath)
22267      input_path=`$CYGPATH -u "$shortmode_path"`
22268      new_path="$input_path"
22269    fi
22270  fi
22271
22272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22273  if test "x$test_cygdrive_prefix" = x; then
22274    # As a simple fix, exclude /usr/bin since it's not a real path.
22275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22277      # a path prefixed by /cygdrive for fixpath to work.
22278      new_path="$CYGWIN_ROOT_PATH$input_path"
22279    fi
22280  fi
22281
22282
22283  if test "x$path" != "x$new_path"; then
22284    BOOT_JDK="$new_path"
22285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22287  fi
22288
22289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22290
22291  path="$BOOT_JDK"
22292  has_colon=`$ECHO $path | $GREP ^.:`
22293  new_path="$path"
22294  if test "x$has_colon" = x; then
22295    # Not in mixed or Windows style, start by that.
22296    new_path=`cmd //c echo $path`
22297  fi
22298
22299
22300  input_path="$new_path"
22301  # Check if we need to convert this using DOS-style short mode. If the path
22302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22303  # take no chances and rewrite it.
22304  # Note: m4 eats our [], so we need to use [ and ] instead.
22305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22306  if test "x$has_forbidden_chars" != x; then
22307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22309  fi
22310
22311
22312  windows_path="$new_path"
22313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22314    unix_path=`$CYGPATH -u "$windows_path"`
22315    new_path="$unix_path"
22316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22318    new_path="$unix_path"
22319  fi
22320
22321  if test "x$path" != "x$new_path"; then
22322    BOOT_JDK="$new_path"
22323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22325  fi
22326
22327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22329
22330    else
22331      # We're on a unix platform. Hooray! :)
22332      path="$BOOT_JDK"
22333      has_space=`$ECHO "$path" | $GREP " "`
22334      if test "x$has_space" != x; then
22335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22338      fi
22339
22340      # Use eval to expand a potential ~
22341      eval path="$path"
22342      if test ! -f "$path" && test ! -d "$path"; then
22343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22344      fi
22345
22346      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22347    fi
22348  fi
22349
22350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22351$as_echo_n "checking for Boot JDK... " >&6; }
22352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22353$as_echo "$BOOT_JDK" >&6; }
22354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22355$as_echo_n "checking Boot JDK version... " >&6; }
22356            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22358$as_echo "$BOOT_JDK_VERSION" >&6; }
22359          fi # end check jdk version
22360        fi # end check javac
22361      fi # end check java
22362    fi # end check boot jdk found
22363  fi
22364
22365
22366  # Test: Is $JAVA_HOME set?
22367
22368  if test "x$BOOT_JDK_FOUND" = xno; then
22369    # Now execute the test
22370
22371  if test "x$JAVA_HOME" != x; then
22372    JAVA_HOME_PROCESSED="$JAVA_HOME"
22373
22374  # Only process if variable expands to non-empty
22375
22376  if test "x$JAVA_HOME_PROCESSED" != x; then
22377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22378
22379  # Input might be given as Windows format, start by converting to
22380  # unix format.
22381  path="$JAVA_HOME_PROCESSED"
22382  new_path=`$CYGPATH -u "$path"`
22383
22384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22387  # "foo.exe" is OK but "foo" is an error.
22388  #
22389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22390  # It is also a way to make sure we got the proper file name for the real test later on.
22391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22392  if test "x$test_shortpath" = x; then
22393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22394$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22395    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22396  fi
22397
22398  # Call helper function which possibly converts this using DOS-style short mode.
22399  # If so, the updated path is stored in $new_path.
22400
22401  input_path="$new_path"
22402  # Check if we need to convert this using DOS-style short mode. If the path
22403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22404  # take no chances and rewrite it.
22405  # Note: m4 eats our [], so we need to use [ and ] instead.
22406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22407  if test "x$has_forbidden_chars" != x; then
22408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22412      # Going to short mode and back again did indeed matter. Since short mode is
22413      # case insensitive, let's make it lowercase to improve readability.
22414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22415      # Now convert it back to Unix-style (cygpath)
22416      input_path=`$CYGPATH -u "$shortmode_path"`
22417      new_path="$input_path"
22418    fi
22419  fi
22420
22421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22422  if test "x$test_cygdrive_prefix" = x; then
22423    # As a simple fix, exclude /usr/bin since it's not a real path.
22424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22426      # a path prefixed by /cygdrive for fixpath to work.
22427      new_path="$CYGWIN_ROOT_PATH$input_path"
22428    fi
22429  fi
22430
22431
22432  if test "x$path" != "x$new_path"; then
22433    JAVA_HOME_PROCESSED="$new_path"
22434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22435$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22436  fi
22437
22438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22439
22440  path="$JAVA_HOME_PROCESSED"
22441  has_colon=`$ECHO $path | $GREP ^.:`
22442  new_path="$path"
22443  if test "x$has_colon" = x; then
22444    # Not in mixed or Windows style, start by that.
22445    new_path=`cmd //c echo $path`
22446  fi
22447
22448
22449  input_path="$new_path"
22450  # Check if we need to convert this using DOS-style short mode. If the path
22451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22452  # take no chances and rewrite it.
22453  # Note: m4 eats our [], so we need to use [ and ] instead.
22454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22455  if test "x$has_forbidden_chars" != x; then
22456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22458  fi
22459
22460
22461  windows_path="$new_path"
22462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22463    unix_path=`$CYGPATH -u "$windows_path"`
22464    new_path="$unix_path"
22465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22467    new_path="$unix_path"
22468  fi
22469
22470  if test "x$path" != "x$new_path"; then
22471    JAVA_HOME_PROCESSED="$new_path"
22472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22473$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22474  fi
22475
22476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22478
22479    else
22480      # We're on a unix platform. Hooray! :)
22481      path="$JAVA_HOME_PROCESSED"
22482      has_space=`$ECHO "$path" | $GREP " "`
22483      if test "x$has_space" != x; then
22484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22485$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22487      fi
22488
22489      # Use eval to expand a potential ~
22490      eval path="$path"
22491      if test ! -f "$path" && test ! -d "$path"; then
22492        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22493      fi
22494
22495      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22496    fi
22497  fi
22498
22499    if test ! -d "$JAVA_HOME_PROCESSED"; then
22500      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22501$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22502    else
22503      # Aha, the user has set a JAVA_HOME
22504      # let us use that as the Boot JDK.
22505      BOOT_JDK="$JAVA_HOME_PROCESSED"
22506      BOOT_JDK_FOUND=maybe
22507      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22508$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22509    fi
22510  fi
22511
22512
22513    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22514    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22515      # Do we have a bin/java?
22516      if test ! -x "$BOOT_JDK/bin/java"; then
22517        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22519        BOOT_JDK_FOUND=no
22520      else
22521        # Do we have a bin/javac?
22522        if test ! -x "$BOOT_JDK/bin/javac"; then
22523          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22525          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22526$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22527          BOOT_JDK_FOUND=no
22528        else
22529          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22530          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22531
22532          # Extra M4 quote needed to protect [] in grep expression.
22533          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22534          if test "x$FOUND_CORRECT_VERSION" = x; then
22535            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22537            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22538$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22539            BOOT_JDK_FOUND=no
22540          else
22541            # We're done! :-)
22542            BOOT_JDK_FOUND=yes
22543
22544  # Only process if variable expands to non-empty
22545
22546  if test "x$BOOT_JDK" != x; then
22547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22548
22549  # Input might be given as Windows format, start by converting to
22550  # unix format.
22551  path="$BOOT_JDK"
22552  new_path=`$CYGPATH -u "$path"`
22553
22554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22557  # "foo.exe" is OK but "foo" is an error.
22558  #
22559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22560  # It is also a way to make sure we got the proper file name for the real test later on.
22561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22562  if test "x$test_shortpath" = x; then
22563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22565    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22566  fi
22567
22568  # Call helper function which possibly converts this using DOS-style short mode.
22569  # If so, the updated path is stored in $new_path.
22570
22571  input_path="$new_path"
22572  # Check if we need to convert this using DOS-style short mode. If the path
22573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22574  # take no chances and rewrite it.
22575  # Note: m4 eats our [], so we need to use [ and ] instead.
22576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22577  if test "x$has_forbidden_chars" != x; then
22578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22582      # Going to short mode and back again did indeed matter. Since short mode is
22583      # case insensitive, let's make it lowercase to improve readability.
22584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22585      # Now convert it back to Unix-style (cygpath)
22586      input_path=`$CYGPATH -u "$shortmode_path"`
22587      new_path="$input_path"
22588    fi
22589  fi
22590
22591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22592  if test "x$test_cygdrive_prefix" = x; then
22593    # As a simple fix, exclude /usr/bin since it's not a real path.
22594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22596      # a path prefixed by /cygdrive for fixpath to work.
22597      new_path="$CYGWIN_ROOT_PATH$input_path"
22598    fi
22599  fi
22600
22601
22602  if test "x$path" != "x$new_path"; then
22603    BOOT_JDK="$new_path"
22604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22606  fi
22607
22608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22609
22610  path="$BOOT_JDK"
22611  has_colon=`$ECHO $path | $GREP ^.:`
22612  new_path="$path"
22613  if test "x$has_colon" = x; then
22614    # Not in mixed or Windows style, start by that.
22615    new_path=`cmd //c echo $path`
22616  fi
22617
22618
22619  input_path="$new_path"
22620  # Check if we need to convert this using DOS-style short mode. If the path
22621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22622  # take no chances and rewrite it.
22623  # Note: m4 eats our [], so we need to use [ and ] instead.
22624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22625  if test "x$has_forbidden_chars" != x; then
22626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22628  fi
22629
22630
22631  windows_path="$new_path"
22632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22633    unix_path=`$CYGPATH -u "$windows_path"`
22634    new_path="$unix_path"
22635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22637    new_path="$unix_path"
22638  fi
22639
22640  if test "x$path" != "x$new_path"; then
22641    BOOT_JDK="$new_path"
22642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22644  fi
22645
22646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22648
22649    else
22650      # We're on a unix platform. Hooray! :)
22651      path="$BOOT_JDK"
22652      has_space=`$ECHO "$path" | $GREP " "`
22653      if test "x$has_space" != x; then
22654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22657      fi
22658
22659      # Use eval to expand a potential ~
22660      eval path="$path"
22661      if test ! -f "$path" && test ! -d "$path"; then
22662        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22663      fi
22664
22665      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22666    fi
22667  fi
22668
22669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22670$as_echo_n "checking for Boot JDK... " >&6; }
22671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22672$as_echo "$BOOT_JDK" >&6; }
22673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22674$as_echo_n "checking Boot JDK version... " >&6; }
22675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22677$as_echo "$BOOT_JDK_VERSION" >&6; }
22678          fi # end check jdk version
22679        fi # end check javac
22680      fi # end check java
22681    fi # end check boot jdk found
22682  fi
22683
22684
22685  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22686
22687  if test "x$BOOT_JDK_FOUND" = xno; then
22688    # Now execute the test
22689
22690  # Extract the first word of "javac", so it can be a program name with args.
22691set dummy javac; ac_word=$2
22692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22693$as_echo_n "checking for $ac_word... " >&6; }
22694if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22695  $as_echo_n "(cached) " >&6
22696else
22697  case $JAVAC_CHECK in
22698  [\\/]* | ?:[\\/]*)
22699  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22700  ;;
22701  *)
22702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22703for as_dir in $PATH
22704do
22705  IFS=$as_save_IFS
22706  test -z "$as_dir" && as_dir=.
22707    for ac_exec_ext in '' $ac_executable_extensions; do
22708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22709    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22711    break 2
22712  fi
22713done
22714  done
22715IFS=$as_save_IFS
22716
22717  ;;
22718esac
22719fi
22720JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22721if test -n "$JAVAC_CHECK"; then
22722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22723$as_echo "$JAVAC_CHECK" >&6; }
22724else
22725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22726$as_echo "no" >&6; }
22727fi
22728
22729
22730  # Extract the first word of "java", so it can be a program name with args.
22731set dummy java; ac_word=$2
22732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22733$as_echo_n "checking for $ac_word... " >&6; }
22734if ${ac_cv_path_JAVA_CHECK+:} false; then :
22735  $as_echo_n "(cached) " >&6
22736else
22737  case $JAVA_CHECK in
22738  [\\/]* | ?:[\\/]*)
22739  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22740  ;;
22741  *)
22742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22743for as_dir in $PATH
22744do
22745  IFS=$as_save_IFS
22746  test -z "$as_dir" && as_dir=.
22747    for ac_exec_ext in '' $ac_executable_extensions; do
22748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22749    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22751    break 2
22752  fi
22753done
22754  done
22755IFS=$as_save_IFS
22756
22757  ;;
22758esac
22759fi
22760JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22761if test -n "$JAVA_CHECK"; then
22762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22763$as_echo "$JAVA_CHECK" >&6; }
22764else
22765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22766$as_echo "no" >&6; }
22767fi
22768
22769
22770  BINARY="$JAVAC_CHECK"
22771  if test "x$JAVAC_CHECK" = x; then
22772    BINARY="$JAVA_CHECK"
22773  fi
22774  if test "x$BINARY" != x; then
22775    # So there is a java(c) binary, it might be part of a JDK.
22776    # Lets find the JDK/JRE directory by following symbolic links.
22777    # Linux/GNU systems often have links from /usr/bin/java to
22778    # /etc/alternatives/java to the real JDK binary.
22779
22780  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22781    # Follow a chain of symbolic links. Use readlink
22782    # where it exists, else fall back to horribly
22783    # complicated shell code.
22784    if test "x$READLINK_TESTED" != yes; then
22785      # On MacOSX there is a readlink tool with a different
22786      # purpose than the GNU readlink tool. Check the found readlink.
22787      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22788      if test "x$ISGNU" = x; then
22789        # A readlink that we do not know how to use.
22790        # Are there other non-GNU readlinks out there?
22791        READLINK_TESTED=yes
22792        READLINK=
22793      fi
22794    fi
22795
22796    if test "x$READLINK" != x; then
22797      BINARY=`$READLINK -f $BINARY`
22798    else
22799      # Save the current directory for restoring afterwards
22800      STARTDIR=$PWD
22801      COUNTER=0
22802      sym_link_dir=`$DIRNAME $BINARY`
22803      sym_link_file=`$BASENAME $BINARY`
22804      cd $sym_link_dir
22805      # Use -P flag to resolve symlinks in directories.
22806      cd `$THEPWDCMD -P`
22807      sym_link_dir=`$THEPWDCMD -P`
22808      # Resolve file symlinks
22809      while test $COUNTER -lt 20; do
22810        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22811        if test "x$ISLINK" == x; then
22812          # This is not a symbolic link! We are done!
22813          break
22814        fi
22815        # Again resolve directory symlinks since the target of the just found
22816        # link could be in a different directory
22817        cd `$DIRNAME $ISLINK`
22818        sym_link_dir=`$THEPWDCMD -P`
22819        sym_link_file=`$BASENAME $ISLINK`
22820        let COUNTER=COUNTER+1
22821      done
22822      cd $STARTDIR
22823      BINARY=$sym_link_dir/$sym_link_file
22824    fi
22825  fi
22826
22827    BOOT_JDK=`dirname "$BINARY"`
22828    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22829    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22830      # Looks like we found ourselves an JDK
22831      BOOT_JDK_FOUND=maybe
22832      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22833$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22834    fi
22835  fi
22836
22837
22838    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22839    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22840      # Do we have a bin/java?
22841      if test ! -x "$BOOT_JDK/bin/java"; then
22842        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22844        BOOT_JDK_FOUND=no
22845      else
22846        # Do we have a bin/javac?
22847        if test ! -x "$BOOT_JDK/bin/javac"; then
22848          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22850          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22851$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22852          BOOT_JDK_FOUND=no
22853        else
22854          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22855          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22856
22857          # Extra M4 quote needed to protect [] in grep expression.
22858          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22859          if test "x$FOUND_CORRECT_VERSION" = x; then
22860            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22862            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22863$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22864            BOOT_JDK_FOUND=no
22865          else
22866            # We're done! :-)
22867            BOOT_JDK_FOUND=yes
22868
22869  # Only process if variable expands to non-empty
22870
22871  if test "x$BOOT_JDK" != x; then
22872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22873
22874  # Input might be given as Windows format, start by converting to
22875  # unix format.
22876  path="$BOOT_JDK"
22877  new_path=`$CYGPATH -u "$path"`
22878
22879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22882  # "foo.exe" is OK but "foo" is an error.
22883  #
22884  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22885  # It is also a way to make sure we got the proper file name for the real test later on.
22886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22887  if test "x$test_shortpath" = x; then
22888    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22889$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22890    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22891  fi
22892
22893  # Call helper function which possibly converts this using DOS-style short mode.
22894  # If so, the updated path is stored in $new_path.
22895
22896  input_path="$new_path"
22897  # Check if we need to convert this using DOS-style short mode. If the path
22898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22899  # take no chances and rewrite it.
22900  # Note: m4 eats our [], so we need to use [ and ] instead.
22901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22902  if test "x$has_forbidden_chars" != x; then
22903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22907      # Going to short mode and back again did indeed matter. Since short mode is
22908      # case insensitive, let's make it lowercase to improve readability.
22909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22910      # Now convert it back to Unix-style (cygpath)
22911      input_path=`$CYGPATH -u "$shortmode_path"`
22912      new_path="$input_path"
22913    fi
22914  fi
22915
22916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22917  if test "x$test_cygdrive_prefix" = x; then
22918    # As a simple fix, exclude /usr/bin since it's not a real path.
22919    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22921      # a path prefixed by /cygdrive for fixpath to work.
22922      new_path="$CYGWIN_ROOT_PATH$input_path"
22923    fi
22924  fi
22925
22926
22927  if test "x$path" != "x$new_path"; then
22928    BOOT_JDK="$new_path"
22929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22931  fi
22932
22933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22934
22935  path="$BOOT_JDK"
22936  has_colon=`$ECHO $path | $GREP ^.:`
22937  new_path="$path"
22938  if test "x$has_colon" = x; then
22939    # Not in mixed or Windows style, start by that.
22940    new_path=`cmd //c echo $path`
22941  fi
22942
22943
22944  input_path="$new_path"
22945  # Check if we need to convert this using DOS-style short mode. If the path
22946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22947  # take no chances and rewrite it.
22948  # Note: m4 eats our [], so we need to use [ and ] instead.
22949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22950  if test "x$has_forbidden_chars" != x; then
22951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22953  fi
22954
22955
22956  windows_path="$new_path"
22957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22958    unix_path=`$CYGPATH -u "$windows_path"`
22959    new_path="$unix_path"
22960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22962    new_path="$unix_path"
22963  fi
22964
22965  if test "x$path" != "x$new_path"; then
22966    BOOT_JDK="$new_path"
22967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22969  fi
22970
22971  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22972  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22973
22974    else
22975      # We're on a unix platform. Hooray! :)
22976      path="$BOOT_JDK"
22977      has_space=`$ECHO "$path" | $GREP " "`
22978      if test "x$has_space" != x; then
22979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22980$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22981        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22982      fi
22983
22984      # Use eval to expand a potential ~
22985      eval path="$path"
22986      if test ! -f "$path" && test ! -d "$path"; then
22987        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22988      fi
22989
22990      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22991    fi
22992  fi
22993
22994            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22995$as_echo_n "checking for Boot JDK... " >&6; }
22996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22997$as_echo "$BOOT_JDK" >&6; }
22998            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22999$as_echo_n "checking Boot JDK version... " >&6; }
23000            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23002$as_echo "$BOOT_JDK_VERSION" >&6; }
23003          fi # end check jdk version
23004        fi # end check javac
23005      fi # end check java
23006    fi # end check boot jdk found
23007  fi
23008
23009
23010  # Test: Is there a JDK installed in default, well-known locations?
23011
23012  if test "x$BOOT_JDK_FOUND" = xno; then
23013    # Now execute the test
23014
23015  if test "x$OPENJDK_TARGET_OS" = xwindows; then
23016
23017  if test "x$BOOT_JDK_FOUND" = xno; then
23018    # Now execute the test
23019
23020  if test "x$ProgramW6432" != x; then
23021    VIRTUAL_DIR="$ProgramW6432/Java"
23022
23023  windows_path="$VIRTUAL_DIR"
23024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23025    unix_path=`$CYGPATH -u "$windows_path"`
23026    VIRTUAL_DIR="$unix_path"
23027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23029    VIRTUAL_DIR="$unix_path"
23030  fi
23031
23032
23033  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23034  BOOT_JDK_SUFFIX=""
23035  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23036  if test "x$ALL_JDKS_FOUND" != x; then
23037    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23038
23039  if test "x$BOOT_JDK_FOUND" = xno; then
23040    # Now execute the test
23041
23042        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23043        if test -d "$BOOT_JDK"; then
23044          BOOT_JDK_FOUND=maybe
23045          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23046$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23047        fi
23048
23049
23050    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23051    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23052      # Do we have a bin/java?
23053      if test ! -x "$BOOT_JDK/bin/java"; then
23054        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23056        BOOT_JDK_FOUND=no
23057      else
23058        # Do we have a bin/javac?
23059        if test ! -x "$BOOT_JDK/bin/javac"; then
23060          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23062          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23063$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23064          BOOT_JDK_FOUND=no
23065        else
23066          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23067          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23068
23069          # Extra M4 quote needed to protect [] in grep expression.
23070          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23071          if test "x$FOUND_CORRECT_VERSION" = x; then
23072            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23074            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23075$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23076            BOOT_JDK_FOUND=no
23077          else
23078            # We're done! :-)
23079            BOOT_JDK_FOUND=yes
23080
23081  # Only process if variable expands to non-empty
23082
23083  if test "x$BOOT_JDK" != x; then
23084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23085
23086  # Input might be given as Windows format, start by converting to
23087  # unix format.
23088  path="$BOOT_JDK"
23089  new_path=`$CYGPATH -u "$path"`
23090
23091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23094  # "foo.exe" is OK but "foo" is an error.
23095  #
23096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23097  # It is also a way to make sure we got the proper file name for the real test later on.
23098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23099  if test "x$test_shortpath" = x; then
23100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23103  fi
23104
23105  # Call helper function which possibly converts this using DOS-style short mode.
23106  # If so, the updated path is stored in $new_path.
23107
23108  input_path="$new_path"
23109  # Check if we need to convert this using DOS-style short mode. If the path
23110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23111  # take no chances and rewrite it.
23112  # Note: m4 eats our [], so we need to use [ and ] instead.
23113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23114  if test "x$has_forbidden_chars" != x; then
23115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23119      # Going to short mode and back again did indeed matter. Since short mode is
23120      # case insensitive, let's make it lowercase to improve readability.
23121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23122      # Now convert it back to Unix-style (cygpath)
23123      input_path=`$CYGPATH -u "$shortmode_path"`
23124      new_path="$input_path"
23125    fi
23126  fi
23127
23128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23129  if test "x$test_cygdrive_prefix" = x; then
23130    # As a simple fix, exclude /usr/bin since it's not a real path.
23131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23133      # a path prefixed by /cygdrive for fixpath to work.
23134      new_path="$CYGWIN_ROOT_PATH$input_path"
23135    fi
23136  fi
23137
23138
23139  if test "x$path" != "x$new_path"; then
23140    BOOT_JDK="$new_path"
23141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23143  fi
23144
23145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23146
23147  path="$BOOT_JDK"
23148  has_colon=`$ECHO $path | $GREP ^.:`
23149  new_path="$path"
23150  if test "x$has_colon" = x; then
23151    # Not in mixed or Windows style, start by that.
23152    new_path=`cmd //c echo $path`
23153  fi
23154
23155
23156  input_path="$new_path"
23157  # Check if we need to convert this using DOS-style short mode. If the path
23158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23159  # take no chances and rewrite it.
23160  # Note: m4 eats our [], so we need to use [ and ] instead.
23161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23162  if test "x$has_forbidden_chars" != x; then
23163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23165  fi
23166
23167
23168  windows_path="$new_path"
23169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23170    unix_path=`$CYGPATH -u "$windows_path"`
23171    new_path="$unix_path"
23172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23174    new_path="$unix_path"
23175  fi
23176
23177  if test "x$path" != "x$new_path"; then
23178    BOOT_JDK="$new_path"
23179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23181  fi
23182
23183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23185
23186    else
23187      # We're on a unix platform. Hooray! :)
23188      path="$BOOT_JDK"
23189      has_space=`$ECHO "$path" | $GREP " "`
23190      if test "x$has_space" != x; then
23191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23193        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23194      fi
23195
23196      # Use eval to expand a potential ~
23197      eval path="$path"
23198      if test ! -f "$path" && test ! -d "$path"; then
23199        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23200      fi
23201
23202      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23203    fi
23204  fi
23205
23206            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23207$as_echo_n "checking for Boot JDK... " >&6; }
23208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23209$as_echo "$BOOT_JDK" >&6; }
23210            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23211$as_echo_n "checking Boot JDK version... " >&6; }
23212            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23214$as_echo "$BOOT_JDK_VERSION" >&6; }
23215          fi # end check jdk version
23216        fi # end check javac
23217      fi # end check java
23218    fi # end check boot jdk found
23219  fi
23220
23221    done
23222  fi
23223
23224  fi
23225
23226
23227    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23228    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23229      # Do we have a bin/java?
23230      if test ! -x "$BOOT_JDK/bin/java"; then
23231        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23233        BOOT_JDK_FOUND=no
23234      else
23235        # Do we have a bin/javac?
23236        if test ! -x "$BOOT_JDK/bin/javac"; then
23237          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23239          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23240$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23241          BOOT_JDK_FOUND=no
23242        else
23243          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23244          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23245
23246          # Extra M4 quote needed to protect [] in grep expression.
23247          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23248          if test "x$FOUND_CORRECT_VERSION" = x; then
23249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23251            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23252$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23253            BOOT_JDK_FOUND=no
23254          else
23255            # We're done! :-)
23256            BOOT_JDK_FOUND=yes
23257
23258  # Only process if variable expands to non-empty
23259
23260  if test "x$BOOT_JDK" != x; then
23261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23262
23263  # Input might be given as Windows format, start by converting to
23264  # unix format.
23265  path="$BOOT_JDK"
23266  new_path=`$CYGPATH -u "$path"`
23267
23268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23271  # "foo.exe" is OK but "foo" is an error.
23272  #
23273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23274  # It is also a way to make sure we got the proper file name for the real test later on.
23275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23276  if test "x$test_shortpath" = x; then
23277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23279    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23280  fi
23281
23282  # Call helper function which possibly converts this using DOS-style short mode.
23283  # If so, the updated path is stored in $new_path.
23284
23285  input_path="$new_path"
23286  # Check if we need to convert this using DOS-style short mode. If the path
23287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23288  # take no chances and rewrite it.
23289  # Note: m4 eats our [], so we need to use [ and ] instead.
23290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23291  if test "x$has_forbidden_chars" != x; then
23292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23296      # Going to short mode and back again did indeed matter. Since short mode is
23297      # case insensitive, let's make it lowercase to improve readability.
23298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299      # Now convert it back to Unix-style (cygpath)
23300      input_path=`$CYGPATH -u "$shortmode_path"`
23301      new_path="$input_path"
23302    fi
23303  fi
23304
23305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23306  if test "x$test_cygdrive_prefix" = x; then
23307    # As a simple fix, exclude /usr/bin since it's not a real path.
23308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23310      # a path prefixed by /cygdrive for fixpath to work.
23311      new_path="$CYGWIN_ROOT_PATH$input_path"
23312    fi
23313  fi
23314
23315
23316  if test "x$path" != "x$new_path"; then
23317    BOOT_JDK="$new_path"
23318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23320  fi
23321
23322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23323
23324  path="$BOOT_JDK"
23325  has_colon=`$ECHO $path | $GREP ^.:`
23326  new_path="$path"
23327  if test "x$has_colon" = x; then
23328    # Not in mixed or Windows style, start by that.
23329    new_path=`cmd //c echo $path`
23330  fi
23331
23332
23333  input_path="$new_path"
23334  # Check if we need to convert this using DOS-style short mode. If the path
23335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23336  # take no chances and rewrite it.
23337  # Note: m4 eats our [], so we need to use [ and ] instead.
23338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23339  if test "x$has_forbidden_chars" != x; then
23340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23342  fi
23343
23344
23345  windows_path="$new_path"
23346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23347    unix_path=`$CYGPATH -u "$windows_path"`
23348    new_path="$unix_path"
23349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23351    new_path="$unix_path"
23352  fi
23353
23354  if test "x$path" != "x$new_path"; then
23355    BOOT_JDK="$new_path"
23356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23358  fi
23359
23360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23362
23363    else
23364      # We're on a unix platform. Hooray! :)
23365      path="$BOOT_JDK"
23366      has_space=`$ECHO "$path" | $GREP " "`
23367      if test "x$has_space" != x; then
23368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23370        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23371      fi
23372
23373      # Use eval to expand a potential ~
23374      eval path="$path"
23375      if test ! -f "$path" && test ! -d "$path"; then
23376        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23377      fi
23378
23379      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23380    fi
23381  fi
23382
23383            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23384$as_echo_n "checking for Boot JDK... " >&6; }
23385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23386$as_echo "$BOOT_JDK" >&6; }
23387            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23388$as_echo_n "checking Boot JDK version... " >&6; }
23389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23391$as_echo "$BOOT_JDK_VERSION" >&6; }
23392          fi # end check jdk version
23393        fi # end check javac
23394      fi # end check java
23395    fi # end check boot jdk found
23396  fi
23397
23398
23399  if test "x$BOOT_JDK_FOUND" = xno; then
23400    # Now execute the test
23401
23402  if test "x$PROGRAMW6432" != x; then
23403    VIRTUAL_DIR="$PROGRAMW6432/Java"
23404
23405  windows_path="$VIRTUAL_DIR"
23406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23407    unix_path=`$CYGPATH -u "$windows_path"`
23408    VIRTUAL_DIR="$unix_path"
23409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23411    VIRTUAL_DIR="$unix_path"
23412  fi
23413
23414
23415  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23416  BOOT_JDK_SUFFIX=""
23417  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23418  if test "x$ALL_JDKS_FOUND" != x; then
23419    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23420
23421  if test "x$BOOT_JDK_FOUND" = xno; then
23422    # Now execute the test
23423
23424        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23425        if test -d "$BOOT_JDK"; then
23426          BOOT_JDK_FOUND=maybe
23427          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23428$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23429        fi
23430
23431
23432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23434      # Do we have a bin/java?
23435      if test ! -x "$BOOT_JDK/bin/java"; then
23436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23438        BOOT_JDK_FOUND=no
23439      else
23440        # Do we have a bin/javac?
23441        if test ! -x "$BOOT_JDK/bin/javac"; then
23442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23446          BOOT_JDK_FOUND=no
23447        else
23448          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23449          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23450
23451          # Extra M4 quote needed to protect [] in grep expression.
23452          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23453          if test "x$FOUND_CORRECT_VERSION" = x; then
23454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23456            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23457$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23458            BOOT_JDK_FOUND=no
23459          else
23460            # We're done! :-)
23461            BOOT_JDK_FOUND=yes
23462
23463  # Only process if variable expands to non-empty
23464
23465  if test "x$BOOT_JDK" != x; then
23466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23467
23468  # Input might be given as Windows format, start by converting to
23469  # unix format.
23470  path="$BOOT_JDK"
23471  new_path=`$CYGPATH -u "$path"`
23472
23473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23476  # "foo.exe" is OK but "foo" is an error.
23477  #
23478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23479  # It is also a way to make sure we got the proper file name for the real test later on.
23480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23481  if test "x$test_shortpath" = x; then
23482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23485  fi
23486
23487  # Call helper function which possibly converts this using DOS-style short mode.
23488  # If so, the updated path is stored in $new_path.
23489
23490  input_path="$new_path"
23491  # Check if we need to convert this using DOS-style short mode. If the path
23492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23493  # take no chances and rewrite it.
23494  # Note: m4 eats our [], so we need to use [ and ] instead.
23495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23496  if test "x$has_forbidden_chars" != x; then
23497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23501      # Going to short mode and back again did indeed matter. Since short mode is
23502      # case insensitive, let's make it lowercase to improve readability.
23503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23504      # Now convert it back to Unix-style (cygpath)
23505      input_path=`$CYGPATH -u "$shortmode_path"`
23506      new_path="$input_path"
23507    fi
23508  fi
23509
23510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23511  if test "x$test_cygdrive_prefix" = x; then
23512    # As a simple fix, exclude /usr/bin since it's not a real path.
23513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23515      # a path prefixed by /cygdrive for fixpath to work.
23516      new_path="$CYGWIN_ROOT_PATH$input_path"
23517    fi
23518  fi
23519
23520
23521  if test "x$path" != "x$new_path"; then
23522    BOOT_JDK="$new_path"
23523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23525  fi
23526
23527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528
23529  path="$BOOT_JDK"
23530  has_colon=`$ECHO $path | $GREP ^.:`
23531  new_path="$path"
23532  if test "x$has_colon" = x; then
23533    # Not in mixed or Windows style, start by that.
23534    new_path=`cmd //c echo $path`
23535  fi
23536
23537
23538  input_path="$new_path"
23539  # Check if we need to convert this using DOS-style short mode. If the path
23540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23541  # take no chances and rewrite it.
23542  # Note: m4 eats our [], so we need to use [ and ] instead.
23543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23544  if test "x$has_forbidden_chars" != x; then
23545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23547  fi
23548
23549
23550  windows_path="$new_path"
23551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23552    unix_path=`$CYGPATH -u "$windows_path"`
23553    new_path="$unix_path"
23554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23556    new_path="$unix_path"
23557  fi
23558
23559  if test "x$path" != "x$new_path"; then
23560    BOOT_JDK="$new_path"
23561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23563  fi
23564
23565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23567
23568    else
23569      # We're on a unix platform. Hooray! :)
23570      path="$BOOT_JDK"
23571      has_space=`$ECHO "$path" | $GREP " "`
23572      if test "x$has_space" != x; then
23573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23576      fi
23577
23578      # Use eval to expand a potential ~
23579      eval path="$path"
23580      if test ! -f "$path" && test ! -d "$path"; then
23581        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23582      fi
23583
23584      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23585    fi
23586  fi
23587
23588            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23589$as_echo_n "checking for Boot JDK... " >&6; }
23590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23591$as_echo "$BOOT_JDK" >&6; }
23592            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23593$as_echo_n "checking Boot JDK version... " >&6; }
23594            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23596$as_echo "$BOOT_JDK_VERSION" >&6; }
23597          fi # end check jdk version
23598        fi # end check javac
23599      fi # end check java
23600    fi # end check boot jdk found
23601  fi
23602
23603    done
23604  fi
23605
23606  fi
23607
23608
23609    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23610    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23611      # Do we have a bin/java?
23612      if test ! -x "$BOOT_JDK/bin/java"; then
23613        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23615        BOOT_JDK_FOUND=no
23616      else
23617        # Do we have a bin/javac?
23618        if test ! -x "$BOOT_JDK/bin/javac"; then
23619          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23621          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23622$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23623          BOOT_JDK_FOUND=no
23624        else
23625          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23626          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23627
23628          # Extra M4 quote needed to protect [] in grep expression.
23629          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23630          if test "x$FOUND_CORRECT_VERSION" = x; then
23631            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23633            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23634$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23635            BOOT_JDK_FOUND=no
23636          else
23637            # We're done! :-)
23638            BOOT_JDK_FOUND=yes
23639
23640  # Only process if variable expands to non-empty
23641
23642  if test "x$BOOT_JDK" != x; then
23643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23644
23645  # Input might be given as Windows format, start by converting to
23646  # unix format.
23647  path="$BOOT_JDK"
23648  new_path=`$CYGPATH -u "$path"`
23649
23650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23653  # "foo.exe" is OK but "foo" is an error.
23654  #
23655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23656  # It is also a way to make sure we got the proper file name for the real test later on.
23657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23658  if test "x$test_shortpath" = x; then
23659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23661    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23662  fi
23663
23664  # Call helper function which possibly converts this using DOS-style short mode.
23665  # If so, the updated path is stored in $new_path.
23666
23667  input_path="$new_path"
23668  # Check if we need to convert this using DOS-style short mode. If the path
23669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23670  # take no chances and rewrite it.
23671  # Note: m4 eats our [], so we need to use [ and ] instead.
23672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23673  if test "x$has_forbidden_chars" != x; then
23674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23678      # Going to short mode and back again did indeed matter. Since short mode is
23679      # case insensitive, let's make it lowercase to improve readability.
23680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23681      # Now convert it back to Unix-style (cygpath)
23682      input_path=`$CYGPATH -u "$shortmode_path"`
23683      new_path="$input_path"
23684    fi
23685  fi
23686
23687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23688  if test "x$test_cygdrive_prefix" = x; then
23689    # As a simple fix, exclude /usr/bin since it's not a real path.
23690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23692      # a path prefixed by /cygdrive for fixpath to work.
23693      new_path="$CYGWIN_ROOT_PATH$input_path"
23694    fi
23695  fi
23696
23697
23698  if test "x$path" != "x$new_path"; then
23699    BOOT_JDK="$new_path"
23700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23702  fi
23703
23704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23705
23706  path="$BOOT_JDK"
23707  has_colon=`$ECHO $path | $GREP ^.:`
23708  new_path="$path"
23709  if test "x$has_colon" = x; then
23710    # Not in mixed or Windows style, start by that.
23711    new_path=`cmd //c echo $path`
23712  fi
23713
23714
23715  input_path="$new_path"
23716  # Check if we need to convert this using DOS-style short mode. If the path
23717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23718  # take no chances and rewrite it.
23719  # Note: m4 eats our [], so we need to use [ and ] instead.
23720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23721  if test "x$has_forbidden_chars" != x; then
23722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23724  fi
23725
23726
23727  windows_path="$new_path"
23728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23729    unix_path=`$CYGPATH -u "$windows_path"`
23730    new_path="$unix_path"
23731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23733    new_path="$unix_path"
23734  fi
23735
23736  if test "x$path" != "x$new_path"; then
23737    BOOT_JDK="$new_path"
23738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23740  fi
23741
23742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23744
23745    else
23746      # We're on a unix platform. Hooray! :)
23747      path="$BOOT_JDK"
23748      has_space=`$ECHO "$path" | $GREP " "`
23749      if test "x$has_space" != x; then
23750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23752        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23753      fi
23754
23755      # Use eval to expand a potential ~
23756      eval path="$path"
23757      if test ! -f "$path" && test ! -d "$path"; then
23758        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23759      fi
23760
23761      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23762    fi
23763  fi
23764
23765            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23766$as_echo_n "checking for Boot JDK... " >&6; }
23767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23768$as_echo "$BOOT_JDK" >&6; }
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23770$as_echo_n "checking Boot JDK version... " >&6; }
23771            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23773$as_echo "$BOOT_JDK_VERSION" >&6; }
23774          fi # end check jdk version
23775        fi # end check javac
23776      fi # end check java
23777    fi # end check boot jdk found
23778  fi
23779
23780
23781  if test "x$BOOT_JDK_FOUND" = xno; then
23782    # Now execute the test
23783
23784  if test "x$PROGRAMFILES" != x; then
23785    VIRTUAL_DIR="$PROGRAMFILES/Java"
23786
23787  windows_path="$VIRTUAL_DIR"
23788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789    unix_path=`$CYGPATH -u "$windows_path"`
23790    VIRTUAL_DIR="$unix_path"
23791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23793    VIRTUAL_DIR="$unix_path"
23794  fi
23795
23796
23797  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23798  BOOT_JDK_SUFFIX=""
23799  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23800  if test "x$ALL_JDKS_FOUND" != x; then
23801    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23802
23803  if test "x$BOOT_JDK_FOUND" = xno; then
23804    # Now execute the test
23805
23806        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23807        if test -d "$BOOT_JDK"; then
23808          BOOT_JDK_FOUND=maybe
23809          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23810$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23811        fi
23812
23813
23814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23816      # Do we have a bin/java?
23817      if test ! -x "$BOOT_JDK/bin/java"; then
23818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23820        BOOT_JDK_FOUND=no
23821      else
23822        # Do we have a bin/javac?
23823        if test ! -x "$BOOT_JDK/bin/javac"; then
23824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23828          BOOT_JDK_FOUND=no
23829        else
23830          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23831          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23832
23833          # Extra M4 quote needed to protect [] in grep expression.
23834          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23835          if test "x$FOUND_CORRECT_VERSION" = x; then
23836            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23838            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23839$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23840            BOOT_JDK_FOUND=no
23841          else
23842            # We're done! :-)
23843            BOOT_JDK_FOUND=yes
23844
23845  # Only process if variable expands to non-empty
23846
23847  if test "x$BOOT_JDK" != x; then
23848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23849
23850  # Input might be given as Windows format, start by converting to
23851  # unix format.
23852  path="$BOOT_JDK"
23853  new_path=`$CYGPATH -u "$path"`
23854
23855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23858  # "foo.exe" is OK but "foo" is an error.
23859  #
23860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23861  # It is also a way to make sure we got the proper file name for the real test later on.
23862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23863  if test "x$test_shortpath" = x; then
23864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23867  fi
23868
23869  # Call helper function which possibly converts this using DOS-style short mode.
23870  # If so, the updated path is stored in $new_path.
23871
23872  input_path="$new_path"
23873  # Check if we need to convert this using DOS-style short mode. If the path
23874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23875  # take no chances and rewrite it.
23876  # Note: m4 eats our [], so we need to use [ and ] instead.
23877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23878  if test "x$has_forbidden_chars" != x; then
23879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23883      # Going to short mode and back again did indeed matter. Since short mode is
23884      # case insensitive, let's make it lowercase to improve readability.
23885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23886      # Now convert it back to Unix-style (cygpath)
23887      input_path=`$CYGPATH -u "$shortmode_path"`
23888      new_path="$input_path"
23889    fi
23890  fi
23891
23892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23893  if test "x$test_cygdrive_prefix" = x; then
23894    # As a simple fix, exclude /usr/bin since it's not a real path.
23895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23897      # a path prefixed by /cygdrive for fixpath to work.
23898      new_path="$CYGWIN_ROOT_PATH$input_path"
23899    fi
23900  fi
23901
23902
23903  if test "x$path" != "x$new_path"; then
23904    BOOT_JDK="$new_path"
23905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23907  fi
23908
23909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23910
23911  path="$BOOT_JDK"
23912  has_colon=`$ECHO $path | $GREP ^.:`
23913  new_path="$path"
23914  if test "x$has_colon" = x; then
23915    # Not in mixed or Windows style, start by that.
23916    new_path=`cmd //c echo $path`
23917  fi
23918
23919
23920  input_path="$new_path"
23921  # Check if we need to convert this using DOS-style short mode. If the path
23922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23923  # take no chances and rewrite it.
23924  # Note: m4 eats our [], so we need to use [ and ] instead.
23925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23926  if test "x$has_forbidden_chars" != x; then
23927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23929  fi
23930
23931
23932  windows_path="$new_path"
23933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23934    unix_path=`$CYGPATH -u "$windows_path"`
23935    new_path="$unix_path"
23936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23938    new_path="$unix_path"
23939  fi
23940
23941  if test "x$path" != "x$new_path"; then
23942    BOOT_JDK="$new_path"
23943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23945  fi
23946
23947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23949
23950    else
23951      # We're on a unix platform. Hooray! :)
23952      path="$BOOT_JDK"
23953      has_space=`$ECHO "$path" | $GREP " "`
23954      if test "x$has_space" != x; then
23955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23958      fi
23959
23960      # Use eval to expand a potential ~
23961      eval path="$path"
23962      if test ! -f "$path" && test ! -d "$path"; then
23963        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23964      fi
23965
23966      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23967    fi
23968  fi
23969
23970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23971$as_echo_n "checking for Boot JDK... " >&6; }
23972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23973$as_echo "$BOOT_JDK" >&6; }
23974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23975$as_echo_n "checking Boot JDK version... " >&6; }
23976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23978$as_echo "$BOOT_JDK_VERSION" >&6; }
23979          fi # end check jdk version
23980        fi # end check javac
23981      fi # end check java
23982    fi # end check boot jdk found
23983  fi
23984
23985    done
23986  fi
23987
23988  fi
23989
23990
23991    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23992    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23993      # Do we have a bin/java?
23994      if test ! -x "$BOOT_JDK/bin/java"; then
23995        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23997        BOOT_JDK_FOUND=no
23998      else
23999        # Do we have a bin/javac?
24000        if test ! -x "$BOOT_JDK/bin/javac"; then
24001          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24003          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24004$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24005          BOOT_JDK_FOUND=no
24006        else
24007          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24008          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24009
24010          # Extra M4 quote needed to protect [] in grep expression.
24011          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24012          if test "x$FOUND_CORRECT_VERSION" = x; then
24013            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24015            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24016$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24017            BOOT_JDK_FOUND=no
24018          else
24019            # We're done! :-)
24020            BOOT_JDK_FOUND=yes
24021
24022  # Only process if variable expands to non-empty
24023
24024  if test "x$BOOT_JDK" != x; then
24025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24026
24027  # Input might be given as Windows format, start by converting to
24028  # unix format.
24029  path="$BOOT_JDK"
24030  new_path=`$CYGPATH -u "$path"`
24031
24032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24035  # "foo.exe" is OK but "foo" is an error.
24036  #
24037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24038  # It is also a way to make sure we got the proper file name for the real test later on.
24039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24040  if test "x$test_shortpath" = x; then
24041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24043    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24044  fi
24045
24046  # Call helper function which possibly converts this using DOS-style short mode.
24047  # If so, the updated path is stored in $new_path.
24048
24049  input_path="$new_path"
24050  # Check if we need to convert this using DOS-style short mode. If the path
24051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24052  # take no chances and rewrite it.
24053  # Note: m4 eats our [], so we need to use [ and ] instead.
24054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24055  if test "x$has_forbidden_chars" != x; then
24056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24060      # Going to short mode and back again did indeed matter. Since short mode is
24061      # case insensitive, let's make it lowercase to improve readability.
24062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24063      # Now convert it back to Unix-style (cygpath)
24064      input_path=`$CYGPATH -u "$shortmode_path"`
24065      new_path="$input_path"
24066    fi
24067  fi
24068
24069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24070  if test "x$test_cygdrive_prefix" = x; then
24071    # As a simple fix, exclude /usr/bin since it's not a real path.
24072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24074      # a path prefixed by /cygdrive for fixpath to work.
24075      new_path="$CYGWIN_ROOT_PATH$input_path"
24076    fi
24077  fi
24078
24079
24080  if test "x$path" != "x$new_path"; then
24081    BOOT_JDK="$new_path"
24082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24084  fi
24085
24086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24087
24088  path="$BOOT_JDK"
24089  has_colon=`$ECHO $path | $GREP ^.:`
24090  new_path="$path"
24091  if test "x$has_colon" = x; then
24092    # Not in mixed or Windows style, start by that.
24093    new_path=`cmd //c echo $path`
24094  fi
24095
24096
24097  input_path="$new_path"
24098  # Check if we need to convert this using DOS-style short mode. If the path
24099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24100  # take no chances and rewrite it.
24101  # Note: m4 eats our [], so we need to use [ and ] instead.
24102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24103  if test "x$has_forbidden_chars" != x; then
24104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24106  fi
24107
24108
24109  windows_path="$new_path"
24110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24111    unix_path=`$CYGPATH -u "$windows_path"`
24112    new_path="$unix_path"
24113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24115    new_path="$unix_path"
24116  fi
24117
24118  if test "x$path" != "x$new_path"; then
24119    BOOT_JDK="$new_path"
24120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24121$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24122  fi
24123
24124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24126
24127    else
24128      # We're on a unix platform. Hooray! :)
24129      path="$BOOT_JDK"
24130      has_space=`$ECHO "$path" | $GREP " "`
24131      if test "x$has_space" != x; then
24132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24135      fi
24136
24137      # Use eval to expand a potential ~
24138      eval path="$path"
24139      if test ! -f "$path" && test ! -d "$path"; then
24140        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24141      fi
24142
24143      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24144    fi
24145  fi
24146
24147            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24148$as_echo_n "checking for Boot JDK... " >&6; }
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24150$as_echo "$BOOT_JDK" >&6; }
24151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24152$as_echo_n "checking Boot JDK version... " >&6; }
24153            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24155$as_echo "$BOOT_JDK_VERSION" >&6; }
24156          fi # end check jdk version
24157        fi # end check javac
24158      fi # end check java
24159    fi # end check boot jdk found
24160  fi
24161
24162
24163  if test "x$BOOT_JDK_FOUND" = xno; then
24164    # Now execute the test
24165
24166  if test "x$ProgramFiles" != x; then
24167    VIRTUAL_DIR="$ProgramFiles/Java"
24168
24169  windows_path="$VIRTUAL_DIR"
24170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24171    unix_path=`$CYGPATH -u "$windows_path"`
24172    VIRTUAL_DIR="$unix_path"
24173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24175    VIRTUAL_DIR="$unix_path"
24176  fi
24177
24178
24179  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24180  BOOT_JDK_SUFFIX=""
24181  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24182  if test "x$ALL_JDKS_FOUND" != x; then
24183    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24184
24185  if test "x$BOOT_JDK_FOUND" = xno; then
24186    # Now execute the test
24187
24188        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24189        if test -d "$BOOT_JDK"; then
24190          BOOT_JDK_FOUND=maybe
24191          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24192$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24193        fi
24194
24195
24196    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24197    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24198      # Do we have a bin/java?
24199      if test ! -x "$BOOT_JDK/bin/java"; then
24200        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24202        BOOT_JDK_FOUND=no
24203      else
24204        # Do we have a bin/javac?
24205        if test ! -x "$BOOT_JDK/bin/javac"; then
24206          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24208          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24209$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24210          BOOT_JDK_FOUND=no
24211        else
24212          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24213          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24214
24215          # Extra M4 quote needed to protect [] in grep expression.
24216          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24217          if test "x$FOUND_CORRECT_VERSION" = x; then
24218            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24220            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24221$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24222            BOOT_JDK_FOUND=no
24223          else
24224            # We're done! :-)
24225            BOOT_JDK_FOUND=yes
24226
24227  # Only process if variable expands to non-empty
24228
24229  if test "x$BOOT_JDK" != x; then
24230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24231
24232  # Input might be given as Windows format, start by converting to
24233  # unix format.
24234  path="$BOOT_JDK"
24235  new_path=`$CYGPATH -u "$path"`
24236
24237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24240  # "foo.exe" is OK but "foo" is an error.
24241  #
24242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24243  # It is also a way to make sure we got the proper file name for the real test later on.
24244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24245  if test "x$test_shortpath" = x; then
24246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24249  fi
24250
24251  # Call helper function which possibly converts this using DOS-style short mode.
24252  # If so, the updated path is stored in $new_path.
24253
24254  input_path="$new_path"
24255  # Check if we need to convert this using DOS-style short mode. If the path
24256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24257  # take no chances and rewrite it.
24258  # Note: m4 eats our [], so we need to use [ and ] instead.
24259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24260  if test "x$has_forbidden_chars" != x; then
24261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24265      # Going to short mode and back again did indeed matter. Since short mode is
24266      # case insensitive, let's make it lowercase to improve readability.
24267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24268      # Now convert it back to Unix-style (cygpath)
24269      input_path=`$CYGPATH -u "$shortmode_path"`
24270      new_path="$input_path"
24271    fi
24272  fi
24273
24274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24275  if test "x$test_cygdrive_prefix" = x; then
24276    # As a simple fix, exclude /usr/bin since it's not a real path.
24277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24279      # a path prefixed by /cygdrive for fixpath to work.
24280      new_path="$CYGWIN_ROOT_PATH$input_path"
24281    fi
24282  fi
24283
24284
24285  if test "x$path" != "x$new_path"; then
24286    BOOT_JDK="$new_path"
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24289  fi
24290
24291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24292
24293  path="$BOOT_JDK"
24294  has_colon=`$ECHO $path | $GREP ^.:`
24295  new_path="$path"
24296  if test "x$has_colon" = x; then
24297    # Not in mixed or Windows style, start by that.
24298    new_path=`cmd //c echo $path`
24299  fi
24300
24301
24302  input_path="$new_path"
24303  # Check if we need to convert this using DOS-style short mode. If the path
24304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24305  # take no chances and rewrite it.
24306  # Note: m4 eats our [], so we need to use [ and ] instead.
24307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24308  if test "x$has_forbidden_chars" != x; then
24309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24311  fi
24312
24313
24314  windows_path="$new_path"
24315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24316    unix_path=`$CYGPATH -u "$windows_path"`
24317    new_path="$unix_path"
24318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24320    new_path="$unix_path"
24321  fi
24322
24323  if test "x$path" != "x$new_path"; then
24324    BOOT_JDK="$new_path"
24325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24327  fi
24328
24329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24331
24332    else
24333      # We're on a unix platform. Hooray! :)
24334      path="$BOOT_JDK"
24335      has_space=`$ECHO "$path" | $GREP " "`
24336      if test "x$has_space" != x; then
24337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24340      fi
24341
24342      # Use eval to expand a potential ~
24343      eval path="$path"
24344      if test ! -f "$path" && test ! -d "$path"; then
24345        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24346      fi
24347
24348      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24349    fi
24350  fi
24351
24352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24353$as_echo_n "checking for Boot JDK... " >&6; }
24354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24355$as_echo "$BOOT_JDK" >&6; }
24356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24357$as_echo_n "checking Boot JDK version... " >&6; }
24358            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24360$as_echo "$BOOT_JDK_VERSION" >&6; }
24361          fi # end check jdk version
24362        fi # end check javac
24363      fi # end check java
24364    fi # end check boot jdk found
24365  fi
24366
24367    done
24368  fi
24369
24370  fi
24371
24372
24373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24375      # Do we have a bin/java?
24376      if test ! -x "$BOOT_JDK/bin/java"; then
24377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24379        BOOT_JDK_FOUND=no
24380      else
24381        # Do we have a bin/javac?
24382        if test ! -x "$BOOT_JDK/bin/javac"; then
24383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24387          BOOT_JDK_FOUND=no
24388        else
24389          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24390          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24391
24392          # Extra M4 quote needed to protect [] in grep expression.
24393          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24394          if test "x$FOUND_CORRECT_VERSION" = x; then
24395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24397            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24398$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24399            BOOT_JDK_FOUND=no
24400          else
24401            # We're done! :-)
24402            BOOT_JDK_FOUND=yes
24403
24404  # Only process if variable expands to non-empty
24405
24406  if test "x$BOOT_JDK" != x; then
24407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24408
24409  # Input might be given as Windows format, start by converting to
24410  # unix format.
24411  path="$BOOT_JDK"
24412  new_path=`$CYGPATH -u "$path"`
24413
24414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24417  # "foo.exe" is OK but "foo" is an error.
24418  #
24419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24420  # It is also a way to make sure we got the proper file name for the real test later on.
24421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24422  if test "x$test_shortpath" = x; then
24423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24426  fi
24427
24428  # Call helper function which possibly converts this using DOS-style short mode.
24429  # If so, the updated path is stored in $new_path.
24430
24431  input_path="$new_path"
24432  # Check if we need to convert this using DOS-style short mode. If the path
24433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24434  # take no chances and rewrite it.
24435  # Note: m4 eats our [], so we need to use [ and ] instead.
24436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24437  if test "x$has_forbidden_chars" != x; then
24438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24442      # Going to short mode and back again did indeed matter. Since short mode is
24443      # case insensitive, let's make it lowercase to improve readability.
24444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24445      # Now convert it back to Unix-style (cygpath)
24446      input_path=`$CYGPATH -u "$shortmode_path"`
24447      new_path="$input_path"
24448    fi
24449  fi
24450
24451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24452  if test "x$test_cygdrive_prefix" = x; then
24453    # As a simple fix, exclude /usr/bin since it's not a real path.
24454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24456      # a path prefixed by /cygdrive for fixpath to work.
24457      new_path="$CYGWIN_ROOT_PATH$input_path"
24458    fi
24459  fi
24460
24461
24462  if test "x$path" != "x$new_path"; then
24463    BOOT_JDK="$new_path"
24464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24466  fi
24467
24468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24469
24470  path="$BOOT_JDK"
24471  has_colon=`$ECHO $path | $GREP ^.:`
24472  new_path="$path"
24473  if test "x$has_colon" = x; then
24474    # Not in mixed or Windows style, start by that.
24475    new_path=`cmd //c echo $path`
24476  fi
24477
24478
24479  input_path="$new_path"
24480  # Check if we need to convert this using DOS-style short mode. If the path
24481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24482  # take no chances and rewrite it.
24483  # Note: m4 eats our [], so we need to use [ and ] instead.
24484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24485  if test "x$has_forbidden_chars" != x; then
24486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24488  fi
24489
24490
24491  windows_path="$new_path"
24492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24493    unix_path=`$CYGPATH -u "$windows_path"`
24494    new_path="$unix_path"
24495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24497    new_path="$unix_path"
24498  fi
24499
24500  if test "x$path" != "x$new_path"; then
24501    BOOT_JDK="$new_path"
24502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24504  fi
24505
24506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24508
24509    else
24510      # We're on a unix platform. Hooray! :)
24511      path="$BOOT_JDK"
24512      has_space=`$ECHO "$path" | $GREP " "`
24513      if test "x$has_space" != x; then
24514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24517      fi
24518
24519      # Use eval to expand a potential ~
24520      eval path="$path"
24521      if test ! -f "$path" && test ! -d "$path"; then
24522        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24523      fi
24524
24525      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24526    fi
24527  fi
24528
24529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24530$as_echo_n "checking for Boot JDK... " >&6; }
24531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24532$as_echo "$BOOT_JDK" >&6; }
24533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24534$as_echo_n "checking Boot JDK version... " >&6; }
24535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24537$as_echo "$BOOT_JDK_VERSION" >&6; }
24538          fi # end check jdk version
24539        fi # end check javac
24540      fi # end check java
24541    fi # end check boot jdk found
24542  fi
24543
24544
24545  if test "x$BOOT_JDK_FOUND" = xno; then
24546    # Now execute the test
24547
24548  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24549  BOOT_JDK_SUFFIX=""
24550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24551  if test "x$ALL_JDKS_FOUND" != x; then
24552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24553
24554  if test "x$BOOT_JDK_FOUND" = xno; then
24555    # Now execute the test
24556
24557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24558        if test -d "$BOOT_JDK"; then
24559          BOOT_JDK_FOUND=maybe
24560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24562        fi
24563
24564
24565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24567      # Do we have a bin/java?
24568      if test ! -x "$BOOT_JDK/bin/java"; then
24569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24571        BOOT_JDK_FOUND=no
24572      else
24573        # Do we have a bin/javac?
24574        if test ! -x "$BOOT_JDK/bin/javac"; then
24575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24579          BOOT_JDK_FOUND=no
24580        else
24581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24583
24584          # Extra M4 quote needed to protect [] in grep expression.
24585          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24586          if test "x$FOUND_CORRECT_VERSION" = x; then
24587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24591            BOOT_JDK_FOUND=no
24592          else
24593            # We're done! :-)
24594            BOOT_JDK_FOUND=yes
24595
24596  # Only process if variable expands to non-empty
24597
24598  if test "x$BOOT_JDK" != x; then
24599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24600
24601  # Input might be given as Windows format, start by converting to
24602  # unix format.
24603  path="$BOOT_JDK"
24604  new_path=`$CYGPATH -u "$path"`
24605
24606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24609  # "foo.exe" is OK but "foo" is an error.
24610  #
24611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24612  # It is also a way to make sure we got the proper file name for the real test later on.
24613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24614  if test "x$test_shortpath" = x; then
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24618  fi
24619
24620  # Call helper function which possibly converts this using DOS-style short mode.
24621  # If so, the updated path is stored in $new_path.
24622
24623  input_path="$new_path"
24624  # Check if we need to convert this using DOS-style short mode. If the path
24625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24626  # take no chances and rewrite it.
24627  # Note: m4 eats our [], so we need to use [ and ] instead.
24628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24629  if test "x$has_forbidden_chars" != x; then
24630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24634      # Going to short mode and back again did indeed matter. Since short mode is
24635      # case insensitive, let's make it lowercase to improve readability.
24636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24637      # Now convert it back to Unix-style (cygpath)
24638      input_path=`$CYGPATH -u "$shortmode_path"`
24639      new_path="$input_path"
24640    fi
24641  fi
24642
24643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24644  if test "x$test_cygdrive_prefix" = x; then
24645    # As a simple fix, exclude /usr/bin since it's not a real path.
24646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24648      # a path prefixed by /cygdrive for fixpath to work.
24649      new_path="$CYGWIN_ROOT_PATH$input_path"
24650    fi
24651  fi
24652
24653
24654  if test "x$path" != "x$new_path"; then
24655    BOOT_JDK="$new_path"
24656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24658  fi
24659
24660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24661
24662  path="$BOOT_JDK"
24663  has_colon=`$ECHO $path | $GREP ^.:`
24664  new_path="$path"
24665  if test "x$has_colon" = x; then
24666    # Not in mixed or Windows style, start by that.
24667    new_path=`cmd //c echo $path`
24668  fi
24669
24670
24671  input_path="$new_path"
24672  # Check if we need to convert this using DOS-style short mode. If the path
24673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24674  # take no chances and rewrite it.
24675  # Note: m4 eats our [], so we need to use [ and ] instead.
24676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24677  if test "x$has_forbidden_chars" != x; then
24678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24680  fi
24681
24682
24683  windows_path="$new_path"
24684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24685    unix_path=`$CYGPATH -u "$windows_path"`
24686    new_path="$unix_path"
24687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24689    new_path="$unix_path"
24690  fi
24691
24692  if test "x$path" != "x$new_path"; then
24693    BOOT_JDK="$new_path"
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24696  fi
24697
24698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24700
24701    else
24702      # We're on a unix platform. Hooray! :)
24703      path="$BOOT_JDK"
24704      has_space=`$ECHO "$path" | $GREP " "`
24705      if test "x$has_space" != x; then
24706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24709      fi
24710
24711      # Use eval to expand a potential ~
24712      eval path="$path"
24713      if test ! -f "$path" && test ! -d "$path"; then
24714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24715      fi
24716
24717      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24718    fi
24719  fi
24720
24721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24722$as_echo_n "checking for Boot JDK... " >&6; }
24723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24724$as_echo "$BOOT_JDK" >&6; }
24725            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24726$as_echo_n "checking Boot JDK version... " >&6; }
24727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24729$as_echo "$BOOT_JDK_VERSION" >&6; }
24730          fi # end check jdk version
24731        fi # end check javac
24732      fi # end check java
24733    fi # end check boot jdk found
24734  fi
24735
24736    done
24737  fi
24738
24739
24740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24742      # Do we have a bin/java?
24743      if test ! -x "$BOOT_JDK/bin/java"; then
24744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24746        BOOT_JDK_FOUND=no
24747      else
24748        # Do we have a bin/javac?
24749        if test ! -x "$BOOT_JDK/bin/javac"; then
24750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24754          BOOT_JDK_FOUND=no
24755        else
24756          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24757          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24758
24759          # Extra M4 quote needed to protect [] in grep expression.
24760          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24761          if test "x$FOUND_CORRECT_VERSION" = x; then
24762            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24764            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24765$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24766            BOOT_JDK_FOUND=no
24767          else
24768            # We're done! :-)
24769            BOOT_JDK_FOUND=yes
24770
24771  # Only process if variable expands to non-empty
24772
24773  if test "x$BOOT_JDK" != x; then
24774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24775
24776  # Input might be given as Windows format, start by converting to
24777  # unix format.
24778  path="$BOOT_JDK"
24779  new_path=`$CYGPATH -u "$path"`
24780
24781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24784  # "foo.exe" is OK but "foo" is an error.
24785  #
24786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24787  # It is also a way to make sure we got the proper file name for the real test later on.
24788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24789  if test "x$test_shortpath" = x; then
24790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24791$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24792    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24793  fi
24794
24795  # Call helper function which possibly converts this using DOS-style short mode.
24796  # If so, the updated path is stored in $new_path.
24797
24798  input_path="$new_path"
24799  # Check if we need to convert this using DOS-style short mode. If the path
24800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24801  # take no chances and rewrite it.
24802  # Note: m4 eats our [], so we need to use [ and ] instead.
24803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24804  if test "x$has_forbidden_chars" != x; then
24805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24809      # Going to short mode and back again did indeed matter. Since short mode is
24810      # case insensitive, let's make it lowercase to improve readability.
24811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24812      # Now convert it back to Unix-style (cygpath)
24813      input_path=`$CYGPATH -u "$shortmode_path"`
24814      new_path="$input_path"
24815    fi
24816  fi
24817
24818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24819  if test "x$test_cygdrive_prefix" = x; then
24820    # As a simple fix, exclude /usr/bin since it's not a real path.
24821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24823      # a path prefixed by /cygdrive for fixpath to work.
24824      new_path="$CYGWIN_ROOT_PATH$input_path"
24825    fi
24826  fi
24827
24828
24829  if test "x$path" != "x$new_path"; then
24830    BOOT_JDK="$new_path"
24831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24833  fi
24834
24835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24836
24837  path="$BOOT_JDK"
24838  has_colon=`$ECHO $path | $GREP ^.:`
24839  new_path="$path"
24840  if test "x$has_colon" = x; then
24841    # Not in mixed or Windows style, start by that.
24842    new_path=`cmd //c echo $path`
24843  fi
24844
24845
24846  input_path="$new_path"
24847  # Check if we need to convert this using DOS-style short mode. If the path
24848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24849  # take no chances and rewrite it.
24850  # Note: m4 eats our [], so we need to use [ and ] instead.
24851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24852  if test "x$has_forbidden_chars" != x; then
24853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24855  fi
24856
24857
24858  windows_path="$new_path"
24859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24860    unix_path=`$CYGPATH -u "$windows_path"`
24861    new_path="$unix_path"
24862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24864    new_path="$unix_path"
24865  fi
24866
24867  if test "x$path" != "x$new_path"; then
24868    BOOT_JDK="$new_path"
24869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24870$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24871  fi
24872
24873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24875
24876    else
24877      # We're on a unix platform. Hooray! :)
24878      path="$BOOT_JDK"
24879      has_space=`$ECHO "$path" | $GREP " "`
24880      if test "x$has_space" != x; then
24881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24884      fi
24885
24886      # Use eval to expand a potential ~
24887      eval path="$path"
24888      if test ! -f "$path" && test ! -d "$path"; then
24889        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24890      fi
24891
24892      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24893    fi
24894  fi
24895
24896            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24897$as_echo_n "checking for Boot JDK... " >&6; }
24898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24899$as_echo "$BOOT_JDK" >&6; }
24900            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24901$as_echo_n "checking Boot JDK version... " >&6; }
24902            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24904$as_echo "$BOOT_JDK_VERSION" >&6; }
24905          fi # end check jdk version
24906        fi # end check javac
24907      fi # end check java
24908    fi # end check boot jdk found
24909  fi
24910
24911  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24912
24913  if test "x$BOOT_JDK_FOUND" = xno; then
24914    # Now execute the test
24915
24916  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24917  BOOT_JDK_SUFFIX="/Contents/Home"
24918  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24919  if test "x$ALL_JDKS_FOUND" != x; then
24920    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24921
24922  if test "x$BOOT_JDK_FOUND" = xno; then
24923    # Now execute the test
24924
24925        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24926        if test -d "$BOOT_JDK"; then
24927          BOOT_JDK_FOUND=maybe
24928          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24929$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24930        fi
24931
24932
24933    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24934    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24935      # Do we have a bin/java?
24936      if test ! -x "$BOOT_JDK/bin/java"; then
24937        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24939        BOOT_JDK_FOUND=no
24940      else
24941        # Do we have a bin/javac?
24942        if test ! -x "$BOOT_JDK/bin/javac"; then
24943          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24945          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24946$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24947          BOOT_JDK_FOUND=no
24948        else
24949          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24950          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24951
24952          # Extra M4 quote needed to protect [] in grep expression.
24953          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24954          if test "x$FOUND_CORRECT_VERSION" = x; then
24955            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24957            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24958$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24959            BOOT_JDK_FOUND=no
24960          else
24961            # We're done! :-)
24962            BOOT_JDK_FOUND=yes
24963
24964  # Only process if variable expands to non-empty
24965
24966  if test "x$BOOT_JDK" != x; then
24967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24968
24969  # Input might be given as Windows format, start by converting to
24970  # unix format.
24971  path="$BOOT_JDK"
24972  new_path=`$CYGPATH -u "$path"`
24973
24974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24977  # "foo.exe" is OK but "foo" is an error.
24978  #
24979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24980  # It is also a way to make sure we got the proper file name for the real test later on.
24981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24982  if test "x$test_shortpath" = x; then
24983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24985    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24986  fi
24987
24988  # Call helper function which possibly converts this using DOS-style short mode.
24989  # If so, the updated path is stored in $new_path.
24990
24991  input_path="$new_path"
24992  # Check if we need to convert this using DOS-style short mode. If the path
24993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24994  # take no chances and rewrite it.
24995  # Note: m4 eats our [], so we need to use [ and ] instead.
24996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24997  if test "x$has_forbidden_chars" != x; then
24998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25002      # Going to short mode and back again did indeed matter. Since short mode is
25003      # case insensitive, let's make it lowercase to improve readability.
25004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25005      # Now convert it back to Unix-style (cygpath)
25006      input_path=`$CYGPATH -u "$shortmode_path"`
25007      new_path="$input_path"
25008    fi
25009  fi
25010
25011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25012  if test "x$test_cygdrive_prefix" = x; then
25013    # As a simple fix, exclude /usr/bin since it's not a real path.
25014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25016      # a path prefixed by /cygdrive for fixpath to work.
25017      new_path="$CYGWIN_ROOT_PATH$input_path"
25018    fi
25019  fi
25020
25021
25022  if test "x$path" != "x$new_path"; then
25023    BOOT_JDK="$new_path"
25024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25026  fi
25027
25028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25029
25030  path="$BOOT_JDK"
25031  has_colon=`$ECHO $path | $GREP ^.:`
25032  new_path="$path"
25033  if test "x$has_colon" = x; then
25034    # Not in mixed or Windows style, start by that.
25035    new_path=`cmd //c echo $path`
25036  fi
25037
25038
25039  input_path="$new_path"
25040  # Check if we need to convert this using DOS-style short mode. If the path
25041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25042  # take no chances and rewrite it.
25043  # Note: m4 eats our [], so we need to use [ and ] instead.
25044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25045  if test "x$has_forbidden_chars" != x; then
25046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25048  fi
25049
25050
25051  windows_path="$new_path"
25052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25053    unix_path=`$CYGPATH -u "$windows_path"`
25054    new_path="$unix_path"
25055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25057    new_path="$unix_path"
25058  fi
25059
25060  if test "x$path" != "x$new_path"; then
25061    BOOT_JDK="$new_path"
25062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25064  fi
25065
25066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25068
25069    else
25070      # We're on a unix platform. Hooray! :)
25071      path="$BOOT_JDK"
25072      has_space=`$ECHO "$path" | $GREP " "`
25073      if test "x$has_space" != x; then
25074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25077      fi
25078
25079      # Use eval to expand a potential ~
25080      eval path="$path"
25081      if test ! -f "$path" && test ! -d "$path"; then
25082        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25083      fi
25084
25085      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25086    fi
25087  fi
25088
25089            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25090$as_echo_n "checking for Boot JDK... " >&6; }
25091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25092$as_echo "$BOOT_JDK" >&6; }
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25094$as_echo_n "checking Boot JDK version... " >&6; }
25095            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25097$as_echo "$BOOT_JDK_VERSION" >&6; }
25098          fi # end check jdk version
25099        fi # end check javac
25100      fi # end check java
25101    fi # end check boot jdk found
25102  fi
25103
25104    done
25105  fi
25106
25107
25108    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25109    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25110      # Do we have a bin/java?
25111      if test ! -x "$BOOT_JDK/bin/java"; then
25112        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25114        BOOT_JDK_FOUND=no
25115      else
25116        # Do we have a bin/javac?
25117        if test ! -x "$BOOT_JDK/bin/javac"; then
25118          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25120          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25121$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25122          BOOT_JDK_FOUND=no
25123        else
25124          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25125          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25126
25127          # Extra M4 quote needed to protect [] in grep expression.
25128          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25129          if test "x$FOUND_CORRECT_VERSION" = x; then
25130            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25132            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25133$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25134            BOOT_JDK_FOUND=no
25135          else
25136            # We're done! :-)
25137            BOOT_JDK_FOUND=yes
25138
25139  # Only process if variable expands to non-empty
25140
25141  if test "x$BOOT_JDK" != x; then
25142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25143
25144  # Input might be given as Windows format, start by converting to
25145  # unix format.
25146  path="$BOOT_JDK"
25147  new_path=`$CYGPATH -u "$path"`
25148
25149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25152  # "foo.exe" is OK but "foo" is an error.
25153  #
25154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25155  # It is also a way to make sure we got the proper file name for the real test later on.
25156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25157  if test "x$test_shortpath" = x; then
25158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25160    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25161  fi
25162
25163  # Call helper function which possibly converts this using DOS-style short mode.
25164  # If so, the updated path is stored in $new_path.
25165
25166  input_path="$new_path"
25167  # Check if we need to convert this using DOS-style short mode. If the path
25168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25169  # take no chances and rewrite it.
25170  # Note: m4 eats our [], so we need to use [ and ] instead.
25171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25172  if test "x$has_forbidden_chars" != x; then
25173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25177      # Going to short mode and back again did indeed matter. Since short mode is
25178      # case insensitive, let's make it lowercase to improve readability.
25179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25180      # Now convert it back to Unix-style (cygpath)
25181      input_path=`$CYGPATH -u "$shortmode_path"`
25182      new_path="$input_path"
25183    fi
25184  fi
25185
25186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25187  if test "x$test_cygdrive_prefix" = x; then
25188    # As a simple fix, exclude /usr/bin since it's not a real path.
25189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25191      # a path prefixed by /cygdrive for fixpath to work.
25192      new_path="$CYGWIN_ROOT_PATH$input_path"
25193    fi
25194  fi
25195
25196
25197  if test "x$path" != "x$new_path"; then
25198    BOOT_JDK="$new_path"
25199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25201  fi
25202
25203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25204
25205  path="$BOOT_JDK"
25206  has_colon=`$ECHO $path | $GREP ^.:`
25207  new_path="$path"
25208  if test "x$has_colon" = x; then
25209    # Not in mixed or Windows style, start by that.
25210    new_path=`cmd //c echo $path`
25211  fi
25212
25213
25214  input_path="$new_path"
25215  # Check if we need to convert this using DOS-style short mode. If the path
25216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25217  # take no chances and rewrite it.
25218  # Note: m4 eats our [], so we need to use [ and ] instead.
25219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25220  if test "x$has_forbidden_chars" != x; then
25221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25223  fi
25224
25225
25226  windows_path="$new_path"
25227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25228    unix_path=`$CYGPATH -u "$windows_path"`
25229    new_path="$unix_path"
25230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25232    new_path="$unix_path"
25233  fi
25234
25235  if test "x$path" != "x$new_path"; then
25236    BOOT_JDK="$new_path"
25237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25239  fi
25240
25241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25243
25244    else
25245      # We're on a unix platform. Hooray! :)
25246      path="$BOOT_JDK"
25247      has_space=`$ECHO "$path" | $GREP " "`
25248      if test "x$has_space" != x; then
25249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25252      fi
25253
25254      # Use eval to expand a potential ~
25255      eval path="$path"
25256      if test ! -f "$path" && test ! -d "$path"; then
25257        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25258      fi
25259
25260      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25261    fi
25262  fi
25263
25264            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25265$as_echo_n "checking for Boot JDK... " >&6; }
25266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25267$as_echo "$BOOT_JDK" >&6; }
25268            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25269$as_echo_n "checking Boot JDK version... " >&6; }
25270            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25272$as_echo "$BOOT_JDK_VERSION" >&6; }
25273          fi # end check jdk version
25274        fi # end check javac
25275      fi # end check java
25276    fi # end check boot jdk found
25277  fi
25278
25279
25280  if test "x$BOOT_JDK_FOUND" = xno; then
25281    # Now execute the test
25282
25283  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25284  BOOT_JDK_SUFFIX="/Contents/Home"
25285  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25286  if test "x$ALL_JDKS_FOUND" != x; then
25287    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25288
25289  if test "x$BOOT_JDK_FOUND" = xno; then
25290    # Now execute the test
25291
25292        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25293        if test -d "$BOOT_JDK"; then
25294          BOOT_JDK_FOUND=maybe
25295          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25296$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25297        fi
25298
25299
25300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25302      # Do we have a bin/java?
25303      if test ! -x "$BOOT_JDK/bin/java"; then
25304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25306        BOOT_JDK_FOUND=no
25307      else
25308        # Do we have a bin/javac?
25309        if test ! -x "$BOOT_JDK/bin/javac"; then
25310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25314          BOOT_JDK_FOUND=no
25315        else
25316          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25317          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25318
25319          # Extra M4 quote needed to protect [] in grep expression.
25320          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25321          if test "x$FOUND_CORRECT_VERSION" = x; then
25322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25325$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25326            BOOT_JDK_FOUND=no
25327          else
25328            # We're done! :-)
25329            BOOT_JDK_FOUND=yes
25330
25331  # Only process if variable expands to non-empty
25332
25333  if test "x$BOOT_JDK" != x; then
25334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25335
25336  # Input might be given as Windows format, start by converting to
25337  # unix format.
25338  path="$BOOT_JDK"
25339  new_path=`$CYGPATH -u "$path"`
25340
25341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25344  # "foo.exe" is OK but "foo" is an error.
25345  #
25346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25347  # It is also a way to make sure we got the proper file name for the real test later on.
25348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25349  if test "x$test_shortpath" = x; then
25350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25353  fi
25354
25355  # Call helper function which possibly converts this using DOS-style short mode.
25356  # If so, the updated path is stored in $new_path.
25357
25358  input_path="$new_path"
25359  # Check if we need to convert this using DOS-style short mode. If the path
25360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25361  # take no chances and rewrite it.
25362  # Note: m4 eats our [], so we need to use [ and ] instead.
25363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25364  if test "x$has_forbidden_chars" != x; then
25365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25369      # Going to short mode and back again did indeed matter. Since short mode is
25370      # case insensitive, let's make it lowercase to improve readability.
25371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25372      # Now convert it back to Unix-style (cygpath)
25373      input_path=`$CYGPATH -u "$shortmode_path"`
25374      new_path="$input_path"
25375    fi
25376  fi
25377
25378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25379  if test "x$test_cygdrive_prefix" = x; then
25380    # As a simple fix, exclude /usr/bin since it's not a real path.
25381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25383      # a path prefixed by /cygdrive for fixpath to work.
25384      new_path="$CYGWIN_ROOT_PATH$input_path"
25385    fi
25386  fi
25387
25388
25389  if test "x$path" != "x$new_path"; then
25390    BOOT_JDK="$new_path"
25391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25393  fi
25394
25395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25396
25397  path="$BOOT_JDK"
25398  has_colon=`$ECHO $path | $GREP ^.:`
25399  new_path="$path"
25400  if test "x$has_colon" = x; then
25401    # Not in mixed or Windows style, start by that.
25402    new_path=`cmd //c echo $path`
25403  fi
25404
25405
25406  input_path="$new_path"
25407  # Check if we need to convert this using DOS-style short mode. If the path
25408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25409  # take no chances and rewrite it.
25410  # Note: m4 eats our [], so we need to use [ and ] instead.
25411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25412  if test "x$has_forbidden_chars" != x; then
25413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25415  fi
25416
25417
25418  windows_path="$new_path"
25419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25420    unix_path=`$CYGPATH -u "$windows_path"`
25421    new_path="$unix_path"
25422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25424    new_path="$unix_path"
25425  fi
25426
25427  if test "x$path" != "x$new_path"; then
25428    BOOT_JDK="$new_path"
25429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25431  fi
25432
25433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25435
25436    else
25437      # We're on a unix platform. Hooray! :)
25438      path="$BOOT_JDK"
25439      has_space=`$ECHO "$path" | $GREP " "`
25440      if test "x$has_space" != x; then
25441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25444      fi
25445
25446      # Use eval to expand a potential ~
25447      eval path="$path"
25448      if test ! -f "$path" && test ! -d "$path"; then
25449        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25450      fi
25451
25452      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25453    fi
25454  fi
25455
25456            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25457$as_echo_n "checking for Boot JDK... " >&6; }
25458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25459$as_echo "$BOOT_JDK" >&6; }
25460            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25461$as_echo_n "checking Boot JDK version... " >&6; }
25462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25464$as_echo "$BOOT_JDK_VERSION" >&6; }
25465          fi # end check jdk version
25466        fi # end check javac
25467      fi # end check java
25468    fi # end check boot jdk found
25469  fi
25470
25471    done
25472  fi
25473
25474
25475    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25476    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25477      # Do we have a bin/java?
25478      if test ! -x "$BOOT_JDK/bin/java"; then
25479        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25481        BOOT_JDK_FOUND=no
25482      else
25483        # Do we have a bin/javac?
25484        if test ! -x "$BOOT_JDK/bin/javac"; then
25485          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25487          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25488$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25489          BOOT_JDK_FOUND=no
25490        else
25491          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25492          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25493
25494          # Extra M4 quote needed to protect [] in grep expression.
25495          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25496          if test "x$FOUND_CORRECT_VERSION" = x; then
25497            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25499            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25500$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25501            BOOT_JDK_FOUND=no
25502          else
25503            # We're done! :-)
25504            BOOT_JDK_FOUND=yes
25505
25506  # Only process if variable expands to non-empty
25507
25508  if test "x$BOOT_JDK" != x; then
25509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25510
25511  # Input might be given as Windows format, start by converting to
25512  # unix format.
25513  path="$BOOT_JDK"
25514  new_path=`$CYGPATH -u "$path"`
25515
25516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25519  # "foo.exe" is OK but "foo" is an error.
25520  #
25521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25522  # It is also a way to make sure we got the proper file name for the real test later on.
25523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25524  if test "x$test_shortpath" = x; then
25525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25526$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25527    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25528  fi
25529
25530  # Call helper function which possibly converts this using DOS-style short mode.
25531  # If so, the updated path is stored in $new_path.
25532
25533  input_path="$new_path"
25534  # Check if we need to convert this using DOS-style short mode. If the path
25535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25536  # take no chances and rewrite it.
25537  # Note: m4 eats our [], so we need to use [ and ] instead.
25538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25539  if test "x$has_forbidden_chars" != x; then
25540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25544      # Going to short mode and back again did indeed matter. Since short mode is
25545      # case insensitive, let's make it lowercase to improve readability.
25546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25547      # Now convert it back to Unix-style (cygpath)
25548      input_path=`$CYGPATH -u "$shortmode_path"`
25549      new_path="$input_path"
25550    fi
25551  fi
25552
25553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25554  if test "x$test_cygdrive_prefix" = x; then
25555    # As a simple fix, exclude /usr/bin since it's not a real path.
25556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25558      # a path prefixed by /cygdrive for fixpath to work.
25559      new_path="$CYGWIN_ROOT_PATH$input_path"
25560    fi
25561  fi
25562
25563
25564  if test "x$path" != "x$new_path"; then
25565    BOOT_JDK="$new_path"
25566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25568  fi
25569
25570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25571
25572  path="$BOOT_JDK"
25573  has_colon=`$ECHO $path | $GREP ^.:`
25574  new_path="$path"
25575  if test "x$has_colon" = x; then
25576    # Not in mixed or Windows style, start by that.
25577    new_path=`cmd //c echo $path`
25578  fi
25579
25580
25581  input_path="$new_path"
25582  # Check if we need to convert this using DOS-style short mode. If the path
25583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25584  # take no chances and rewrite it.
25585  # Note: m4 eats our [], so we need to use [ and ] instead.
25586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25587  if test "x$has_forbidden_chars" != x; then
25588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25590  fi
25591
25592
25593  windows_path="$new_path"
25594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25595    unix_path=`$CYGPATH -u "$windows_path"`
25596    new_path="$unix_path"
25597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25599    new_path="$unix_path"
25600  fi
25601
25602  if test "x$path" != "x$new_path"; then
25603    BOOT_JDK="$new_path"
25604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25606  fi
25607
25608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25610
25611    else
25612      # We're on a unix platform. Hooray! :)
25613      path="$BOOT_JDK"
25614      has_space=`$ECHO "$path" | $GREP " "`
25615      if test "x$has_space" != x; then
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25619      fi
25620
25621      # Use eval to expand a potential ~
25622      eval path="$path"
25623      if test ! -f "$path" && test ! -d "$path"; then
25624        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25625      fi
25626
25627      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25628    fi
25629  fi
25630
25631            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25632$as_echo_n "checking for Boot JDK... " >&6; }
25633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25634$as_echo "$BOOT_JDK" >&6; }
25635            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25636$as_echo_n "checking Boot JDK version... " >&6; }
25637            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25639$as_echo "$BOOT_JDK_VERSION" >&6; }
25640          fi # end check jdk version
25641        fi # end check javac
25642      fi # end check java
25643    fi # end check boot jdk found
25644  fi
25645
25646  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25647
25648  if test "x$BOOT_JDK_FOUND" = xno; then
25649    # Now execute the test
25650
25651  BOOT_JDK_PREFIX="/usr/lib/jvm"
25652  BOOT_JDK_SUFFIX=""
25653  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25654  if test "x$ALL_JDKS_FOUND" != x; then
25655    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25656
25657  if test "x$BOOT_JDK_FOUND" = xno; then
25658    # Now execute the test
25659
25660        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25661        if test -d "$BOOT_JDK"; then
25662          BOOT_JDK_FOUND=maybe
25663          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25664$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25665        fi
25666
25667
25668    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25669    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25670      # Do we have a bin/java?
25671      if test ! -x "$BOOT_JDK/bin/java"; then
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25674        BOOT_JDK_FOUND=no
25675      else
25676        # Do we have a bin/javac?
25677        if test ! -x "$BOOT_JDK/bin/javac"; then
25678          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25680          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25681$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25682          BOOT_JDK_FOUND=no
25683        else
25684          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25685          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25686
25687          # Extra M4 quote needed to protect [] in grep expression.
25688          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25689          if test "x$FOUND_CORRECT_VERSION" = x; then
25690            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25692            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25693$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25694            BOOT_JDK_FOUND=no
25695          else
25696            # We're done! :-)
25697            BOOT_JDK_FOUND=yes
25698
25699  # Only process if variable expands to non-empty
25700
25701  if test "x$BOOT_JDK" != x; then
25702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25703
25704  # Input might be given as Windows format, start by converting to
25705  # unix format.
25706  path="$BOOT_JDK"
25707  new_path=`$CYGPATH -u "$path"`
25708
25709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25712  # "foo.exe" is OK but "foo" is an error.
25713  #
25714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25715  # It is also a way to make sure we got the proper file name for the real test later on.
25716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25717  if test "x$test_shortpath" = x; then
25718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25720    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25721  fi
25722
25723  # Call helper function which possibly converts this using DOS-style short mode.
25724  # If so, the updated path is stored in $new_path.
25725
25726  input_path="$new_path"
25727  # Check if we need to convert this using DOS-style short mode. If the path
25728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25729  # take no chances and rewrite it.
25730  # Note: m4 eats our [], so we need to use [ and ] instead.
25731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25732  if test "x$has_forbidden_chars" != x; then
25733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25737      # Going to short mode and back again did indeed matter. Since short mode is
25738      # case insensitive, let's make it lowercase to improve readability.
25739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25740      # Now convert it back to Unix-style (cygpath)
25741      input_path=`$CYGPATH -u "$shortmode_path"`
25742      new_path="$input_path"
25743    fi
25744  fi
25745
25746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25747  if test "x$test_cygdrive_prefix" = x; then
25748    # As a simple fix, exclude /usr/bin since it's not a real path.
25749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25751      # a path prefixed by /cygdrive for fixpath to work.
25752      new_path="$CYGWIN_ROOT_PATH$input_path"
25753    fi
25754  fi
25755
25756
25757  if test "x$path" != "x$new_path"; then
25758    BOOT_JDK="$new_path"
25759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25761  fi
25762
25763    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25764
25765  path="$BOOT_JDK"
25766  has_colon=`$ECHO $path | $GREP ^.:`
25767  new_path="$path"
25768  if test "x$has_colon" = x; then
25769    # Not in mixed or Windows style, start by that.
25770    new_path=`cmd //c echo $path`
25771  fi
25772
25773
25774  input_path="$new_path"
25775  # Check if we need to convert this using DOS-style short mode. If the path
25776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25777  # take no chances and rewrite it.
25778  # Note: m4 eats our [], so we need to use [ and ] instead.
25779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25780  if test "x$has_forbidden_chars" != x; then
25781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25783  fi
25784
25785
25786  windows_path="$new_path"
25787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25788    unix_path=`$CYGPATH -u "$windows_path"`
25789    new_path="$unix_path"
25790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25792    new_path="$unix_path"
25793  fi
25794
25795  if test "x$path" != "x$new_path"; then
25796    BOOT_JDK="$new_path"
25797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25799  fi
25800
25801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25803
25804    else
25805      # We're on a unix platform. Hooray! :)
25806      path="$BOOT_JDK"
25807      has_space=`$ECHO "$path" | $GREP " "`
25808      if test "x$has_space" != x; then
25809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25811        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25812      fi
25813
25814      # Use eval to expand a potential ~
25815      eval path="$path"
25816      if test ! -f "$path" && test ! -d "$path"; then
25817        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25818      fi
25819
25820      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25821    fi
25822  fi
25823
25824            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25825$as_echo_n "checking for Boot JDK... " >&6; }
25826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25827$as_echo "$BOOT_JDK" >&6; }
25828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25829$as_echo_n "checking Boot JDK version... " >&6; }
25830            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25832$as_echo "$BOOT_JDK_VERSION" >&6; }
25833          fi # end check jdk version
25834        fi # end check javac
25835      fi # end check java
25836    fi # end check boot jdk found
25837  fi
25838
25839    done
25840  fi
25841
25842
25843    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25844    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25845      # Do we have a bin/java?
25846      if test ! -x "$BOOT_JDK/bin/java"; then
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25849        BOOT_JDK_FOUND=no
25850      else
25851        # Do we have a bin/javac?
25852        if test ! -x "$BOOT_JDK/bin/javac"; then
25853          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25855          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25856$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25857          BOOT_JDK_FOUND=no
25858        else
25859          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25860          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25861
25862          # Extra M4 quote needed to protect [] in grep expression.
25863          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25864          if test "x$FOUND_CORRECT_VERSION" = x; then
25865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25867            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25869            BOOT_JDK_FOUND=no
25870          else
25871            # We're done! :-)
25872            BOOT_JDK_FOUND=yes
25873
25874  # Only process if variable expands to non-empty
25875
25876  if test "x$BOOT_JDK" != x; then
25877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878
25879  # Input might be given as Windows format, start by converting to
25880  # unix format.
25881  path="$BOOT_JDK"
25882  new_path=`$CYGPATH -u "$path"`
25883
25884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25887  # "foo.exe" is OK but "foo" is an error.
25888  #
25889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25890  # It is also a way to make sure we got the proper file name for the real test later on.
25891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25892  if test "x$test_shortpath" = x; then
25893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25896  fi
25897
25898  # Call helper function which possibly converts this using DOS-style short mode.
25899  # If so, the updated path is stored in $new_path.
25900
25901  input_path="$new_path"
25902  # Check if we need to convert this using DOS-style short mode. If the path
25903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25904  # take no chances and rewrite it.
25905  # Note: m4 eats our [], so we need to use [ and ] instead.
25906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25907  if test "x$has_forbidden_chars" != x; then
25908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25912      # Going to short mode and back again did indeed matter. Since short mode is
25913      # case insensitive, let's make it lowercase to improve readability.
25914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25915      # Now convert it back to Unix-style (cygpath)
25916      input_path=`$CYGPATH -u "$shortmode_path"`
25917      new_path="$input_path"
25918    fi
25919  fi
25920
25921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25922  if test "x$test_cygdrive_prefix" = x; then
25923    # As a simple fix, exclude /usr/bin since it's not a real path.
25924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25926      # a path prefixed by /cygdrive for fixpath to work.
25927      new_path="$CYGWIN_ROOT_PATH$input_path"
25928    fi
25929  fi
25930
25931
25932  if test "x$path" != "x$new_path"; then
25933    BOOT_JDK="$new_path"
25934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25936  fi
25937
25938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25939
25940  path="$BOOT_JDK"
25941  has_colon=`$ECHO $path | $GREP ^.:`
25942  new_path="$path"
25943  if test "x$has_colon" = x; then
25944    # Not in mixed or Windows style, start by that.
25945    new_path=`cmd //c echo $path`
25946  fi
25947
25948
25949  input_path="$new_path"
25950  # Check if we need to convert this using DOS-style short mode. If the path
25951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25952  # take no chances and rewrite it.
25953  # Note: m4 eats our [], so we need to use [ and ] instead.
25954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25955  if test "x$has_forbidden_chars" != x; then
25956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25958  fi
25959
25960
25961  windows_path="$new_path"
25962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25963    unix_path=`$CYGPATH -u "$windows_path"`
25964    new_path="$unix_path"
25965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25967    new_path="$unix_path"
25968  fi
25969
25970  if test "x$path" != "x$new_path"; then
25971    BOOT_JDK="$new_path"
25972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25974  fi
25975
25976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25978
25979    else
25980      # We're on a unix platform. Hooray! :)
25981      path="$BOOT_JDK"
25982      has_space=`$ECHO "$path" | $GREP " "`
25983      if test "x$has_space" != x; then
25984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25987      fi
25988
25989      # Use eval to expand a potential ~
25990      eval path="$path"
25991      if test ! -f "$path" && test ! -d "$path"; then
25992        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25993      fi
25994
25995      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25996    fi
25997  fi
25998
25999            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26000$as_echo_n "checking for Boot JDK... " >&6; }
26001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26002$as_echo "$BOOT_JDK" >&6; }
26003            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26004$as_echo_n "checking Boot JDK version... " >&6; }
26005            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26007$as_echo "$BOOT_JDK_VERSION" >&6; }
26008          fi # end check jdk version
26009        fi # end check javac
26010      fi # end check java
26011    fi # end check boot jdk found
26012  fi
26013
26014  fi
26015
26016
26017    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26018    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26019      # Do we have a bin/java?
26020      if test ! -x "$BOOT_JDK/bin/java"; then
26021        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26023        BOOT_JDK_FOUND=no
26024      else
26025        # Do we have a bin/javac?
26026        if test ! -x "$BOOT_JDK/bin/javac"; then
26027          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26029          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26030$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26031          BOOT_JDK_FOUND=no
26032        else
26033          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26034          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26035
26036          # Extra M4 quote needed to protect [] in grep expression.
26037          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26038          if test "x$FOUND_CORRECT_VERSION" = x; then
26039            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26041            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26042$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26043            BOOT_JDK_FOUND=no
26044          else
26045            # We're done! :-)
26046            BOOT_JDK_FOUND=yes
26047
26048  # Only process if variable expands to non-empty
26049
26050  if test "x$BOOT_JDK" != x; then
26051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26052
26053  # Input might be given as Windows format, start by converting to
26054  # unix format.
26055  path="$BOOT_JDK"
26056  new_path=`$CYGPATH -u "$path"`
26057
26058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26061  # "foo.exe" is OK but "foo" is an error.
26062  #
26063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26064  # It is also a way to make sure we got the proper file name for the real test later on.
26065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26066  if test "x$test_shortpath" = x; then
26067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26069    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26070  fi
26071
26072  # Call helper function which possibly converts this using DOS-style short mode.
26073  # If so, the updated path is stored in $new_path.
26074
26075  input_path="$new_path"
26076  # Check if we need to convert this using DOS-style short mode. If the path
26077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26078  # take no chances and rewrite it.
26079  # Note: m4 eats our [], so we need to use [ and ] instead.
26080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26081  if test "x$has_forbidden_chars" != x; then
26082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26086      # Going to short mode and back again did indeed matter. Since short mode is
26087      # case insensitive, let's make it lowercase to improve readability.
26088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26089      # Now convert it back to Unix-style (cygpath)
26090      input_path=`$CYGPATH -u "$shortmode_path"`
26091      new_path="$input_path"
26092    fi
26093  fi
26094
26095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26096  if test "x$test_cygdrive_prefix" = x; then
26097    # As a simple fix, exclude /usr/bin since it's not a real path.
26098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26100      # a path prefixed by /cygdrive for fixpath to work.
26101      new_path="$CYGWIN_ROOT_PATH$input_path"
26102    fi
26103  fi
26104
26105
26106  if test "x$path" != "x$new_path"; then
26107    BOOT_JDK="$new_path"
26108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26110  fi
26111
26112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26113
26114  path="$BOOT_JDK"
26115  has_colon=`$ECHO $path | $GREP ^.:`
26116  new_path="$path"
26117  if test "x$has_colon" = x; then
26118    # Not in mixed or Windows style, start by that.
26119    new_path=`cmd //c echo $path`
26120  fi
26121
26122
26123  input_path="$new_path"
26124  # Check if we need to convert this using DOS-style short mode. If the path
26125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26126  # take no chances and rewrite it.
26127  # Note: m4 eats our [], so we need to use [ and ] instead.
26128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26129  if test "x$has_forbidden_chars" != x; then
26130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26132  fi
26133
26134
26135  windows_path="$new_path"
26136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26137    unix_path=`$CYGPATH -u "$windows_path"`
26138    new_path="$unix_path"
26139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26141    new_path="$unix_path"
26142  fi
26143
26144  if test "x$path" != "x$new_path"; then
26145    BOOT_JDK="$new_path"
26146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26148  fi
26149
26150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26152
26153    else
26154      # We're on a unix platform. Hooray! :)
26155      path="$BOOT_JDK"
26156      has_space=`$ECHO "$path" | $GREP " "`
26157      if test "x$has_space" != x; then
26158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26161      fi
26162
26163      # Use eval to expand a potential ~
26164      eval path="$path"
26165      if test ! -f "$path" && test ! -d "$path"; then
26166        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26167      fi
26168
26169      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26170    fi
26171  fi
26172
26173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26174$as_echo_n "checking for Boot JDK... " >&6; }
26175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26176$as_echo "$BOOT_JDK" >&6; }
26177            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26178$as_echo_n "checking Boot JDK version... " >&6; }
26179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26181$as_echo "$BOOT_JDK_VERSION" >&6; }
26182          fi # end check jdk version
26183        fi # end check javac
26184      fi # end check java
26185    fi # end check boot jdk found
26186  fi
26187
26188
26189  # If we haven't found anything yet, we've truly lost. Give up.
26190  if test "x$BOOT_JDK_FOUND" = xno; then
26191
26192  # Print a helpful message on how to acquire the necessary build dependency.
26193  # openjdk is the help tag: freetype, cups, alsa etc
26194  MISSING_DEPENDENCY=openjdk
26195
26196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197    cygwin_help $MISSING_DEPENDENCY
26198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26199    msys_help $MISSING_DEPENDENCY
26200  else
26201    PKGHANDLER_COMMAND=
26202
26203    case $PKGHANDLER in
26204      apt-get)
26205        apt_help     $MISSING_DEPENDENCY ;;
26206      yum)
26207        yum_help     $MISSING_DEPENDENCY ;;
26208      port)
26209        port_help    $MISSING_DEPENDENCY ;;
26210      pkgutil)
26211        pkgutil_help $MISSING_DEPENDENCY ;;
26212      pkgadd)
26213        pkgadd_help  $MISSING_DEPENDENCY ;;
26214    esac
26215
26216    if test "x$PKGHANDLER_COMMAND" != x; then
26217      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26218    fi
26219  fi
26220
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
26222$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
26223    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
26224$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26225    as_fn_error $? "Cannot continue" "$LINENO" 5
26226  fi
26227
26228
26229
26230  # Setup tools from the Boot JDK.
26231
26232  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26233
26234  # Publish this variable in the help.
26235
26236
26237  if [ -z "${JAVA+x}" ]; then
26238    # The variable is not set by user, try to locate tool using the code snippet
26239
26240      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26241$as_echo_n "checking for java in Boot JDK... " >&6; }
26242      JAVA=$BOOT_JDK/bin/java
26243      if test ! -x $JAVA; then
26244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26245$as_echo "not found" >&6; }
26246        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26247$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26248        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26249      fi
26250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26251$as_echo "ok" >&6; }
26252
26253
26254  else
26255    # The variable is set, but is it from the command line or the environment?
26256
26257    # Try to remove the string !JAVA! from our list.
26258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26260      # If it failed, the variable was not from the command line. Ignore it,
26261      # but warn the user (except for BASH, which is always set by the calling BASH).
26262      if test "xJAVA" != xBASH; then
26263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26264$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26265      fi
26266      # Try to locate tool using the code snippet
26267
26268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26269$as_echo_n "checking for java in Boot JDK... " >&6; }
26270      JAVA=$BOOT_JDK/bin/java
26271      if test ! -x $JAVA; then
26272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26273$as_echo "not found" >&6; }
26274        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26275$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26276        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26277      fi
26278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26279$as_echo "ok" >&6; }
26280
26281
26282    else
26283      # If it succeeded, then it was overridden by the user. We will use it
26284      # for the tool.
26285
26286      # First remove it from the list of overridden variables, so we can test
26287      # for unknown variables in the end.
26288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26289
26290      # Check if we try to supply an empty value
26291      if test "x$JAVA" = x; then
26292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
26293$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
26294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26295$as_echo_n "checking for JAVA... " >&6; }
26296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26297$as_echo "disabled" >&6; }
26298      else
26299        # Check if the provided tool contains a complete path.
26300        tool_specified="$JAVA"
26301        tool_basename="${tool_specified##*/}"
26302        if test "x$tool_basename" = "x$tool_specified"; then
26303          # A command without a complete path is provided, search $PATH.
26304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26305$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26306          # Extract the first word of "$tool_basename", so it can be a program name with args.
26307set dummy $tool_basename; ac_word=$2
26308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26309$as_echo_n "checking for $ac_word... " >&6; }
26310if ${ac_cv_path_JAVA+:} false; then :
26311  $as_echo_n "(cached) " >&6
26312else
26313  case $JAVA in
26314  [\\/]* | ?:[\\/]*)
26315  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26316  ;;
26317  *)
26318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26319for as_dir in $PATH
26320do
26321  IFS=$as_save_IFS
26322  test -z "$as_dir" && as_dir=.
26323    for ac_exec_ext in '' $ac_executable_extensions; do
26324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26325    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26327    break 2
26328  fi
26329done
26330  done
26331IFS=$as_save_IFS
26332
26333  ;;
26334esac
26335fi
26336JAVA=$ac_cv_path_JAVA
26337if test -n "$JAVA"; then
26338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26339$as_echo "$JAVA" >&6; }
26340else
26341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26342$as_echo "no" >&6; }
26343fi
26344
26345
26346          if test "x$JAVA" = x; then
26347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26348          fi
26349        else
26350          # Otherwise we believe it is a complete path. Use it as it is.
26351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26352$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26354$as_echo_n "checking for JAVA... " >&6; }
26355          if test ! -x "$tool_specified"; then
26356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26357$as_echo "not found" >&6; }
26358            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26359          fi
26360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26361$as_echo "$tool_specified" >&6; }
26362        fi
26363      fi
26364    fi
26365  fi
26366
26367
26368
26369  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26370
26371  # Publish this variable in the help.
26372
26373
26374  if [ -z "${JAVAC+x}" ]; then
26375    # The variable is not set by user, try to locate tool using the code snippet
26376
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26378$as_echo_n "checking for javac in Boot JDK... " >&6; }
26379      JAVAC=$BOOT_JDK/bin/javac
26380      if test ! -x $JAVAC; then
26381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26382$as_echo "not found" >&6; }
26383        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26384$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26385        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26386      fi
26387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26388$as_echo "ok" >&6; }
26389
26390
26391  else
26392    # The variable is set, but is it from the command line or the environment?
26393
26394    # Try to remove the string !JAVAC! from our list.
26395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26397      # If it failed, the variable was not from the command line. Ignore it,
26398      # but warn the user (except for BASH, which is always set by the calling BASH).
26399      if test "xJAVAC" != xBASH; then
26400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26401$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26402      fi
26403      # Try to locate tool using the code snippet
26404
26405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26406$as_echo_n "checking for javac in Boot JDK... " >&6; }
26407      JAVAC=$BOOT_JDK/bin/javac
26408      if test ! -x $JAVAC; then
26409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26410$as_echo "not found" >&6; }
26411        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26412$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26413        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26414      fi
26415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26416$as_echo "ok" >&6; }
26417
26418
26419    else
26420      # If it succeeded, then it was overridden by the user. We will use it
26421      # for the tool.
26422
26423      # First remove it from the list of overridden variables, so we can test
26424      # for unknown variables in the end.
26425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26426
26427      # Check if we try to supply an empty value
26428      if test "x$JAVAC" = x; then
26429        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
26430$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
26431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26432$as_echo_n "checking for JAVAC... " >&6; }
26433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26434$as_echo "disabled" >&6; }
26435      else
26436        # Check if the provided tool contains a complete path.
26437        tool_specified="$JAVAC"
26438        tool_basename="${tool_specified##*/}"
26439        if test "x$tool_basename" = "x$tool_specified"; then
26440          # A command without a complete path is provided, search $PATH.
26441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26442$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26443          # Extract the first word of "$tool_basename", so it can be a program name with args.
26444set dummy $tool_basename; ac_word=$2
26445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26446$as_echo_n "checking for $ac_word... " >&6; }
26447if ${ac_cv_path_JAVAC+:} false; then :
26448  $as_echo_n "(cached) " >&6
26449else
26450  case $JAVAC in
26451  [\\/]* | ?:[\\/]*)
26452  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26453  ;;
26454  *)
26455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26456for as_dir in $PATH
26457do
26458  IFS=$as_save_IFS
26459  test -z "$as_dir" && as_dir=.
26460    for ac_exec_ext in '' $ac_executable_extensions; do
26461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26462    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26464    break 2
26465  fi
26466done
26467  done
26468IFS=$as_save_IFS
26469
26470  ;;
26471esac
26472fi
26473JAVAC=$ac_cv_path_JAVAC
26474if test -n "$JAVAC"; then
26475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26476$as_echo "$JAVAC" >&6; }
26477else
26478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26479$as_echo "no" >&6; }
26480fi
26481
26482
26483          if test "x$JAVAC" = x; then
26484            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26485          fi
26486        else
26487          # Otherwise we believe it is a complete path. Use it as it is.
26488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26489$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26490          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26491$as_echo_n "checking for JAVAC... " >&6; }
26492          if test ! -x "$tool_specified"; then
26493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26494$as_echo "not found" >&6; }
26495            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26496          fi
26497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26498$as_echo "$tool_specified" >&6; }
26499        fi
26500      fi
26501    fi
26502  fi
26503
26504
26505
26506  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26507
26508  # Publish this variable in the help.
26509
26510
26511  if [ -z "${JAVAH+x}" ]; then
26512    # The variable is not set by user, try to locate tool using the code snippet
26513
26514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26515$as_echo_n "checking for javah in Boot JDK... " >&6; }
26516      JAVAH=$BOOT_JDK/bin/javah
26517      if test ! -x $JAVAH; then
26518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26519$as_echo "not found" >&6; }
26520        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26521$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26522        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26523      fi
26524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26525$as_echo "ok" >&6; }
26526
26527
26528  else
26529    # The variable is set, but is it from the command line or the environment?
26530
26531    # Try to remove the string !JAVAH! from our list.
26532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26534      # If it failed, the variable was not from the command line. Ignore it,
26535      # but warn the user (except for BASH, which is always set by the calling BASH).
26536      if test "xJAVAH" != xBASH; then
26537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26538$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26539      fi
26540      # Try to locate tool using the code snippet
26541
26542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26543$as_echo_n "checking for javah in Boot JDK... " >&6; }
26544      JAVAH=$BOOT_JDK/bin/javah
26545      if test ! -x $JAVAH; then
26546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26547$as_echo "not found" >&6; }
26548        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26549$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26550        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26551      fi
26552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26553$as_echo "ok" >&6; }
26554
26555
26556    else
26557      # If it succeeded, then it was overridden by the user. We will use it
26558      # for the tool.
26559
26560      # First remove it from the list of overridden variables, so we can test
26561      # for unknown variables in the end.
26562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26563
26564      # Check if we try to supply an empty value
26565      if test "x$JAVAH" = x; then
26566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
26567$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
26568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26569$as_echo_n "checking for JAVAH... " >&6; }
26570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26571$as_echo "disabled" >&6; }
26572      else
26573        # Check if the provided tool contains a complete path.
26574        tool_specified="$JAVAH"
26575        tool_basename="${tool_specified##*/}"
26576        if test "x$tool_basename" = "x$tool_specified"; then
26577          # A command without a complete path is provided, search $PATH.
26578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26579$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26580          # Extract the first word of "$tool_basename", so it can be a program name with args.
26581set dummy $tool_basename; ac_word=$2
26582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26583$as_echo_n "checking for $ac_word... " >&6; }
26584if ${ac_cv_path_JAVAH+:} false; then :
26585  $as_echo_n "(cached) " >&6
26586else
26587  case $JAVAH in
26588  [\\/]* | ?:[\\/]*)
26589  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26590  ;;
26591  *)
26592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26593for as_dir in $PATH
26594do
26595  IFS=$as_save_IFS
26596  test -z "$as_dir" && as_dir=.
26597    for ac_exec_ext in '' $ac_executable_extensions; do
26598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26599    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26601    break 2
26602  fi
26603done
26604  done
26605IFS=$as_save_IFS
26606
26607  ;;
26608esac
26609fi
26610JAVAH=$ac_cv_path_JAVAH
26611if test -n "$JAVAH"; then
26612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26613$as_echo "$JAVAH" >&6; }
26614else
26615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26616$as_echo "no" >&6; }
26617fi
26618
26619
26620          if test "x$JAVAH" = x; then
26621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26622          fi
26623        else
26624          # Otherwise we believe it is a complete path. Use it as it is.
26625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26626$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26628$as_echo_n "checking for JAVAH... " >&6; }
26629          if test ! -x "$tool_specified"; then
26630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26631$as_echo "not found" >&6; }
26632            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26633          fi
26634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26635$as_echo "$tool_specified" >&6; }
26636        fi
26637      fi
26638    fi
26639  fi
26640
26641
26642
26643  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26644
26645  # Publish this variable in the help.
26646
26647
26648  if [ -z "${JAR+x}" ]; then
26649    # The variable is not set by user, try to locate tool using the code snippet
26650
26651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26652$as_echo_n "checking for jar in Boot JDK... " >&6; }
26653      JAR=$BOOT_JDK/bin/jar
26654      if test ! -x $JAR; then
26655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26656$as_echo "not found" >&6; }
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26658$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26659        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26660      fi
26661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26662$as_echo "ok" >&6; }
26663
26664
26665  else
26666    # The variable is set, but is it from the command line or the environment?
26667
26668    # Try to remove the string !JAR! from our list.
26669    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26670    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26671      # If it failed, the variable was not from the command line. Ignore it,
26672      # but warn the user (except for BASH, which is always set by the calling BASH).
26673      if test "xJAR" != xBASH; then
26674        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26675$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26676      fi
26677      # Try to locate tool using the code snippet
26678
26679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26680$as_echo_n "checking for jar in Boot JDK... " >&6; }
26681      JAR=$BOOT_JDK/bin/jar
26682      if test ! -x $JAR; then
26683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26684$as_echo "not found" >&6; }
26685        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26686$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26687        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26688      fi
26689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26690$as_echo "ok" >&6; }
26691
26692
26693    else
26694      # If it succeeded, then it was overridden by the user. We will use it
26695      # for the tool.
26696
26697      # First remove it from the list of overridden variables, so we can test
26698      # for unknown variables in the end.
26699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26700
26701      # Check if we try to supply an empty value
26702      if test "x$JAR" = x; then
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
26704$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
26705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26706$as_echo_n "checking for JAR... " >&6; }
26707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26708$as_echo "disabled" >&6; }
26709      else
26710        # Check if the provided tool contains a complete path.
26711        tool_specified="$JAR"
26712        tool_basename="${tool_specified##*/}"
26713        if test "x$tool_basename" = "x$tool_specified"; then
26714          # A command without a complete path is provided, search $PATH.
26715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26716$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26717          # Extract the first word of "$tool_basename", so it can be a program name with args.
26718set dummy $tool_basename; ac_word=$2
26719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26720$as_echo_n "checking for $ac_word... " >&6; }
26721if ${ac_cv_path_JAR+:} false; then :
26722  $as_echo_n "(cached) " >&6
26723else
26724  case $JAR in
26725  [\\/]* | ?:[\\/]*)
26726  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26727  ;;
26728  *)
26729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26730for as_dir in $PATH
26731do
26732  IFS=$as_save_IFS
26733  test -z "$as_dir" && as_dir=.
26734    for ac_exec_ext in '' $ac_executable_extensions; do
26735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26736    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26738    break 2
26739  fi
26740done
26741  done
26742IFS=$as_save_IFS
26743
26744  ;;
26745esac
26746fi
26747JAR=$ac_cv_path_JAR
26748if test -n "$JAR"; then
26749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26750$as_echo "$JAR" >&6; }
26751else
26752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26753$as_echo "no" >&6; }
26754fi
26755
26756
26757          if test "x$JAR" = x; then
26758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26759          fi
26760        else
26761          # Otherwise we believe it is a complete path. Use it as it is.
26762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26763$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26765$as_echo_n "checking for JAR... " >&6; }
26766          if test ! -x "$tool_specified"; then
26767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26768$as_echo "not found" >&6; }
26769            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26770          fi
26771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26772$as_echo "$tool_specified" >&6; }
26773        fi
26774      fi
26775    fi
26776  fi
26777
26778
26779
26780  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26781
26782  # Publish this variable in the help.
26783
26784
26785  if [ -z "${JARSIGNER+x}" ]; then
26786    # The variable is not set by user, try to locate tool using the code snippet
26787
26788      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26789$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26790      JARSIGNER=$BOOT_JDK/bin/jarsigner
26791      if test ! -x $JARSIGNER; then
26792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26793$as_echo "not found" >&6; }
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26795$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26796        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26797      fi
26798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26799$as_echo "ok" >&6; }
26800
26801
26802  else
26803    # The variable is set, but is it from the command line or the environment?
26804
26805    # Try to remove the string !JARSIGNER! from our list.
26806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26808      # If it failed, the variable was not from the command line. Ignore it,
26809      # but warn the user (except for BASH, which is always set by the calling BASH).
26810      if test "xJARSIGNER" != xBASH; then
26811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26812$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26813      fi
26814      # Try to locate tool using the code snippet
26815
26816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26817$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26818      JARSIGNER=$BOOT_JDK/bin/jarsigner
26819      if test ! -x $JARSIGNER; then
26820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26821$as_echo "not found" >&6; }
26822        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26823$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26824        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26825      fi
26826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26827$as_echo "ok" >&6; }
26828
26829
26830    else
26831      # If it succeeded, then it was overridden by the user. We will use it
26832      # for the tool.
26833
26834      # First remove it from the list of overridden variables, so we can test
26835      # for unknown variables in the end.
26836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26837
26838      # Check if we try to supply an empty value
26839      if test "x$JARSIGNER" = x; then
26840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
26841$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
26842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26843$as_echo_n "checking for JARSIGNER... " >&6; }
26844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26845$as_echo "disabled" >&6; }
26846      else
26847        # Check if the provided tool contains a complete path.
26848        tool_specified="$JARSIGNER"
26849        tool_basename="${tool_specified##*/}"
26850        if test "x$tool_basename" = "x$tool_specified"; then
26851          # A command without a complete path is provided, search $PATH.
26852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26853$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26854          # Extract the first word of "$tool_basename", so it can be a program name with args.
26855set dummy $tool_basename; ac_word=$2
26856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26857$as_echo_n "checking for $ac_word... " >&6; }
26858if ${ac_cv_path_JARSIGNER+:} false; then :
26859  $as_echo_n "(cached) " >&6
26860else
26861  case $JARSIGNER in
26862  [\\/]* | ?:[\\/]*)
26863  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26864  ;;
26865  *)
26866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26867for as_dir in $PATH
26868do
26869  IFS=$as_save_IFS
26870  test -z "$as_dir" && as_dir=.
26871    for ac_exec_ext in '' $ac_executable_extensions; do
26872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26873    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26875    break 2
26876  fi
26877done
26878  done
26879IFS=$as_save_IFS
26880
26881  ;;
26882esac
26883fi
26884JARSIGNER=$ac_cv_path_JARSIGNER
26885if test -n "$JARSIGNER"; then
26886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26887$as_echo "$JARSIGNER" >&6; }
26888else
26889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26890$as_echo "no" >&6; }
26891fi
26892
26893
26894          if test "x$JARSIGNER" = x; then
26895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26896          fi
26897        else
26898          # Otherwise we believe it is a complete path. Use it as it is.
26899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26900$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26902$as_echo_n "checking for JARSIGNER... " >&6; }
26903          if test ! -x "$tool_specified"; then
26904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26905$as_echo "not found" >&6; }
26906            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26907          fi
26908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26909$as_echo "$tool_specified" >&6; }
26910        fi
26911      fi
26912    fi
26913  fi
26914
26915
26916
26917  # Finally, set some other options...
26918
26919  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26920  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26921
26922
26923
26924  # Check if the boot jdk is 32 or 64 bit
26925  if "$JAVA" -d64 -version > /dev/null 2>&1; then
26926    BOOT_JDK_BITS="64"
26927  else
26928    BOOT_JDK_BITS="32"
26929  fi
26930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
26931$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
26932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
26933$as_echo "$BOOT_JDK_BITS" >&6; }
26934
26935
26936
26937###############################################################################
26938#
26939# Configure the sources to use. We can add or override individual directories.
26940#
26941###############################################################################
26942
26943
26944  # Where are the sources. Any of these can be overridden
26945  # using --with-override-corba and the likes.
26946  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26947  CORBA_TOPDIR="$SRC_ROOT/corba"
26948  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26949  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26950  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26951  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26952  JDK_TOPDIR="$SRC_ROOT/jdk"
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963  ###############################################################################
26964  #
26965  # Pickup additional source for a component from outside of the source root
26966  # or override source for a component.
26967  #
26968
26969# Check whether --with-add-source-root was given.
26970if test "${with_add_source_root+set}" = set; then :
26971  withval=$with_add_source_root;
26972fi
26973
26974
26975
26976# Check whether --with-override-source-root was given.
26977if test "${with_override_source_root+set}" = set; then :
26978  withval=$with_override_source_root;
26979fi
26980
26981
26982
26983# Check whether --with-adds-and-overrides was given.
26984if test "${with_adds_and_overrides+set}" = set; then :
26985  withval=$with_adds_and_overrides;
26986fi
26987
26988
26989  if test "x$with_adds_and_overrides" != x; then
26990    with_add_source_root="$with_adds_and_overrides/adds"
26991    with_override_source_root="$with_adds_and_overrides/overrides"
26992  fi
26993
26994  if test "x$with_add_source_root" != x; then
26995    if ! test -d $with_add_source_root; then
26996      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26997    fi
26998    CURDIR="$PWD"
26999    cd "$with_add_source_root"
27000    ADD_SRC_ROOT="`pwd`"
27001    cd "$CURDIR"
27002    # Verify that the addon source root does not have any root makefiles.
27003    # If it does, then it is usually an error, prevent this.
27004    if test -f $with_add_source_root/langtools/make/Makefile; then
27005      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
27006    fi
27007    if test -f $with_add_source_root/corba/make/Makefile; then
27008      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
27009    fi
27010    if test -f $with_add_source_root/jaxp/make/Makefile; then
27011      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
27012    fi
27013    if test -f $with_add_source_root/jaxws/make/Makefile; then
27014      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
27015    fi
27016    if test -f $with_add_source_root/hotspot/make/Makefile; then
27017      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
27018    fi
27019    if test -f $with_add_source_root/nashorn/make/Makefile; then
27020      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
27021    fi
27022    if test -f $with_add_source_root/jdk/make/Makefile; then
27023      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
27024    fi
27025  fi
27026
27027
27028  if test "x$with_override_source_root" != x; then
27029    if ! test -d $with_override_source_root; then
27030      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
27031    fi
27032    CURDIR="$PWD"
27033    cd "$with_override_source_root"
27034    OVERRIDE_SRC_ROOT="`pwd`"
27035    cd "$CURDIR"
27036    if test -f $with_override_source_root/langtools/make/Makefile; then
27037      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
27038    fi
27039    if test -f $with_override_source_root/corba/make/Makefile; then
27040      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
27041    fi
27042    if test -f $with_override_source_root/jaxp/make/Makefile; then
27043      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
27044    fi
27045    if test -f $with_override_source_root/jaxws/make/Makefile; then
27046      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
27047    fi
27048    if test -f $with_override_source_root/hotspot/make/Makefile; then
27049      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
27050    fi
27051    if test -f $with_override_source_root/nashorn/make/Makefile; then
27052      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
27053    fi
27054    if test -f $with_override_source_root/jdk/make/Makefile; then
27055      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
27056    fi
27057  fi
27058
27059
27060  ###############################################################################
27061  #
27062  # Override a repo completely, this is used for example when you have 3 small
27063  # development sandboxes of the langtools sources and want to avoid having 3 full
27064  # OpenJDK sources checked out on disk.
27065  #
27066  # Assuming that the 3 langtools sandboxes are located here:
27067  # /home/fredrik/sandbox1/langtools
27068  # /home/fredrik/sandbox2/langtools
27069  # /home/fredrik/sandbox3/langtools
27070  #
27071  # From the source root you create build subdirs manually:
27072  #     mkdir -p build1 build2 build3
27073  # in each build directory run:
27074  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
27075  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
27076  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
27077  #
27078
27079
27080# Check whether --with-override-langtools was given.
27081if test "${with_override_langtools+set}" = set; then :
27082  withval=$with_override_langtools;
27083fi
27084
27085
27086
27087# Check whether --with-override-corba was given.
27088if test "${with_override_corba+set}" = set; then :
27089  withval=$with_override_corba;
27090fi
27091
27092
27093
27094# Check whether --with-override-jaxp was given.
27095if test "${with_override_jaxp+set}" = set; then :
27096  withval=$with_override_jaxp;
27097fi
27098
27099
27100
27101# Check whether --with-override-jaxws was given.
27102if test "${with_override_jaxws+set}" = set; then :
27103  withval=$with_override_jaxws;
27104fi
27105
27106
27107
27108# Check whether --with-override-hotspot was given.
27109if test "${with_override_hotspot+set}" = set; then :
27110  withval=$with_override_hotspot;
27111fi
27112
27113
27114
27115# Check whether --with-override-nashorn was given.
27116if test "${with_override_nashorn+set}" = set; then :
27117  withval=$with_override_nashorn;
27118fi
27119
27120
27121
27122# Check whether --with-override-jdk was given.
27123if test "${with_override_jdk+set}" = set; then :
27124  withval=$with_override_jdk;
27125fi
27126
27127
27128  if test "x$with_override_langtools" != x; then
27129    CURDIR="$PWD"
27130    cd "$with_override_langtools"
27131    LANGTOOLS_TOPDIR="`pwd`"
27132    cd "$CURDIR"
27133    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
27134      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
27135    fi
27136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
27137$as_echo_n "checking if langtools should be overridden... " >&6; }
27138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
27139$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
27140  fi
27141  if test "x$with_override_corba" != x; then
27142    CURDIR="$PWD"
27143    cd "$with_override_corba"
27144    CORBA_TOPDIR="`pwd`"
27145    cd "$CURDIR"
27146    if ! test -f $CORBA_TOPDIR/make/Makefile; then
27147      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
27148    fi
27149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
27150$as_echo_n "checking if corba should be overridden... " >&6; }
27151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
27152$as_echo "yes with $CORBA_TOPDIR" >&6; }
27153  fi
27154  if test "x$with_override_jaxp" != x; then
27155    CURDIR="$PWD"
27156    cd "$with_override_jaxp"
27157    JAXP_TOPDIR="`pwd`"
27158    cd "$CURDIR"
27159    if ! test -f $JAXP_TOPDIR/make/Makefile; then
27160      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
27161    fi
27162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
27163$as_echo_n "checking if jaxp should be overridden... " >&6; }
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
27165$as_echo "yes with $JAXP_TOPDIR" >&6; }
27166  fi
27167  if test "x$with_override_jaxws" != x; then
27168    CURDIR="$PWD"
27169    cd "$with_override_jaxws"
27170    JAXWS_TOPDIR="`pwd`"
27171    cd "$CURDIR"
27172    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
27173      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
27174    fi
27175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
27176$as_echo_n "checking if jaxws should be overridden... " >&6; }
27177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
27178$as_echo "yes with $JAXWS_TOPDIR" >&6; }
27179  fi
27180  if test "x$with_override_hotspot" != x; then
27181    CURDIR="$PWD"
27182    cd "$with_override_hotspot"
27183    HOTSPOT_TOPDIR="`pwd`"
27184    cd "$CURDIR"
27185    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
27186      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
27187    fi
27188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
27189$as_echo_n "checking if hotspot should be overridden... " >&6; }
27190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
27191$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
27192  fi
27193  if test "x$with_override_nashorn" != x; then
27194    CURDIR="$PWD"
27195    cd "$with_override_nashorn"
27196    NASHORN_TOPDIR="`pwd`"
27197    cd "$CURDIR"
27198    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
27199      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
27200    fi
27201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
27202$as_echo_n "checking if nashorn should be overridden... " >&6; }
27203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
27204$as_echo "yes with $NASHORN_TOPDIR" >&6; }
27205  fi
27206  if test "x$with_override_jdk" != x; then
27207    CURDIR="$PWD"
27208    cd "$with_override_jdk"
27209    JDK_TOPDIR="`pwd`"
27210    cd "$CURDIR"
27211    if ! test -f $JDK_TOPDIR/make/Makefile; then
27212      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
27213    fi
27214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
27215$as_echo_n "checking if JDK should be overridden... " >&6; }
27216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
27217$as_echo "yes with $JDK_TOPDIR" >&6; }
27218  fi
27219
27220
27221  BUILD_OUTPUT="$OUTPUT_ROOT"
27222
27223
27224  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
27225  BUILD_HOTSPOT=true
27226
27227
27228
27229# Check whether --with-import-hotspot was given.
27230if test "${with_import_hotspot+set}" = set; then :
27231  withval=$with_import_hotspot;
27232fi
27233
27234  if test "x$with_import_hotspot" != x; then
27235    CURDIR="$PWD"
27236    cd "$with_import_hotspot"
27237    HOTSPOT_DIST="`pwd`"
27238    cd "$CURDIR"
27239    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27240      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27241    fi
27242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27243$as_echo_n "checking if hotspot should be imported... " >&6; }
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27245$as_echo "yes from $HOTSPOT_DIST" >&6; }
27246    BUILD_HOTSPOT=false
27247  fi
27248
27249  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27250
27251
27252###############################################################################
27253#
27254# Setup the toolchain (compilers etc), i.e. tools used to compile and process
27255# native code.
27256#
27257###############################################################################
27258
27259# First determine the toolchain type (compiler family)
27260
27261
27262# Check whether --with-toolchain-type was given.
27263if test "${with_toolchain_type+set}" = set; then :
27264  withval=$with_toolchain_type;
27265fi
27266
27267
27268  # Use indirect variable referencing
27269  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27270  VALID_TOOLCHAINS=${!toolchain_var_name}
27271
27272  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27273    if test -n "$XCODEBUILD"; then
27274      # On Mac OS X, default toolchain to clang after Xcode 5
27275      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27276      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27277      if test $? -ne 0; then
27278        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27279      fi
27280      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
27281          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
27282          $CUT -f 1 -d .`
27283      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
27284$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
27285      if test $XCODE_MAJOR_VERSION -ge 5; then
27286          DEFAULT_TOOLCHAIN="clang"
27287      else
27288          DEFAULT_TOOLCHAIN="gcc"
27289      fi
27290    else
27291      # If Xcode is not installed, but the command line tools are
27292      # then we can't run xcodebuild. On these systems we should
27293      # default to clang
27294      DEFAULT_TOOLCHAIN="clang"
27295    fi
27296  else
27297    # First toolchain type in the list is the default
27298    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27299  fi
27300
27301  if test "x$with_toolchain_type" = xlist; then
27302    # List all toolchains
27303    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27304$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27305    for toolchain in $VALID_TOOLCHAINS; do
27306      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27307      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27308      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27309    done
27310
27311    exit 0
27312  elif test "x$with_toolchain_type" != x; then
27313    # User override; check that it is valid
27314    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27315      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27316$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27317      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27318$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27319      as_fn_error $? "Cannot continue." "$LINENO" 5
27320    fi
27321    TOOLCHAIN_TYPE=$with_toolchain_type
27322  else
27323    # No flag given, use default
27324    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27325  fi
27326
27327
27328  TOOLCHAIN_CC_BINARY_clang="clang"
27329  TOOLCHAIN_CC_BINARY_gcc="gcc"
27330  TOOLCHAIN_CC_BINARY_microsoft="cl"
27331  TOOLCHAIN_CC_BINARY_solstudio="cc"
27332  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27333
27334  TOOLCHAIN_CXX_BINARY_clang="clang++"
27335  TOOLCHAIN_CXX_BINARY_gcc="g++"
27336  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27337  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27338  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27339
27340  # Use indirect variable referencing
27341  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27342  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27343  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27344  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27345  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27346  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27347
27348
27349  # Define filename patterns
27350  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27351    LIBRARY_PREFIX=
27352    SHARED_LIBRARY_SUFFIX='.dll'
27353    STATIC_LIBRARY_SUFFIX='.lib'
27354    SHARED_LIBRARY='$1.dll'
27355    STATIC_LIBRARY='$1.lib'
27356    OBJ_SUFFIX='.obj'
27357    EXE_SUFFIX='.exe'
27358  else
27359    LIBRARY_PREFIX=lib
27360    SHARED_LIBRARY_SUFFIX='.so'
27361    STATIC_LIBRARY_SUFFIX='.a'
27362    SHARED_LIBRARY='lib$1.so'
27363    STATIC_LIBRARY='lib$1.a'
27364    OBJ_SUFFIX='.o'
27365    EXE_SUFFIX=''
27366    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27367      SHARED_LIBRARY='lib$1.dylib'
27368      SHARED_LIBRARY_SUFFIX='.dylib'
27369    fi
27370  fi
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27382    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27383$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27384  else
27385    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27386$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27387  fi
27388
27389
27390# User supplied flags should be used when configure detects compilers
27391
27392  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27394$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27395  fi
27396
27397  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27399$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27400  fi
27401
27402  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27404$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27405  fi
27406
27407
27408# Check whether --with-extra-cflags was given.
27409if test "${with_extra_cflags+set}" = set; then :
27410  withval=$with_extra_cflags;
27411fi
27412
27413
27414
27415# Check whether --with-extra-cxxflags was given.
27416if test "${with_extra_cxxflags+set}" = set; then :
27417  withval=$with_extra_cxxflags;
27418fi
27419
27420
27421
27422# Check whether --with-extra-ldflags was given.
27423if test "${with_extra_ldflags+set}" = set; then :
27424  withval=$with_extra_ldflags;
27425fi
27426
27427
27428  EXTRA_CFLAGS="$with_extra_cflags"
27429  EXTRA_CXXFLAGS="$with_extra_cxxflags"
27430  EXTRA_LDFLAGS="$with_extra_ldflags"
27431
27432  # Hotspot needs these set in their legacy form
27433  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
27434  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
27435  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
27436
27437
27438
27439
27440
27441  # The global CFLAGS and LDLAGS variables are used by configure tests and
27442  # should include the extra parameters
27443  CFLAGS="$EXTRA_CFLAGS"
27444  CXXFLAGS="$EXTRA_CXXFLAGS"
27445  LDFLAGS="$EXTRA_LDFLAGS"
27446  CPPFLAGS=""
27447
27448# The sysroot cflags are needed for configure to be able to run the compilers
27449
27450  if test "x$SYSROOT" != "x"; then
27451    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27452      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27453        # Solaris Studio does not have a concept of sysroot. Instead we must
27454        # make sure the default include and lib dirs are appended to each
27455        # compile and link command line.
27456        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
27457        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
27458            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
27459            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
27460      fi
27461    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
27462      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
27463      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
27464    elif test "x$TOOLCHAIN_TYPE" = xclang; then
27465      SYSROOT_CFLAGS="-isysroot $SYSROOT"
27466      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
27467    fi
27468    # Propagate the sysroot args to hotspot
27469    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
27470    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
27471    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
27472    # The global CFLAGS and LDFLAGS variables need these for configure to function
27473    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
27474    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
27475    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
27476    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
27477  fi
27478
27479  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27480    # We also need -iframework<path>/System/Library/Frameworks
27481    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27482    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27483    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
27484    # set this here so it doesn't have to be peppered throughout the forest
27485    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27486    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27487  fi
27488
27489
27490
27491
27492
27493# Then detect the actual binaries needed
27494
27495  # FIXME: Is this needed?
27496  ac_ext=cpp
27497ac_cpp='$CXXCPP $CPPFLAGS'
27498ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27499ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27500ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27501
27502
27503  # Store the CFLAGS etc passed to the configure script.
27504  ORG_CFLAGS="$CFLAGS"
27505  ORG_CXXFLAGS="$CXXFLAGS"
27506
27507  # autoconf magic only relies on PATH, so update it if tools dir is specified
27508  OLD_PATH="$PATH"
27509
27510  # On Windows, we need to detect the visual studio installation first.
27511  # This will change the PATH, but we need to keep that new PATH even
27512  # after toolchain detection is done, since the compiler (on x86) uses
27513  # it for DLL resolution in runtime.
27514  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27515      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27516
27517  # Store path to cygwin link.exe to help excluding it when searching for
27518  # VS linker. This must be done before changing the PATH when looking for VS.
27519  # Extract the first word of "link", so it can be a program name with args.
27520set dummy link; ac_word=$2
27521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27522$as_echo_n "checking for $ac_word... " >&6; }
27523if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27524  $as_echo_n "(cached) " >&6
27525else
27526  case $CYGWIN_LINK in
27527  [\\/]* | ?:[\\/]*)
27528  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27529  ;;
27530  *)
27531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27532for as_dir in $PATH
27533do
27534  IFS=$as_save_IFS
27535  test -z "$as_dir" && as_dir=.
27536    for ac_exec_ext in '' $ac_executable_extensions; do
27537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27538    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27540    break 2
27541  fi
27542done
27543  done
27544IFS=$as_save_IFS
27545
27546  ;;
27547esac
27548fi
27549CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27550if test -n "$CYGWIN_LINK"; then
27551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27552$as_echo "$CYGWIN_LINK" >&6; }
27553else
27554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27555$as_echo "no" >&6; }
27556fi
27557
27558
27559  if test "x$CYGWIN_LINK" != x; then
27560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27561$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27562    "$CYGWIN_LINK" --version > /dev/null
27563    if test $? -eq 0 ; then
27564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27565$as_echo "yes" >&6; }
27566    else
27567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27568$as_echo "no" >&6; }
27569      # This might be the VS linker. Don't exclude it later on.
27570      CYGWIN_LINK=""
27571    fi
27572  fi
27573
27574  # First-hand choice is to locate and run the vsvars bat file.
27575
27576
27577# Check whether --with-toolchain-version was given.
27578if test "${with_toolchain_version+set}" = set; then :
27579  withval=$with_toolchain_version;
27580fi
27581
27582
27583  if test "x$with_toolchain_version" = xlist; then
27584    # List all toolchains
27585    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27586$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27587    for version in $VALID_VS_VERSIONS; do
27588      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27589      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27590    done
27591
27592    exit 0
27593  elif test "x$DEVKIT_VS_VERSION" != x; then
27594    VS_VERSION=$DEVKIT_VS_VERSION
27595    TOOLCHAIN_VERSION=$VS_VERSION
27596    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27597    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27598    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27599    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27600    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27601    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27602
27603    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27604    # can still be exported as INCLUDE for compiler invocations without
27605    # SYSROOT_CFLAGS
27606    OLDIFS="$IFS"
27607    IFS=";"
27608    for i in $DEVKIT_VS_INCLUDE; do
27609      ipath=$i
27610
27611  unix_path="$ipath"
27612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27613    windows_path=`$CYGPATH -m "$unix_path"`
27614    ipath="$windows_path"
27615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27616    windows_path=`cmd //c echo $unix_path`
27617    ipath="$windows_path"
27618  fi
27619
27620      VS_INCLUDE="$VS_INCLUDE;$ipath"
27621    done
27622    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27623    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27624    for i in $DEVKIT_VS_LIB; do
27625      libpath=$i
27626
27627  unix_path="$libpath"
27628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27629    windows_path=`$CYGPATH -m "$unix_path"`
27630    libpath="$windows_path"
27631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27632    windows_path=`cmd //c echo $unix_path`
27633    libpath="$windows_path"
27634  fi
27635
27636      VS_LIB="$VS_LIB;$libpath"
27637    done
27638    IFS="$OLDIFS"
27639
27640    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27641$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27642
27643  elif test "x$with_toolchain_version" != x; then
27644    # User override; check that it is valid
27645    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27646      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27647$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27648      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27649$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27650      as_fn_error $? "Cannot continue." "$LINENO" 5
27651    fi
27652    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27653  else
27654    # No flag given, use default
27655    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27656  fi
27657
27658  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27659
27660  VS_VERSION="$VS_VERSION"
27661  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27662  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27663  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27664  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27665
27666  # When using --with-tools-dir, assume it points to the correct and default
27667  # version of Visual Studio or that --with-toolchain-version was also set.
27668  if test "x$with_tools_dir" != x; then
27669
27670  if test "x$VS_ENV_CMD" = x; then
27671    VS_VERSION="${VS_VERSION}"
27672    VS_BASE="$with_tools_dir/../.."
27673    METHOD="--with-tools-dir"
27674
27675    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27676      VCVARSFILE="vc/bin/vcvars32.bat"
27677    else
27678      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27679    fi
27680
27681
27682  windows_path="$VS_BASE"
27683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27684    unix_path=`$CYGPATH -u "$windows_path"`
27685    VS_BASE="$unix_path"
27686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27688    VS_BASE="$unix_path"
27689  fi
27690
27691    if test -d "$VS_BASE"; then
27692      if test -f "$VS_BASE/$VCVARSFILE"; then
27693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27694$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27695        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27696        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27697        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27698        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27699      else
27700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27701$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27703$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27704      fi
27705    fi
27706  fi
27707
27708
27709  if test "x$VS_ENV_CMD" = x; then
27710    VS_VERSION="${VS_VERSION}"
27711    VS_BASE="$with_tools_dir/../../.."
27712    METHOD="--with-tools-dir"
27713
27714    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27715      VCVARSFILE="vc/bin/vcvars32.bat"
27716    else
27717      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27718    fi
27719
27720
27721  windows_path="$VS_BASE"
27722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27723    unix_path=`$CYGPATH -u "$windows_path"`
27724    VS_BASE="$unix_path"
27725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27727    VS_BASE="$unix_path"
27728  fi
27729
27730    if test -d "$VS_BASE"; then
27731      if test -f "$VS_BASE/$VCVARSFILE"; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27733$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27734        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27735        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27736        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27737        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27738      else
27739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27740$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27741        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27742$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27743      fi
27744    fi
27745  fi
27746
27747    if test "x$VS_ENV_CMD" = x; then
27748      # Having specified an argument which is incorrect will produce an instant failure;
27749      # we should not go on looking
27750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27751$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27752      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27753$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27754      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27755$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27756      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27757    fi
27758  fi
27759
27760  VS_ENV_CMD=""
27761  VS_ENV_ARGS=""
27762
27763  if test "x$VS_COMNTOOLS" != x; then
27764
27765  if test "x$VS_ENV_CMD" = x; then
27766    VS_VERSION="${VS_VERSION}"
27767    VS_BASE="$VS_COMNTOOLS/../.."
27768    METHOD="$VS_COMNTOOLS_VAR variable"
27769
27770    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27771      VCVARSFILE="vc/bin/vcvars32.bat"
27772    else
27773      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27774    fi
27775
27776
27777  windows_path="$VS_BASE"
27778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27779    unix_path=`$CYGPATH -u "$windows_path"`
27780    VS_BASE="$unix_path"
27781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27783    VS_BASE="$unix_path"
27784  fi
27785
27786    if test -d "$VS_BASE"; then
27787      if test -f "$VS_BASE/$VCVARSFILE"; then
27788        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27789$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27790        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27791        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27792        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27793        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27794      else
27795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27796$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27797        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27798$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27799      fi
27800    fi
27801  fi
27802
27803  fi
27804  if test "x$PROGRAMFILES" != x; then
27805
27806  if test "x$VS_ENV_CMD" = x; then
27807    VS_VERSION="${VS_VERSION}"
27808    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27809    METHOD="well-known name"
27810
27811    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27812      VCVARSFILE="vc/bin/vcvars32.bat"
27813    else
27814      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27815    fi
27816
27817
27818  windows_path="$VS_BASE"
27819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27820    unix_path=`$CYGPATH -u "$windows_path"`
27821    VS_BASE="$unix_path"
27822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27824    VS_BASE="$unix_path"
27825  fi
27826
27827    if test -d "$VS_BASE"; then
27828      if test -f "$VS_BASE/$VCVARSFILE"; then
27829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27830$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27831        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27832        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27833        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27834        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27835      else
27836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27837$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27839$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27840      fi
27841    fi
27842  fi
27843
27844  fi
27845  # Work around the insanely named ProgramFiles(x86) env variable
27846  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27847  if test "x$PROGRAMFILES_X86" != x; then
27848
27849  if test "x$VS_ENV_CMD" = x; then
27850    VS_VERSION="${VS_VERSION}"
27851    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27852    METHOD="well-known name"
27853
27854    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27855      VCVARSFILE="vc/bin/vcvars32.bat"
27856    else
27857      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27858    fi
27859
27860
27861  windows_path="$VS_BASE"
27862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27863    unix_path=`$CYGPATH -u "$windows_path"`
27864    VS_BASE="$unix_path"
27865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27867    VS_BASE="$unix_path"
27868  fi
27869
27870    if test -d "$VS_BASE"; then
27871      if test -f "$VS_BASE/$VCVARSFILE"; then
27872        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27873$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27874        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27875        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27876        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27877        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27878      else
27879        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27880$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27881        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27882$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27883      fi
27884    fi
27885  fi
27886
27887  fi
27888
27889  if test "x$VS_ENV_CMD" = x; then
27890    VS_VERSION="${VS_VERSION}"
27891    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27892    METHOD="well-known name"
27893
27894    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27895      VCVARSFILE="vc/bin/vcvars32.bat"
27896    else
27897      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27898    fi
27899
27900
27901  windows_path="$VS_BASE"
27902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903    unix_path=`$CYGPATH -u "$windows_path"`
27904    VS_BASE="$unix_path"
27905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27907    VS_BASE="$unix_path"
27908  fi
27909
27910    if test -d "$VS_BASE"; then
27911      if test -f "$VS_BASE/$VCVARSFILE"; then
27912        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27913$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27914        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27915        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27916        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27917        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27918      else
27919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27920$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27922$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27923      fi
27924    fi
27925  fi
27926
27927
27928  if test "x$VS_ENV_CMD" = x; then
27929    VS_VERSION="${VS_VERSION}"
27930    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27931    METHOD="well-known name"
27932
27933    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27934      VCVARSFILE="vc/bin/vcvars32.bat"
27935    else
27936      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27937    fi
27938
27939
27940  windows_path="$VS_BASE"
27941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27942    unix_path=`$CYGPATH -u "$windows_path"`
27943    VS_BASE="$unix_path"
27944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27946    VS_BASE="$unix_path"
27947  fi
27948
27949    if test -d "$VS_BASE"; then
27950      if test -f "$VS_BASE/$VCVARSFILE"; then
27951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27952$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27953        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27954        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27955        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27956        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27957      else
27958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27959$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27961$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27962      fi
27963    fi
27964  fi
27965
27966
27967  if test "x$SDK_INSTALL_DIR" != x; then
27968    if test "x$ProgramW6432" != x; then
27969
27970  if test "x$VS_ENV_CMD" = x; then
27971    VS_VERSION="${VS_VERSION}"
27972    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27973    METHOD="well-known name"
27974
27975  windows_path="$WIN_SDK_BASE"
27976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27977    unix_path=`$CYGPATH -u "$windows_path"`
27978    WIN_SDK_BASE="$unix_path"
27979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27981    WIN_SDK_BASE="$unix_path"
27982  fi
27983
27984    if test -d "$WIN_SDK_BASE"; then
27985      # There have been cases of partial or broken SDK installations. A missing
27986      # lib dir is not going to work.
27987      if test ! -d "$WIN_SDK_BASE/lib"; then
27988        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27989$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27990        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27991$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27992      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27993        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27994$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27995        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27996        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27997          VS_ENV_ARGS="/x86"
27998        else
27999          VS_ENV_ARGS="/x64"
28000        fi
28001        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28002        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28003        # TODO: improve detection for other versions of SDK
28004        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28005      else
28006        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28007$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28008        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28009$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28010      fi
28011    fi
28012  fi
28013
28014    fi
28015    if test "x$PROGRAMW6432" != x; then
28016
28017  if test "x$VS_ENV_CMD" = x; then
28018    VS_VERSION="${VS_VERSION}"
28019    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
28020    METHOD="well-known name"
28021
28022  windows_path="$WIN_SDK_BASE"
28023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28024    unix_path=`$CYGPATH -u "$windows_path"`
28025    WIN_SDK_BASE="$unix_path"
28026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28028    WIN_SDK_BASE="$unix_path"
28029  fi
28030
28031    if test -d "$WIN_SDK_BASE"; then
28032      # There have been cases of partial or broken SDK installations. A missing
28033      # lib dir is not going to work.
28034      if test ! -d "$WIN_SDK_BASE/lib"; then
28035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28036$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28037        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28038$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28039      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28041$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28042        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28043        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28044          VS_ENV_ARGS="/x86"
28045        else
28046          VS_ENV_ARGS="/x64"
28047        fi
28048        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28049        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28050        # TODO: improve detection for other versions of SDK
28051        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28052      else
28053        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28054$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28055        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28056$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28057      fi
28058    fi
28059  fi
28060
28061    fi
28062    if test "x$PROGRAMFILES" != x; then
28063
28064  if test "x$VS_ENV_CMD" = x; then
28065    VS_VERSION="${VS_VERSION}"
28066    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
28067    METHOD="well-known name"
28068
28069  windows_path="$WIN_SDK_BASE"
28070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28071    unix_path=`$CYGPATH -u "$windows_path"`
28072    WIN_SDK_BASE="$unix_path"
28073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28075    WIN_SDK_BASE="$unix_path"
28076  fi
28077
28078    if test -d "$WIN_SDK_BASE"; then
28079      # There have been cases of partial or broken SDK installations. A missing
28080      # lib dir is not going to work.
28081      if test ! -d "$WIN_SDK_BASE/lib"; then
28082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28083$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28084        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28085$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28086      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28088$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28089        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28090        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28091          VS_ENV_ARGS="/x86"
28092        else
28093          VS_ENV_ARGS="/x64"
28094        fi
28095        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28096        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28097        # TODO: improve detection for other versions of SDK
28098        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28099      else
28100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28103$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28104      fi
28105    fi
28106  fi
28107
28108    fi
28109
28110  if test "x$VS_ENV_CMD" = x; then
28111    VS_VERSION="${VS_VERSION}"
28112    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
28113    METHOD="well-known name"
28114
28115  windows_path="$WIN_SDK_BASE"
28116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28117    unix_path=`$CYGPATH -u "$windows_path"`
28118    WIN_SDK_BASE="$unix_path"
28119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28121    WIN_SDK_BASE="$unix_path"
28122  fi
28123
28124    if test -d "$WIN_SDK_BASE"; then
28125      # There have been cases of partial or broken SDK installations. A missing
28126      # lib dir is not going to work.
28127      if test ! -d "$WIN_SDK_BASE/lib"; then
28128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28129$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28130        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28131$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28132      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28133        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28134$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28135        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28136        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28137          VS_ENV_ARGS="/x86"
28138        else
28139          VS_ENV_ARGS="/x64"
28140        fi
28141        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28142        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28143        # TODO: improve detection for other versions of SDK
28144        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28145      else
28146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28147$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28148        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28149$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28150      fi
28151    fi
28152  fi
28153
28154
28155  if test "x$VS_ENV_CMD" = x; then
28156    VS_VERSION="${VS_VERSION}"
28157    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
28158    METHOD="well-known name"
28159
28160  windows_path="$WIN_SDK_BASE"
28161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28162    unix_path=`$CYGPATH -u "$windows_path"`
28163    WIN_SDK_BASE="$unix_path"
28164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28166    WIN_SDK_BASE="$unix_path"
28167  fi
28168
28169    if test -d "$WIN_SDK_BASE"; then
28170      # There have been cases of partial or broken SDK installations. A missing
28171      # lib dir is not going to work.
28172      if test ! -d "$WIN_SDK_BASE/lib"; then
28173        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28174$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28176$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28177      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28179$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28180        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28181        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28182          VS_ENV_ARGS="/x86"
28183        else
28184          VS_ENV_ARGS="/x64"
28185        fi
28186        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28187        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28188        # TODO: improve detection for other versions of SDK
28189        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28190      else
28191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28192$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28193        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28194$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28195      fi
28196    fi
28197  fi
28198
28199  fi
28200
28201    if test "x$VS_ENV_CMD" != x; then
28202      TOOLCHAIN_VERSION=$VS_VERSION
28203      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
28204      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
28205      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
28206      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
28207      # The rest of the variables are already evaled while probing
28208      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
28209$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
28210      break
28211    fi
28212  done
28213
28214
28215  # If we have a devkit, skip all of the below.
28216  if test "x$DEVKIT_VS_VERSION" = x; then
28217    if test "x$VS_ENV_CMD" != x; then
28218      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
28219
28220  # Only process if variable expands to non-empty
28221
28222  if test "x$VS_ENV_CMD" != x; then
28223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28224
28225  # First separate the path from the arguments. This will split at the first
28226  # space.
28227  complete="$VS_ENV_CMD"
28228  path="${complete%% *}"
28229  tmp="$complete EOL"
28230  arguments="${tmp#* }"
28231
28232  # Input might be given as Windows format, start by converting to
28233  # unix format.
28234  new_path=`$CYGPATH -u "$path"`
28235
28236  # Now try to locate executable using which
28237  new_path=`$WHICH "$new_path" 2> /dev/null`
28238  # bat and cmd files are not always considered executable in cygwin causing which
28239  # to not find them
28240  if test "x$new_path" = x \
28241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28243    new_path=`$CYGPATH -u "$path"`
28244  fi
28245  if test "x$new_path" = x; then
28246    # Oops. Which didn't find the executable.
28247    # The splitting of arguments from the executable at a space might have been incorrect,
28248    # since paths with space are more likely in Windows. Give it another try with the whole
28249    # argument.
28250    path="$complete"
28251    arguments="EOL"
28252    new_path=`$CYGPATH -u "$path"`
28253    new_path=`$WHICH "$new_path" 2> /dev/null`
28254    # bat and cmd files are not always considered executable in cygwin causing which
28255    # to not find them
28256    if test "x$new_path" = x \
28257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28259      new_path=`$CYGPATH -u "$path"`
28260    fi
28261    if test "x$new_path" = x; then
28262      # It's still not found. Now this is an unrecoverable error.
28263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28264$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28265      has_space=`$ECHO "$complete" | $GREP " "`
28266      if test "x$has_space" != x; then
28267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28269      fi
28270      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28271    fi
28272  fi
28273
28274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28277  # "foo.exe" is OK but "foo" is an error.
28278  #
28279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28280  # It is also a way to make sure we got the proper file name for the real test later on.
28281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28282  if test "x$test_shortpath" = x; then
28283    # Short path failed, file does not exist as specified.
28284    # Try adding .exe or .cmd
28285    if test -f "${new_path}.exe"; then
28286      input_to_shortpath="${new_path}.exe"
28287    elif test -f "${new_path}.cmd"; then
28288      input_to_shortpath="${new_path}.cmd"
28289    else
28290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
28291$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
28292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28294      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28295    fi
28296  else
28297    input_to_shortpath="$new_path"
28298  fi
28299
28300  # Call helper function which possibly converts this using DOS-style short mode.
28301  # If so, the updated path is stored in $new_path.
28302  new_path="$input_to_shortpath"
28303
28304  input_path="$input_to_shortpath"
28305  # Check if we need to convert this using DOS-style short mode. If the path
28306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28307  # take no chances and rewrite it.
28308  # Note: m4 eats our [], so we need to use [ and ] instead.
28309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28310  if test "x$has_forbidden_chars" != x; then
28311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28315      # Going to short mode and back again did indeed matter. Since short mode is
28316      # case insensitive, let's make it lowercase to improve readability.
28317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28318      # Now convert it back to Unix-style (cygpath)
28319      input_path=`$CYGPATH -u "$shortmode_path"`
28320      new_path="$input_path"
28321    fi
28322  fi
28323
28324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28325  if test "x$test_cygdrive_prefix" = x; then
28326    # As a simple fix, exclude /usr/bin since it's not a real path.
28327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28329      # a path prefixed by /cygdrive for fixpath to work.
28330      new_path="$CYGWIN_ROOT_PATH$input_path"
28331    fi
28332  fi
28333
28334  # remove trailing .exe if any
28335  new_path="${new_path/%.exe/}"
28336
28337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28338
28339  # First separate the path from the arguments. This will split at the first
28340  # space.
28341  complete="$VS_ENV_CMD"
28342  path="${complete%% *}"
28343  tmp="$complete EOL"
28344  arguments="${tmp#* }"
28345
28346  # Input might be given as Windows format, start by converting to
28347  # unix format.
28348  new_path="$path"
28349
28350  windows_path="$new_path"
28351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28352    unix_path=`$CYGPATH -u "$windows_path"`
28353    new_path="$unix_path"
28354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28356    new_path="$unix_path"
28357  fi
28358
28359
28360  # Now try to locate executable using which
28361  new_path=`$WHICH "$new_path" 2> /dev/null`
28362
28363  if test "x$new_path" = x; then
28364    # Oops. Which didn't find the executable.
28365    # The splitting of arguments from the executable at a space might have been incorrect,
28366    # since paths with space are more likely in Windows. Give it another try with the whole
28367    # argument.
28368    path="$complete"
28369    arguments="EOL"
28370    new_path="$path"
28371
28372  windows_path="$new_path"
28373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28374    unix_path=`$CYGPATH -u "$windows_path"`
28375    new_path="$unix_path"
28376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28378    new_path="$unix_path"
28379  fi
28380
28381
28382    new_path=`$WHICH "$new_path" 2> /dev/null`
28383    # bat and cmd files are not always considered executable in MSYS causing which
28384    # to not find them
28385    if test "x$new_path" = x \
28386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28388      new_path="$path"
28389
28390  windows_path="$new_path"
28391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28392    unix_path=`$CYGPATH -u "$windows_path"`
28393    new_path="$unix_path"
28394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28396    new_path="$unix_path"
28397  fi
28398
28399    fi
28400
28401    if test "x$new_path" = x; then
28402      # It's still not found. Now this is an unrecoverable error.
28403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28404$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28405      has_space=`$ECHO "$complete" | $GREP " "`
28406      if test "x$has_space" != x; then
28407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28409      fi
28410      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28411    fi
28412  fi
28413
28414  # Now new_path has a complete unix path to the binary
28415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28416    # Keep paths in /bin as-is, but remove trailing .exe if any
28417    new_path="${new_path/%.exe/}"
28418    # Do not save /bin paths to all_fixpath_prefixes!
28419  else
28420    # Not in mixed or Windows style, start by that.
28421    new_path=`cmd //c echo $new_path`
28422
28423  input_path="$new_path"
28424  # Check if we need to convert this using DOS-style short mode. If the path
28425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28426  # take no chances and rewrite it.
28427  # Note: m4 eats our [], so we need to use [ and ] instead.
28428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28429  if test "x$has_forbidden_chars" != x; then
28430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28432  fi
28433
28434    # Output is in $new_path
28435
28436  windows_path="$new_path"
28437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28438    unix_path=`$CYGPATH -u "$windows_path"`
28439    new_path="$unix_path"
28440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28442    new_path="$unix_path"
28443  fi
28444
28445    # remove trailing .exe if any
28446    new_path="${new_path/%.exe/}"
28447
28448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28450  fi
28451
28452    else
28453      # We're on a unix platform. Hooray! :)
28454      # First separate the path from the arguments. This will split at the first
28455      # space.
28456      complete="$VS_ENV_CMD"
28457      path="${complete%% *}"
28458      tmp="$complete EOL"
28459      arguments="${tmp#* }"
28460
28461      # Cannot rely on the command "which" here since it doesn't always work.
28462      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28463      if test -z "$is_absolute_path"; then
28464        # Path to executable is not absolute. Find it.
28465        IFS_save="$IFS"
28466        IFS=:
28467        for p in $PATH; do
28468          if test -f "$p/$path" && test -x "$p/$path"; then
28469            new_path="$p/$path"
28470            break
28471          fi
28472        done
28473        IFS="$IFS_save"
28474      else
28475        # This is an absolute path, we can use it without further modifications.
28476        new_path="$path"
28477      fi
28478
28479      if test "x$new_path" = x; then
28480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28481$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28482        has_space=`$ECHO "$complete" | $GREP " "`
28483        if test "x$has_space" != x; then
28484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28486        fi
28487        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28488      fi
28489    fi
28490
28491    # Now join together the path and the arguments once again
28492    if test "x$arguments" != xEOL; then
28493      new_complete="$new_path ${arguments% *}"
28494    else
28495      new_complete="$new_path"
28496    fi
28497
28498    if test "x$complete" != "x$new_complete"; then
28499      VS_ENV_CMD="$new_complete"
28500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28501$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28502    fi
28503  fi
28504
28505
28506      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28507      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28508$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28509
28510      # We need to create a couple of temporary files.
28511      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28512      $MKDIR -p $VS_ENV_TMP_DIR
28513
28514      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28515      # Instead create a shell script which will set the relevant variables when run.
28516      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28517
28518  unix_path="$WINPATH_VS_ENV_CMD"
28519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28520    windows_path=`$CYGPATH -m "$unix_path"`
28521    WINPATH_VS_ENV_CMD="$windows_path"
28522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28523    windows_path=`cmd //c echo $unix_path`
28524    WINPATH_VS_ENV_CMD="$windows_path"
28525  fi
28526
28527      WINPATH_BASH="$BASH"
28528
28529  unix_path="$WINPATH_BASH"
28530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28531    windows_path=`$CYGPATH -m "$unix_path"`
28532    WINPATH_BASH="$windows_path"
28533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28534    windows_path=`cmd //c echo $unix_path`
28535    WINPATH_BASH="$windows_path"
28536  fi
28537
28538
28539      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28540      # script (executable by bash) that will setup the important variables.
28541      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28542      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28543      # This will end up something like:
28544      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28545      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28546      # These will end up something like:
28547      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28548      # The trailing space for everyone except PATH is no typo, but is needed due
28549      # to trailing \ in the Windows paths. These will be stripped later.
28550      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28551          >> $EXTRACT_VC_ENV_BAT_FILE
28552      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28553          >> $EXTRACT_VC_ENV_BAT_FILE
28554      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28555          >> $EXTRACT_VC_ENV_BAT_FILE
28556      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28557          >> $EXTRACT_VC_ENV_BAT_FILE
28558      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28559          >> $EXTRACT_VC_ENV_BAT_FILE
28560      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28561          >> $EXTRACT_VC_ENV_BAT_FILE
28562
28563      # Now execute the newly created bat file.
28564      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28565      # Change directory so we don't need to mess with Windows paths in redirects.
28566      cd $VS_ENV_TMP_DIR
28567      cmd /c extract-vs-env.bat | $CAT
28568      cd $CURDIR
28569
28570      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28571        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28572$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28573        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28574$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28575        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28576$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28577        as_fn_error $? "Cannot continue" "$LINENO" 5
28578      fi
28579
28580      # Now set all paths and other env variables. This will allow the rest of
28581      # the configure script to find and run the compiler in the proper way.
28582      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28583$as_echo "$as_me: Setting extracted environment variables" >&6;}
28584      . $VS_ENV_TMP_DIR/set-vs-env.sh
28585      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28586      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28587    else
28588      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28589      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28590$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28591    fi
28592  fi
28593
28594  # At this point, we should have correct variables in the environment, or we can't continue.
28595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28596$as_echo_n "checking for Visual Studio variables... " >&6; }
28597
28598  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28599      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28600    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28602$as_echo "present but broken" >&6; }
28603      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28604    else
28605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28606$as_echo "ok" >&6; }
28607      # Remove any trailing "\" ";" and " " from the variables.
28608      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28609      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28610      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28611      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28612      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28613      # Remove any paths containing # (typically F#) as that messes up make. This
28614      # is needed if visual studio was installed with F# support.
28615      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28616
28617
28618
28619
28620
28621      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28622      OLDIFS="$IFS"
28623      IFS=";"
28624      for i in $VS_INCLUDE; do
28625        ipath=$i
28626        # Only process non-empty elements
28627        if test "x$ipath" != x; then
28628          IFS="$OLDIFS"
28629          # Check that directory exists before calling fixup_path
28630          testpath=$ipath
28631
28632  windows_path="$testpath"
28633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28634    unix_path=`$CYGPATH -u "$windows_path"`
28635    testpath="$unix_path"
28636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28638    testpath="$unix_path"
28639  fi
28640
28641          if test -d "$testpath"; then
28642
28643  # Only process if variable expands to non-empty
28644
28645  if test "x$ipath" != x; then
28646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28647
28648  # Input might be given as Windows format, start by converting to
28649  # unix format.
28650  path="$ipath"
28651  new_path=`$CYGPATH -u "$path"`
28652
28653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28656  # "foo.exe" is OK but "foo" is an error.
28657  #
28658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28659  # It is also a way to make sure we got the proper file name for the real test later on.
28660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28661  if test "x$test_shortpath" = x; then
28662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28663$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28664    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28665  fi
28666
28667  # Call helper function which possibly converts this using DOS-style short mode.
28668  # If so, the updated path is stored in $new_path.
28669
28670  input_path="$new_path"
28671  # Check if we need to convert this using DOS-style short mode. If the path
28672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28673  # take no chances and rewrite it.
28674  # Note: m4 eats our [], so we need to use [ and ] instead.
28675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28676  if test "x$has_forbidden_chars" != x; then
28677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28681      # Going to short mode and back again did indeed matter. Since short mode is
28682      # case insensitive, let's make it lowercase to improve readability.
28683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28684      # Now convert it back to Unix-style (cygpath)
28685      input_path=`$CYGPATH -u "$shortmode_path"`
28686      new_path="$input_path"
28687    fi
28688  fi
28689
28690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28691  if test "x$test_cygdrive_prefix" = x; then
28692    # As a simple fix, exclude /usr/bin since it's not a real path.
28693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28695      # a path prefixed by /cygdrive for fixpath to work.
28696      new_path="$CYGWIN_ROOT_PATH$input_path"
28697    fi
28698  fi
28699
28700
28701  if test "x$path" != "x$new_path"; then
28702    ipath="$new_path"
28703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28704$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28705  fi
28706
28707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28708
28709  path="$ipath"
28710  has_colon=`$ECHO $path | $GREP ^.:`
28711  new_path="$path"
28712  if test "x$has_colon" = x; then
28713    # Not in mixed or Windows style, start by that.
28714    new_path=`cmd //c echo $path`
28715  fi
28716
28717
28718  input_path="$new_path"
28719  # Check if we need to convert this using DOS-style short mode. If the path
28720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28721  # take no chances and rewrite it.
28722  # Note: m4 eats our [], so we need to use [ and ] instead.
28723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28724  if test "x$has_forbidden_chars" != x; then
28725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28727  fi
28728
28729
28730  windows_path="$new_path"
28731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28732    unix_path=`$CYGPATH -u "$windows_path"`
28733    new_path="$unix_path"
28734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28736    new_path="$unix_path"
28737  fi
28738
28739  if test "x$path" != "x$new_path"; then
28740    ipath="$new_path"
28741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28742$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28743  fi
28744
28745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28747
28748    else
28749      # We're on a unix platform. Hooray! :)
28750      path="$ipath"
28751      has_space=`$ECHO "$path" | $GREP " "`
28752      if test "x$has_space" != x; then
28753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28754$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28756      fi
28757
28758      # Use eval to expand a potential ~
28759      eval path="$path"
28760      if test ! -f "$path" && test ! -d "$path"; then
28761        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28762      fi
28763
28764      ipath="`cd "$path"; $THEPWDCMD -L`"
28765    fi
28766  fi
28767
28768            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28769          fi
28770          IFS=";"
28771        fi
28772      done
28773      # Convert VS_LIB into SYSROOT_LDFLAGS
28774      for i in $VS_LIB; do
28775        libpath=$i
28776        # Only process non-empty elements
28777        if test "x$libpath" != x; then
28778          IFS="$OLDIFS"
28779          # Check that directory exists before calling fixup_path
28780          testpath=$libpath
28781
28782  windows_path="$testpath"
28783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28784    unix_path=`$CYGPATH -u "$windows_path"`
28785    testpath="$unix_path"
28786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28788    testpath="$unix_path"
28789  fi
28790
28791          if test -d "$testpath"; then
28792
28793  # Only process if variable expands to non-empty
28794
28795  if test "x$libpath" != x; then
28796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28797
28798  # Input might be given as Windows format, start by converting to
28799  # unix format.
28800  path="$libpath"
28801  new_path=`$CYGPATH -u "$path"`
28802
28803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28806  # "foo.exe" is OK but "foo" is an error.
28807  #
28808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28809  # It is also a way to make sure we got the proper file name for the real test later on.
28810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28811  if test "x$test_shortpath" = x; then
28812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28813$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28814    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28815  fi
28816
28817  # Call helper function which possibly converts this using DOS-style short mode.
28818  # If so, the updated path is stored in $new_path.
28819
28820  input_path="$new_path"
28821  # Check if we need to convert this using DOS-style short mode. If the path
28822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28823  # take no chances and rewrite it.
28824  # Note: m4 eats our [], so we need to use [ and ] instead.
28825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28826  if test "x$has_forbidden_chars" != x; then
28827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28831      # Going to short mode and back again did indeed matter. Since short mode is
28832      # case insensitive, let's make it lowercase to improve readability.
28833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28834      # Now convert it back to Unix-style (cygpath)
28835      input_path=`$CYGPATH -u "$shortmode_path"`
28836      new_path="$input_path"
28837    fi
28838  fi
28839
28840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28841  if test "x$test_cygdrive_prefix" = x; then
28842    # As a simple fix, exclude /usr/bin since it's not a real path.
28843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28845      # a path prefixed by /cygdrive for fixpath to work.
28846      new_path="$CYGWIN_ROOT_PATH$input_path"
28847    fi
28848  fi
28849
28850
28851  if test "x$path" != "x$new_path"; then
28852    libpath="$new_path"
28853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28854$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28855  fi
28856
28857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28858
28859  path="$libpath"
28860  has_colon=`$ECHO $path | $GREP ^.:`
28861  new_path="$path"
28862  if test "x$has_colon" = x; then
28863    # Not in mixed or Windows style, start by that.
28864    new_path=`cmd //c echo $path`
28865  fi
28866
28867
28868  input_path="$new_path"
28869  # Check if we need to convert this using DOS-style short mode. If the path
28870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28871  # take no chances and rewrite it.
28872  # Note: m4 eats our [], so we need to use [ and ] instead.
28873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28874  if test "x$has_forbidden_chars" != x; then
28875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28877  fi
28878
28879
28880  windows_path="$new_path"
28881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882    unix_path=`$CYGPATH -u "$windows_path"`
28883    new_path="$unix_path"
28884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28886    new_path="$unix_path"
28887  fi
28888
28889  if test "x$path" != "x$new_path"; then
28890    libpath="$new_path"
28891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28892$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28893  fi
28894
28895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28897
28898    else
28899      # We're on a unix platform. Hooray! :)
28900      path="$libpath"
28901      has_space=`$ECHO "$path" | $GREP " "`
28902      if test "x$has_space" != x; then
28903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28904$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28906      fi
28907
28908      # Use eval to expand a potential ~
28909      eval path="$path"
28910      if test ! -f "$path" && test ! -d "$path"; then
28911        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28912      fi
28913
28914      libpath="`cd "$path"; $THEPWDCMD -L`"
28915    fi
28916  fi
28917
28918            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28919          fi
28920          IFS=";"
28921        fi
28922      done
28923      IFS="$OLDIFS"
28924    fi
28925  else
28926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28927$as_echo "not found" >&6; }
28928
28929    if test "x$VS_ENV_CMD" = x; then
28930      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28931$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28932      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28933$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28934    else
28935      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28936$as_echo "$as_me: Running the extraction script failed." >&6;}
28937    fi
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28939$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28940    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28941$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28942    as_fn_error $? "Cannot continue" "$LINENO" 5
28943  fi
28944
28945    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28946    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28947    PATH="$VS_PATH"
28948    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28949    export INCLUDE="$VS_INCLUDE"
28950    export LIB="$VS_LIB"
28951  fi
28952
28953  # For solaris we really need solaris tools, and not the GNU equivalent.
28954  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28955  # so add that to path before starting to probe.
28956  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28957  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28958    PATH="/usr/ccs/bin:$PATH"
28959  fi
28960
28961  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28962  # override all other locations.
28963  if test "x$TOOLCHAIN_PATH" != x; then
28964    PATH=$TOOLCHAIN_PATH:$PATH
28965  fi
28966
28967
28968  #
28969  # Setup the compilers (CC and CXX)
28970  #
28971
28972  COMPILER_NAME=C
28973  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28974
28975  if test "x$CC" != x; then
28976    # User has supplied compiler name already, always let that override.
28977    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28978$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28979    if test "x`basename $CC`" = "x$CC"; then
28980      # A command without a complete path is provided, search $PATH.
28981
28982      for ac_prog in $CC
28983do
28984  # Extract the first word of "$ac_prog", so it can be a program name with args.
28985set dummy $ac_prog; ac_word=$2
28986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28987$as_echo_n "checking for $ac_word... " >&6; }
28988if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28989  $as_echo_n "(cached) " >&6
28990else
28991  case $POTENTIAL_CC in
28992  [\\/]* | ?:[\\/]*)
28993  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28994  ;;
28995  *)
28996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28997for as_dir in $PATH
28998do
28999  IFS=$as_save_IFS
29000  test -z "$as_dir" && as_dir=.
29001    for ac_exec_ext in '' $ac_executable_extensions; do
29002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29003    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29005    break 2
29006  fi
29007done
29008  done
29009IFS=$as_save_IFS
29010
29011  ;;
29012esac
29013fi
29014POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29015if test -n "$POTENTIAL_CC"; then
29016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29017$as_echo "$POTENTIAL_CC" >&6; }
29018else
29019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29020$as_echo "no" >&6; }
29021fi
29022
29023
29024  test -n "$POTENTIAL_CC" && break
29025done
29026
29027      if test "x$POTENTIAL_CC" != x; then
29028        CC=$POTENTIAL_CC
29029      else
29030        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29031      fi
29032    else
29033      # Otherwise it might already be a complete path
29034      if test ! -x "$CC"; then
29035        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29036      fi
29037    fi
29038  else
29039    # No user supplied value. Locate compiler ourselves.
29040
29041    # If we are cross compiling, assume cross compilation tools follows the
29042    # cross compilation standard where they are prefixed with the autoconf
29043    # standard name for the target. For example the binary
29044    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29045    # If we are not cross compiling, then the default compiler name will be
29046    # used.
29047
29048    CC=
29049    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29050    # before checking the rest of the PATH.
29051    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29052    # step, this should not be necessary.
29053    if test -n "$TOOLCHAIN_PATH"; then
29054      PATH_save="$PATH"
29055      PATH="$TOOLCHAIN_PATH"
29056      for ac_prog in $SEARCH_LIST
29057do
29058  # Extract the first word of "$ac_prog", so it can be a program name with args.
29059set dummy $ac_prog; ac_word=$2
29060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29061$as_echo_n "checking for $ac_word... " >&6; }
29062if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
29063  $as_echo_n "(cached) " >&6
29064else
29065  case $TOOLCHAIN_PATH_CC in
29066  [\\/]* | ?:[\\/]*)
29067  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
29068  ;;
29069  *)
29070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29071for as_dir in $PATH
29072do
29073  IFS=$as_save_IFS
29074  test -z "$as_dir" && as_dir=.
29075    for ac_exec_ext in '' $ac_executable_extensions; do
29076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29077    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
29078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29079    break 2
29080  fi
29081done
29082  done
29083IFS=$as_save_IFS
29084
29085  ;;
29086esac
29087fi
29088TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
29089if test -n "$TOOLCHAIN_PATH_CC"; then
29090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
29091$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
29092else
29093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29094$as_echo "no" >&6; }
29095fi
29096
29097
29098  test -n "$TOOLCHAIN_PATH_CC" && break
29099done
29100
29101      CC=$TOOLCHAIN_PATH_CC
29102      PATH="$PATH_save"
29103    fi
29104
29105    # AC_PATH_PROGS can't be run multiple times with the same variable,
29106    # so create a new name for this run.
29107    if test "x$CC" = x; then
29108      for ac_prog in $SEARCH_LIST
29109do
29110  # Extract the first word of "$ac_prog", so it can be a program name with args.
29111set dummy $ac_prog; ac_word=$2
29112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29113$as_echo_n "checking for $ac_word... " >&6; }
29114if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29115  $as_echo_n "(cached) " >&6
29116else
29117  case $POTENTIAL_CC in
29118  [\\/]* | ?:[\\/]*)
29119  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29120  ;;
29121  *)
29122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29123for as_dir in $PATH
29124do
29125  IFS=$as_save_IFS
29126  test -z "$as_dir" && as_dir=.
29127    for ac_exec_ext in '' $ac_executable_extensions; do
29128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29129    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29131    break 2
29132  fi
29133done
29134  done
29135IFS=$as_save_IFS
29136
29137  ;;
29138esac
29139fi
29140POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29141if test -n "$POTENTIAL_CC"; then
29142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29143$as_echo "$POTENTIAL_CC" >&6; }
29144else
29145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29146$as_echo "no" >&6; }
29147fi
29148
29149
29150  test -n "$POTENTIAL_CC" && break
29151done
29152
29153      CC=$POTENTIAL_CC
29154    fi
29155
29156    if test "x$CC" = x; then
29157
29158  # Print a helpful message on how to acquire the necessary build dependency.
29159  # devkit is the help tag: freetype, cups, alsa etc
29160  MISSING_DEPENDENCY=devkit
29161
29162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29163    cygwin_help $MISSING_DEPENDENCY
29164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29165    msys_help $MISSING_DEPENDENCY
29166  else
29167    PKGHANDLER_COMMAND=
29168
29169    case $PKGHANDLER in
29170      apt-get)
29171        apt_help     $MISSING_DEPENDENCY ;;
29172      yum)
29173        yum_help     $MISSING_DEPENDENCY ;;
29174      port)
29175        port_help    $MISSING_DEPENDENCY ;;
29176      pkgutil)
29177        pkgutil_help $MISSING_DEPENDENCY ;;
29178      pkgadd)
29179        pkgadd_help  $MISSING_DEPENDENCY ;;
29180    esac
29181
29182    if test "x$PKGHANDLER_COMMAND" != x; then
29183      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29184    fi
29185  fi
29186
29187      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29188    fi
29189  fi
29190
29191  # Now we have a compiler binary in CC. Make sure it's okay.
29192
29193  # Only process if variable expands to non-empty
29194
29195  if test "x$CC" != x; then
29196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29197
29198  # First separate the path from the arguments. This will split at the first
29199  # space.
29200  complete="$CC"
29201  path="${complete%% *}"
29202  tmp="$complete EOL"
29203  arguments="${tmp#* }"
29204
29205  # Input might be given as Windows format, start by converting to
29206  # unix format.
29207  new_path=`$CYGPATH -u "$path"`
29208
29209  # Now try to locate executable using which
29210  new_path=`$WHICH "$new_path" 2> /dev/null`
29211  # bat and cmd files are not always considered executable in cygwin causing which
29212  # to not find them
29213  if test "x$new_path" = x \
29214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29216    new_path=`$CYGPATH -u "$path"`
29217  fi
29218  if test "x$new_path" = x; then
29219    # Oops. Which didn't find the executable.
29220    # The splitting of arguments from the executable at a space might have been incorrect,
29221    # since paths with space are more likely in Windows. Give it another try with the whole
29222    # argument.
29223    path="$complete"
29224    arguments="EOL"
29225    new_path=`$CYGPATH -u "$path"`
29226    new_path=`$WHICH "$new_path" 2> /dev/null`
29227    # bat and cmd files are not always considered executable in cygwin causing which
29228    # to not find them
29229    if test "x$new_path" = x \
29230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29232      new_path=`$CYGPATH -u "$path"`
29233    fi
29234    if test "x$new_path" = x; then
29235      # It's still not found. Now this is an unrecoverable error.
29236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29237$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29238      has_space=`$ECHO "$complete" | $GREP " "`
29239      if test "x$has_space" != x; then
29240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29242      fi
29243      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29244    fi
29245  fi
29246
29247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29250  # "foo.exe" is OK but "foo" is an error.
29251  #
29252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29253  # It is also a way to make sure we got the proper file name for the real test later on.
29254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29255  if test "x$test_shortpath" = x; then
29256    # Short path failed, file does not exist as specified.
29257    # Try adding .exe or .cmd
29258    if test -f "${new_path}.exe"; then
29259      input_to_shortpath="${new_path}.exe"
29260    elif test -f "${new_path}.cmd"; then
29261      input_to_shortpath="${new_path}.cmd"
29262    else
29263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29264$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29267      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29268    fi
29269  else
29270    input_to_shortpath="$new_path"
29271  fi
29272
29273  # Call helper function which possibly converts this using DOS-style short mode.
29274  # If so, the updated path is stored in $new_path.
29275  new_path="$input_to_shortpath"
29276
29277  input_path="$input_to_shortpath"
29278  # Check if we need to convert this using DOS-style short mode. If the path
29279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29280  # take no chances and rewrite it.
29281  # Note: m4 eats our [], so we need to use [ and ] instead.
29282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29283  if test "x$has_forbidden_chars" != x; then
29284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29288      # Going to short mode and back again did indeed matter. Since short mode is
29289      # case insensitive, let's make it lowercase to improve readability.
29290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29291      # Now convert it back to Unix-style (cygpath)
29292      input_path=`$CYGPATH -u "$shortmode_path"`
29293      new_path="$input_path"
29294    fi
29295  fi
29296
29297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29298  if test "x$test_cygdrive_prefix" = x; then
29299    # As a simple fix, exclude /usr/bin since it's not a real path.
29300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29302      # a path prefixed by /cygdrive for fixpath to work.
29303      new_path="$CYGWIN_ROOT_PATH$input_path"
29304    fi
29305  fi
29306
29307  # remove trailing .exe if any
29308  new_path="${new_path/%.exe/}"
29309
29310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29311
29312  # First separate the path from the arguments. This will split at the first
29313  # space.
29314  complete="$CC"
29315  path="${complete%% *}"
29316  tmp="$complete EOL"
29317  arguments="${tmp#* }"
29318
29319  # Input might be given as Windows format, start by converting to
29320  # unix format.
29321  new_path="$path"
29322
29323  windows_path="$new_path"
29324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29325    unix_path=`$CYGPATH -u "$windows_path"`
29326    new_path="$unix_path"
29327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29329    new_path="$unix_path"
29330  fi
29331
29332
29333  # Now try to locate executable using which
29334  new_path=`$WHICH "$new_path" 2> /dev/null`
29335
29336  if test "x$new_path" = x; then
29337    # Oops. Which didn't find the executable.
29338    # The splitting of arguments from the executable at a space might have been incorrect,
29339    # since paths with space are more likely in Windows. Give it another try with the whole
29340    # argument.
29341    path="$complete"
29342    arguments="EOL"
29343    new_path="$path"
29344
29345  windows_path="$new_path"
29346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29347    unix_path=`$CYGPATH -u "$windows_path"`
29348    new_path="$unix_path"
29349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29351    new_path="$unix_path"
29352  fi
29353
29354
29355    new_path=`$WHICH "$new_path" 2> /dev/null`
29356    # bat and cmd files are not always considered executable in MSYS causing which
29357    # to not find them
29358    if test "x$new_path" = x \
29359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29361      new_path="$path"
29362
29363  windows_path="$new_path"
29364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29365    unix_path=`$CYGPATH -u "$windows_path"`
29366    new_path="$unix_path"
29367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29369    new_path="$unix_path"
29370  fi
29371
29372    fi
29373
29374    if test "x$new_path" = x; then
29375      # It's still not found. Now this is an unrecoverable error.
29376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29377$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29378      has_space=`$ECHO "$complete" | $GREP " "`
29379      if test "x$has_space" != x; then
29380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29382      fi
29383      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29384    fi
29385  fi
29386
29387  # Now new_path has a complete unix path to the binary
29388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29389    # Keep paths in /bin as-is, but remove trailing .exe if any
29390    new_path="${new_path/%.exe/}"
29391    # Do not save /bin paths to all_fixpath_prefixes!
29392  else
29393    # Not in mixed or Windows style, start by that.
29394    new_path=`cmd //c echo $new_path`
29395
29396  input_path="$new_path"
29397  # Check if we need to convert this using DOS-style short mode. If the path
29398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29399  # take no chances and rewrite it.
29400  # Note: m4 eats our [], so we need to use [ and ] instead.
29401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29402  if test "x$has_forbidden_chars" != x; then
29403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29405  fi
29406
29407    # Output is in $new_path
29408
29409  windows_path="$new_path"
29410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29411    unix_path=`$CYGPATH -u "$windows_path"`
29412    new_path="$unix_path"
29413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29415    new_path="$unix_path"
29416  fi
29417
29418    # remove trailing .exe if any
29419    new_path="${new_path/%.exe/}"
29420
29421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29423  fi
29424
29425    else
29426      # We're on a unix platform. Hooray! :)
29427      # First separate the path from the arguments. This will split at the first
29428      # space.
29429      complete="$CC"
29430      path="${complete%% *}"
29431      tmp="$complete EOL"
29432      arguments="${tmp#* }"
29433
29434      # Cannot rely on the command "which" here since it doesn't always work.
29435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29436      if test -z "$is_absolute_path"; then
29437        # Path to executable is not absolute. Find it.
29438        IFS_save="$IFS"
29439        IFS=:
29440        for p in $PATH; do
29441          if test -f "$p/$path" && test -x "$p/$path"; then
29442            new_path="$p/$path"
29443            break
29444          fi
29445        done
29446        IFS="$IFS_save"
29447      else
29448        # This is an absolute path, we can use it without further modifications.
29449        new_path="$path"
29450      fi
29451
29452      if test "x$new_path" = x; then
29453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29454$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29455        has_space=`$ECHO "$complete" | $GREP " "`
29456        if test "x$has_space" != x; then
29457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29459        fi
29460        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29461      fi
29462    fi
29463
29464    # Now join together the path and the arguments once again
29465    if test "x$arguments" != xEOL; then
29466      new_complete="$new_path ${arguments% *}"
29467    else
29468      new_complete="$new_path"
29469    fi
29470
29471    if test "x$complete" != "x$new_complete"; then
29472      CC="$new_complete"
29473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29474$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29475    fi
29476  fi
29477
29478  TEST_COMPILER="$CC"
29479  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29480  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29481  if test "x$OPENJDK_BUILD_OS" != xaix; then
29482    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29484$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29485
29486  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29487    # Follow a chain of symbolic links. Use readlink
29488    # where it exists, else fall back to horribly
29489    # complicated shell code.
29490    if test "x$READLINK_TESTED" != yes; then
29491      # On MacOSX there is a readlink tool with a different
29492      # purpose than the GNU readlink tool. Check the found readlink.
29493      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29494      if test "x$ISGNU" = x; then
29495        # A readlink that we do not know how to use.
29496        # Are there other non-GNU readlinks out there?
29497        READLINK_TESTED=yes
29498        READLINK=
29499      fi
29500    fi
29501
29502    if test "x$READLINK" != x; then
29503      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29504    else
29505      # Save the current directory for restoring afterwards
29506      STARTDIR=$PWD
29507      COUNTER=0
29508      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29509      sym_link_file=`$BASENAME $TEST_COMPILER`
29510      cd $sym_link_dir
29511      # Use -P flag to resolve symlinks in directories.
29512      cd `$THEPWDCMD -P`
29513      sym_link_dir=`$THEPWDCMD -P`
29514      # Resolve file symlinks
29515      while test $COUNTER -lt 20; do
29516        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29517        if test "x$ISLINK" == x; then
29518          # This is not a symbolic link! We are done!
29519          break
29520        fi
29521        # Again resolve directory symlinks since the target of the just found
29522        # link could be in a different directory
29523        cd `$DIRNAME $ISLINK`
29524        sym_link_dir=`$THEPWDCMD -P`
29525        sym_link_file=`$BASENAME $ISLINK`
29526        let COUNTER=COUNTER+1
29527      done
29528      cd $STARTDIR
29529      TEST_COMPILER=$sym_link_dir/$sym_link_file
29530    fi
29531  fi
29532
29533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29534$as_echo "$TEST_COMPILER" >&6; }
29535  fi
29536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29537$as_echo_n "checking if CC is disguised ccache... " >&6; }
29538
29539  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29540  if test "x$COMPILER_BASENAME" = "xccache"; then
29541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29542$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29543    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29544    # We want to control ccache invocation ourselves, so ignore this cc and try
29545    # searching again.
29546
29547    # Remove the path to the fake ccache cc from the PATH
29548    RETRY_COMPILER_SAVED_PATH="$PATH"
29549    COMPILER_DIRNAME=`$DIRNAME $CC`
29550    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29551
29552    # Try again looking for our compiler
29553    if test -n "$ac_tool_prefix"; then
29554  for ac_prog in $TOOLCHAIN_CC_BINARY
29555  do
29556    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29559$as_echo_n "checking for $ac_word... " >&6; }
29560if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29561  $as_echo_n "(cached) " >&6
29562else
29563  if test -n "$PROPER_COMPILER_CC"; then
29564  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29565else
29566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29567for as_dir in $PATH
29568do
29569  IFS=$as_save_IFS
29570  test -z "$as_dir" && as_dir=.
29571    for ac_exec_ext in '' $ac_executable_extensions; do
29572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29573    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29575    break 2
29576  fi
29577done
29578  done
29579IFS=$as_save_IFS
29580
29581fi
29582fi
29583PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29584if test -n "$PROPER_COMPILER_CC"; then
29585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29586$as_echo "$PROPER_COMPILER_CC" >&6; }
29587else
29588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29589$as_echo "no" >&6; }
29590fi
29591
29592
29593    test -n "$PROPER_COMPILER_CC" && break
29594  done
29595fi
29596if test -z "$PROPER_COMPILER_CC"; then
29597  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29598  for ac_prog in $TOOLCHAIN_CC_BINARY
29599do
29600  # Extract the first word of "$ac_prog", so it can be a program name with args.
29601set dummy $ac_prog; ac_word=$2
29602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29603$as_echo_n "checking for $ac_word... " >&6; }
29604if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29605  $as_echo_n "(cached) " >&6
29606else
29607  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29608  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29609else
29610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29611for as_dir in $PATH
29612do
29613  IFS=$as_save_IFS
29614  test -z "$as_dir" && as_dir=.
29615    for ac_exec_ext in '' $ac_executable_extensions; do
29616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29617    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29619    break 2
29620  fi
29621done
29622  done
29623IFS=$as_save_IFS
29624
29625fi
29626fi
29627ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29628if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29630$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29631else
29632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29633$as_echo "no" >&6; }
29634fi
29635
29636
29637  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29638done
29639
29640  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29641    PROPER_COMPILER_CC=""
29642  else
29643    case $cross_compiling:$ac_tool_warned in
29644yes:)
29645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29647ac_tool_warned=yes ;;
29648esac
29649    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29650  fi
29651fi
29652
29653
29654  # Only process if variable expands to non-empty
29655
29656  if test "x$PROPER_COMPILER_CC" != x; then
29657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29658
29659  # First separate the path from the arguments. This will split at the first
29660  # space.
29661  complete="$PROPER_COMPILER_CC"
29662  path="${complete%% *}"
29663  tmp="$complete EOL"
29664  arguments="${tmp#* }"
29665
29666  # Input might be given as Windows format, start by converting to
29667  # unix format.
29668  new_path=`$CYGPATH -u "$path"`
29669
29670  # Now try to locate executable using which
29671  new_path=`$WHICH "$new_path" 2> /dev/null`
29672  # bat and cmd files are not always considered executable in cygwin causing which
29673  # to not find them
29674  if test "x$new_path" = x \
29675      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29676      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29677    new_path=`$CYGPATH -u "$path"`
29678  fi
29679  if test "x$new_path" = x; then
29680    # Oops. Which didn't find the executable.
29681    # The splitting of arguments from the executable at a space might have been incorrect,
29682    # since paths with space are more likely in Windows. Give it another try with the whole
29683    # argument.
29684    path="$complete"
29685    arguments="EOL"
29686    new_path=`$CYGPATH -u "$path"`
29687    new_path=`$WHICH "$new_path" 2> /dev/null`
29688    # bat and cmd files are not always considered executable in cygwin causing which
29689    # to not find them
29690    if test "x$new_path" = x \
29691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29693      new_path=`$CYGPATH -u "$path"`
29694    fi
29695    if test "x$new_path" = x; then
29696      # It's still not found. Now this is an unrecoverable error.
29697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29698$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29699      has_space=`$ECHO "$complete" | $GREP " "`
29700      if test "x$has_space" != x; then
29701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29703      fi
29704      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29705    fi
29706  fi
29707
29708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29711  # "foo.exe" is OK but "foo" is an error.
29712  #
29713  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29714  # It is also a way to make sure we got the proper file name for the real test later on.
29715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29716  if test "x$test_shortpath" = x; then
29717    # Short path failed, file does not exist as specified.
29718    # Try adding .exe or .cmd
29719    if test -f "${new_path}.exe"; then
29720      input_to_shortpath="${new_path}.exe"
29721    elif test -f "${new_path}.cmd"; then
29722      input_to_shortpath="${new_path}.cmd"
29723    else
29724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29725$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29728      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29729    fi
29730  else
29731    input_to_shortpath="$new_path"
29732  fi
29733
29734  # Call helper function which possibly converts this using DOS-style short mode.
29735  # If so, the updated path is stored in $new_path.
29736  new_path="$input_to_shortpath"
29737
29738  input_path="$input_to_shortpath"
29739  # Check if we need to convert this using DOS-style short mode. If the path
29740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29741  # take no chances and rewrite it.
29742  # Note: m4 eats our [], so we need to use [ and ] instead.
29743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29744  if test "x$has_forbidden_chars" != x; then
29745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29749      # Going to short mode and back again did indeed matter. Since short mode is
29750      # case insensitive, let's make it lowercase to improve readability.
29751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29752      # Now convert it back to Unix-style (cygpath)
29753      input_path=`$CYGPATH -u "$shortmode_path"`
29754      new_path="$input_path"
29755    fi
29756  fi
29757
29758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29759  if test "x$test_cygdrive_prefix" = x; then
29760    # As a simple fix, exclude /usr/bin since it's not a real path.
29761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29763      # a path prefixed by /cygdrive for fixpath to work.
29764      new_path="$CYGWIN_ROOT_PATH$input_path"
29765    fi
29766  fi
29767
29768  # remove trailing .exe if any
29769  new_path="${new_path/%.exe/}"
29770
29771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29772
29773  # First separate the path from the arguments. This will split at the first
29774  # space.
29775  complete="$PROPER_COMPILER_CC"
29776  path="${complete%% *}"
29777  tmp="$complete EOL"
29778  arguments="${tmp#* }"
29779
29780  # Input might be given as Windows format, start by converting to
29781  # unix format.
29782  new_path="$path"
29783
29784  windows_path="$new_path"
29785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29786    unix_path=`$CYGPATH -u "$windows_path"`
29787    new_path="$unix_path"
29788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29790    new_path="$unix_path"
29791  fi
29792
29793
29794  # Now try to locate executable using which
29795  new_path=`$WHICH "$new_path" 2> /dev/null`
29796
29797  if test "x$new_path" = x; then
29798    # Oops. Which didn't find the executable.
29799    # The splitting of arguments from the executable at a space might have been incorrect,
29800    # since paths with space are more likely in Windows. Give it another try with the whole
29801    # argument.
29802    path="$complete"
29803    arguments="EOL"
29804    new_path="$path"
29805
29806  windows_path="$new_path"
29807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29808    unix_path=`$CYGPATH -u "$windows_path"`
29809    new_path="$unix_path"
29810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29812    new_path="$unix_path"
29813  fi
29814
29815
29816    new_path=`$WHICH "$new_path" 2> /dev/null`
29817    # bat and cmd files are not always considered executable in MSYS causing which
29818    # to not find them
29819    if test "x$new_path" = x \
29820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29822      new_path="$path"
29823
29824  windows_path="$new_path"
29825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29826    unix_path=`$CYGPATH -u "$windows_path"`
29827    new_path="$unix_path"
29828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29830    new_path="$unix_path"
29831  fi
29832
29833    fi
29834
29835    if test "x$new_path" = x; then
29836      # It's still not found. Now this is an unrecoverable error.
29837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29838$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29839      has_space=`$ECHO "$complete" | $GREP " "`
29840      if test "x$has_space" != x; then
29841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29843      fi
29844      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29845    fi
29846  fi
29847
29848  # Now new_path has a complete unix path to the binary
29849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29850    # Keep paths in /bin as-is, but remove trailing .exe if any
29851    new_path="${new_path/%.exe/}"
29852    # Do not save /bin paths to all_fixpath_prefixes!
29853  else
29854    # Not in mixed or Windows style, start by that.
29855    new_path=`cmd //c echo $new_path`
29856
29857  input_path="$new_path"
29858  # Check if we need to convert this using DOS-style short mode. If the path
29859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29860  # take no chances and rewrite it.
29861  # Note: m4 eats our [], so we need to use [ and ] instead.
29862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29863  if test "x$has_forbidden_chars" != x; then
29864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29866  fi
29867
29868    # Output is in $new_path
29869
29870  windows_path="$new_path"
29871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29872    unix_path=`$CYGPATH -u "$windows_path"`
29873    new_path="$unix_path"
29874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29876    new_path="$unix_path"
29877  fi
29878
29879    # remove trailing .exe if any
29880    new_path="${new_path/%.exe/}"
29881
29882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29884  fi
29885
29886    else
29887      # We're on a unix platform. Hooray! :)
29888      # First separate the path from the arguments. This will split at the first
29889      # space.
29890      complete="$PROPER_COMPILER_CC"
29891      path="${complete%% *}"
29892      tmp="$complete EOL"
29893      arguments="${tmp#* }"
29894
29895      # Cannot rely on the command "which" here since it doesn't always work.
29896      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29897      if test -z "$is_absolute_path"; then
29898        # Path to executable is not absolute. Find it.
29899        IFS_save="$IFS"
29900        IFS=:
29901        for p in $PATH; do
29902          if test -f "$p/$path" && test -x "$p/$path"; then
29903            new_path="$p/$path"
29904            break
29905          fi
29906        done
29907        IFS="$IFS_save"
29908      else
29909        # This is an absolute path, we can use it without further modifications.
29910        new_path="$path"
29911      fi
29912
29913      if test "x$new_path" = x; then
29914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29915$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29916        has_space=`$ECHO "$complete" | $GREP " "`
29917        if test "x$has_space" != x; then
29918          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29920        fi
29921        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29922      fi
29923    fi
29924
29925    # Now join together the path and the arguments once again
29926    if test "x$arguments" != xEOL; then
29927      new_complete="$new_path ${arguments% *}"
29928    else
29929      new_complete="$new_path"
29930    fi
29931
29932    if test "x$complete" != "x$new_complete"; then
29933      PROPER_COMPILER_CC="$new_complete"
29934      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29935$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29936    fi
29937  fi
29938
29939    PATH="$RETRY_COMPILER_SAVED_PATH"
29940
29941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29942$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29943
29944  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29945    # Follow a chain of symbolic links. Use readlink
29946    # where it exists, else fall back to horribly
29947    # complicated shell code.
29948    if test "x$READLINK_TESTED" != yes; then
29949      # On MacOSX there is a readlink tool with a different
29950      # purpose than the GNU readlink tool. Check the found readlink.
29951      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29952      if test "x$ISGNU" = x; then
29953        # A readlink that we do not know how to use.
29954        # Are there other non-GNU readlinks out there?
29955        READLINK_TESTED=yes
29956        READLINK=
29957      fi
29958    fi
29959
29960    if test "x$READLINK" != x; then
29961      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29962    else
29963      # Save the current directory for restoring afterwards
29964      STARTDIR=$PWD
29965      COUNTER=0
29966      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29967      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29968      cd $sym_link_dir
29969      # Use -P flag to resolve symlinks in directories.
29970      cd `$THEPWDCMD -P`
29971      sym_link_dir=`$THEPWDCMD -P`
29972      # Resolve file symlinks
29973      while test $COUNTER -lt 20; do
29974        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29975        if test "x$ISLINK" == x; then
29976          # This is not a symbolic link! We are done!
29977          break
29978        fi
29979        # Again resolve directory symlinks since the target of the just found
29980        # link could be in a different directory
29981        cd `$DIRNAME $ISLINK`
29982        sym_link_dir=`$THEPWDCMD -P`
29983        sym_link_file=`$BASENAME $ISLINK`
29984        let COUNTER=COUNTER+1
29985      done
29986      cd $STARTDIR
29987      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29988    fi
29989  fi
29990
29991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29992$as_echo "$PROPER_COMPILER_CC" >&6; }
29993    CC="$PROPER_COMPILER_CC"
29994  else
29995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29996$as_echo "no, keeping CC" >&6; }
29997  fi
29998
29999
30000  COMPILER=$CC
30001  COMPILER_NAME=$COMPILER_NAME
30002
30003  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30004    # cc -V output typically looks like
30005    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30006    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30007    # Check that this is likely to be the Solaris Studio cc.
30008    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30009    if test $? -ne 0; then
30010      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30011      { $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
30012$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30013      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30014$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30015      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30016$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30017      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30018    fi
30019    # Remove usage instructions (if present), and
30020    # collapse compiler output into a single line
30021    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30022        $SED -e 's/ *[Uu]sage:.*//'`
30023    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30024        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30025  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30026    # xlc -qversion output typically looks like
30027    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30028    #     Version: 11.01.0000.0015
30029    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30030    # Check that this is likely to be the IBM XL C compiler.
30031    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30032    if test $? -ne 0; then
30033      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30034      { $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
30035$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30036      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30037$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30038      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30039$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30040      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30041    fi
30042    # Collapse compiler output into a single line
30043    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30044    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30045        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30046  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30047    # There is no specific version flag, but all output starts with a version string.
30048    # First line typically looks something like:
30049    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30050    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30051    # Check that this is likely to be Microsoft CL.EXE.
30052    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30053    if test $? -ne 0; then
30054      { $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
30055$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30056      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30057$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30058      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30059    fi
30060    # Collapse compiler output into a single line
30061    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30062    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30063        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30064  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30065    # gcc --version output typically looks like
30066    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30067    #     Copyright (C) 2013 Free Software Foundation, Inc.
30068    #     This is free software; see the source for copying conditions.  There is NO
30069    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30070    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30071    # Check that this is likely to be GCC.
30072    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30073    if test $? -ne 0; then
30074      { $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
30075$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30077$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30078      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30079    fi
30080    # Remove Copyright and legalese from version string, and
30081    # collapse into a single line
30082    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30083        $SED -e 's/ *Copyright .*//'`
30084    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30085        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30086  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30087    # clang --version output typically looks like
30088    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30089    #    clang version 3.3 (tags/RELEASE_33/final)
30090    # or
30091    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30092    #    Target: x86_64-pc-linux-gnu
30093    #    Thread model: posix
30094    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30095    # Check that this is likely to be clang
30096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30097    if test $? -ne 0; then
30098      { $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
30099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30101$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30103    fi
30104    # Collapse compiler output into a single line
30105    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30107        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30108  else
30109      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30110  fi
30111  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30112  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30113  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30114  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
30115
30116  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30117$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30118
30119
30120  # Now that we have resolved CC ourself, let autoconf have its go at it
30121  ac_ext=c
30122ac_cpp='$CPP $CPPFLAGS'
30123ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30124ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30125ac_compiler_gnu=$ac_cv_c_compiler_gnu
30126if test -n "$ac_tool_prefix"; then
30127  for ac_prog in $CC
30128  do
30129    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30132$as_echo_n "checking for $ac_word... " >&6; }
30133if ${ac_cv_prog_CC+:} false; then :
30134  $as_echo_n "(cached) " >&6
30135else
30136  if test -n "$CC"; then
30137  ac_cv_prog_CC="$CC" # Let the user override the test.
30138else
30139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30140for as_dir in $PATH
30141do
30142  IFS=$as_save_IFS
30143  test -z "$as_dir" && as_dir=.
30144    for ac_exec_ext in '' $ac_executable_extensions; do
30145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30146    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30148    break 2
30149  fi
30150done
30151  done
30152IFS=$as_save_IFS
30153
30154fi
30155fi
30156CC=$ac_cv_prog_CC
30157if test -n "$CC"; then
30158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30159$as_echo "$CC" >&6; }
30160else
30161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30162$as_echo "no" >&6; }
30163fi
30164
30165
30166    test -n "$CC" && break
30167  done
30168fi
30169if test -z "$CC"; then
30170  ac_ct_CC=$CC
30171  for ac_prog in $CC
30172do
30173  # Extract the first word of "$ac_prog", so it can be a program name with args.
30174set dummy $ac_prog; ac_word=$2
30175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30176$as_echo_n "checking for $ac_word... " >&6; }
30177if ${ac_cv_prog_ac_ct_CC+:} false; then :
30178  $as_echo_n "(cached) " >&6
30179else
30180  if test -n "$ac_ct_CC"; then
30181  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30182else
30183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30184for as_dir in $PATH
30185do
30186  IFS=$as_save_IFS
30187  test -z "$as_dir" && as_dir=.
30188    for ac_exec_ext in '' $ac_executable_extensions; do
30189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30190    ac_cv_prog_ac_ct_CC="$ac_prog"
30191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30192    break 2
30193  fi
30194done
30195  done
30196IFS=$as_save_IFS
30197
30198fi
30199fi
30200ac_ct_CC=$ac_cv_prog_ac_ct_CC
30201if test -n "$ac_ct_CC"; then
30202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30203$as_echo "$ac_ct_CC" >&6; }
30204else
30205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30206$as_echo "no" >&6; }
30207fi
30208
30209
30210  test -n "$ac_ct_CC" && break
30211done
30212
30213  if test "x$ac_ct_CC" = x; then
30214    CC=""
30215  else
30216    case $cross_compiling:$ac_tool_warned in
30217yes:)
30218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30220ac_tool_warned=yes ;;
30221esac
30222    CC=$ac_ct_CC
30223  fi
30224fi
30225
30226
30227test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30229as_fn_error $? "no acceptable C compiler found in \$PATH
30230See \`config.log' for more details" "$LINENO" 5; }
30231
30232# Provide some information about the compiler.
30233$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30234set X $ac_compile
30235ac_compiler=$2
30236for ac_option in --version -v -V -qversion; do
30237  { { ac_try="$ac_compiler $ac_option >&5"
30238case "(($ac_try" in
30239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30240  *) ac_try_echo=$ac_try;;
30241esac
30242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30243$as_echo "$ac_try_echo"; } >&5
30244  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30245  ac_status=$?
30246  if test -s conftest.err; then
30247    sed '10a\
30248... rest of stderr output deleted ...
30249         10q' conftest.err >conftest.er1
30250    cat conftest.er1 >&5
30251  fi
30252  rm -f conftest.er1 conftest.err
30253  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30254  test $ac_status = 0; }
30255done
30256
30257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30258/* end confdefs.h.  */
30259
30260int
30261main ()
30262{
30263
30264  ;
30265  return 0;
30266}
30267_ACEOF
30268ac_clean_files_save=$ac_clean_files
30269ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30270# Try to create an executable without -o first, disregard a.out.
30271# It will help us diagnose broken compilers, and finding out an intuition
30272# of exeext.
30273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30274$as_echo_n "checking whether the C compiler works... " >&6; }
30275ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30276
30277# The possible output files:
30278ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30279
30280ac_rmfiles=
30281for ac_file in $ac_files
30282do
30283  case $ac_file in
30284    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30285    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30286  esac
30287done
30288rm -f $ac_rmfiles
30289
30290if { { ac_try="$ac_link_default"
30291case "(($ac_try" in
30292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30293  *) ac_try_echo=$ac_try;;
30294esac
30295eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30296$as_echo "$ac_try_echo"; } >&5
30297  (eval "$ac_link_default") 2>&5
30298  ac_status=$?
30299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30300  test $ac_status = 0; }; then :
30301  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30302# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30303# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30304# so that the user can short-circuit this test for compilers unknown to
30305# Autoconf.
30306for ac_file in $ac_files ''
30307do
30308  test -f "$ac_file" || continue
30309  case $ac_file in
30310    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30311	;;
30312    [ab].out )
30313	# We found the default executable, but exeext='' is most
30314	# certainly right.
30315	break;;
30316    *.* )
30317	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30318	then :; else
30319	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30320	fi
30321	# We set ac_cv_exeext here because the later test for it is not
30322	# safe: cross compilers may not add the suffix if given an `-o'
30323	# argument, so we may need to know it at that point already.
30324	# Even if this section looks crufty: it has the advantage of
30325	# actually working.
30326	break;;
30327    * )
30328	break;;
30329  esac
30330done
30331test "$ac_cv_exeext" = no && ac_cv_exeext=
30332
30333else
30334  ac_file=''
30335fi
30336if test -z "$ac_file"; then :
30337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30338$as_echo "no" >&6; }
30339$as_echo "$as_me: failed program was:" >&5
30340sed 's/^/| /' conftest.$ac_ext >&5
30341
30342{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30344as_fn_error 77 "C compiler cannot create executables
30345See \`config.log' for more details" "$LINENO" 5; }
30346else
30347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30348$as_echo "yes" >&6; }
30349fi
30350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30351$as_echo_n "checking for C compiler default output file name... " >&6; }
30352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30353$as_echo "$ac_file" >&6; }
30354ac_exeext=$ac_cv_exeext
30355
30356rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30357ac_clean_files=$ac_clean_files_save
30358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30359$as_echo_n "checking for suffix of executables... " >&6; }
30360if { { ac_try="$ac_link"
30361case "(($ac_try" in
30362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30363  *) ac_try_echo=$ac_try;;
30364esac
30365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30366$as_echo "$ac_try_echo"; } >&5
30367  (eval "$ac_link") 2>&5
30368  ac_status=$?
30369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30370  test $ac_status = 0; }; then :
30371  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30372# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30373# work properly (i.e., refer to `conftest.exe'), while it won't with
30374# `rm'.
30375for ac_file in conftest.exe conftest conftest.*; do
30376  test -f "$ac_file" || continue
30377  case $ac_file in
30378    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30379    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30380	  break;;
30381    * ) break;;
30382  esac
30383done
30384else
30385  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30387as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30388See \`config.log' for more details" "$LINENO" 5; }
30389fi
30390rm -f conftest conftest$ac_cv_exeext
30391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30392$as_echo "$ac_cv_exeext" >&6; }
30393
30394rm -f conftest.$ac_ext
30395EXEEXT=$ac_cv_exeext
30396ac_exeext=$EXEEXT
30397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398/* end confdefs.h.  */
30399#include <stdio.h>
30400int
30401main ()
30402{
30403FILE *f = fopen ("conftest.out", "w");
30404 return ferror (f) || fclose (f) != 0;
30405
30406  ;
30407  return 0;
30408}
30409_ACEOF
30410ac_clean_files="$ac_clean_files conftest.out"
30411# Check that the compiler produces executables we can run.  If not, either
30412# the compiler is broken, or we cross compile.
30413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30414$as_echo_n "checking whether we are cross compiling... " >&6; }
30415if test "$cross_compiling" != yes; then
30416  { { ac_try="$ac_link"
30417case "(($ac_try" in
30418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30419  *) ac_try_echo=$ac_try;;
30420esac
30421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30422$as_echo "$ac_try_echo"; } >&5
30423  (eval "$ac_link") 2>&5
30424  ac_status=$?
30425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30426  test $ac_status = 0; }
30427  if { ac_try='./conftest$ac_cv_exeext'
30428  { { case "(($ac_try" in
30429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30430  *) ac_try_echo=$ac_try;;
30431esac
30432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30433$as_echo "$ac_try_echo"; } >&5
30434  (eval "$ac_try") 2>&5
30435  ac_status=$?
30436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30437  test $ac_status = 0; }; }; then
30438    cross_compiling=no
30439  else
30440    if test "$cross_compiling" = maybe; then
30441	cross_compiling=yes
30442    else
30443	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30445as_fn_error $? "cannot run C compiled programs.
30446If you meant to cross compile, use \`--host'.
30447See \`config.log' for more details" "$LINENO" 5; }
30448    fi
30449  fi
30450fi
30451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30452$as_echo "$cross_compiling" >&6; }
30453
30454rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30455ac_clean_files=$ac_clean_files_save
30456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30457$as_echo_n "checking for suffix of object files... " >&6; }
30458if ${ac_cv_objext+:} false; then :
30459  $as_echo_n "(cached) " >&6
30460else
30461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30462/* end confdefs.h.  */
30463
30464int
30465main ()
30466{
30467
30468  ;
30469  return 0;
30470}
30471_ACEOF
30472rm -f conftest.o conftest.obj
30473if { { ac_try="$ac_compile"
30474case "(($ac_try" in
30475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30476  *) ac_try_echo=$ac_try;;
30477esac
30478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30479$as_echo "$ac_try_echo"; } >&5
30480  (eval "$ac_compile") 2>&5
30481  ac_status=$?
30482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30483  test $ac_status = 0; }; then :
30484  for ac_file in conftest.o conftest.obj conftest.*; do
30485  test -f "$ac_file" || continue;
30486  case $ac_file in
30487    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30488    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30489       break;;
30490  esac
30491done
30492else
30493  $as_echo "$as_me: failed program was:" >&5
30494sed 's/^/| /' conftest.$ac_ext >&5
30495
30496{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30498as_fn_error $? "cannot compute suffix of object files: cannot compile
30499See \`config.log' for more details" "$LINENO" 5; }
30500fi
30501rm -f conftest.$ac_cv_objext conftest.$ac_ext
30502fi
30503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30504$as_echo "$ac_cv_objext" >&6; }
30505OBJEXT=$ac_cv_objext
30506ac_objext=$OBJEXT
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30508$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30509if ${ac_cv_c_compiler_gnu+:} false; then :
30510  $as_echo_n "(cached) " >&6
30511else
30512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30513/* end confdefs.h.  */
30514
30515int
30516main ()
30517{
30518#ifndef __GNUC__
30519       choke me
30520#endif
30521
30522  ;
30523  return 0;
30524}
30525_ACEOF
30526if ac_fn_c_try_compile "$LINENO"; then :
30527  ac_compiler_gnu=yes
30528else
30529  ac_compiler_gnu=no
30530fi
30531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30532ac_cv_c_compiler_gnu=$ac_compiler_gnu
30533
30534fi
30535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30536$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30537if test $ac_compiler_gnu = yes; then
30538  GCC=yes
30539else
30540  GCC=
30541fi
30542ac_test_CFLAGS=${CFLAGS+set}
30543ac_save_CFLAGS=$CFLAGS
30544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30545$as_echo_n "checking whether $CC accepts -g... " >&6; }
30546if ${ac_cv_prog_cc_g+:} false; then :
30547  $as_echo_n "(cached) " >&6
30548else
30549  ac_save_c_werror_flag=$ac_c_werror_flag
30550   ac_c_werror_flag=yes
30551   ac_cv_prog_cc_g=no
30552   CFLAGS="-g"
30553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30554/* end confdefs.h.  */
30555
30556int
30557main ()
30558{
30559
30560  ;
30561  return 0;
30562}
30563_ACEOF
30564if ac_fn_c_try_compile "$LINENO"; then :
30565  ac_cv_prog_cc_g=yes
30566else
30567  CFLAGS=""
30568      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30569/* end confdefs.h.  */
30570
30571int
30572main ()
30573{
30574
30575  ;
30576  return 0;
30577}
30578_ACEOF
30579if ac_fn_c_try_compile "$LINENO"; then :
30580
30581else
30582  ac_c_werror_flag=$ac_save_c_werror_flag
30583	 CFLAGS="-g"
30584	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30585/* end confdefs.h.  */
30586
30587int
30588main ()
30589{
30590
30591  ;
30592  return 0;
30593}
30594_ACEOF
30595if ac_fn_c_try_compile "$LINENO"; then :
30596  ac_cv_prog_cc_g=yes
30597fi
30598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30599fi
30600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30601fi
30602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30603   ac_c_werror_flag=$ac_save_c_werror_flag
30604fi
30605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30606$as_echo "$ac_cv_prog_cc_g" >&6; }
30607if test "$ac_test_CFLAGS" = set; then
30608  CFLAGS=$ac_save_CFLAGS
30609elif test $ac_cv_prog_cc_g = yes; then
30610  if test "$GCC" = yes; then
30611    CFLAGS="-g -O2"
30612  else
30613    CFLAGS="-g"
30614  fi
30615else
30616  if test "$GCC" = yes; then
30617    CFLAGS="-O2"
30618  else
30619    CFLAGS=
30620  fi
30621fi
30622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30623$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30624if ${ac_cv_prog_cc_c89+:} false; then :
30625  $as_echo_n "(cached) " >&6
30626else
30627  ac_cv_prog_cc_c89=no
30628ac_save_CC=$CC
30629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30630/* end confdefs.h.  */
30631#include <stdarg.h>
30632#include <stdio.h>
30633struct stat;
30634/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30635struct buf { int x; };
30636FILE * (*rcsopen) (struct buf *, struct stat *, int);
30637static char *e (p, i)
30638     char **p;
30639     int i;
30640{
30641  return p[i];
30642}
30643static char *f (char * (*g) (char **, int), char **p, ...)
30644{
30645  char *s;
30646  va_list v;
30647  va_start (v,p);
30648  s = g (p, va_arg (v,int));
30649  va_end (v);
30650  return s;
30651}
30652
30653/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30654   function prototypes and stuff, but not '\xHH' hex character constants.
30655   These don't provoke an error unfortunately, instead are silently treated
30656   as 'x'.  The following induces an error, until -std is added to get
30657   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30658   array size at least.  It's necessary to write '\x00'==0 to get something
30659   that's true only with -std.  */
30660int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30661
30662/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30663   inside strings and character constants.  */
30664#define FOO(x) 'x'
30665int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30666
30667int test (int i, double x);
30668struct s1 {int (*f) (int a);};
30669struct s2 {int (*f) (double a);};
30670int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30671int argc;
30672char **argv;
30673int
30674main ()
30675{
30676return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30677  ;
30678  return 0;
30679}
30680_ACEOF
30681for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30682	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30683do
30684  CC="$ac_save_CC $ac_arg"
30685  if ac_fn_c_try_compile "$LINENO"; then :
30686  ac_cv_prog_cc_c89=$ac_arg
30687fi
30688rm -f core conftest.err conftest.$ac_objext
30689  test "x$ac_cv_prog_cc_c89" != "xno" && break
30690done
30691rm -f conftest.$ac_ext
30692CC=$ac_save_CC
30693
30694fi
30695# AC_CACHE_VAL
30696case "x$ac_cv_prog_cc_c89" in
30697  x)
30698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30699$as_echo "none needed" >&6; } ;;
30700  xno)
30701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30702$as_echo "unsupported" >&6; } ;;
30703  *)
30704    CC="$CC $ac_cv_prog_cc_c89"
30705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30706$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30707esac
30708if test "x$ac_cv_prog_cc_c89" != xno; then :
30709
30710fi
30711
30712ac_ext=cpp
30713ac_cpp='$CXXCPP $CPPFLAGS'
30714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30717
30718
30719
30720  COMPILER_NAME=C++
30721  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30722
30723  if test "x$CXX" != x; then
30724    # User has supplied compiler name already, always let that override.
30725    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30726$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30727    if test "x`basename $CXX`" = "x$CXX"; then
30728      # A command without a complete path is provided, search $PATH.
30729
30730      for ac_prog in $CXX
30731do
30732  # Extract the first word of "$ac_prog", so it can be a program name with args.
30733set dummy $ac_prog; ac_word=$2
30734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30735$as_echo_n "checking for $ac_word... " >&6; }
30736if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30737  $as_echo_n "(cached) " >&6
30738else
30739  case $POTENTIAL_CXX in
30740  [\\/]* | ?:[\\/]*)
30741  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30742  ;;
30743  *)
30744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30745for as_dir in $PATH
30746do
30747  IFS=$as_save_IFS
30748  test -z "$as_dir" && as_dir=.
30749    for ac_exec_ext in '' $ac_executable_extensions; do
30750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30751    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30753    break 2
30754  fi
30755done
30756  done
30757IFS=$as_save_IFS
30758
30759  ;;
30760esac
30761fi
30762POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30763if test -n "$POTENTIAL_CXX"; then
30764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30765$as_echo "$POTENTIAL_CXX" >&6; }
30766else
30767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30768$as_echo "no" >&6; }
30769fi
30770
30771
30772  test -n "$POTENTIAL_CXX" && break
30773done
30774
30775      if test "x$POTENTIAL_CXX" != x; then
30776        CXX=$POTENTIAL_CXX
30777      else
30778        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30779      fi
30780    else
30781      # Otherwise it might already be a complete path
30782      if test ! -x "$CXX"; then
30783        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30784      fi
30785    fi
30786  else
30787    # No user supplied value. Locate compiler ourselves.
30788
30789    # If we are cross compiling, assume cross compilation tools follows the
30790    # cross compilation standard where they are prefixed with the autoconf
30791    # standard name for the target. For example the binary
30792    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30793    # If we are not cross compiling, then the default compiler name will be
30794    # used.
30795
30796    CXX=
30797    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30798    # before checking the rest of the PATH.
30799    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30800    # step, this should not be necessary.
30801    if test -n "$TOOLCHAIN_PATH"; then
30802      PATH_save="$PATH"
30803      PATH="$TOOLCHAIN_PATH"
30804      for ac_prog in $SEARCH_LIST
30805do
30806  # Extract the first word of "$ac_prog", so it can be a program name with args.
30807set dummy $ac_prog; ac_word=$2
30808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30809$as_echo_n "checking for $ac_word... " >&6; }
30810if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30811  $as_echo_n "(cached) " >&6
30812else
30813  case $TOOLCHAIN_PATH_CXX in
30814  [\\/]* | ?:[\\/]*)
30815  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30816  ;;
30817  *)
30818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30819for as_dir in $PATH
30820do
30821  IFS=$as_save_IFS
30822  test -z "$as_dir" && as_dir=.
30823    for ac_exec_ext in '' $ac_executable_extensions; do
30824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30825    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30827    break 2
30828  fi
30829done
30830  done
30831IFS=$as_save_IFS
30832
30833  ;;
30834esac
30835fi
30836TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30837if test -n "$TOOLCHAIN_PATH_CXX"; then
30838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30839$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30840else
30841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30842$as_echo "no" >&6; }
30843fi
30844
30845
30846  test -n "$TOOLCHAIN_PATH_CXX" && break
30847done
30848
30849      CXX=$TOOLCHAIN_PATH_CXX
30850      PATH="$PATH_save"
30851    fi
30852
30853    # AC_PATH_PROGS can't be run multiple times with the same variable,
30854    # so create a new name for this run.
30855    if test "x$CXX" = x; then
30856      for ac_prog in $SEARCH_LIST
30857do
30858  # Extract the first word of "$ac_prog", so it can be a program name with args.
30859set dummy $ac_prog; ac_word=$2
30860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30861$as_echo_n "checking for $ac_word... " >&6; }
30862if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30863  $as_echo_n "(cached) " >&6
30864else
30865  case $POTENTIAL_CXX in
30866  [\\/]* | ?:[\\/]*)
30867  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30868  ;;
30869  *)
30870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30871for as_dir in $PATH
30872do
30873  IFS=$as_save_IFS
30874  test -z "$as_dir" && as_dir=.
30875    for ac_exec_ext in '' $ac_executable_extensions; do
30876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30877    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30879    break 2
30880  fi
30881done
30882  done
30883IFS=$as_save_IFS
30884
30885  ;;
30886esac
30887fi
30888POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30889if test -n "$POTENTIAL_CXX"; then
30890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30891$as_echo "$POTENTIAL_CXX" >&6; }
30892else
30893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30894$as_echo "no" >&6; }
30895fi
30896
30897
30898  test -n "$POTENTIAL_CXX" && break
30899done
30900
30901      CXX=$POTENTIAL_CXX
30902    fi
30903
30904    if test "x$CXX" = x; then
30905
30906  # Print a helpful message on how to acquire the necessary build dependency.
30907  # devkit is the help tag: freetype, cups, alsa etc
30908  MISSING_DEPENDENCY=devkit
30909
30910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30911    cygwin_help $MISSING_DEPENDENCY
30912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30913    msys_help $MISSING_DEPENDENCY
30914  else
30915    PKGHANDLER_COMMAND=
30916
30917    case $PKGHANDLER in
30918      apt-get)
30919        apt_help     $MISSING_DEPENDENCY ;;
30920      yum)
30921        yum_help     $MISSING_DEPENDENCY ;;
30922      port)
30923        port_help    $MISSING_DEPENDENCY ;;
30924      pkgutil)
30925        pkgutil_help $MISSING_DEPENDENCY ;;
30926      pkgadd)
30927        pkgadd_help  $MISSING_DEPENDENCY ;;
30928    esac
30929
30930    if test "x$PKGHANDLER_COMMAND" != x; then
30931      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30932    fi
30933  fi
30934
30935      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30936    fi
30937  fi
30938
30939  # Now we have a compiler binary in CXX. Make sure it's okay.
30940
30941  # Only process if variable expands to non-empty
30942
30943  if test "x$CXX" != x; then
30944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30945
30946  # First separate the path from the arguments. This will split at the first
30947  # space.
30948  complete="$CXX"
30949  path="${complete%% *}"
30950  tmp="$complete EOL"
30951  arguments="${tmp#* }"
30952
30953  # Input might be given as Windows format, start by converting to
30954  # unix format.
30955  new_path=`$CYGPATH -u "$path"`
30956
30957  # Now try to locate executable using which
30958  new_path=`$WHICH "$new_path" 2> /dev/null`
30959  # bat and cmd files are not always considered executable in cygwin causing which
30960  # to not find them
30961  if test "x$new_path" = x \
30962      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30963      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30964    new_path=`$CYGPATH -u "$path"`
30965  fi
30966  if test "x$new_path" = x; then
30967    # Oops. Which didn't find the executable.
30968    # The splitting of arguments from the executable at a space might have been incorrect,
30969    # since paths with space are more likely in Windows. Give it another try with the whole
30970    # argument.
30971    path="$complete"
30972    arguments="EOL"
30973    new_path=`$CYGPATH -u "$path"`
30974    new_path=`$WHICH "$new_path" 2> /dev/null`
30975    # bat and cmd files are not always considered executable in cygwin causing which
30976    # to not find them
30977    if test "x$new_path" = x \
30978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30980      new_path=`$CYGPATH -u "$path"`
30981    fi
30982    if test "x$new_path" = x; then
30983      # It's still not found. Now this is an unrecoverable error.
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30985$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30986      has_space=`$ECHO "$complete" | $GREP " "`
30987      if test "x$has_space" != x; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30990      fi
30991      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30992    fi
30993  fi
30994
30995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30998  # "foo.exe" is OK but "foo" is an error.
30999  #
31000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31001  # It is also a way to make sure we got the proper file name for the real test later on.
31002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31003  if test "x$test_shortpath" = x; then
31004    # Short path failed, file does not exist as specified.
31005    # Try adding .exe or .cmd
31006    if test -f "${new_path}.exe"; then
31007      input_to_shortpath="${new_path}.exe"
31008    elif test -f "${new_path}.cmd"; then
31009      input_to_shortpath="${new_path}.cmd"
31010    else
31011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31012$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31015      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31016    fi
31017  else
31018    input_to_shortpath="$new_path"
31019  fi
31020
31021  # Call helper function which possibly converts this using DOS-style short mode.
31022  # If so, the updated path is stored in $new_path.
31023  new_path="$input_to_shortpath"
31024
31025  input_path="$input_to_shortpath"
31026  # Check if we need to convert this using DOS-style short mode. If the path
31027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31028  # take no chances and rewrite it.
31029  # Note: m4 eats our [], so we need to use [ and ] instead.
31030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31031  if test "x$has_forbidden_chars" != x; then
31032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31036      # Going to short mode and back again did indeed matter. Since short mode is
31037      # case insensitive, let's make it lowercase to improve readability.
31038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31039      # Now convert it back to Unix-style (cygpath)
31040      input_path=`$CYGPATH -u "$shortmode_path"`
31041      new_path="$input_path"
31042    fi
31043  fi
31044
31045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31046  if test "x$test_cygdrive_prefix" = x; then
31047    # As a simple fix, exclude /usr/bin since it's not a real path.
31048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31050      # a path prefixed by /cygdrive for fixpath to work.
31051      new_path="$CYGWIN_ROOT_PATH$input_path"
31052    fi
31053  fi
31054
31055  # remove trailing .exe if any
31056  new_path="${new_path/%.exe/}"
31057
31058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31059
31060  # First separate the path from the arguments. This will split at the first
31061  # space.
31062  complete="$CXX"
31063  path="${complete%% *}"
31064  tmp="$complete EOL"
31065  arguments="${tmp#* }"
31066
31067  # Input might be given as Windows format, start by converting to
31068  # unix format.
31069  new_path="$path"
31070
31071  windows_path="$new_path"
31072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31073    unix_path=`$CYGPATH -u "$windows_path"`
31074    new_path="$unix_path"
31075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31077    new_path="$unix_path"
31078  fi
31079
31080
31081  # Now try to locate executable using which
31082  new_path=`$WHICH "$new_path" 2> /dev/null`
31083
31084  if test "x$new_path" = x; then
31085    # Oops. Which didn't find the executable.
31086    # The splitting of arguments from the executable at a space might have been incorrect,
31087    # since paths with space are more likely in Windows. Give it another try with the whole
31088    # argument.
31089    path="$complete"
31090    arguments="EOL"
31091    new_path="$path"
31092
31093  windows_path="$new_path"
31094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31095    unix_path=`$CYGPATH -u "$windows_path"`
31096    new_path="$unix_path"
31097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31099    new_path="$unix_path"
31100  fi
31101
31102
31103    new_path=`$WHICH "$new_path" 2> /dev/null`
31104    # bat and cmd files are not always considered executable in MSYS causing which
31105    # to not find them
31106    if test "x$new_path" = x \
31107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31109      new_path="$path"
31110
31111  windows_path="$new_path"
31112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31113    unix_path=`$CYGPATH -u "$windows_path"`
31114    new_path="$unix_path"
31115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31117    new_path="$unix_path"
31118  fi
31119
31120    fi
31121
31122    if test "x$new_path" = x; then
31123      # It's still not found. Now this is an unrecoverable error.
31124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31125$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31126      has_space=`$ECHO "$complete" | $GREP " "`
31127      if test "x$has_space" != x; then
31128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31130      fi
31131      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31132    fi
31133  fi
31134
31135  # Now new_path has a complete unix path to the binary
31136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31137    # Keep paths in /bin as-is, but remove trailing .exe if any
31138    new_path="${new_path/%.exe/}"
31139    # Do not save /bin paths to all_fixpath_prefixes!
31140  else
31141    # Not in mixed or Windows style, start by that.
31142    new_path=`cmd //c echo $new_path`
31143
31144  input_path="$new_path"
31145  # Check if we need to convert this using DOS-style short mode. If the path
31146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31147  # take no chances and rewrite it.
31148  # Note: m4 eats our [], so we need to use [ and ] instead.
31149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31150  if test "x$has_forbidden_chars" != x; then
31151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31153  fi
31154
31155    # Output is in $new_path
31156
31157  windows_path="$new_path"
31158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31159    unix_path=`$CYGPATH -u "$windows_path"`
31160    new_path="$unix_path"
31161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31163    new_path="$unix_path"
31164  fi
31165
31166    # remove trailing .exe if any
31167    new_path="${new_path/%.exe/}"
31168
31169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31171  fi
31172
31173    else
31174      # We're on a unix platform. Hooray! :)
31175      # First separate the path from the arguments. This will split at the first
31176      # space.
31177      complete="$CXX"
31178      path="${complete%% *}"
31179      tmp="$complete EOL"
31180      arguments="${tmp#* }"
31181
31182      # Cannot rely on the command "which" here since it doesn't always work.
31183      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31184      if test -z "$is_absolute_path"; then
31185        # Path to executable is not absolute. Find it.
31186        IFS_save="$IFS"
31187        IFS=:
31188        for p in $PATH; do
31189          if test -f "$p/$path" && test -x "$p/$path"; then
31190            new_path="$p/$path"
31191            break
31192          fi
31193        done
31194        IFS="$IFS_save"
31195      else
31196        # This is an absolute path, we can use it without further modifications.
31197        new_path="$path"
31198      fi
31199
31200      if test "x$new_path" = x; then
31201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31202$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31203        has_space=`$ECHO "$complete" | $GREP " "`
31204        if test "x$has_space" != x; then
31205          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31206$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31207        fi
31208        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31209      fi
31210    fi
31211
31212    # Now join together the path and the arguments once again
31213    if test "x$arguments" != xEOL; then
31214      new_complete="$new_path ${arguments% *}"
31215    else
31216      new_complete="$new_path"
31217    fi
31218
31219    if test "x$complete" != "x$new_complete"; then
31220      CXX="$new_complete"
31221      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31222$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31223    fi
31224  fi
31225
31226  TEST_COMPILER="$CXX"
31227  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31228  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31229  if test "x$OPENJDK_BUILD_OS" != xaix; then
31230    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31232$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31233
31234  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31235    # Follow a chain of symbolic links. Use readlink
31236    # where it exists, else fall back to horribly
31237    # complicated shell code.
31238    if test "x$READLINK_TESTED" != yes; then
31239      # On MacOSX there is a readlink tool with a different
31240      # purpose than the GNU readlink tool. Check the found readlink.
31241      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31242      if test "x$ISGNU" = x; then
31243        # A readlink that we do not know how to use.
31244        # Are there other non-GNU readlinks out there?
31245        READLINK_TESTED=yes
31246        READLINK=
31247      fi
31248    fi
31249
31250    if test "x$READLINK" != x; then
31251      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31252    else
31253      # Save the current directory for restoring afterwards
31254      STARTDIR=$PWD
31255      COUNTER=0
31256      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31257      sym_link_file=`$BASENAME $TEST_COMPILER`
31258      cd $sym_link_dir
31259      # Use -P flag to resolve symlinks in directories.
31260      cd `$THEPWDCMD -P`
31261      sym_link_dir=`$THEPWDCMD -P`
31262      # Resolve file symlinks
31263      while test $COUNTER -lt 20; do
31264        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31265        if test "x$ISLINK" == x; then
31266          # This is not a symbolic link! We are done!
31267          break
31268        fi
31269        # Again resolve directory symlinks since the target of the just found
31270        # link could be in a different directory
31271        cd `$DIRNAME $ISLINK`
31272        sym_link_dir=`$THEPWDCMD -P`
31273        sym_link_file=`$BASENAME $ISLINK`
31274        let COUNTER=COUNTER+1
31275      done
31276      cd $STARTDIR
31277      TEST_COMPILER=$sym_link_dir/$sym_link_file
31278    fi
31279  fi
31280
31281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31282$as_echo "$TEST_COMPILER" >&6; }
31283  fi
31284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31285$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31286
31287  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31288  if test "x$COMPILER_BASENAME" = "xccache"; then
31289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31290$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31291    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31292    # We want to control ccache invocation ourselves, so ignore this cc and try
31293    # searching again.
31294
31295    # Remove the path to the fake ccache cc from the PATH
31296    RETRY_COMPILER_SAVED_PATH="$PATH"
31297    COMPILER_DIRNAME=`$DIRNAME $CXX`
31298    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31299
31300    # Try again looking for our compiler
31301    if test -n "$ac_tool_prefix"; then
31302  for ac_prog in $TOOLCHAIN_CXX_BINARY
31303  do
31304    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31305set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31307$as_echo_n "checking for $ac_word... " >&6; }
31308if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31309  $as_echo_n "(cached) " >&6
31310else
31311  if test -n "$PROPER_COMPILER_CXX"; then
31312  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31313else
31314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31315for as_dir in $PATH
31316do
31317  IFS=$as_save_IFS
31318  test -z "$as_dir" && as_dir=.
31319    for ac_exec_ext in '' $ac_executable_extensions; do
31320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31321    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31323    break 2
31324  fi
31325done
31326  done
31327IFS=$as_save_IFS
31328
31329fi
31330fi
31331PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31332if test -n "$PROPER_COMPILER_CXX"; then
31333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31334$as_echo "$PROPER_COMPILER_CXX" >&6; }
31335else
31336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31337$as_echo "no" >&6; }
31338fi
31339
31340
31341    test -n "$PROPER_COMPILER_CXX" && break
31342  done
31343fi
31344if test -z "$PROPER_COMPILER_CXX"; then
31345  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31346  for ac_prog in $TOOLCHAIN_CXX_BINARY
31347do
31348  # Extract the first word of "$ac_prog", so it can be a program name with args.
31349set dummy $ac_prog; ac_word=$2
31350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31351$as_echo_n "checking for $ac_word... " >&6; }
31352if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31353  $as_echo_n "(cached) " >&6
31354else
31355  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31356  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31357else
31358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31359for as_dir in $PATH
31360do
31361  IFS=$as_save_IFS
31362  test -z "$as_dir" && as_dir=.
31363    for ac_exec_ext in '' $ac_executable_extensions; do
31364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31365    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31367    break 2
31368  fi
31369done
31370  done
31371IFS=$as_save_IFS
31372
31373fi
31374fi
31375ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31376if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31378$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31379else
31380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31381$as_echo "no" >&6; }
31382fi
31383
31384
31385  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31386done
31387
31388  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31389    PROPER_COMPILER_CXX=""
31390  else
31391    case $cross_compiling:$ac_tool_warned in
31392yes:)
31393{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31394$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31395ac_tool_warned=yes ;;
31396esac
31397    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31398  fi
31399fi
31400
31401
31402  # Only process if variable expands to non-empty
31403
31404  if test "x$PROPER_COMPILER_CXX" != x; then
31405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31406
31407  # First separate the path from the arguments. This will split at the first
31408  # space.
31409  complete="$PROPER_COMPILER_CXX"
31410  path="${complete%% *}"
31411  tmp="$complete EOL"
31412  arguments="${tmp#* }"
31413
31414  # Input might be given as Windows format, start by converting to
31415  # unix format.
31416  new_path=`$CYGPATH -u "$path"`
31417
31418  # Now try to locate executable using which
31419  new_path=`$WHICH "$new_path" 2> /dev/null`
31420  # bat and cmd files are not always considered executable in cygwin causing which
31421  # to not find them
31422  if test "x$new_path" = x \
31423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31425    new_path=`$CYGPATH -u "$path"`
31426  fi
31427  if test "x$new_path" = x; then
31428    # Oops. Which didn't find the executable.
31429    # The splitting of arguments from the executable at a space might have been incorrect,
31430    # since paths with space are more likely in Windows. Give it another try with the whole
31431    # argument.
31432    path="$complete"
31433    arguments="EOL"
31434    new_path=`$CYGPATH -u "$path"`
31435    new_path=`$WHICH "$new_path" 2> /dev/null`
31436    # bat and cmd files are not always considered executable in cygwin causing which
31437    # to not find them
31438    if test "x$new_path" = x \
31439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31441      new_path=`$CYGPATH -u "$path"`
31442    fi
31443    if test "x$new_path" = x; then
31444      # It's still not found. Now this is an unrecoverable error.
31445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31446$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31447      has_space=`$ECHO "$complete" | $GREP " "`
31448      if test "x$has_space" != x; then
31449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31451      fi
31452      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31453    fi
31454  fi
31455
31456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31459  # "foo.exe" is OK but "foo" is an error.
31460  #
31461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31462  # It is also a way to make sure we got the proper file name for the real test later on.
31463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31464  if test "x$test_shortpath" = x; then
31465    # Short path failed, file does not exist as specified.
31466    # Try adding .exe or .cmd
31467    if test -f "${new_path}.exe"; then
31468      input_to_shortpath="${new_path}.exe"
31469    elif test -f "${new_path}.cmd"; then
31470      input_to_shortpath="${new_path}.cmd"
31471    else
31472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31473$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31476      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31477    fi
31478  else
31479    input_to_shortpath="$new_path"
31480  fi
31481
31482  # Call helper function which possibly converts this using DOS-style short mode.
31483  # If so, the updated path is stored in $new_path.
31484  new_path="$input_to_shortpath"
31485
31486  input_path="$input_to_shortpath"
31487  # Check if we need to convert this using DOS-style short mode. If the path
31488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31489  # take no chances and rewrite it.
31490  # Note: m4 eats our [], so we need to use [ and ] instead.
31491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31492  if test "x$has_forbidden_chars" != x; then
31493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31497      # Going to short mode and back again did indeed matter. Since short mode is
31498      # case insensitive, let's make it lowercase to improve readability.
31499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31500      # Now convert it back to Unix-style (cygpath)
31501      input_path=`$CYGPATH -u "$shortmode_path"`
31502      new_path="$input_path"
31503    fi
31504  fi
31505
31506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31507  if test "x$test_cygdrive_prefix" = x; then
31508    # As a simple fix, exclude /usr/bin since it's not a real path.
31509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31511      # a path prefixed by /cygdrive for fixpath to work.
31512      new_path="$CYGWIN_ROOT_PATH$input_path"
31513    fi
31514  fi
31515
31516  # remove trailing .exe if any
31517  new_path="${new_path/%.exe/}"
31518
31519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31520
31521  # First separate the path from the arguments. This will split at the first
31522  # space.
31523  complete="$PROPER_COMPILER_CXX"
31524  path="${complete%% *}"
31525  tmp="$complete EOL"
31526  arguments="${tmp#* }"
31527
31528  # Input might be given as Windows format, start by converting to
31529  # unix format.
31530  new_path="$path"
31531
31532  windows_path="$new_path"
31533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31534    unix_path=`$CYGPATH -u "$windows_path"`
31535    new_path="$unix_path"
31536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31538    new_path="$unix_path"
31539  fi
31540
31541
31542  # Now try to locate executable using which
31543  new_path=`$WHICH "$new_path" 2> /dev/null`
31544
31545  if test "x$new_path" = x; then
31546    # Oops. Which didn't find the executable.
31547    # The splitting of arguments from the executable at a space might have been incorrect,
31548    # since paths with space are more likely in Windows. Give it another try with the whole
31549    # argument.
31550    path="$complete"
31551    arguments="EOL"
31552    new_path="$path"
31553
31554  windows_path="$new_path"
31555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31556    unix_path=`$CYGPATH -u "$windows_path"`
31557    new_path="$unix_path"
31558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31560    new_path="$unix_path"
31561  fi
31562
31563
31564    new_path=`$WHICH "$new_path" 2> /dev/null`
31565    # bat and cmd files are not always considered executable in MSYS causing which
31566    # to not find them
31567    if test "x$new_path" = x \
31568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31570      new_path="$path"
31571
31572  windows_path="$new_path"
31573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31574    unix_path=`$CYGPATH -u "$windows_path"`
31575    new_path="$unix_path"
31576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31578    new_path="$unix_path"
31579  fi
31580
31581    fi
31582
31583    if test "x$new_path" = x; then
31584      # It's still not found. Now this is an unrecoverable error.
31585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31586$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31587      has_space=`$ECHO "$complete" | $GREP " "`
31588      if test "x$has_space" != x; then
31589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31591      fi
31592      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31593    fi
31594  fi
31595
31596  # Now new_path has a complete unix path to the binary
31597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31598    # Keep paths in /bin as-is, but remove trailing .exe if any
31599    new_path="${new_path/%.exe/}"
31600    # Do not save /bin paths to all_fixpath_prefixes!
31601  else
31602    # Not in mixed or Windows style, start by that.
31603    new_path=`cmd //c echo $new_path`
31604
31605  input_path="$new_path"
31606  # Check if we need to convert this using DOS-style short mode. If the path
31607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31608  # take no chances and rewrite it.
31609  # Note: m4 eats our [], so we need to use [ and ] instead.
31610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31611  if test "x$has_forbidden_chars" != x; then
31612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31614  fi
31615
31616    # Output is in $new_path
31617
31618  windows_path="$new_path"
31619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31620    unix_path=`$CYGPATH -u "$windows_path"`
31621    new_path="$unix_path"
31622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31624    new_path="$unix_path"
31625  fi
31626
31627    # remove trailing .exe if any
31628    new_path="${new_path/%.exe/}"
31629
31630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31632  fi
31633
31634    else
31635      # We're on a unix platform. Hooray! :)
31636      # First separate the path from the arguments. This will split at the first
31637      # space.
31638      complete="$PROPER_COMPILER_CXX"
31639      path="${complete%% *}"
31640      tmp="$complete EOL"
31641      arguments="${tmp#* }"
31642
31643      # Cannot rely on the command "which" here since it doesn't always work.
31644      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31645      if test -z "$is_absolute_path"; then
31646        # Path to executable is not absolute. Find it.
31647        IFS_save="$IFS"
31648        IFS=:
31649        for p in $PATH; do
31650          if test -f "$p/$path" && test -x "$p/$path"; then
31651            new_path="$p/$path"
31652            break
31653          fi
31654        done
31655        IFS="$IFS_save"
31656      else
31657        # This is an absolute path, we can use it without further modifications.
31658        new_path="$path"
31659      fi
31660
31661      if test "x$new_path" = x; then
31662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31663$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31664        has_space=`$ECHO "$complete" | $GREP " "`
31665        if test "x$has_space" != x; then
31666          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31668        fi
31669        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31670      fi
31671    fi
31672
31673    # Now join together the path and the arguments once again
31674    if test "x$arguments" != xEOL; then
31675      new_complete="$new_path ${arguments% *}"
31676    else
31677      new_complete="$new_path"
31678    fi
31679
31680    if test "x$complete" != "x$new_complete"; then
31681      PROPER_COMPILER_CXX="$new_complete"
31682      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31683$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31684    fi
31685  fi
31686
31687    PATH="$RETRY_COMPILER_SAVED_PATH"
31688
31689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31690$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31691
31692  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31693    # Follow a chain of symbolic links. Use readlink
31694    # where it exists, else fall back to horribly
31695    # complicated shell code.
31696    if test "x$READLINK_TESTED" != yes; then
31697      # On MacOSX there is a readlink tool with a different
31698      # purpose than the GNU readlink tool. Check the found readlink.
31699      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31700      if test "x$ISGNU" = x; then
31701        # A readlink that we do not know how to use.
31702        # Are there other non-GNU readlinks out there?
31703        READLINK_TESTED=yes
31704        READLINK=
31705      fi
31706    fi
31707
31708    if test "x$READLINK" != x; then
31709      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31710    else
31711      # Save the current directory for restoring afterwards
31712      STARTDIR=$PWD
31713      COUNTER=0
31714      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31715      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31716      cd $sym_link_dir
31717      # Use -P flag to resolve symlinks in directories.
31718      cd `$THEPWDCMD -P`
31719      sym_link_dir=`$THEPWDCMD -P`
31720      # Resolve file symlinks
31721      while test $COUNTER -lt 20; do
31722        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31723        if test "x$ISLINK" == x; then
31724          # This is not a symbolic link! We are done!
31725          break
31726        fi
31727        # Again resolve directory symlinks since the target of the just found
31728        # link could be in a different directory
31729        cd `$DIRNAME $ISLINK`
31730        sym_link_dir=`$THEPWDCMD -P`
31731        sym_link_file=`$BASENAME $ISLINK`
31732        let COUNTER=COUNTER+1
31733      done
31734      cd $STARTDIR
31735      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31736    fi
31737  fi
31738
31739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31740$as_echo "$PROPER_COMPILER_CXX" >&6; }
31741    CXX="$PROPER_COMPILER_CXX"
31742  else
31743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31744$as_echo "no, keeping CXX" >&6; }
31745  fi
31746
31747
31748  COMPILER=$CXX
31749  COMPILER_NAME=$COMPILER_NAME
31750
31751  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31752    # cc -V output typically looks like
31753    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31754    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31755    # Check that this is likely to be the Solaris Studio cc.
31756    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31757    if test $? -ne 0; then
31758      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31759      { $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
31760$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31762$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31763      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31764$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31765      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31766    fi
31767    # Remove usage instructions (if present), and
31768    # collapse compiler output into a single line
31769    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31770        $SED -e 's/ *[Uu]sage:.*//'`
31771    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31772        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31773  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31774    # xlc -qversion output typically looks like
31775    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31776    #     Version: 11.01.0000.0015
31777    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31778    # Check that this is likely to be the IBM XL C compiler.
31779    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31780    if test $? -ne 0; then
31781      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31782      { $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
31783$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31784      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31785$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31786      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31787$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31788      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31789    fi
31790    # Collapse compiler output into a single line
31791    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31792    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31793        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31794  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31795    # There is no specific version flag, but all output starts with a version string.
31796    # First line typically looks something like:
31797    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31798    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31799    # Check that this is likely to be Microsoft CL.EXE.
31800    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31801    if test $? -ne 0; then
31802      { $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
31803$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31804      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31805$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31806      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31807    fi
31808    # Collapse compiler output into a single line
31809    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31810    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31811        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31812  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31813    # gcc --version output typically looks like
31814    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31815    #     Copyright (C) 2013 Free Software Foundation, Inc.
31816    #     This is free software; see the source for copying conditions.  There is NO
31817    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31818    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31819    # Check that this is likely to be GCC.
31820    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31821    if test $? -ne 0; then
31822      { $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
31823$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31824      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31825$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31826      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31827    fi
31828    # Remove Copyright and legalese from version string, and
31829    # collapse into a single line
31830    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31831        $SED -e 's/ *Copyright .*//'`
31832    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31833        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31834  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31835    # clang --version output typically looks like
31836    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31837    #    clang version 3.3 (tags/RELEASE_33/final)
31838    # or
31839    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31840    #    Target: x86_64-pc-linux-gnu
31841    #    Thread model: posix
31842    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31843    # Check that this is likely to be clang
31844    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31845    if test $? -ne 0; then
31846      { $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
31847$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31848      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31849$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31850      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31851    fi
31852    # Collapse compiler output into a single line
31853    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31854    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31855        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31856  else
31857      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31858  fi
31859  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31860  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31861  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31862  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31863
31864  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31865$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31866
31867
31868  # Now that we have resolved CXX ourself, let autoconf have its go at it
31869  ac_ext=cpp
31870ac_cpp='$CXXCPP $CPPFLAGS'
31871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31874if test -z "$CXX"; then
31875  if test -n "$CCC"; then
31876    CXX=$CCC
31877  else
31878    if test -n "$ac_tool_prefix"; then
31879  for ac_prog in $CXX
31880  do
31881    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31882set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31884$as_echo_n "checking for $ac_word... " >&6; }
31885if ${ac_cv_prog_CXX+:} false; then :
31886  $as_echo_n "(cached) " >&6
31887else
31888  if test -n "$CXX"; then
31889  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31890else
31891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31892for as_dir in $PATH
31893do
31894  IFS=$as_save_IFS
31895  test -z "$as_dir" && as_dir=.
31896    for ac_exec_ext in '' $ac_executable_extensions; do
31897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31898    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31900    break 2
31901  fi
31902done
31903  done
31904IFS=$as_save_IFS
31905
31906fi
31907fi
31908CXX=$ac_cv_prog_CXX
31909if test -n "$CXX"; then
31910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31911$as_echo "$CXX" >&6; }
31912else
31913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31914$as_echo "no" >&6; }
31915fi
31916
31917
31918    test -n "$CXX" && break
31919  done
31920fi
31921if test -z "$CXX"; then
31922  ac_ct_CXX=$CXX
31923  for ac_prog in $CXX
31924do
31925  # Extract the first word of "$ac_prog", so it can be a program name with args.
31926set dummy $ac_prog; ac_word=$2
31927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31928$as_echo_n "checking for $ac_word... " >&6; }
31929if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31930  $as_echo_n "(cached) " >&6
31931else
31932  if test -n "$ac_ct_CXX"; then
31933  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31934else
31935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31936for as_dir in $PATH
31937do
31938  IFS=$as_save_IFS
31939  test -z "$as_dir" && as_dir=.
31940    for ac_exec_ext in '' $ac_executable_extensions; do
31941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31942    ac_cv_prog_ac_ct_CXX="$ac_prog"
31943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31944    break 2
31945  fi
31946done
31947  done
31948IFS=$as_save_IFS
31949
31950fi
31951fi
31952ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31953if test -n "$ac_ct_CXX"; then
31954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31955$as_echo "$ac_ct_CXX" >&6; }
31956else
31957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31958$as_echo "no" >&6; }
31959fi
31960
31961
31962  test -n "$ac_ct_CXX" && break
31963done
31964
31965  if test "x$ac_ct_CXX" = x; then
31966    CXX="g++"
31967  else
31968    case $cross_compiling:$ac_tool_warned in
31969yes:)
31970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31972ac_tool_warned=yes ;;
31973esac
31974    CXX=$ac_ct_CXX
31975  fi
31976fi
31977
31978  fi
31979fi
31980# Provide some information about the compiler.
31981$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31982set X $ac_compile
31983ac_compiler=$2
31984for ac_option in --version -v -V -qversion; do
31985  { { ac_try="$ac_compiler $ac_option >&5"
31986case "(($ac_try" in
31987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31988  *) ac_try_echo=$ac_try;;
31989esac
31990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31991$as_echo "$ac_try_echo"; } >&5
31992  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31993  ac_status=$?
31994  if test -s conftest.err; then
31995    sed '10a\
31996... rest of stderr output deleted ...
31997         10q' conftest.err >conftest.er1
31998    cat conftest.er1 >&5
31999  fi
32000  rm -f conftest.er1 conftest.err
32001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32002  test $ac_status = 0; }
32003done
32004
32005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32006$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32007if ${ac_cv_cxx_compiler_gnu+:} false; then :
32008  $as_echo_n "(cached) " >&6
32009else
32010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32011/* end confdefs.h.  */
32012
32013int
32014main ()
32015{
32016#ifndef __GNUC__
32017       choke me
32018#endif
32019
32020  ;
32021  return 0;
32022}
32023_ACEOF
32024if ac_fn_cxx_try_compile "$LINENO"; then :
32025  ac_compiler_gnu=yes
32026else
32027  ac_compiler_gnu=no
32028fi
32029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32030ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32031
32032fi
32033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32034$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32035if test $ac_compiler_gnu = yes; then
32036  GXX=yes
32037else
32038  GXX=
32039fi
32040ac_test_CXXFLAGS=${CXXFLAGS+set}
32041ac_save_CXXFLAGS=$CXXFLAGS
32042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32043$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32044if ${ac_cv_prog_cxx_g+:} false; then :
32045  $as_echo_n "(cached) " >&6
32046else
32047  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32048   ac_cxx_werror_flag=yes
32049   ac_cv_prog_cxx_g=no
32050   CXXFLAGS="-g"
32051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32052/* end confdefs.h.  */
32053
32054int
32055main ()
32056{
32057
32058  ;
32059  return 0;
32060}
32061_ACEOF
32062if ac_fn_cxx_try_compile "$LINENO"; then :
32063  ac_cv_prog_cxx_g=yes
32064else
32065  CXXFLAGS=""
32066      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32067/* end confdefs.h.  */
32068
32069int
32070main ()
32071{
32072
32073  ;
32074  return 0;
32075}
32076_ACEOF
32077if ac_fn_cxx_try_compile "$LINENO"; then :
32078
32079else
32080  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32081	 CXXFLAGS="-g"
32082	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32083/* end confdefs.h.  */
32084
32085int
32086main ()
32087{
32088
32089  ;
32090  return 0;
32091}
32092_ACEOF
32093if ac_fn_cxx_try_compile "$LINENO"; then :
32094  ac_cv_prog_cxx_g=yes
32095fi
32096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32097fi
32098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32099fi
32100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32101   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32102fi
32103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32104$as_echo "$ac_cv_prog_cxx_g" >&6; }
32105if test "$ac_test_CXXFLAGS" = set; then
32106  CXXFLAGS=$ac_save_CXXFLAGS
32107elif test $ac_cv_prog_cxx_g = yes; then
32108  if test "$GXX" = yes; then
32109    CXXFLAGS="-g -O2"
32110  else
32111    CXXFLAGS="-g"
32112  fi
32113else
32114  if test "$GXX" = yes; then
32115    CXXFLAGS="-O2"
32116  else
32117    CXXFLAGS=
32118  fi
32119fi
32120ac_ext=cpp
32121ac_cpp='$CXXCPP $CPPFLAGS'
32122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32125
32126
32127  #
32128  # Setup the preprocessor (CPP and CXXCPP)
32129  #
32130  ac_ext=c
32131ac_cpp='$CPP $CPPFLAGS'
32132ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32133ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32134ac_compiler_gnu=$ac_cv_c_compiler_gnu
32135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
32136$as_echo_n "checking how to run the C preprocessor... " >&6; }
32137# On Suns, sometimes $CPP names a directory.
32138if test -n "$CPP" && test -d "$CPP"; then
32139  CPP=
32140fi
32141if test -z "$CPP"; then
32142  if ${ac_cv_prog_CPP+:} false; then :
32143  $as_echo_n "(cached) " >&6
32144else
32145      # Double quotes because CPP needs to be expanded
32146    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
32147    do
32148      ac_preproc_ok=false
32149for ac_c_preproc_warn_flag in '' yes
32150do
32151  # Use a header file that comes with gcc, so configuring glibc
32152  # with a fresh cross-compiler works.
32153  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32154  # <limits.h> exists even on freestanding compilers.
32155  # On the NeXT, cc -E runs the code through the compiler's parser,
32156  # not just through cpp. "Syntax error" is here to catch this case.
32157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32158/* end confdefs.h.  */
32159#ifdef __STDC__
32160# include <limits.h>
32161#else
32162# include <assert.h>
32163#endif
32164		     Syntax error
32165_ACEOF
32166if ac_fn_c_try_cpp "$LINENO"; then :
32167
32168else
32169  # Broken: fails on valid input.
32170continue
32171fi
32172rm -f conftest.err conftest.i conftest.$ac_ext
32173
32174  # OK, works on sane cases.  Now check whether nonexistent headers
32175  # can be detected and how.
32176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32177/* end confdefs.h.  */
32178#include <ac_nonexistent.h>
32179_ACEOF
32180if ac_fn_c_try_cpp "$LINENO"; then :
32181  # Broken: success on invalid input.
32182continue
32183else
32184  # Passes both tests.
32185ac_preproc_ok=:
32186break
32187fi
32188rm -f conftest.err conftest.i conftest.$ac_ext
32189
32190done
32191# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32192rm -f conftest.i conftest.err conftest.$ac_ext
32193if $ac_preproc_ok; then :
32194  break
32195fi
32196
32197    done
32198    ac_cv_prog_CPP=$CPP
32199
32200fi
32201  CPP=$ac_cv_prog_CPP
32202else
32203  ac_cv_prog_CPP=$CPP
32204fi
32205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
32206$as_echo "$CPP" >&6; }
32207ac_preproc_ok=false
32208for ac_c_preproc_warn_flag in '' yes
32209do
32210  # Use a header file that comes with gcc, so configuring glibc
32211  # with a fresh cross-compiler works.
32212  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32213  # <limits.h> exists even on freestanding compilers.
32214  # On the NeXT, cc -E runs the code through the compiler's parser,
32215  # not just through cpp. "Syntax error" is here to catch this case.
32216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32217/* end confdefs.h.  */
32218#ifdef __STDC__
32219# include <limits.h>
32220#else
32221# include <assert.h>
32222#endif
32223		     Syntax error
32224_ACEOF
32225if ac_fn_c_try_cpp "$LINENO"; then :
32226
32227else
32228  # Broken: fails on valid input.
32229continue
32230fi
32231rm -f conftest.err conftest.i conftest.$ac_ext
32232
32233  # OK, works on sane cases.  Now check whether nonexistent headers
32234  # can be detected and how.
32235  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32236/* end confdefs.h.  */
32237#include <ac_nonexistent.h>
32238_ACEOF
32239if ac_fn_c_try_cpp "$LINENO"; then :
32240  # Broken: success on invalid input.
32241continue
32242else
32243  # Passes both tests.
32244ac_preproc_ok=:
32245break
32246fi
32247rm -f conftest.err conftest.i conftest.$ac_ext
32248
32249done
32250# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32251rm -f conftest.i conftest.err conftest.$ac_ext
32252if $ac_preproc_ok; then :
32253
32254else
32255  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32257as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
32258See \`config.log' for more details" "$LINENO" 5; }
32259fi
32260
32261ac_ext=cpp
32262ac_cpp='$CXXCPP $CPPFLAGS'
32263ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32264ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32265ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32266
32267
32268  # Only process if variable expands to non-empty
32269
32270  if test "x$CPP" != x; then
32271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32272
32273  # First separate the path from the arguments. This will split at the first
32274  # space.
32275  complete="$CPP"
32276  path="${complete%% *}"
32277  tmp="$complete EOL"
32278  arguments="${tmp#* }"
32279
32280  # Input might be given as Windows format, start by converting to
32281  # unix format.
32282  new_path=`$CYGPATH -u "$path"`
32283
32284  # Now try to locate executable using which
32285  new_path=`$WHICH "$new_path" 2> /dev/null`
32286  # bat and cmd files are not always considered executable in cygwin causing which
32287  # to not find them
32288  if test "x$new_path" = x \
32289      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32290      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32291    new_path=`$CYGPATH -u "$path"`
32292  fi
32293  if test "x$new_path" = x; then
32294    # Oops. Which didn't find the executable.
32295    # The splitting of arguments from the executable at a space might have been incorrect,
32296    # since paths with space are more likely in Windows. Give it another try with the whole
32297    # argument.
32298    path="$complete"
32299    arguments="EOL"
32300    new_path=`$CYGPATH -u "$path"`
32301    new_path=`$WHICH "$new_path" 2> /dev/null`
32302    # bat and cmd files are not always considered executable in cygwin causing which
32303    # to not find them
32304    if test "x$new_path" = x \
32305        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32306        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32307      new_path=`$CYGPATH -u "$path"`
32308    fi
32309    if test "x$new_path" = x; then
32310      # It's still not found. Now this is an unrecoverable error.
32311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32312$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32313      has_space=`$ECHO "$complete" | $GREP " "`
32314      if test "x$has_space" != x; then
32315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32317      fi
32318      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32319    fi
32320  fi
32321
32322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32325  # "foo.exe" is OK but "foo" is an error.
32326  #
32327  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32328  # It is also a way to make sure we got the proper file name for the real test later on.
32329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32330  if test "x$test_shortpath" = x; then
32331    # Short path failed, file does not exist as specified.
32332    # Try adding .exe or .cmd
32333    if test -f "${new_path}.exe"; then
32334      input_to_shortpath="${new_path}.exe"
32335    elif test -f "${new_path}.cmd"; then
32336      input_to_shortpath="${new_path}.cmd"
32337    else
32338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
32339$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
32340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32342      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32343    fi
32344  else
32345    input_to_shortpath="$new_path"
32346  fi
32347
32348  # Call helper function which possibly converts this using DOS-style short mode.
32349  # If so, the updated path is stored in $new_path.
32350  new_path="$input_to_shortpath"
32351
32352  input_path="$input_to_shortpath"
32353  # Check if we need to convert this using DOS-style short mode. If the path
32354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32355  # take no chances and rewrite it.
32356  # Note: m4 eats our [], so we need to use [ and ] instead.
32357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32358  if test "x$has_forbidden_chars" != x; then
32359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32363      # Going to short mode and back again did indeed matter. Since short mode is
32364      # case insensitive, let's make it lowercase to improve readability.
32365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32366      # Now convert it back to Unix-style (cygpath)
32367      input_path=`$CYGPATH -u "$shortmode_path"`
32368      new_path="$input_path"
32369    fi
32370  fi
32371
32372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32373  if test "x$test_cygdrive_prefix" = x; then
32374    # As a simple fix, exclude /usr/bin since it's not a real path.
32375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32377      # a path prefixed by /cygdrive for fixpath to work.
32378      new_path="$CYGWIN_ROOT_PATH$input_path"
32379    fi
32380  fi
32381
32382  # remove trailing .exe if any
32383  new_path="${new_path/%.exe/}"
32384
32385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32386
32387  # First separate the path from the arguments. This will split at the first
32388  # space.
32389  complete="$CPP"
32390  path="${complete%% *}"
32391  tmp="$complete EOL"
32392  arguments="${tmp#* }"
32393
32394  # Input might be given as Windows format, start by converting to
32395  # unix format.
32396  new_path="$path"
32397
32398  windows_path="$new_path"
32399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32400    unix_path=`$CYGPATH -u "$windows_path"`
32401    new_path="$unix_path"
32402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32404    new_path="$unix_path"
32405  fi
32406
32407
32408  # Now try to locate executable using which
32409  new_path=`$WHICH "$new_path" 2> /dev/null`
32410
32411  if test "x$new_path" = x; then
32412    # Oops. Which didn't find the executable.
32413    # The splitting of arguments from the executable at a space might have been incorrect,
32414    # since paths with space are more likely in Windows. Give it another try with the whole
32415    # argument.
32416    path="$complete"
32417    arguments="EOL"
32418    new_path="$path"
32419
32420  windows_path="$new_path"
32421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32422    unix_path=`$CYGPATH -u "$windows_path"`
32423    new_path="$unix_path"
32424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32426    new_path="$unix_path"
32427  fi
32428
32429
32430    new_path=`$WHICH "$new_path" 2> /dev/null`
32431    # bat and cmd files are not always considered executable in MSYS causing which
32432    # to not find them
32433    if test "x$new_path" = x \
32434        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32435        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32436      new_path="$path"
32437
32438  windows_path="$new_path"
32439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32440    unix_path=`$CYGPATH -u "$windows_path"`
32441    new_path="$unix_path"
32442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32444    new_path="$unix_path"
32445  fi
32446
32447    fi
32448
32449    if test "x$new_path" = x; then
32450      # It's still not found. Now this is an unrecoverable error.
32451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32452$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32453      has_space=`$ECHO "$complete" | $GREP " "`
32454      if test "x$has_space" != x; then
32455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32457      fi
32458      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32459    fi
32460  fi
32461
32462  # Now new_path has a complete unix path to the binary
32463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32464    # Keep paths in /bin as-is, but remove trailing .exe if any
32465    new_path="${new_path/%.exe/}"
32466    # Do not save /bin paths to all_fixpath_prefixes!
32467  else
32468    # Not in mixed or Windows style, start by that.
32469    new_path=`cmd //c echo $new_path`
32470
32471  input_path="$new_path"
32472  # Check if we need to convert this using DOS-style short mode. If the path
32473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32474  # take no chances and rewrite it.
32475  # Note: m4 eats our [], so we need to use [ and ] instead.
32476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32477  if test "x$has_forbidden_chars" != x; then
32478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32480  fi
32481
32482    # Output is in $new_path
32483
32484  windows_path="$new_path"
32485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32486    unix_path=`$CYGPATH -u "$windows_path"`
32487    new_path="$unix_path"
32488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32490    new_path="$unix_path"
32491  fi
32492
32493    # remove trailing .exe if any
32494    new_path="${new_path/%.exe/}"
32495
32496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32498  fi
32499
32500    else
32501      # We're on a unix platform. Hooray! :)
32502      # First separate the path from the arguments. This will split at the first
32503      # space.
32504      complete="$CPP"
32505      path="${complete%% *}"
32506      tmp="$complete EOL"
32507      arguments="${tmp#* }"
32508
32509      # Cannot rely on the command "which" here since it doesn't always work.
32510      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32511      if test -z "$is_absolute_path"; then
32512        # Path to executable is not absolute. Find it.
32513        IFS_save="$IFS"
32514        IFS=:
32515        for p in $PATH; do
32516          if test -f "$p/$path" && test -x "$p/$path"; then
32517            new_path="$p/$path"
32518            break
32519          fi
32520        done
32521        IFS="$IFS_save"
32522      else
32523        # This is an absolute path, we can use it without further modifications.
32524        new_path="$path"
32525      fi
32526
32527      if test "x$new_path" = x; then
32528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32529$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32530        has_space=`$ECHO "$complete" | $GREP " "`
32531        if test "x$has_space" != x; then
32532          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32533$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32534        fi
32535        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32536      fi
32537    fi
32538
32539    # Now join together the path and the arguments once again
32540    if test "x$arguments" != xEOL; then
32541      new_complete="$new_path ${arguments% *}"
32542    else
32543      new_complete="$new_path"
32544    fi
32545
32546    if test "x$complete" != "x$new_complete"; then
32547      CPP="$new_complete"
32548      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32549$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32550    fi
32551  fi
32552
32553  ac_ext=cpp
32554ac_cpp='$CXXCPP $CPPFLAGS'
32555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32559$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32560if test -z "$CXXCPP"; then
32561  if ${ac_cv_prog_CXXCPP+:} false; then :
32562  $as_echo_n "(cached) " >&6
32563else
32564      # Double quotes because CXXCPP needs to be expanded
32565    for CXXCPP in "$CXX -E" "/lib/cpp"
32566    do
32567      ac_preproc_ok=false
32568for ac_cxx_preproc_warn_flag in '' yes
32569do
32570  # Use a header file that comes with gcc, so configuring glibc
32571  # with a fresh cross-compiler works.
32572  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32573  # <limits.h> exists even on freestanding compilers.
32574  # On the NeXT, cc -E runs the code through the compiler's parser,
32575  # not just through cpp. "Syntax error" is here to catch this case.
32576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32577/* end confdefs.h.  */
32578#ifdef __STDC__
32579# include <limits.h>
32580#else
32581# include <assert.h>
32582#endif
32583		     Syntax error
32584_ACEOF
32585if ac_fn_cxx_try_cpp "$LINENO"; then :
32586
32587else
32588  # Broken: fails on valid input.
32589continue
32590fi
32591rm -f conftest.err conftest.i conftest.$ac_ext
32592
32593  # OK, works on sane cases.  Now check whether nonexistent headers
32594  # can be detected and how.
32595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32596/* end confdefs.h.  */
32597#include <ac_nonexistent.h>
32598_ACEOF
32599if ac_fn_cxx_try_cpp "$LINENO"; then :
32600  # Broken: success on invalid input.
32601continue
32602else
32603  # Passes both tests.
32604ac_preproc_ok=:
32605break
32606fi
32607rm -f conftest.err conftest.i conftest.$ac_ext
32608
32609done
32610# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32611rm -f conftest.i conftest.err conftest.$ac_ext
32612if $ac_preproc_ok; then :
32613  break
32614fi
32615
32616    done
32617    ac_cv_prog_CXXCPP=$CXXCPP
32618
32619fi
32620  CXXCPP=$ac_cv_prog_CXXCPP
32621else
32622  ac_cv_prog_CXXCPP=$CXXCPP
32623fi
32624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32625$as_echo "$CXXCPP" >&6; }
32626ac_preproc_ok=false
32627for ac_cxx_preproc_warn_flag in '' yes
32628do
32629  # Use a header file that comes with gcc, so configuring glibc
32630  # with a fresh cross-compiler works.
32631  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32632  # <limits.h> exists even on freestanding compilers.
32633  # On the NeXT, cc -E runs the code through the compiler's parser,
32634  # not just through cpp. "Syntax error" is here to catch this case.
32635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32636/* end confdefs.h.  */
32637#ifdef __STDC__
32638# include <limits.h>
32639#else
32640# include <assert.h>
32641#endif
32642		     Syntax error
32643_ACEOF
32644if ac_fn_cxx_try_cpp "$LINENO"; then :
32645
32646else
32647  # Broken: fails on valid input.
32648continue
32649fi
32650rm -f conftest.err conftest.i conftest.$ac_ext
32651
32652  # OK, works on sane cases.  Now check whether nonexistent headers
32653  # can be detected and how.
32654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32655/* end confdefs.h.  */
32656#include <ac_nonexistent.h>
32657_ACEOF
32658if ac_fn_cxx_try_cpp "$LINENO"; then :
32659  # Broken: success on invalid input.
32660continue
32661else
32662  # Passes both tests.
32663ac_preproc_ok=:
32664break
32665fi
32666rm -f conftest.err conftest.i conftest.$ac_ext
32667
32668done
32669# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32670rm -f conftest.i conftest.err conftest.$ac_ext
32671if $ac_preproc_ok; then :
32672
32673else
32674  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32676as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32677See \`config.log' for more details" "$LINENO" 5; }
32678fi
32679
32680ac_ext=cpp
32681ac_cpp='$CXXCPP $CPPFLAGS'
32682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32685
32686
32687  # Only process if variable expands to non-empty
32688
32689  if test "x$CXXCPP" != x; then
32690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32691
32692  # First separate the path from the arguments. This will split at the first
32693  # space.
32694  complete="$CXXCPP"
32695  path="${complete%% *}"
32696  tmp="$complete EOL"
32697  arguments="${tmp#* }"
32698
32699  # Input might be given as Windows format, start by converting to
32700  # unix format.
32701  new_path=`$CYGPATH -u "$path"`
32702
32703  # Now try to locate executable using which
32704  new_path=`$WHICH "$new_path" 2> /dev/null`
32705  # bat and cmd files are not always considered executable in cygwin causing which
32706  # to not find them
32707  if test "x$new_path" = x \
32708      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32709      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32710    new_path=`$CYGPATH -u "$path"`
32711  fi
32712  if test "x$new_path" = x; then
32713    # Oops. Which didn't find the executable.
32714    # The splitting of arguments from the executable at a space might have been incorrect,
32715    # since paths with space are more likely in Windows. Give it another try with the whole
32716    # argument.
32717    path="$complete"
32718    arguments="EOL"
32719    new_path=`$CYGPATH -u "$path"`
32720    new_path=`$WHICH "$new_path" 2> /dev/null`
32721    # bat and cmd files are not always considered executable in cygwin causing which
32722    # to not find them
32723    if test "x$new_path" = x \
32724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32726      new_path=`$CYGPATH -u "$path"`
32727    fi
32728    if test "x$new_path" = x; then
32729      # It's still not found. Now this is an unrecoverable error.
32730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32731$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32732      has_space=`$ECHO "$complete" | $GREP " "`
32733      if test "x$has_space" != x; then
32734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32736      fi
32737      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32738    fi
32739  fi
32740
32741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32744  # "foo.exe" is OK but "foo" is an error.
32745  #
32746  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32747  # It is also a way to make sure we got the proper file name for the real test later on.
32748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32749  if test "x$test_shortpath" = x; then
32750    # Short path failed, file does not exist as specified.
32751    # Try adding .exe or .cmd
32752    if test -f "${new_path}.exe"; then
32753      input_to_shortpath="${new_path}.exe"
32754    elif test -f "${new_path}.cmd"; then
32755      input_to_shortpath="${new_path}.cmd"
32756    else
32757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32758$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32761      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32762    fi
32763  else
32764    input_to_shortpath="$new_path"
32765  fi
32766
32767  # Call helper function which possibly converts this using DOS-style short mode.
32768  # If so, the updated path is stored in $new_path.
32769  new_path="$input_to_shortpath"
32770
32771  input_path="$input_to_shortpath"
32772  # Check if we need to convert this using DOS-style short mode. If the path
32773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32774  # take no chances and rewrite it.
32775  # Note: m4 eats our [], so we need to use [ and ] instead.
32776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32777  if test "x$has_forbidden_chars" != x; then
32778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32782      # Going to short mode and back again did indeed matter. Since short mode is
32783      # case insensitive, let's make it lowercase to improve readability.
32784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32785      # Now convert it back to Unix-style (cygpath)
32786      input_path=`$CYGPATH -u "$shortmode_path"`
32787      new_path="$input_path"
32788    fi
32789  fi
32790
32791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32792  if test "x$test_cygdrive_prefix" = x; then
32793    # As a simple fix, exclude /usr/bin since it's not a real path.
32794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32796      # a path prefixed by /cygdrive for fixpath to work.
32797      new_path="$CYGWIN_ROOT_PATH$input_path"
32798    fi
32799  fi
32800
32801  # remove trailing .exe if any
32802  new_path="${new_path/%.exe/}"
32803
32804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32805
32806  # First separate the path from the arguments. This will split at the first
32807  # space.
32808  complete="$CXXCPP"
32809  path="${complete%% *}"
32810  tmp="$complete EOL"
32811  arguments="${tmp#* }"
32812
32813  # Input might be given as Windows format, start by converting to
32814  # unix format.
32815  new_path="$path"
32816
32817  windows_path="$new_path"
32818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819    unix_path=`$CYGPATH -u "$windows_path"`
32820    new_path="$unix_path"
32821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32823    new_path="$unix_path"
32824  fi
32825
32826
32827  # Now try to locate executable using which
32828  new_path=`$WHICH "$new_path" 2> /dev/null`
32829
32830  if test "x$new_path" = x; then
32831    # Oops. Which didn't find the executable.
32832    # The splitting of arguments from the executable at a space might have been incorrect,
32833    # since paths with space are more likely in Windows. Give it another try with the whole
32834    # argument.
32835    path="$complete"
32836    arguments="EOL"
32837    new_path="$path"
32838
32839  windows_path="$new_path"
32840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32841    unix_path=`$CYGPATH -u "$windows_path"`
32842    new_path="$unix_path"
32843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32845    new_path="$unix_path"
32846  fi
32847
32848
32849    new_path=`$WHICH "$new_path" 2> /dev/null`
32850    # bat and cmd files are not always considered executable in MSYS causing which
32851    # to not find them
32852    if test "x$new_path" = x \
32853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32855      new_path="$path"
32856
32857  windows_path="$new_path"
32858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32859    unix_path=`$CYGPATH -u "$windows_path"`
32860    new_path="$unix_path"
32861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32863    new_path="$unix_path"
32864  fi
32865
32866    fi
32867
32868    if test "x$new_path" = x; then
32869      # It's still not found. Now this is an unrecoverable error.
32870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32871$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32872      has_space=`$ECHO "$complete" | $GREP " "`
32873      if test "x$has_space" != x; then
32874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32876      fi
32877      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32878    fi
32879  fi
32880
32881  # Now new_path has a complete unix path to the binary
32882  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32883    # Keep paths in /bin as-is, but remove trailing .exe if any
32884    new_path="${new_path/%.exe/}"
32885    # Do not save /bin paths to all_fixpath_prefixes!
32886  else
32887    # Not in mixed or Windows style, start by that.
32888    new_path=`cmd //c echo $new_path`
32889
32890  input_path="$new_path"
32891  # Check if we need to convert this using DOS-style short mode. If the path
32892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32893  # take no chances and rewrite it.
32894  # Note: m4 eats our [], so we need to use [ and ] instead.
32895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32896  if test "x$has_forbidden_chars" != x; then
32897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899  fi
32900
32901    # Output is in $new_path
32902
32903  windows_path="$new_path"
32904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32905    unix_path=`$CYGPATH -u "$windows_path"`
32906    new_path="$unix_path"
32907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32909    new_path="$unix_path"
32910  fi
32911
32912    # remove trailing .exe if any
32913    new_path="${new_path/%.exe/}"
32914
32915    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32916    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32917  fi
32918
32919    else
32920      # We're on a unix platform. Hooray! :)
32921      # First separate the path from the arguments. This will split at the first
32922      # space.
32923      complete="$CXXCPP"
32924      path="${complete%% *}"
32925      tmp="$complete EOL"
32926      arguments="${tmp#* }"
32927
32928      # Cannot rely on the command "which" here since it doesn't always work.
32929      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32930      if test -z "$is_absolute_path"; then
32931        # Path to executable is not absolute. Find it.
32932        IFS_save="$IFS"
32933        IFS=:
32934        for p in $PATH; do
32935          if test -f "$p/$path" && test -x "$p/$path"; then
32936            new_path="$p/$path"
32937            break
32938          fi
32939        done
32940        IFS="$IFS_save"
32941      else
32942        # This is an absolute path, we can use it without further modifications.
32943        new_path="$path"
32944      fi
32945
32946      if test "x$new_path" = x; then
32947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32948$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32949        has_space=`$ECHO "$complete" | $GREP " "`
32950        if test "x$has_space" != x; then
32951          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32953        fi
32954        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32955      fi
32956    fi
32957
32958    # Now join together the path and the arguments once again
32959    if test "x$arguments" != xEOL; then
32960      new_complete="$new_path ${arguments% *}"
32961    else
32962      new_complete="$new_path"
32963    fi
32964
32965    if test "x$complete" != "x$new_complete"; then
32966      CXXCPP="$new_complete"
32967      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32968$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32969    fi
32970  fi
32971
32972
32973  #
32974  # Setup the linker (LD)
32975  #
32976  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32977    # In the Microsoft toolchain we have a separate LD command "link".
32978    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32979    # a cygwin program for something completely different.
32980    # Extract the first word of "link", so it can be a program name with args.
32981set dummy link; ac_word=$2
32982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32983$as_echo_n "checking for $ac_word... " >&6; }
32984if ${ac_cv_prog_LD+:} false; then :
32985  $as_echo_n "(cached) " >&6
32986else
32987  if test -n "$LD"; then
32988  ac_cv_prog_LD="$LD" # Let the user override the test.
32989else
32990  ac_prog_rejected=no
32991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32992for as_dir in $PATH
32993do
32994  IFS=$as_save_IFS
32995  test -z "$as_dir" && as_dir=.
32996    for ac_exec_ext in '' $ac_executable_extensions; do
32997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32998    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32999       ac_prog_rejected=yes
33000       continue
33001     fi
33002    ac_cv_prog_LD="link"
33003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33004    break 2
33005  fi
33006done
33007  done
33008IFS=$as_save_IFS
33009
33010if test $ac_prog_rejected = yes; then
33011  # We found a bogon in the path, so make sure we never use it.
33012  set dummy $ac_cv_prog_LD
33013  shift
33014  if test $# != 0; then
33015    # We chose a different compiler from the bogus one.
33016    # However, it has the same basename, so the bogon will be chosen
33017    # first if we set LD to just the basename; use the full file name.
33018    shift
33019    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
33020  fi
33021fi
33022fi
33023fi
33024LD=$ac_cv_prog_LD
33025if test -n "$LD"; then
33026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
33027$as_echo "$LD" >&6; }
33028else
33029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33030$as_echo "no" >&6; }
33031fi
33032
33033
33034
33035  # Only process if variable expands to non-empty
33036
33037  if test "x$LD" != x; then
33038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33039
33040  # First separate the path from the arguments. This will split at the first
33041  # space.
33042  complete="$LD"
33043  path="${complete%% *}"
33044  tmp="$complete EOL"
33045  arguments="${tmp#* }"
33046
33047  # Input might be given as Windows format, start by converting to
33048  # unix format.
33049  new_path=`$CYGPATH -u "$path"`
33050
33051  # Now try to locate executable using which
33052  new_path=`$WHICH "$new_path" 2> /dev/null`
33053  # bat and cmd files are not always considered executable in cygwin causing which
33054  # to not find them
33055  if test "x$new_path" = x \
33056      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33057      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33058    new_path=`$CYGPATH -u "$path"`
33059  fi
33060  if test "x$new_path" = x; then
33061    # Oops. Which didn't find the executable.
33062    # The splitting of arguments from the executable at a space might have been incorrect,
33063    # since paths with space are more likely in Windows. Give it another try with the whole
33064    # argument.
33065    path="$complete"
33066    arguments="EOL"
33067    new_path=`$CYGPATH -u "$path"`
33068    new_path=`$WHICH "$new_path" 2> /dev/null`
33069    # bat and cmd files are not always considered executable in cygwin causing which
33070    # to not find them
33071    if test "x$new_path" = x \
33072        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33073        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33074      new_path=`$CYGPATH -u "$path"`
33075    fi
33076    if test "x$new_path" = x; then
33077      # It's still not found. Now this is an unrecoverable error.
33078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33079$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33080      has_space=`$ECHO "$complete" | $GREP " "`
33081      if test "x$has_space" != x; then
33082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33084      fi
33085      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33086    fi
33087  fi
33088
33089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33092  # "foo.exe" is OK but "foo" is an error.
33093  #
33094  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33095  # It is also a way to make sure we got the proper file name for the real test later on.
33096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33097  if test "x$test_shortpath" = x; then
33098    # Short path failed, file does not exist as specified.
33099    # Try adding .exe or .cmd
33100    if test -f "${new_path}.exe"; then
33101      input_to_shortpath="${new_path}.exe"
33102    elif test -f "${new_path}.cmd"; then
33103      input_to_shortpath="${new_path}.cmd"
33104    else
33105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
33106$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
33107      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33108$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33109      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33110    fi
33111  else
33112    input_to_shortpath="$new_path"
33113  fi
33114
33115  # Call helper function which possibly converts this using DOS-style short mode.
33116  # If so, the updated path is stored in $new_path.
33117  new_path="$input_to_shortpath"
33118
33119  input_path="$input_to_shortpath"
33120  # Check if we need to convert this using DOS-style short mode. If the path
33121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33122  # take no chances and rewrite it.
33123  # Note: m4 eats our [], so we need to use [ and ] instead.
33124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33125  if test "x$has_forbidden_chars" != x; then
33126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33130      # Going to short mode and back again did indeed matter. Since short mode is
33131      # case insensitive, let's make it lowercase to improve readability.
33132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33133      # Now convert it back to Unix-style (cygpath)
33134      input_path=`$CYGPATH -u "$shortmode_path"`
33135      new_path="$input_path"
33136    fi
33137  fi
33138
33139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33140  if test "x$test_cygdrive_prefix" = x; then
33141    # As a simple fix, exclude /usr/bin since it's not a real path.
33142    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33144      # a path prefixed by /cygdrive for fixpath to work.
33145      new_path="$CYGWIN_ROOT_PATH$input_path"
33146    fi
33147  fi
33148
33149  # remove trailing .exe if any
33150  new_path="${new_path/%.exe/}"
33151
33152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33153
33154  # First separate the path from the arguments. This will split at the first
33155  # space.
33156  complete="$LD"
33157  path="${complete%% *}"
33158  tmp="$complete EOL"
33159  arguments="${tmp#* }"
33160
33161  # Input might be given as Windows format, start by converting to
33162  # unix format.
33163  new_path="$path"
33164
33165  windows_path="$new_path"
33166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33167    unix_path=`$CYGPATH -u "$windows_path"`
33168    new_path="$unix_path"
33169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33171    new_path="$unix_path"
33172  fi
33173
33174
33175  # Now try to locate executable using which
33176  new_path=`$WHICH "$new_path" 2> /dev/null`
33177
33178  if test "x$new_path" = x; then
33179    # Oops. Which didn't find the executable.
33180    # The splitting of arguments from the executable at a space might have been incorrect,
33181    # since paths with space are more likely in Windows. Give it another try with the whole
33182    # argument.
33183    path="$complete"
33184    arguments="EOL"
33185    new_path="$path"
33186
33187  windows_path="$new_path"
33188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33189    unix_path=`$CYGPATH -u "$windows_path"`
33190    new_path="$unix_path"
33191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33193    new_path="$unix_path"
33194  fi
33195
33196
33197    new_path=`$WHICH "$new_path" 2> /dev/null`
33198    # bat and cmd files are not always considered executable in MSYS causing which
33199    # to not find them
33200    if test "x$new_path" = x \
33201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33203      new_path="$path"
33204
33205  windows_path="$new_path"
33206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33207    unix_path=`$CYGPATH -u "$windows_path"`
33208    new_path="$unix_path"
33209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33211    new_path="$unix_path"
33212  fi
33213
33214    fi
33215
33216    if test "x$new_path" = x; then
33217      # It's still not found. Now this is an unrecoverable error.
33218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33219$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33220      has_space=`$ECHO "$complete" | $GREP " "`
33221      if test "x$has_space" != x; then
33222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33224      fi
33225      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33226    fi
33227  fi
33228
33229  # Now new_path has a complete unix path to the binary
33230  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33231    # Keep paths in /bin as-is, but remove trailing .exe if any
33232    new_path="${new_path/%.exe/}"
33233    # Do not save /bin paths to all_fixpath_prefixes!
33234  else
33235    # Not in mixed or Windows style, start by that.
33236    new_path=`cmd //c echo $new_path`
33237
33238  input_path="$new_path"
33239  # Check if we need to convert this using DOS-style short mode. If the path
33240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33241  # take no chances and rewrite it.
33242  # Note: m4 eats our [], so we need to use [ and ] instead.
33243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33244  if test "x$has_forbidden_chars" != x; then
33245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33247  fi
33248
33249    # Output is in $new_path
33250
33251  windows_path="$new_path"
33252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33253    unix_path=`$CYGPATH -u "$windows_path"`
33254    new_path="$unix_path"
33255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33257    new_path="$unix_path"
33258  fi
33259
33260    # remove trailing .exe if any
33261    new_path="${new_path/%.exe/}"
33262
33263    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33264    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33265  fi
33266
33267    else
33268      # We're on a unix platform. Hooray! :)
33269      # First separate the path from the arguments. This will split at the first
33270      # space.
33271      complete="$LD"
33272      path="${complete%% *}"
33273      tmp="$complete EOL"
33274      arguments="${tmp#* }"
33275
33276      # Cannot rely on the command "which" here since it doesn't always work.
33277      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33278      if test -z "$is_absolute_path"; then
33279        # Path to executable is not absolute. Find it.
33280        IFS_save="$IFS"
33281        IFS=:
33282        for p in $PATH; do
33283          if test -f "$p/$path" && test -x "$p/$path"; then
33284            new_path="$p/$path"
33285            break
33286          fi
33287        done
33288        IFS="$IFS_save"
33289      else
33290        # This is an absolute path, we can use it without further modifications.
33291        new_path="$path"
33292      fi
33293
33294      if test "x$new_path" = x; then
33295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33296$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33297        has_space=`$ECHO "$complete" | $GREP " "`
33298        if test "x$has_space" != x; then
33299          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33300$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33301        fi
33302        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33303      fi
33304    fi
33305
33306    # Now join together the path and the arguments once again
33307    if test "x$arguments" != xEOL; then
33308      new_complete="$new_path ${arguments% *}"
33309    else
33310      new_complete="$new_path"
33311    fi
33312
33313    if test "x$complete" != "x$new_complete"; then
33314      LD="$new_complete"
33315      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
33316$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
33317    fi
33318  fi
33319
33320    # Verify that we indeed succeeded with this trick.
33321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33322$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33323    "$LD" --version > /dev/null
33324    if test $? -eq 0 ; then
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33326$as_echo "no" >&6; }
33327      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33328    else
33329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33330$as_echo "yes" >&6; }
33331    fi
33332    LDCXX="$LD"
33333  else
33334    # All other toolchains use the compiler to link.
33335    LD="$CC"
33336    LDCXX="$CXX"
33337  fi
33338
33339  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
33340
33341
33342  #
33343  # Setup the assembler (AS)
33344  #
33345  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
33346    # FIXME: should this really be solaris, or solstudio?
33347
33348
33349  # Publish this variable in the help.
33350
33351
33352  if [ -z "${AS+x}" ]; then
33353    # The variable is not set by user, try to locate tool using the code snippet
33354    for ac_prog in as
33355do
33356  # Extract the first word of "$ac_prog", so it can be a program name with args.
33357set dummy $ac_prog; ac_word=$2
33358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33359$as_echo_n "checking for $ac_word... " >&6; }
33360if ${ac_cv_path_AS+:} false; then :
33361  $as_echo_n "(cached) " >&6
33362else
33363  case $AS in
33364  [\\/]* | ?:[\\/]*)
33365  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33366  ;;
33367  *)
33368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33369for as_dir in $PATH
33370do
33371  IFS=$as_save_IFS
33372  test -z "$as_dir" && as_dir=.
33373    for ac_exec_ext in '' $ac_executable_extensions; do
33374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33375    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33377    break 2
33378  fi
33379done
33380  done
33381IFS=$as_save_IFS
33382
33383  ;;
33384esac
33385fi
33386AS=$ac_cv_path_AS
33387if test -n "$AS"; then
33388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33389$as_echo "$AS" >&6; }
33390else
33391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33392$as_echo "no" >&6; }
33393fi
33394
33395
33396  test -n "$AS" && break
33397done
33398
33399  else
33400    # The variable is set, but is it from the command line or the environment?
33401
33402    # Try to remove the string !AS! from our list.
33403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33405      # If it failed, the variable was not from the command line. Ignore it,
33406      # but warn the user (except for BASH, which is always set by the calling BASH).
33407      if test "xAS" != xBASH; then
33408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33409$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33410      fi
33411      # Try to locate tool using the code snippet
33412      for ac_prog in as
33413do
33414  # Extract the first word of "$ac_prog", so it can be a program name with args.
33415set dummy $ac_prog; ac_word=$2
33416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33417$as_echo_n "checking for $ac_word... " >&6; }
33418if ${ac_cv_path_AS+:} false; then :
33419  $as_echo_n "(cached) " >&6
33420else
33421  case $AS in
33422  [\\/]* | ?:[\\/]*)
33423  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33424  ;;
33425  *)
33426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33427for as_dir in $PATH
33428do
33429  IFS=$as_save_IFS
33430  test -z "$as_dir" && as_dir=.
33431    for ac_exec_ext in '' $ac_executable_extensions; do
33432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33433    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33435    break 2
33436  fi
33437done
33438  done
33439IFS=$as_save_IFS
33440
33441  ;;
33442esac
33443fi
33444AS=$ac_cv_path_AS
33445if test -n "$AS"; then
33446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33447$as_echo "$AS" >&6; }
33448else
33449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33450$as_echo "no" >&6; }
33451fi
33452
33453
33454  test -n "$AS" && break
33455done
33456
33457    else
33458      # If it succeeded, then it was overridden by the user. We will use it
33459      # for the tool.
33460
33461      # First remove it from the list of overridden variables, so we can test
33462      # for unknown variables in the end.
33463      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33464
33465      # Check if we try to supply an empty value
33466      if test "x$AS" = x; then
33467        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
33468$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
33469        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33470$as_echo_n "checking for AS... " >&6; }
33471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
33472$as_echo "disabled" >&6; }
33473      else
33474        # Check if the provided tool contains a complete path.
33475        tool_specified="$AS"
33476        tool_basename="${tool_specified##*/}"
33477        if test "x$tool_basename" = "x$tool_specified"; then
33478          # A command without a complete path is provided, search $PATH.
33479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33480$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33481          # Extract the first word of "$tool_basename", so it can be a program name with args.
33482set dummy $tool_basename; ac_word=$2
33483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33484$as_echo_n "checking for $ac_word... " >&6; }
33485if ${ac_cv_path_AS+:} false; then :
33486  $as_echo_n "(cached) " >&6
33487else
33488  case $AS in
33489  [\\/]* | ?:[\\/]*)
33490  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33491  ;;
33492  *)
33493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33494for as_dir in $PATH
33495do
33496  IFS=$as_save_IFS
33497  test -z "$as_dir" && as_dir=.
33498    for ac_exec_ext in '' $ac_executable_extensions; do
33499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33500    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33502    break 2
33503  fi
33504done
33505  done
33506IFS=$as_save_IFS
33507
33508  ;;
33509esac
33510fi
33511AS=$ac_cv_path_AS
33512if test -n "$AS"; then
33513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33514$as_echo "$AS" >&6; }
33515else
33516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33517$as_echo "no" >&6; }
33518fi
33519
33520
33521          if test "x$AS" = x; then
33522            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33523          fi
33524        else
33525          # Otherwise we believe it is a complete path. Use it as it is.
33526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33527$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33528          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33529$as_echo_n "checking for AS... " >&6; }
33530          if test ! -x "$tool_specified"; then
33531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33532$as_echo "not found" >&6; }
33533            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33534          fi
33535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33536$as_echo "$tool_specified" >&6; }
33537        fi
33538      fi
33539    fi
33540  fi
33541
33542
33543
33544  # Only process if variable expands to non-empty
33545
33546  if test "x$AS" != x; then
33547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33548
33549  # First separate the path from the arguments. This will split at the first
33550  # space.
33551  complete="$AS"
33552  path="${complete%% *}"
33553  tmp="$complete EOL"
33554  arguments="${tmp#* }"
33555
33556  # Input might be given as Windows format, start by converting to
33557  # unix format.
33558  new_path=`$CYGPATH -u "$path"`
33559
33560  # Now try to locate executable using which
33561  new_path=`$WHICH "$new_path" 2> /dev/null`
33562  # bat and cmd files are not always considered executable in cygwin causing which
33563  # to not find them
33564  if test "x$new_path" = x \
33565      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33566      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33567    new_path=`$CYGPATH -u "$path"`
33568  fi
33569  if test "x$new_path" = x; then
33570    # Oops. Which didn't find the executable.
33571    # The splitting of arguments from the executable at a space might have been incorrect,
33572    # since paths with space are more likely in Windows. Give it another try with the whole
33573    # argument.
33574    path="$complete"
33575    arguments="EOL"
33576    new_path=`$CYGPATH -u "$path"`
33577    new_path=`$WHICH "$new_path" 2> /dev/null`
33578    # bat and cmd files are not always considered executable in cygwin causing which
33579    # to not find them
33580    if test "x$new_path" = x \
33581        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33582        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33583      new_path=`$CYGPATH -u "$path"`
33584    fi
33585    if test "x$new_path" = x; then
33586      # It's still not found. Now this is an unrecoverable error.
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33588$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33589      has_space=`$ECHO "$complete" | $GREP " "`
33590      if test "x$has_space" != x; then
33591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33593      fi
33594      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33595    fi
33596  fi
33597
33598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33601  # "foo.exe" is OK but "foo" is an error.
33602  #
33603  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33604  # It is also a way to make sure we got the proper file name for the real test later on.
33605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33606  if test "x$test_shortpath" = x; then
33607    # Short path failed, file does not exist as specified.
33608    # Try adding .exe or .cmd
33609    if test -f "${new_path}.exe"; then
33610      input_to_shortpath="${new_path}.exe"
33611    elif test -f "${new_path}.cmd"; then
33612      input_to_shortpath="${new_path}.cmd"
33613    else
33614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33615$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33616      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33617$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33618      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33619    fi
33620  else
33621    input_to_shortpath="$new_path"
33622  fi
33623
33624  # Call helper function which possibly converts this using DOS-style short mode.
33625  # If so, the updated path is stored in $new_path.
33626  new_path="$input_to_shortpath"
33627
33628  input_path="$input_to_shortpath"
33629  # Check if we need to convert this using DOS-style short mode. If the path
33630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33631  # take no chances and rewrite it.
33632  # Note: m4 eats our [], so we need to use [ and ] instead.
33633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33634  if test "x$has_forbidden_chars" != x; then
33635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33639      # Going to short mode and back again did indeed matter. Since short mode is
33640      # case insensitive, let's make it lowercase to improve readability.
33641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33642      # Now convert it back to Unix-style (cygpath)
33643      input_path=`$CYGPATH -u "$shortmode_path"`
33644      new_path="$input_path"
33645    fi
33646  fi
33647
33648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33649  if test "x$test_cygdrive_prefix" = x; then
33650    # As a simple fix, exclude /usr/bin since it's not a real path.
33651    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33653      # a path prefixed by /cygdrive for fixpath to work.
33654      new_path="$CYGWIN_ROOT_PATH$input_path"
33655    fi
33656  fi
33657
33658  # remove trailing .exe if any
33659  new_path="${new_path/%.exe/}"
33660
33661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33662
33663  # First separate the path from the arguments. This will split at the first
33664  # space.
33665  complete="$AS"
33666  path="${complete%% *}"
33667  tmp="$complete EOL"
33668  arguments="${tmp#* }"
33669
33670  # Input might be given as Windows format, start by converting to
33671  # unix format.
33672  new_path="$path"
33673
33674  windows_path="$new_path"
33675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33676    unix_path=`$CYGPATH -u "$windows_path"`
33677    new_path="$unix_path"
33678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33680    new_path="$unix_path"
33681  fi
33682
33683
33684  # Now try to locate executable using which
33685  new_path=`$WHICH "$new_path" 2> /dev/null`
33686
33687  if test "x$new_path" = x; then
33688    # Oops. Which didn't find the executable.
33689    # The splitting of arguments from the executable at a space might have been incorrect,
33690    # since paths with space are more likely in Windows. Give it another try with the whole
33691    # argument.
33692    path="$complete"
33693    arguments="EOL"
33694    new_path="$path"
33695
33696  windows_path="$new_path"
33697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33698    unix_path=`$CYGPATH -u "$windows_path"`
33699    new_path="$unix_path"
33700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33702    new_path="$unix_path"
33703  fi
33704
33705
33706    new_path=`$WHICH "$new_path" 2> /dev/null`
33707    # bat and cmd files are not always considered executable in MSYS causing which
33708    # to not find them
33709    if test "x$new_path" = x \
33710        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33711        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33712      new_path="$path"
33713
33714  windows_path="$new_path"
33715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33716    unix_path=`$CYGPATH -u "$windows_path"`
33717    new_path="$unix_path"
33718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33720    new_path="$unix_path"
33721  fi
33722
33723    fi
33724
33725    if test "x$new_path" = x; then
33726      # It's still not found. Now this is an unrecoverable error.
33727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33728$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33729      has_space=`$ECHO "$complete" | $GREP " "`
33730      if test "x$has_space" != x; then
33731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33733      fi
33734      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33735    fi
33736  fi
33737
33738  # Now new_path has a complete unix path to the binary
33739  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33740    # Keep paths in /bin as-is, but remove trailing .exe if any
33741    new_path="${new_path/%.exe/}"
33742    # Do not save /bin paths to all_fixpath_prefixes!
33743  else
33744    # Not in mixed or Windows style, start by that.
33745    new_path=`cmd //c echo $new_path`
33746
33747  input_path="$new_path"
33748  # Check if we need to convert this using DOS-style short mode. If the path
33749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33750  # take no chances and rewrite it.
33751  # Note: m4 eats our [], so we need to use [ and ] instead.
33752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33753  if test "x$has_forbidden_chars" != x; then
33754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33756  fi
33757
33758    # Output is in $new_path
33759
33760  windows_path="$new_path"
33761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33762    unix_path=`$CYGPATH -u "$windows_path"`
33763    new_path="$unix_path"
33764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33766    new_path="$unix_path"
33767  fi
33768
33769    # remove trailing .exe if any
33770    new_path="${new_path/%.exe/}"
33771
33772    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33773    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33774  fi
33775
33776    else
33777      # We're on a unix platform. Hooray! :)
33778      # First separate the path from the arguments. This will split at the first
33779      # space.
33780      complete="$AS"
33781      path="${complete%% *}"
33782      tmp="$complete EOL"
33783      arguments="${tmp#* }"
33784
33785      # Cannot rely on the command "which" here since it doesn't always work.
33786      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33787      if test -z "$is_absolute_path"; then
33788        # Path to executable is not absolute. Find it.
33789        IFS_save="$IFS"
33790        IFS=:
33791        for p in $PATH; do
33792          if test -f "$p/$path" && test -x "$p/$path"; then
33793            new_path="$p/$path"
33794            break
33795          fi
33796        done
33797        IFS="$IFS_save"
33798      else
33799        # This is an absolute path, we can use it without further modifications.
33800        new_path="$path"
33801      fi
33802
33803      if test "x$new_path" = x; then
33804        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33805$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33806        has_space=`$ECHO "$complete" | $GREP " "`
33807        if test "x$has_space" != x; then
33808          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33809$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33810        fi
33811        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33812      fi
33813    fi
33814
33815    # Now join together the path and the arguments once again
33816    if test "x$arguments" != xEOL; then
33817      new_complete="$new_path ${arguments% *}"
33818    else
33819      new_complete="$new_path"
33820    fi
33821
33822    if test "x$complete" != "x$new_complete"; then
33823      AS="$new_complete"
33824      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33825$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33826    fi
33827  fi
33828
33829  else
33830    # FIXME: is this correct for microsoft?
33831    AS="$CC -c"
33832  fi
33833
33834
33835  #
33836  # Setup the archiver (AR)
33837  #
33838  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33839    # The corresponding ar tool is lib.exe (used to create static libraries)
33840    # Extract the first word of "lib", so it can be a program name with args.
33841set dummy lib; ac_word=$2
33842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33843$as_echo_n "checking for $ac_word... " >&6; }
33844if ${ac_cv_prog_AR+:} false; then :
33845  $as_echo_n "(cached) " >&6
33846else
33847  if test -n "$AR"; then
33848  ac_cv_prog_AR="$AR" # Let the user override the test.
33849else
33850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33851for as_dir in $PATH
33852do
33853  IFS=$as_save_IFS
33854  test -z "$as_dir" && as_dir=.
33855    for ac_exec_ext in '' $ac_executable_extensions; do
33856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33857    ac_cv_prog_AR="lib"
33858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33859    break 2
33860  fi
33861done
33862  done
33863IFS=$as_save_IFS
33864
33865fi
33866fi
33867AR=$ac_cv_prog_AR
33868if test -n "$AR"; then
33869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33870$as_echo "$AR" >&6; }
33871else
33872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33873$as_echo "no" >&6; }
33874fi
33875
33876
33877  else
33878
33879
33880  # Publish this variable in the help.
33881
33882
33883  if [ -z "${AR+x}" ]; then
33884    # The variable is not set by user, try to locate tool using the code snippet
33885    if test -n "$ac_tool_prefix"; then
33886  for ac_prog in ar
33887  do
33888    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33891$as_echo_n "checking for $ac_word... " >&6; }
33892if ${ac_cv_prog_AR+:} false; then :
33893  $as_echo_n "(cached) " >&6
33894else
33895  if test -n "$AR"; then
33896  ac_cv_prog_AR="$AR" # Let the user override the test.
33897else
33898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33899for as_dir in $PATH
33900do
33901  IFS=$as_save_IFS
33902  test -z "$as_dir" && as_dir=.
33903    for ac_exec_ext in '' $ac_executable_extensions; do
33904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33905    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33907    break 2
33908  fi
33909done
33910  done
33911IFS=$as_save_IFS
33912
33913fi
33914fi
33915AR=$ac_cv_prog_AR
33916if test -n "$AR"; then
33917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33918$as_echo "$AR" >&6; }
33919else
33920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33921$as_echo "no" >&6; }
33922fi
33923
33924
33925    test -n "$AR" && break
33926  done
33927fi
33928if test -z "$AR"; then
33929  ac_ct_AR=$AR
33930  for ac_prog in ar
33931do
33932  # Extract the first word of "$ac_prog", so it can be a program name with args.
33933set dummy $ac_prog; ac_word=$2
33934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33935$as_echo_n "checking for $ac_word... " >&6; }
33936if ${ac_cv_prog_ac_ct_AR+:} false; then :
33937  $as_echo_n "(cached) " >&6
33938else
33939  if test -n "$ac_ct_AR"; then
33940  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33941else
33942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33943for as_dir in $PATH
33944do
33945  IFS=$as_save_IFS
33946  test -z "$as_dir" && as_dir=.
33947    for ac_exec_ext in '' $ac_executable_extensions; do
33948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33949    ac_cv_prog_ac_ct_AR="$ac_prog"
33950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33951    break 2
33952  fi
33953done
33954  done
33955IFS=$as_save_IFS
33956
33957fi
33958fi
33959ac_ct_AR=$ac_cv_prog_ac_ct_AR
33960if test -n "$ac_ct_AR"; then
33961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33962$as_echo "$ac_ct_AR" >&6; }
33963else
33964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33965$as_echo "no" >&6; }
33966fi
33967
33968
33969  test -n "$ac_ct_AR" && break
33970done
33971
33972  if test "x$ac_ct_AR" = x; then
33973    AR=""
33974  else
33975    case $cross_compiling:$ac_tool_warned in
33976yes:)
33977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33979ac_tool_warned=yes ;;
33980esac
33981    AR=$ac_ct_AR
33982  fi
33983fi
33984
33985  else
33986    # The variable is set, but is it from the command line or the environment?
33987
33988    # Try to remove the string !AR! from our list.
33989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33991      # If it failed, the variable was not from the command line. Ignore it,
33992      # but warn the user (except for BASH, which is always set by the calling BASH).
33993      if test "xAR" != xBASH; then
33994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33995$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33996      fi
33997      # Try to locate tool using the code snippet
33998      if test -n "$ac_tool_prefix"; then
33999  for ac_prog in ar
34000  do
34001    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34002set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34004$as_echo_n "checking for $ac_word... " >&6; }
34005if ${ac_cv_prog_AR+:} false; then :
34006  $as_echo_n "(cached) " >&6
34007else
34008  if test -n "$AR"; then
34009  ac_cv_prog_AR="$AR" # Let the user override the test.
34010else
34011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34012for as_dir in $PATH
34013do
34014  IFS=$as_save_IFS
34015  test -z "$as_dir" && as_dir=.
34016    for ac_exec_ext in '' $ac_executable_extensions; do
34017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34018    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
34019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34020    break 2
34021  fi
34022done
34023  done
34024IFS=$as_save_IFS
34025
34026fi
34027fi
34028AR=$ac_cv_prog_AR
34029if test -n "$AR"; then
34030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34031$as_echo "$AR" >&6; }
34032else
34033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34034$as_echo "no" >&6; }
34035fi
34036
34037
34038    test -n "$AR" && break
34039  done
34040fi
34041if test -z "$AR"; then
34042  ac_ct_AR=$AR
34043  for ac_prog in ar
34044do
34045  # Extract the first word of "$ac_prog", so it can be a program name with args.
34046set dummy $ac_prog; ac_word=$2
34047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34048$as_echo_n "checking for $ac_word... " >&6; }
34049if ${ac_cv_prog_ac_ct_AR+:} false; then :
34050  $as_echo_n "(cached) " >&6
34051else
34052  if test -n "$ac_ct_AR"; then
34053  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
34054else
34055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34056for as_dir in $PATH
34057do
34058  IFS=$as_save_IFS
34059  test -z "$as_dir" && as_dir=.
34060    for ac_exec_ext in '' $ac_executable_extensions; do
34061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34062    ac_cv_prog_ac_ct_AR="$ac_prog"
34063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34064    break 2
34065  fi
34066done
34067  done
34068IFS=$as_save_IFS
34069
34070fi
34071fi
34072ac_ct_AR=$ac_cv_prog_ac_ct_AR
34073if test -n "$ac_ct_AR"; then
34074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34075$as_echo "$ac_ct_AR" >&6; }
34076else
34077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34078$as_echo "no" >&6; }
34079fi
34080
34081
34082  test -n "$ac_ct_AR" && break
34083done
34084
34085  if test "x$ac_ct_AR" = x; then
34086    AR=""
34087  else
34088    case $cross_compiling:$ac_tool_warned in
34089yes:)
34090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34092ac_tool_warned=yes ;;
34093esac
34094    AR=$ac_ct_AR
34095  fi
34096fi
34097
34098    else
34099      # If it succeeded, then it was overridden by the user. We will use it
34100      # for the tool.
34101
34102      # First remove it from the list of overridden variables, so we can test
34103      # for unknown variables in the end.
34104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34105
34106      # Check if we try to supply an empty value
34107      if test "x$AR" = x; then
34108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
34109$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
34110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34111$as_echo_n "checking for AR... " >&6; }
34112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34113$as_echo "disabled" >&6; }
34114      else
34115        # Check if the provided tool contains a complete path.
34116        tool_specified="$AR"
34117        tool_basename="${tool_specified##*/}"
34118        if test "x$tool_basename" = "x$tool_specified"; then
34119          # A command without a complete path is provided, search $PATH.
34120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
34121$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
34122          # Extract the first word of "$tool_basename", so it can be a program name with args.
34123set dummy $tool_basename; ac_word=$2
34124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34125$as_echo_n "checking for $ac_word... " >&6; }
34126if ${ac_cv_path_AR+:} false; then :
34127  $as_echo_n "(cached) " >&6
34128else
34129  case $AR in
34130  [\\/]* | ?:[\\/]*)
34131  ac_cv_path_AR="$AR" # Let the user override the test with a path.
34132  ;;
34133  *)
34134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34135for as_dir in $PATH
34136do
34137  IFS=$as_save_IFS
34138  test -z "$as_dir" && as_dir=.
34139    for ac_exec_ext in '' $ac_executable_extensions; do
34140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34141    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
34142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34143    break 2
34144  fi
34145done
34146  done
34147IFS=$as_save_IFS
34148
34149  ;;
34150esac
34151fi
34152AR=$ac_cv_path_AR
34153if test -n "$AR"; then
34154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34155$as_echo "$AR" >&6; }
34156else
34157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34158$as_echo "no" >&6; }
34159fi
34160
34161
34162          if test "x$AR" = x; then
34163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34164          fi
34165        else
34166          # Otherwise we believe it is a complete path. Use it as it is.
34167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
34168$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
34169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34170$as_echo_n "checking for AR... " >&6; }
34171          if test ! -x "$tool_specified"; then
34172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34173$as_echo "not found" >&6; }
34174            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
34175          fi
34176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34177$as_echo "$tool_specified" >&6; }
34178        fi
34179      fi
34180    fi
34181  fi
34182
34183
34184  fi
34185
34186  # Only process if variable expands to non-empty
34187
34188  if test "x$AR" != x; then
34189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34190
34191  # First separate the path from the arguments. This will split at the first
34192  # space.
34193  complete="$AR"
34194  path="${complete%% *}"
34195  tmp="$complete EOL"
34196  arguments="${tmp#* }"
34197
34198  # Input might be given as Windows format, start by converting to
34199  # unix format.
34200  new_path=`$CYGPATH -u "$path"`
34201
34202  # Now try to locate executable using which
34203  new_path=`$WHICH "$new_path" 2> /dev/null`
34204  # bat and cmd files are not always considered executable in cygwin causing which
34205  # to not find them
34206  if test "x$new_path" = x \
34207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34209    new_path=`$CYGPATH -u "$path"`
34210  fi
34211  if test "x$new_path" = x; then
34212    # Oops. Which didn't find the executable.
34213    # The splitting of arguments from the executable at a space might have been incorrect,
34214    # since paths with space are more likely in Windows. Give it another try with the whole
34215    # argument.
34216    path="$complete"
34217    arguments="EOL"
34218    new_path=`$CYGPATH -u "$path"`
34219    new_path=`$WHICH "$new_path" 2> /dev/null`
34220    # bat and cmd files are not always considered executable in cygwin causing which
34221    # to not find them
34222    if test "x$new_path" = x \
34223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34225      new_path=`$CYGPATH -u "$path"`
34226    fi
34227    if test "x$new_path" = x; then
34228      # It's still not found. Now this is an unrecoverable error.
34229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34230$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34231      has_space=`$ECHO "$complete" | $GREP " "`
34232      if test "x$has_space" != x; then
34233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34235      fi
34236      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34237    fi
34238  fi
34239
34240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34243  # "foo.exe" is OK but "foo" is an error.
34244  #
34245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34246  # It is also a way to make sure we got the proper file name for the real test later on.
34247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34248  if test "x$test_shortpath" = x; then
34249    # Short path failed, file does not exist as specified.
34250    # Try adding .exe or .cmd
34251    if test -f "${new_path}.exe"; then
34252      input_to_shortpath="${new_path}.exe"
34253    elif test -f "${new_path}.cmd"; then
34254      input_to_shortpath="${new_path}.cmd"
34255    else
34256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
34257$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
34258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34260      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34261    fi
34262  else
34263    input_to_shortpath="$new_path"
34264  fi
34265
34266  # Call helper function which possibly converts this using DOS-style short mode.
34267  # If so, the updated path is stored in $new_path.
34268  new_path="$input_to_shortpath"
34269
34270  input_path="$input_to_shortpath"
34271  # Check if we need to convert this using DOS-style short mode. If the path
34272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34273  # take no chances and rewrite it.
34274  # Note: m4 eats our [], so we need to use [ and ] instead.
34275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34276  if test "x$has_forbidden_chars" != x; then
34277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34281      # Going to short mode and back again did indeed matter. Since short mode is
34282      # case insensitive, let's make it lowercase to improve readability.
34283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34284      # Now convert it back to Unix-style (cygpath)
34285      input_path=`$CYGPATH -u "$shortmode_path"`
34286      new_path="$input_path"
34287    fi
34288  fi
34289
34290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34291  if test "x$test_cygdrive_prefix" = x; then
34292    # As a simple fix, exclude /usr/bin since it's not a real path.
34293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34295      # a path prefixed by /cygdrive for fixpath to work.
34296      new_path="$CYGWIN_ROOT_PATH$input_path"
34297    fi
34298  fi
34299
34300  # remove trailing .exe if any
34301  new_path="${new_path/%.exe/}"
34302
34303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34304
34305  # First separate the path from the arguments. This will split at the first
34306  # space.
34307  complete="$AR"
34308  path="${complete%% *}"
34309  tmp="$complete EOL"
34310  arguments="${tmp#* }"
34311
34312  # Input might be given as Windows format, start by converting to
34313  # unix format.
34314  new_path="$path"
34315
34316  windows_path="$new_path"
34317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34318    unix_path=`$CYGPATH -u "$windows_path"`
34319    new_path="$unix_path"
34320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34322    new_path="$unix_path"
34323  fi
34324
34325
34326  # Now try to locate executable using which
34327  new_path=`$WHICH "$new_path" 2> /dev/null`
34328
34329  if test "x$new_path" = x; then
34330    # Oops. Which didn't find the executable.
34331    # The splitting of arguments from the executable at a space might have been incorrect,
34332    # since paths with space are more likely in Windows. Give it another try with the whole
34333    # argument.
34334    path="$complete"
34335    arguments="EOL"
34336    new_path="$path"
34337
34338  windows_path="$new_path"
34339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34340    unix_path=`$CYGPATH -u "$windows_path"`
34341    new_path="$unix_path"
34342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34344    new_path="$unix_path"
34345  fi
34346
34347
34348    new_path=`$WHICH "$new_path" 2> /dev/null`
34349    # bat and cmd files are not always considered executable in MSYS causing which
34350    # to not find them
34351    if test "x$new_path" = x \
34352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34354      new_path="$path"
34355
34356  windows_path="$new_path"
34357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34358    unix_path=`$CYGPATH -u "$windows_path"`
34359    new_path="$unix_path"
34360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34362    new_path="$unix_path"
34363  fi
34364
34365    fi
34366
34367    if test "x$new_path" = x; then
34368      # It's still not found. Now this is an unrecoverable error.
34369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34370$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34371      has_space=`$ECHO "$complete" | $GREP " "`
34372      if test "x$has_space" != x; then
34373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34375      fi
34376      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34377    fi
34378  fi
34379
34380  # Now new_path has a complete unix path to the binary
34381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34382    # Keep paths in /bin as-is, but remove trailing .exe if any
34383    new_path="${new_path/%.exe/}"
34384    # Do not save /bin paths to all_fixpath_prefixes!
34385  else
34386    # Not in mixed or Windows style, start by that.
34387    new_path=`cmd //c echo $new_path`
34388
34389  input_path="$new_path"
34390  # Check if we need to convert this using DOS-style short mode. If the path
34391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34392  # take no chances and rewrite it.
34393  # Note: m4 eats our [], so we need to use [ and ] instead.
34394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34395  if test "x$has_forbidden_chars" != x; then
34396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34398  fi
34399
34400    # Output is in $new_path
34401
34402  windows_path="$new_path"
34403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34404    unix_path=`$CYGPATH -u "$windows_path"`
34405    new_path="$unix_path"
34406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34408    new_path="$unix_path"
34409  fi
34410
34411    # remove trailing .exe if any
34412    new_path="${new_path/%.exe/}"
34413
34414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34416  fi
34417
34418    else
34419      # We're on a unix platform. Hooray! :)
34420      # First separate the path from the arguments. This will split at the first
34421      # space.
34422      complete="$AR"
34423      path="${complete%% *}"
34424      tmp="$complete EOL"
34425      arguments="${tmp#* }"
34426
34427      # Cannot rely on the command "which" here since it doesn't always work.
34428      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34429      if test -z "$is_absolute_path"; then
34430        # Path to executable is not absolute. Find it.
34431        IFS_save="$IFS"
34432        IFS=:
34433        for p in $PATH; do
34434          if test -f "$p/$path" && test -x "$p/$path"; then
34435            new_path="$p/$path"
34436            break
34437          fi
34438        done
34439        IFS="$IFS_save"
34440      else
34441        # This is an absolute path, we can use it without further modifications.
34442        new_path="$path"
34443      fi
34444
34445      if test "x$new_path" = x; then
34446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34447$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34448        has_space=`$ECHO "$complete" | $GREP " "`
34449        if test "x$has_space" != x; then
34450          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34452        fi
34453        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34454      fi
34455    fi
34456
34457    # Now join together the path and the arguments once again
34458    if test "x$arguments" != xEOL; then
34459      new_complete="$new_path ${arguments% *}"
34460    else
34461      new_complete="$new_path"
34462    fi
34463
34464    if test "x$complete" != "x$new_complete"; then
34465      AR="$new_complete"
34466      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34467$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34468    fi
34469  fi
34470
34471
34472
34473  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34474
34475
34476  # Publish this variable in the help.
34477
34478
34479  if [ -z "${LIPO+x}" ]; then
34480    # The variable is not set by user, try to locate tool using the code snippet
34481    for ac_prog in lipo
34482do
34483  # Extract the first word of "$ac_prog", so it can be a program name with args.
34484set dummy $ac_prog; ac_word=$2
34485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34486$as_echo_n "checking for $ac_word... " >&6; }
34487if ${ac_cv_path_LIPO+:} false; then :
34488  $as_echo_n "(cached) " >&6
34489else
34490  case $LIPO in
34491  [\\/]* | ?:[\\/]*)
34492  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34493  ;;
34494  *)
34495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34496for as_dir in $PATH
34497do
34498  IFS=$as_save_IFS
34499  test -z "$as_dir" && as_dir=.
34500    for ac_exec_ext in '' $ac_executable_extensions; do
34501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34502    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34504    break 2
34505  fi
34506done
34507  done
34508IFS=$as_save_IFS
34509
34510  ;;
34511esac
34512fi
34513LIPO=$ac_cv_path_LIPO
34514if test -n "$LIPO"; then
34515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34516$as_echo "$LIPO" >&6; }
34517else
34518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34519$as_echo "no" >&6; }
34520fi
34521
34522
34523  test -n "$LIPO" && break
34524done
34525
34526  else
34527    # The variable is set, but is it from the command line or the environment?
34528
34529    # Try to remove the string !LIPO! from our list.
34530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34532      # If it failed, the variable was not from the command line. Ignore it,
34533      # but warn the user (except for BASH, which is always set by the calling BASH).
34534      if test "xLIPO" != xBASH; then
34535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34536$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34537      fi
34538      # Try to locate tool using the code snippet
34539      for ac_prog in lipo
34540do
34541  # Extract the first word of "$ac_prog", so it can be a program name with args.
34542set dummy $ac_prog; ac_word=$2
34543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34544$as_echo_n "checking for $ac_word... " >&6; }
34545if ${ac_cv_path_LIPO+:} false; then :
34546  $as_echo_n "(cached) " >&6
34547else
34548  case $LIPO in
34549  [\\/]* | ?:[\\/]*)
34550  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34551  ;;
34552  *)
34553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34554for as_dir in $PATH
34555do
34556  IFS=$as_save_IFS
34557  test -z "$as_dir" && as_dir=.
34558    for ac_exec_ext in '' $ac_executable_extensions; do
34559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34560    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34562    break 2
34563  fi
34564done
34565  done
34566IFS=$as_save_IFS
34567
34568  ;;
34569esac
34570fi
34571LIPO=$ac_cv_path_LIPO
34572if test -n "$LIPO"; then
34573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34574$as_echo "$LIPO" >&6; }
34575else
34576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34577$as_echo "no" >&6; }
34578fi
34579
34580
34581  test -n "$LIPO" && break
34582done
34583
34584    else
34585      # If it succeeded, then it was overridden by the user. We will use it
34586      # for the tool.
34587
34588      # First remove it from the list of overridden variables, so we can test
34589      # for unknown variables in the end.
34590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34591
34592      # Check if we try to supply an empty value
34593      if test "x$LIPO" = x; then
34594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
34595$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
34596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34597$as_echo_n "checking for LIPO... " >&6; }
34598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34599$as_echo "disabled" >&6; }
34600      else
34601        # Check if the provided tool contains a complete path.
34602        tool_specified="$LIPO"
34603        tool_basename="${tool_specified##*/}"
34604        if test "x$tool_basename" = "x$tool_specified"; then
34605          # A command without a complete path is provided, search $PATH.
34606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34607$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34608          # Extract the first word of "$tool_basename", so it can be a program name with args.
34609set dummy $tool_basename; ac_word=$2
34610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34611$as_echo_n "checking for $ac_word... " >&6; }
34612if ${ac_cv_path_LIPO+:} false; then :
34613  $as_echo_n "(cached) " >&6
34614else
34615  case $LIPO in
34616  [\\/]* | ?:[\\/]*)
34617  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34618  ;;
34619  *)
34620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34621for as_dir in $PATH
34622do
34623  IFS=$as_save_IFS
34624  test -z "$as_dir" && as_dir=.
34625    for ac_exec_ext in '' $ac_executable_extensions; do
34626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34627    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34629    break 2
34630  fi
34631done
34632  done
34633IFS=$as_save_IFS
34634
34635  ;;
34636esac
34637fi
34638LIPO=$ac_cv_path_LIPO
34639if test -n "$LIPO"; then
34640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34641$as_echo "$LIPO" >&6; }
34642else
34643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34644$as_echo "no" >&6; }
34645fi
34646
34647
34648          if test "x$LIPO" = x; then
34649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34650          fi
34651        else
34652          # Otherwise we believe it is a complete path. Use it as it is.
34653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34654$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34656$as_echo_n "checking for LIPO... " >&6; }
34657          if test ! -x "$tool_specified"; then
34658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34659$as_echo "not found" >&6; }
34660            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34661          fi
34662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34663$as_echo "$tool_specified" >&6; }
34664        fi
34665      fi
34666    fi
34667  fi
34668
34669
34670
34671  # Only process if variable expands to non-empty
34672
34673  if test "x$LIPO" != x; then
34674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675
34676  # First separate the path from the arguments. This will split at the first
34677  # space.
34678  complete="$LIPO"
34679  path="${complete%% *}"
34680  tmp="$complete EOL"
34681  arguments="${tmp#* }"
34682
34683  # Input might be given as Windows format, start by converting to
34684  # unix format.
34685  new_path=`$CYGPATH -u "$path"`
34686
34687  # Now try to locate executable using which
34688  new_path=`$WHICH "$new_path" 2> /dev/null`
34689  # bat and cmd files are not always considered executable in cygwin causing which
34690  # to not find them
34691  if test "x$new_path" = x \
34692      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34693      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34694    new_path=`$CYGPATH -u "$path"`
34695  fi
34696  if test "x$new_path" = x; then
34697    # Oops. Which didn't find the executable.
34698    # The splitting of arguments from the executable at a space might have been incorrect,
34699    # since paths with space are more likely in Windows. Give it another try with the whole
34700    # argument.
34701    path="$complete"
34702    arguments="EOL"
34703    new_path=`$CYGPATH -u "$path"`
34704    new_path=`$WHICH "$new_path" 2> /dev/null`
34705    # bat and cmd files are not always considered executable in cygwin causing which
34706    # to not find them
34707    if test "x$new_path" = x \
34708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34710      new_path=`$CYGPATH -u "$path"`
34711    fi
34712    if test "x$new_path" = x; then
34713      # It's still not found. Now this is an unrecoverable error.
34714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34715$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34716      has_space=`$ECHO "$complete" | $GREP " "`
34717      if test "x$has_space" != x; then
34718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34720      fi
34721      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34722    fi
34723  fi
34724
34725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34728  # "foo.exe" is OK but "foo" is an error.
34729  #
34730  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34731  # It is also a way to make sure we got the proper file name for the real test later on.
34732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34733  if test "x$test_shortpath" = x; then
34734    # Short path failed, file does not exist as specified.
34735    # Try adding .exe or .cmd
34736    if test -f "${new_path}.exe"; then
34737      input_to_shortpath="${new_path}.exe"
34738    elif test -f "${new_path}.cmd"; then
34739      input_to_shortpath="${new_path}.cmd"
34740    else
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34742$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34745      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34746    fi
34747  else
34748    input_to_shortpath="$new_path"
34749  fi
34750
34751  # Call helper function which possibly converts this using DOS-style short mode.
34752  # If so, the updated path is stored in $new_path.
34753  new_path="$input_to_shortpath"
34754
34755  input_path="$input_to_shortpath"
34756  # Check if we need to convert this using DOS-style short mode. If the path
34757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34758  # take no chances and rewrite it.
34759  # Note: m4 eats our [], so we need to use [ and ] instead.
34760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34761  if test "x$has_forbidden_chars" != x; then
34762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34766      # Going to short mode and back again did indeed matter. Since short mode is
34767      # case insensitive, let's make it lowercase to improve readability.
34768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34769      # Now convert it back to Unix-style (cygpath)
34770      input_path=`$CYGPATH -u "$shortmode_path"`
34771      new_path="$input_path"
34772    fi
34773  fi
34774
34775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34776  if test "x$test_cygdrive_prefix" = x; then
34777    # As a simple fix, exclude /usr/bin since it's not a real path.
34778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34780      # a path prefixed by /cygdrive for fixpath to work.
34781      new_path="$CYGWIN_ROOT_PATH$input_path"
34782    fi
34783  fi
34784
34785  # remove trailing .exe if any
34786  new_path="${new_path/%.exe/}"
34787
34788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34789
34790  # First separate the path from the arguments. This will split at the first
34791  # space.
34792  complete="$LIPO"
34793  path="${complete%% *}"
34794  tmp="$complete EOL"
34795  arguments="${tmp#* }"
34796
34797  # Input might be given as Windows format, start by converting to
34798  # unix format.
34799  new_path="$path"
34800
34801  windows_path="$new_path"
34802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34803    unix_path=`$CYGPATH -u "$windows_path"`
34804    new_path="$unix_path"
34805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34807    new_path="$unix_path"
34808  fi
34809
34810
34811  # Now try to locate executable using which
34812  new_path=`$WHICH "$new_path" 2> /dev/null`
34813
34814  if test "x$new_path" = x; then
34815    # Oops. Which didn't find the executable.
34816    # The splitting of arguments from the executable at a space might have been incorrect,
34817    # since paths with space are more likely in Windows. Give it another try with the whole
34818    # argument.
34819    path="$complete"
34820    arguments="EOL"
34821    new_path="$path"
34822
34823  windows_path="$new_path"
34824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34825    unix_path=`$CYGPATH -u "$windows_path"`
34826    new_path="$unix_path"
34827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34829    new_path="$unix_path"
34830  fi
34831
34832
34833    new_path=`$WHICH "$new_path" 2> /dev/null`
34834    # bat and cmd files are not always considered executable in MSYS causing which
34835    # to not find them
34836    if test "x$new_path" = x \
34837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34839      new_path="$path"
34840
34841  windows_path="$new_path"
34842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34843    unix_path=`$CYGPATH -u "$windows_path"`
34844    new_path="$unix_path"
34845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34847    new_path="$unix_path"
34848  fi
34849
34850    fi
34851
34852    if test "x$new_path" = x; then
34853      # It's still not found. Now this is an unrecoverable error.
34854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34855$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34856      has_space=`$ECHO "$complete" | $GREP " "`
34857      if test "x$has_space" != x; then
34858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34860      fi
34861      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34862    fi
34863  fi
34864
34865  # Now new_path has a complete unix path to the binary
34866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34867    # Keep paths in /bin as-is, but remove trailing .exe if any
34868    new_path="${new_path/%.exe/}"
34869    # Do not save /bin paths to all_fixpath_prefixes!
34870  else
34871    # Not in mixed or Windows style, start by that.
34872    new_path=`cmd //c echo $new_path`
34873
34874  input_path="$new_path"
34875  # Check if we need to convert this using DOS-style short mode. If the path
34876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34877  # take no chances and rewrite it.
34878  # Note: m4 eats our [], so we need to use [ and ] instead.
34879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34880  if test "x$has_forbidden_chars" != x; then
34881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34883  fi
34884
34885    # Output is in $new_path
34886
34887  windows_path="$new_path"
34888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34889    unix_path=`$CYGPATH -u "$windows_path"`
34890    new_path="$unix_path"
34891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34893    new_path="$unix_path"
34894  fi
34895
34896    # remove trailing .exe if any
34897    new_path="${new_path/%.exe/}"
34898
34899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34901  fi
34902
34903    else
34904      # We're on a unix platform. Hooray! :)
34905      # First separate the path from the arguments. This will split at the first
34906      # space.
34907      complete="$LIPO"
34908      path="${complete%% *}"
34909      tmp="$complete EOL"
34910      arguments="${tmp#* }"
34911
34912      # Cannot rely on the command "which" here since it doesn't always work.
34913      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34914      if test -z "$is_absolute_path"; then
34915        # Path to executable is not absolute. Find it.
34916        IFS_save="$IFS"
34917        IFS=:
34918        for p in $PATH; do
34919          if test -f "$p/$path" && test -x "$p/$path"; then
34920            new_path="$p/$path"
34921            break
34922          fi
34923        done
34924        IFS="$IFS_save"
34925      else
34926        # This is an absolute path, we can use it without further modifications.
34927        new_path="$path"
34928      fi
34929
34930      if test "x$new_path" = x; then
34931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34932$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34933        has_space=`$ECHO "$complete" | $GREP " "`
34934        if test "x$has_space" != x; then
34935          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34937        fi
34938        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34939      fi
34940    fi
34941
34942    # Now join together the path and the arguments once again
34943    if test "x$arguments" != xEOL; then
34944      new_complete="$new_path ${arguments% *}"
34945    else
34946      new_complete="$new_path"
34947    fi
34948
34949    if test "x$complete" != "x$new_complete"; then
34950      LIPO="$new_complete"
34951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34952$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34953    fi
34954  fi
34955
34956  fi
34957
34958  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34959    # Extract the first word of "mt", so it can be a program name with args.
34960set dummy mt; ac_word=$2
34961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34962$as_echo_n "checking for $ac_word... " >&6; }
34963if ${ac_cv_prog_MT+:} false; then :
34964  $as_echo_n "(cached) " >&6
34965else
34966  if test -n "$MT"; then
34967  ac_cv_prog_MT="$MT" # Let the user override the test.
34968else
34969  ac_prog_rejected=no
34970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34971for as_dir in $PATH
34972do
34973  IFS=$as_save_IFS
34974  test -z "$as_dir" && as_dir=.
34975    for ac_exec_ext in '' $ac_executable_extensions; do
34976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34977    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34978       ac_prog_rejected=yes
34979       continue
34980     fi
34981    ac_cv_prog_MT="mt"
34982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34983    break 2
34984  fi
34985done
34986  done
34987IFS=$as_save_IFS
34988
34989if test $ac_prog_rejected = yes; then
34990  # We found a bogon in the path, so make sure we never use it.
34991  set dummy $ac_cv_prog_MT
34992  shift
34993  if test $# != 0; then
34994    # We chose a different compiler from the bogus one.
34995    # However, it has the same basename, so the bogon will be chosen
34996    # first if we set MT to just the basename; use the full file name.
34997    shift
34998    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34999  fi
35000fi
35001fi
35002fi
35003MT=$ac_cv_prog_MT
35004if test -n "$MT"; then
35005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
35006$as_echo "$MT" >&6; }
35007else
35008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35009$as_echo "no" >&6; }
35010fi
35011
35012
35013
35014  # Only process if variable expands to non-empty
35015
35016  if test "x$MT" != x; then
35017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35018
35019  # First separate the path from the arguments. This will split at the first
35020  # space.
35021  complete="$MT"
35022  path="${complete%% *}"
35023  tmp="$complete EOL"
35024  arguments="${tmp#* }"
35025
35026  # Input might be given as Windows format, start by converting to
35027  # unix format.
35028  new_path=`$CYGPATH -u "$path"`
35029
35030  # Now try to locate executable using which
35031  new_path=`$WHICH "$new_path" 2> /dev/null`
35032  # bat and cmd files are not always considered executable in cygwin causing which
35033  # to not find them
35034  if test "x$new_path" = x \
35035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35037    new_path=`$CYGPATH -u "$path"`
35038  fi
35039  if test "x$new_path" = x; then
35040    # Oops. Which didn't find the executable.
35041    # The splitting of arguments from the executable at a space might have been incorrect,
35042    # since paths with space are more likely in Windows. Give it another try with the whole
35043    # argument.
35044    path="$complete"
35045    arguments="EOL"
35046    new_path=`$CYGPATH -u "$path"`
35047    new_path=`$WHICH "$new_path" 2> /dev/null`
35048    # bat and cmd files are not always considered executable in cygwin causing which
35049    # to not find them
35050    if test "x$new_path" = x \
35051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35053      new_path=`$CYGPATH -u "$path"`
35054    fi
35055    if test "x$new_path" = x; then
35056      # It's still not found. Now this is an unrecoverable error.
35057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35058$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35059      has_space=`$ECHO "$complete" | $GREP " "`
35060      if test "x$has_space" != x; then
35061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35063      fi
35064      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35065    fi
35066  fi
35067
35068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35071  # "foo.exe" is OK but "foo" is an error.
35072  #
35073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35074  # It is also a way to make sure we got the proper file name for the real test later on.
35075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35076  if test "x$test_shortpath" = x; then
35077    # Short path failed, file does not exist as specified.
35078    # Try adding .exe or .cmd
35079    if test -f "${new_path}.exe"; then
35080      input_to_shortpath="${new_path}.exe"
35081    elif test -f "${new_path}.cmd"; then
35082      input_to_shortpath="${new_path}.cmd"
35083    else
35084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
35085$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
35086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35088      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35089    fi
35090  else
35091    input_to_shortpath="$new_path"
35092  fi
35093
35094  # Call helper function which possibly converts this using DOS-style short mode.
35095  # If so, the updated path is stored in $new_path.
35096  new_path="$input_to_shortpath"
35097
35098  input_path="$input_to_shortpath"
35099  # Check if we need to convert this using DOS-style short mode. If the path
35100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35101  # take no chances and rewrite it.
35102  # Note: m4 eats our [], so we need to use [ and ] instead.
35103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35104  if test "x$has_forbidden_chars" != x; then
35105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35109      # Going to short mode and back again did indeed matter. Since short mode is
35110      # case insensitive, let's make it lowercase to improve readability.
35111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35112      # Now convert it back to Unix-style (cygpath)
35113      input_path=`$CYGPATH -u "$shortmode_path"`
35114      new_path="$input_path"
35115    fi
35116  fi
35117
35118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35119  if test "x$test_cygdrive_prefix" = x; then
35120    # As a simple fix, exclude /usr/bin since it's not a real path.
35121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35123      # a path prefixed by /cygdrive for fixpath to work.
35124      new_path="$CYGWIN_ROOT_PATH$input_path"
35125    fi
35126  fi
35127
35128  # remove trailing .exe if any
35129  new_path="${new_path/%.exe/}"
35130
35131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35132
35133  # First separate the path from the arguments. This will split at the first
35134  # space.
35135  complete="$MT"
35136  path="${complete%% *}"
35137  tmp="$complete EOL"
35138  arguments="${tmp#* }"
35139
35140  # Input might be given as Windows format, start by converting to
35141  # unix format.
35142  new_path="$path"
35143
35144  windows_path="$new_path"
35145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35146    unix_path=`$CYGPATH -u "$windows_path"`
35147    new_path="$unix_path"
35148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35150    new_path="$unix_path"
35151  fi
35152
35153
35154  # Now try to locate executable using which
35155  new_path=`$WHICH "$new_path" 2> /dev/null`
35156
35157  if test "x$new_path" = x; then
35158    # Oops. Which didn't find the executable.
35159    # The splitting of arguments from the executable at a space might have been incorrect,
35160    # since paths with space are more likely in Windows. Give it another try with the whole
35161    # argument.
35162    path="$complete"
35163    arguments="EOL"
35164    new_path="$path"
35165
35166  windows_path="$new_path"
35167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35168    unix_path=`$CYGPATH -u "$windows_path"`
35169    new_path="$unix_path"
35170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35172    new_path="$unix_path"
35173  fi
35174
35175
35176    new_path=`$WHICH "$new_path" 2> /dev/null`
35177    # bat and cmd files are not always considered executable in MSYS causing which
35178    # to not find them
35179    if test "x$new_path" = x \
35180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35182      new_path="$path"
35183
35184  windows_path="$new_path"
35185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35186    unix_path=`$CYGPATH -u "$windows_path"`
35187    new_path="$unix_path"
35188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35190    new_path="$unix_path"
35191  fi
35192
35193    fi
35194
35195    if test "x$new_path" = x; then
35196      # It's still not found. Now this is an unrecoverable error.
35197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35198$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35199      has_space=`$ECHO "$complete" | $GREP " "`
35200      if test "x$has_space" != x; then
35201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35203      fi
35204      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35205    fi
35206  fi
35207
35208  # Now new_path has a complete unix path to the binary
35209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35210    # Keep paths in /bin as-is, but remove trailing .exe if any
35211    new_path="${new_path/%.exe/}"
35212    # Do not save /bin paths to all_fixpath_prefixes!
35213  else
35214    # Not in mixed or Windows style, start by that.
35215    new_path=`cmd //c echo $new_path`
35216
35217  input_path="$new_path"
35218  # Check if we need to convert this using DOS-style short mode. If the path
35219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35220  # take no chances and rewrite it.
35221  # Note: m4 eats our [], so we need to use [ and ] instead.
35222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35223  if test "x$has_forbidden_chars" != x; then
35224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35226  fi
35227
35228    # Output is in $new_path
35229
35230  windows_path="$new_path"
35231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35232    unix_path=`$CYGPATH -u "$windows_path"`
35233    new_path="$unix_path"
35234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35236    new_path="$unix_path"
35237  fi
35238
35239    # remove trailing .exe if any
35240    new_path="${new_path/%.exe/}"
35241
35242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35244  fi
35245
35246    else
35247      # We're on a unix platform. Hooray! :)
35248      # First separate the path from the arguments. This will split at the first
35249      # space.
35250      complete="$MT"
35251      path="${complete%% *}"
35252      tmp="$complete EOL"
35253      arguments="${tmp#* }"
35254
35255      # Cannot rely on the command "which" here since it doesn't always work.
35256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35257      if test -z "$is_absolute_path"; then
35258        # Path to executable is not absolute. Find it.
35259        IFS_save="$IFS"
35260        IFS=:
35261        for p in $PATH; do
35262          if test -f "$p/$path" && test -x "$p/$path"; then
35263            new_path="$p/$path"
35264            break
35265          fi
35266        done
35267        IFS="$IFS_save"
35268      else
35269        # This is an absolute path, we can use it without further modifications.
35270        new_path="$path"
35271      fi
35272
35273      if test "x$new_path" = x; then
35274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35275$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35276        has_space=`$ECHO "$complete" | $GREP " "`
35277        if test "x$has_space" != x; then
35278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35280        fi
35281        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35282      fi
35283    fi
35284
35285    # Now join together the path and the arguments once again
35286    if test "x$arguments" != xEOL; then
35287      new_complete="$new_path ${arguments% *}"
35288    else
35289      new_complete="$new_path"
35290    fi
35291
35292    if test "x$complete" != "x$new_complete"; then
35293      MT="$new_complete"
35294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
35295$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
35296    fi
35297  fi
35298
35299    # Setup the resource compiler (RC)
35300    # Extract the first word of "rc", so it can be a program name with args.
35301set dummy rc; ac_word=$2
35302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35303$as_echo_n "checking for $ac_word... " >&6; }
35304if ${ac_cv_prog_RC+:} false; then :
35305  $as_echo_n "(cached) " >&6
35306else
35307  if test -n "$RC"; then
35308  ac_cv_prog_RC="$RC" # Let the user override the test.
35309else
35310  ac_prog_rejected=no
35311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35312for as_dir in $PATH
35313do
35314  IFS=$as_save_IFS
35315  test -z "$as_dir" && as_dir=.
35316    for ac_exec_ext in '' $ac_executable_extensions; do
35317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35318    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
35319       ac_prog_rejected=yes
35320       continue
35321     fi
35322    ac_cv_prog_RC="rc"
35323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35324    break 2
35325  fi
35326done
35327  done
35328IFS=$as_save_IFS
35329
35330if test $ac_prog_rejected = yes; then
35331  # We found a bogon in the path, so make sure we never use it.
35332  set dummy $ac_cv_prog_RC
35333  shift
35334  if test $# != 0; then
35335    # We chose a different compiler from the bogus one.
35336    # However, it has the same basename, so the bogon will be chosen
35337    # first if we set RC to just the basename; use the full file name.
35338    shift
35339    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
35340  fi
35341fi
35342fi
35343fi
35344RC=$ac_cv_prog_RC
35345if test -n "$RC"; then
35346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
35347$as_echo "$RC" >&6; }
35348else
35349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35350$as_echo "no" >&6; }
35351fi
35352
35353
35354
35355  # Only process if variable expands to non-empty
35356
35357  if test "x$RC" != x; then
35358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35359
35360  # First separate the path from the arguments. This will split at the first
35361  # space.
35362  complete="$RC"
35363  path="${complete%% *}"
35364  tmp="$complete EOL"
35365  arguments="${tmp#* }"
35366
35367  # Input might be given as Windows format, start by converting to
35368  # unix format.
35369  new_path=`$CYGPATH -u "$path"`
35370
35371  # Now try to locate executable using which
35372  new_path=`$WHICH "$new_path" 2> /dev/null`
35373  # bat and cmd files are not always considered executable in cygwin causing which
35374  # to not find them
35375  if test "x$new_path" = x \
35376      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35377      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35378    new_path=`$CYGPATH -u "$path"`
35379  fi
35380  if test "x$new_path" = x; then
35381    # Oops. Which didn't find the executable.
35382    # The splitting of arguments from the executable at a space might have been incorrect,
35383    # since paths with space are more likely in Windows. Give it another try with the whole
35384    # argument.
35385    path="$complete"
35386    arguments="EOL"
35387    new_path=`$CYGPATH -u "$path"`
35388    new_path=`$WHICH "$new_path" 2> /dev/null`
35389    # bat and cmd files are not always considered executable in cygwin causing which
35390    # to not find them
35391    if test "x$new_path" = x \
35392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35394      new_path=`$CYGPATH -u "$path"`
35395    fi
35396    if test "x$new_path" = x; then
35397      # It's still not found. Now this is an unrecoverable error.
35398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35399$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35400      has_space=`$ECHO "$complete" | $GREP " "`
35401      if test "x$has_space" != x; then
35402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35404      fi
35405      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35406    fi
35407  fi
35408
35409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35412  # "foo.exe" is OK but "foo" is an error.
35413  #
35414  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35415  # It is also a way to make sure we got the proper file name for the real test later on.
35416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35417  if test "x$test_shortpath" = x; then
35418    # Short path failed, file does not exist as specified.
35419    # Try adding .exe or .cmd
35420    if test -f "${new_path}.exe"; then
35421      input_to_shortpath="${new_path}.exe"
35422    elif test -f "${new_path}.cmd"; then
35423      input_to_shortpath="${new_path}.cmd"
35424    else
35425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35426$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35427      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35428$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35429      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35430    fi
35431  else
35432    input_to_shortpath="$new_path"
35433  fi
35434
35435  # Call helper function which possibly converts this using DOS-style short mode.
35436  # If so, the updated path is stored in $new_path.
35437  new_path="$input_to_shortpath"
35438
35439  input_path="$input_to_shortpath"
35440  # Check if we need to convert this using DOS-style short mode. If the path
35441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35442  # take no chances and rewrite it.
35443  # Note: m4 eats our [], so we need to use [ and ] instead.
35444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35445  if test "x$has_forbidden_chars" != x; then
35446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35450      # Going to short mode and back again did indeed matter. Since short mode is
35451      # case insensitive, let's make it lowercase to improve readability.
35452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35453      # Now convert it back to Unix-style (cygpath)
35454      input_path=`$CYGPATH -u "$shortmode_path"`
35455      new_path="$input_path"
35456    fi
35457  fi
35458
35459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35460  if test "x$test_cygdrive_prefix" = x; then
35461    # As a simple fix, exclude /usr/bin since it's not a real path.
35462    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35464      # a path prefixed by /cygdrive for fixpath to work.
35465      new_path="$CYGWIN_ROOT_PATH$input_path"
35466    fi
35467  fi
35468
35469  # remove trailing .exe if any
35470  new_path="${new_path/%.exe/}"
35471
35472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35473
35474  # First separate the path from the arguments. This will split at the first
35475  # space.
35476  complete="$RC"
35477  path="${complete%% *}"
35478  tmp="$complete EOL"
35479  arguments="${tmp#* }"
35480
35481  # Input might be given as Windows format, start by converting to
35482  # unix format.
35483  new_path="$path"
35484
35485  windows_path="$new_path"
35486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35487    unix_path=`$CYGPATH -u "$windows_path"`
35488    new_path="$unix_path"
35489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35491    new_path="$unix_path"
35492  fi
35493
35494
35495  # Now try to locate executable using which
35496  new_path=`$WHICH "$new_path" 2> /dev/null`
35497
35498  if test "x$new_path" = x; then
35499    # Oops. Which didn't find the executable.
35500    # The splitting of arguments from the executable at a space might have been incorrect,
35501    # since paths with space are more likely in Windows. Give it another try with the whole
35502    # argument.
35503    path="$complete"
35504    arguments="EOL"
35505    new_path="$path"
35506
35507  windows_path="$new_path"
35508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35509    unix_path=`$CYGPATH -u "$windows_path"`
35510    new_path="$unix_path"
35511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35513    new_path="$unix_path"
35514  fi
35515
35516
35517    new_path=`$WHICH "$new_path" 2> /dev/null`
35518    # bat and cmd files are not always considered executable in MSYS causing which
35519    # to not find them
35520    if test "x$new_path" = x \
35521        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35522        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35523      new_path="$path"
35524
35525  windows_path="$new_path"
35526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35527    unix_path=`$CYGPATH -u "$windows_path"`
35528    new_path="$unix_path"
35529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35531    new_path="$unix_path"
35532  fi
35533
35534    fi
35535
35536    if test "x$new_path" = x; then
35537      # It's still not found. Now this is an unrecoverable error.
35538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35539$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35540      has_space=`$ECHO "$complete" | $GREP " "`
35541      if test "x$has_space" != x; then
35542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35544      fi
35545      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35546    fi
35547  fi
35548
35549  # Now new_path has a complete unix path to the binary
35550  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35551    # Keep paths in /bin as-is, but remove trailing .exe if any
35552    new_path="${new_path/%.exe/}"
35553    # Do not save /bin paths to all_fixpath_prefixes!
35554  else
35555    # Not in mixed or Windows style, start by that.
35556    new_path=`cmd //c echo $new_path`
35557
35558  input_path="$new_path"
35559  # Check if we need to convert this using DOS-style short mode. If the path
35560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35561  # take no chances and rewrite it.
35562  # Note: m4 eats our [], so we need to use [ and ] instead.
35563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35564  if test "x$has_forbidden_chars" != x; then
35565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35567  fi
35568
35569    # Output is in $new_path
35570
35571  windows_path="$new_path"
35572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35573    unix_path=`$CYGPATH -u "$windows_path"`
35574    new_path="$unix_path"
35575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35577    new_path="$unix_path"
35578  fi
35579
35580    # remove trailing .exe if any
35581    new_path="${new_path/%.exe/}"
35582
35583    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35584    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35585  fi
35586
35587    else
35588      # We're on a unix platform. Hooray! :)
35589      # First separate the path from the arguments. This will split at the first
35590      # space.
35591      complete="$RC"
35592      path="${complete%% *}"
35593      tmp="$complete EOL"
35594      arguments="${tmp#* }"
35595
35596      # Cannot rely on the command "which" here since it doesn't always work.
35597      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35598      if test -z "$is_absolute_path"; then
35599        # Path to executable is not absolute. Find it.
35600        IFS_save="$IFS"
35601        IFS=:
35602        for p in $PATH; do
35603          if test -f "$p/$path" && test -x "$p/$path"; then
35604            new_path="$p/$path"
35605            break
35606          fi
35607        done
35608        IFS="$IFS_save"
35609      else
35610        # This is an absolute path, we can use it without further modifications.
35611        new_path="$path"
35612      fi
35613
35614      if test "x$new_path" = x; then
35615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35616$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35617        has_space=`$ECHO "$complete" | $GREP " "`
35618        if test "x$has_space" != x; then
35619          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35620$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35621        fi
35622        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35623      fi
35624    fi
35625
35626    # Now join together the path and the arguments once again
35627    if test "x$arguments" != xEOL; then
35628      new_complete="$new_path ${arguments% *}"
35629    else
35630      new_complete="$new_path"
35631    fi
35632
35633    if test "x$complete" != "x$new_complete"; then
35634      RC="$new_complete"
35635      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35636$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35637    fi
35638  fi
35639
35640    # Extract the first word of "dumpbin", so it can be a program name with args.
35641set dummy dumpbin; ac_word=$2
35642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35643$as_echo_n "checking for $ac_word... " >&6; }
35644if ${ac_cv_prog_DUMPBIN+:} false; then :
35645  $as_echo_n "(cached) " >&6
35646else
35647  if test -n "$DUMPBIN"; then
35648  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35649else
35650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35651for as_dir in $PATH
35652do
35653  IFS=$as_save_IFS
35654  test -z "$as_dir" && as_dir=.
35655    for ac_exec_ext in '' $ac_executable_extensions; do
35656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35657    ac_cv_prog_DUMPBIN="dumpbin"
35658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35659    break 2
35660  fi
35661done
35662  done
35663IFS=$as_save_IFS
35664
35665fi
35666fi
35667DUMPBIN=$ac_cv_prog_DUMPBIN
35668if test -n "$DUMPBIN"; then
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35670$as_echo "$DUMPBIN" >&6; }
35671else
35672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35673$as_echo "no" >&6; }
35674fi
35675
35676
35677
35678  # Only process if variable expands to non-empty
35679
35680  if test "x$DUMPBIN" != x; then
35681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35682
35683  # First separate the path from the arguments. This will split at the first
35684  # space.
35685  complete="$DUMPBIN"
35686  path="${complete%% *}"
35687  tmp="$complete EOL"
35688  arguments="${tmp#* }"
35689
35690  # Input might be given as Windows format, start by converting to
35691  # unix format.
35692  new_path=`$CYGPATH -u "$path"`
35693
35694  # Now try to locate executable using which
35695  new_path=`$WHICH "$new_path" 2> /dev/null`
35696  # bat and cmd files are not always considered executable in cygwin causing which
35697  # to not find them
35698  if test "x$new_path" = x \
35699      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35700      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35701    new_path=`$CYGPATH -u "$path"`
35702  fi
35703  if test "x$new_path" = x; then
35704    # Oops. Which didn't find the executable.
35705    # The splitting of arguments from the executable at a space might have been incorrect,
35706    # since paths with space are more likely in Windows. Give it another try with the whole
35707    # argument.
35708    path="$complete"
35709    arguments="EOL"
35710    new_path=`$CYGPATH -u "$path"`
35711    new_path=`$WHICH "$new_path" 2> /dev/null`
35712    # bat and cmd files are not always considered executable in cygwin causing which
35713    # to not find them
35714    if test "x$new_path" = x \
35715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35717      new_path=`$CYGPATH -u "$path"`
35718    fi
35719    if test "x$new_path" = x; then
35720      # It's still not found. Now this is an unrecoverable error.
35721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35722$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35723      has_space=`$ECHO "$complete" | $GREP " "`
35724      if test "x$has_space" != x; then
35725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35727      fi
35728      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35729    fi
35730  fi
35731
35732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35735  # "foo.exe" is OK but "foo" is an error.
35736  #
35737  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35738  # It is also a way to make sure we got the proper file name for the real test later on.
35739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35740  if test "x$test_shortpath" = x; then
35741    # Short path failed, file does not exist as specified.
35742    # Try adding .exe or .cmd
35743    if test -f "${new_path}.exe"; then
35744      input_to_shortpath="${new_path}.exe"
35745    elif test -f "${new_path}.cmd"; then
35746      input_to_shortpath="${new_path}.cmd"
35747    else
35748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35749$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35752      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35753    fi
35754  else
35755    input_to_shortpath="$new_path"
35756  fi
35757
35758  # Call helper function which possibly converts this using DOS-style short mode.
35759  # If so, the updated path is stored in $new_path.
35760  new_path="$input_to_shortpath"
35761
35762  input_path="$input_to_shortpath"
35763  # Check if we need to convert this using DOS-style short mode. If the path
35764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35765  # take no chances and rewrite it.
35766  # Note: m4 eats our [], so we need to use [ and ] instead.
35767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35768  if test "x$has_forbidden_chars" != x; then
35769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35773      # Going to short mode and back again did indeed matter. Since short mode is
35774      # case insensitive, let's make it lowercase to improve readability.
35775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35776      # Now convert it back to Unix-style (cygpath)
35777      input_path=`$CYGPATH -u "$shortmode_path"`
35778      new_path="$input_path"
35779    fi
35780  fi
35781
35782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35783  if test "x$test_cygdrive_prefix" = x; then
35784    # As a simple fix, exclude /usr/bin since it's not a real path.
35785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35787      # a path prefixed by /cygdrive for fixpath to work.
35788      new_path="$CYGWIN_ROOT_PATH$input_path"
35789    fi
35790  fi
35791
35792  # remove trailing .exe if any
35793  new_path="${new_path/%.exe/}"
35794
35795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35796
35797  # First separate the path from the arguments. This will split at the first
35798  # space.
35799  complete="$DUMPBIN"
35800  path="${complete%% *}"
35801  tmp="$complete EOL"
35802  arguments="${tmp#* }"
35803
35804  # Input might be given as Windows format, start by converting to
35805  # unix format.
35806  new_path="$path"
35807
35808  windows_path="$new_path"
35809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35810    unix_path=`$CYGPATH -u "$windows_path"`
35811    new_path="$unix_path"
35812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35814    new_path="$unix_path"
35815  fi
35816
35817
35818  # Now try to locate executable using which
35819  new_path=`$WHICH "$new_path" 2> /dev/null`
35820
35821  if test "x$new_path" = x; then
35822    # Oops. Which didn't find the executable.
35823    # The splitting of arguments from the executable at a space might have been incorrect,
35824    # since paths with space are more likely in Windows. Give it another try with the whole
35825    # argument.
35826    path="$complete"
35827    arguments="EOL"
35828    new_path="$path"
35829
35830  windows_path="$new_path"
35831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35832    unix_path=`$CYGPATH -u "$windows_path"`
35833    new_path="$unix_path"
35834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35836    new_path="$unix_path"
35837  fi
35838
35839
35840    new_path=`$WHICH "$new_path" 2> /dev/null`
35841    # bat and cmd files are not always considered executable in MSYS causing which
35842    # to not find them
35843    if test "x$new_path" = x \
35844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35846      new_path="$path"
35847
35848  windows_path="$new_path"
35849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35850    unix_path=`$CYGPATH -u "$windows_path"`
35851    new_path="$unix_path"
35852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35854    new_path="$unix_path"
35855  fi
35856
35857    fi
35858
35859    if test "x$new_path" = x; then
35860      # It's still not found. Now this is an unrecoverable error.
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35862$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35863      has_space=`$ECHO "$complete" | $GREP " "`
35864      if test "x$has_space" != x; then
35865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35867      fi
35868      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35869    fi
35870  fi
35871
35872  # Now new_path has a complete unix path to the binary
35873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35874    # Keep paths in /bin as-is, but remove trailing .exe if any
35875    new_path="${new_path/%.exe/}"
35876    # Do not save /bin paths to all_fixpath_prefixes!
35877  else
35878    # Not in mixed or Windows style, start by that.
35879    new_path=`cmd //c echo $new_path`
35880
35881  input_path="$new_path"
35882  # Check if we need to convert this using DOS-style short mode. If the path
35883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35884  # take no chances and rewrite it.
35885  # Note: m4 eats our [], so we need to use [ and ] instead.
35886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35887  if test "x$has_forbidden_chars" != x; then
35888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35890  fi
35891
35892    # Output is in $new_path
35893
35894  windows_path="$new_path"
35895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35896    unix_path=`$CYGPATH -u "$windows_path"`
35897    new_path="$unix_path"
35898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35900    new_path="$unix_path"
35901  fi
35902
35903    # remove trailing .exe if any
35904    new_path="${new_path/%.exe/}"
35905
35906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35908  fi
35909
35910    else
35911      # We're on a unix platform. Hooray! :)
35912      # First separate the path from the arguments. This will split at the first
35913      # space.
35914      complete="$DUMPBIN"
35915      path="${complete%% *}"
35916      tmp="$complete EOL"
35917      arguments="${tmp#* }"
35918
35919      # Cannot rely on the command "which" here since it doesn't always work.
35920      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35921      if test -z "$is_absolute_path"; then
35922        # Path to executable is not absolute. Find it.
35923        IFS_save="$IFS"
35924        IFS=:
35925        for p in $PATH; do
35926          if test -f "$p/$path" && test -x "$p/$path"; then
35927            new_path="$p/$path"
35928            break
35929          fi
35930        done
35931        IFS="$IFS_save"
35932      else
35933        # This is an absolute path, we can use it without further modifications.
35934        new_path="$path"
35935      fi
35936
35937      if test "x$new_path" = x; then
35938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35939$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35940        has_space=`$ECHO "$complete" | $GREP " "`
35941        if test "x$has_space" != x; then
35942          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35944        fi
35945        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35946      fi
35947    fi
35948
35949    # Now join together the path and the arguments once again
35950    if test "x$arguments" != xEOL; then
35951      new_complete="$new_path ${arguments% *}"
35952    else
35953      new_complete="$new_path"
35954    fi
35955
35956    if test "x$complete" != "x$new_complete"; then
35957      DUMPBIN="$new_complete"
35958      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35959$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35960    fi
35961  fi
35962
35963    # We need to check for 'msbuild.exe' because at the place where we expect to
35964    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35965    # won't find the 'msbuild.exe' executable in that case (and the
35966    # 'ac_executable_extensions' is unusable due to performance reasons).
35967    # Notice that we intentionally don't fix up the path to MSBUILD because we
35968    # will call it in a DOS shell during freetype detection on Windows (see
35969    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35970    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35971set dummy msbuild.exe; ac_word=$2
35972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35973$as_echo_n "checking for $ac_word... " >&6; }
35974if ${ac_cv_prog_MSBUILD+:} false; then :
35975  $as_echo_n "(cached) " >&6
35976else
35977  if test -n "$MSBUILD"; then
35978  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35979else
35980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35981for as_dir in $PATH
35982do
35983  IFS=$as_save_IFS
35984  test -z "$as_dir" && as_dir=.
35985    for ac_exec_ext in '' $ac_executable_extensions; do
35986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35987    ac_cv_prog_MSBUILD="msbuild.exe"
35988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35989    break 2
35990  fi
35991done
35992  done
35993IFS=$as_save_IFS
35994
35995fi
35996fi
35997MSBUILD=$ac_cv_prog_MSBUILD
35998if test -n "$MSBUILD"; then
35999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
36000$as_echo "$MSBUILD" >&6; }
36001else
36002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36003$as_echo "no" >&6; }
36004fi
36005
36006
36007  fi
36008
36009  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36010
36011
36012  # Publish this variable in the help.
36013
36014
36015  if [ -z "${STRIP+x}" ]; then
36016    # The variable is not set by user, try to locate tool using the code snippet
36017    for ac_prog in strip
36018do
36019  # Extract the first word of "$ac_prog", so it can be a program name with args.
36020set dummy $ac_prog; ac_word=$2
36021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36022$as_echo_n "checking for $ac_word... " >&6; }
36023if ${ac_cv_path_STRIP+:} false; then :
36024  $as_echo_n "(cached) " >&6
36025else
36026  case $STRIP in
36027  [\\/]* | ?:[\\/]*)
36028  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36029  ;;
36030  *)
36031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36032for as_dir in $PATH
36033do
36034  IFS=$as_save_IFS
36035  test -z "$as_dir" && as_dir=.
36036    for ac_exec_ext in '' $ac_executable_extensions; do
36037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36038    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36040    break 2
36041  fi
36042done
36043  done
36044IFS=$as_save_IFS
36045
36046  ;;
36047esac
36048fi
36049STRIP=$ac_cv_path_STRIP
36050if test -n "$STRIP"; then
36051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36052$as_echo "$STRIP" >&6; }
36053else
36054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36055$as_echo "no" >&6; }
36056fi
36057
36058
36059  test -n "$STRIP" && break
36060done
36061
36062  else
36063    # The variable is set, but is it from the command line or the environment?
36064
36065    # Try to remove the string !STRIP! from our list.
36066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36068      # If it failed, the variable was not from the command line. Ignore it,
36069      # but warn the user (except for BASH, which is always set by the calling BASH).
36070      if test "xSTRIP" != xBASH; then
36071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36072$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36073      fi
36074      # Try to locate tool using the code snippet
36075      for ac_prog in strip
36076do
36077  # Extract the first word of "$ac_prog", so it can be a program name with args.
36078set dummy $ac_prog; ac_word=$2
36079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36080$as_echo_n "checking for $ac_word... " >&6; }
36081if ${ac_cv_path_STRIP+:} false; then :
36082  $as_echo_n "(cached) " >&6
36083else
36084  case $STRIP in
36085  [\\/]* | ?:[\\/]*)
36086  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36087  ;;
36088  *)
36089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36090for as_dir in $PATH
36091do
36092  IFS=$as_save_IFS
36093  test -z "$as_dir" && as_dir=.
36094    for ac_exec_ext in '' $ac_executable_extensions; do
36095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36096    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36098    break 2
36099  fi
36100done
36101  done
36102IFS=$as_save_IFS
36103
36104  ;;
36105esac
36106fi
36107STRIP=$ac_cv_path_STRIP
36108if test -n "$STRIP"; then
36109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36110$as_echo "$STRIP" >&6; }
36111else
36112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36113$as_echo "no" >&6; }
36114fi
36115
36116
36117  test -n "$STRIP" && break
36118done
36119
36120    else
36121      # If it succeeded, then it was overridden by the user. We will use it
36122      # for the tool.
36123
36124      # First remove it from the list of overridden variables, so we can test
36125      # for unknown variables in the end.
36126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36127
36128      # Check if we try to supply an empty value
36129      if test "x$STRIP" = x; then
36130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
36131$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
36132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36133$as_echo_n "checking for STRIP... " >&6; }
36134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36135$as_echo "disabled" >&6; }
36136      else
36137        # Check if the provided tool contains a complete path.
36138        tool_specified="$STRIP"
36139        tool_basename="${tool_specified##*/}"
36140        if test "x$tool_basename" = "x$tool_specified"; then
36141          # A command without a complete path is provided, search $PATH.
36142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36143$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36144          # Extract the first word of "$tool_basename", so it can be a program name with args.
36145set dummy $tool_basename; ac_word=$2
36146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36147$as_echo_n "checking for $ac_word... " >&6; }
36148if ${ac_cv_path_STRIP+:} false; then :
36149  $as_echo_n "(cached) " >&6
36150else
36151  case $STRIP in
36152  [\\/]* | ?:[\\/]*)
36153  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36154  ;;
36155  *)
36156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36157for as_dir in $PATH
36158do
36159  IFS=$as_save_IFS
36160  test -z "$as_dir" && as_dir=.
36161    for ac_exec_ext in '' $ac_executable_extensions; do
36162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36163    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36165    break 2
36166  fi
36167done
36168  done
36169IFS=$as_save_IFS
36170
36171  ;;
36172esac
36173fi
36174STRIP=$ac_cv_path_STRIP
36175if test -n "$STRIP"; then
36176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36177$as_echo "$STRIP" >&6; }
36178else
36179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36180$as_echo "no" >&6; }
36181fi
36182
36183
36184          if test "x$STRIP" = x; then
36185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36186          fi
36187        else
36188          # Otherwise we believe it is a complete path. Use it as it is.
36189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36190$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36192$as_echo_n "checking for STRIP... " >&6; }
36193          if test ! -x "$tool_specified"; then
36194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36195$as_echo "not found" >&6; }
36196            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36197          fi
36198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36199$as_echo "$tool_specified" >&6; }
36200        fi
36201      fi
36202    fi
36203  fi
36204
36205
36206
36207  # Only process if variable expands to non-empty
36208
36209  if test "x$STRIP" != x; then
36210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36211
36212  # First separate the path from the arguments. This will split at the first
36213  # space.
36214  complete="$STRIP"
36215  path="${complete%% *}"
36216  tmp="$complete EOL"
36217  arguments="${tmp#* }"
36218
36219  # Input might be given as Windows format, start by converting to
36220  # unix format.
36221  new_path=`$CYGPATH -u "$path"`
36222
36223  # Now try to locate executable using which
36224  new_path=`$WHICH "$new_path" 2> /dev/null`
36225  # bat and cmd files are not always considered executable in cygwin causing which
36226  # to not find them
36227  if test "x$new_path" = x \
36228      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36229      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36230    new_path=`$CYGPATH -u "$path"`
36231  fi
36232  if test "x$new_path" = x; then
36233    # Oops. Which didn't find the executable.
36234    # The splitting of arguments from the executable at a space might have been incorrect,
36235    # since paths with space are more likely in Windows. Give it another try with the whole
36236    # argument.
36237    path="$complete"
36238    arguments="EOL"
36239    new_path=`$CYGPATH -u "$path"`
36240    new_path=`$WHICH "$new_path" 2> /dev/null`
36241    # bat and cmd files are not always considered executable in cygwin causing which
36242    # to not find them
36243    if test "x$new_path" = x \
36244        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36245        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36246      new_path=`$CYGPATH -u "$path"`
36247    fi
36248    if test "x$new_path" = x; then
36249      # It's still not found. Now this is an unrecoverable error.
36250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36251$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36252      has_space=`$ECHO "$complete" | $GREP " "`
36253      if test "x$has_space" != x; then
36254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36256      fi
36257      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36258    fi
36259  fi
36260
36261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36264  # "foo.exe" is OK but "foo" is an error.
36265  #
36266  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36267  # It is also a way to make sure we got the proper file name for the real test later on.
36268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36269  if test "x$test_shortpath" = x; then
36270    # Short path failed, file does not exist as specified.
36271    # Try adding .exe or .cmd
36272    if test -f "${new_path}.exe"; then
36273      input_to_shortpath="${new_path}.exe"
36274    elif test -f "${new_path}.cmd"; then
36275      input_to_shortpath="${new_path}.cmd"
36276    else
36277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36278$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36281      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36282    fi
36283  else
36284    input_to_shortpath="$new_path"
36285  fi
36286
36287  # Call helper function which possibly converts this using DOS-style short mode.
36288  # If so, the updated path is stored in $new_path.
36289  new_path="$input_to_shortpath"
36290
36291  input_path="$input_to_shortpath"
36292  # Check if we need to convert this using DOS-style short mode. If the path
36293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36294  # take no chances and rewrite it.
36295  # Note: m4 eats our [], so we need to use [ and ] instead.
36296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36297  if test "x$has_forbidden_chars" != x; then
36298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36302      # Going to short mode and back again did indeed matter. Since short mode is
36303      # case insensitive, let's make it lowercase to improve readability.
36304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36305      # Now convert it back to Unix-style (cygpath)
36306      input_path=`$CYGPATH -u "$shortmode_path"`
36307      new_path="$input_path"
36308    fi
36309  fi
36310
36311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36312  if test "x$test_cygdrive_prefix" = x; then
36313    # As a simple fix, exclude /usr/bin since it's not a real path.
36314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36316      # a path prefixed by /cygdrive for fixpath to work.
36317      new_path="$CYGWIN_ROOT_PATH$input_path"
36318    fi
36319  fi
36320
36321  # remove trailing .exe if any
36322  new_path="${new_path/%.exe/}"
36323
36324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36325
36326  # First separate the path from the arguments. This will split at the first
36327  # space.
36328  complete="$STRIP"
36329  path="${complete%% *}"
36330  tmp="$complete EOL"
36331  arguments="${tmp#* }"
36332
36333  # Input might be given as Windows format, start by converting to
36334  # unix format.
36335  new_path="$path"
36336
36337  windows_path="$new_path"
36338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36339    unix_path=`$CYGPATH -u "$windows_path"`
36340    new_path="$unix_path"
36341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36343    new_path="$unix_path"
36344  fi
36345
36346
36347  # Now try to locate executable using which
36348  new_path=`$WHICH "$new_path" 2> /dev/null`
36349
36350  if test "x$new_path" = x; then
36351    # Oops. Which didn't find the executable.
36352    # The splitting of arguments from the executable at a space might have been incorrect,
36353    # since paths with space are more likely in Windows. Give it another try with the whole
36354    # argument.
36355    path="$complete"
36356    arguments="EOL"
36357    new_path="$path"
36358
36359  windows_path="$new_path"
36360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36361    unix_path=`$CYGPATH -u "$windows_path"`
36362    new_path="$unix_path"
36363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36365    new_path="$unix_path"
36366  fi
36367
36368
36369    new_path=`$WHICH "$new_path" 2> /dev/null`
36370    # bat and cmd files are not always considered executable in MSYS causing which
36371    # to not find them
36372    if test "x$new_path" = x \
36373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36375      new_path="$path"
36376
36377  windows_path="$new_path"
36378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36379    unix_path=`$CYGPATH -u "$windows_path"`
36380    new_path="$unix_path"
36381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36383    new_path="$unix_path"
36384  fi
36385
36386    fi
36387
36388    if test "x$new_path" = x; then
36389      # It's still not found. Now this is an unrecoverable error.
36390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36391$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36392      has_space=`$ECHO "$complete" | $GREP " "`
36393      if test "x$has_space" != x; then
36394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36396      fi
36397      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36398    fi
36399  fi
36400
36401  # Now new_path has a complete unix path to the binary
36402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36403    # Keep paths in /bin as-is, but remove trailing .exe if any
36404    new_path="${new_path/%.exe/}"
36405    # Do not save /bin paths to all_fixpath_prefixes!
36406  else
36407    # Not in mixed or Windows style, start by that.
36408    new_path=`cmd //c echo $new_path`
36409
36410  input_path="$new_path"
36411  # Check if we need to convert this using DOS-style short mode. If the path
36412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36413  # take no chances and rewrite it.
36414  # Note: m4 eats our [], so we need to use [ and ] instead.
36415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36416  if test "x$has_forbidden_chars" != x; then
36417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36419  fi
36420
36421    # Output is in $new_path
36422
36423  windows_path="$new_path"
36424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36425    unix_path=`$CYGPATH -u "$windows_path"`
36426    new_path="$unix_path"
36427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36429    new_path="$unix_path"
36430  fi
36431
36432    # remove trailing .exe if any
36433    new_path="${new_path/%.exe/}"
36434
36435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36437  fi
36438
36439    else
36440      # We're on a unix platform. Hooray! :)
36441      # First separate the path from the arguments. This will split at the first
36442      # space.
36443      complete="$STRIP"
36444      path="${complete%% *}"
36445      tmp="$complete EOL"
36446      arguments="${tmp#* }"
36447
36448      # Cannot rely on the command "which" here since it doesn't always work.
36449      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36450      if test -z "$is_absolute_path"; then
36451        # Path to executable is not absolute. Find it.
36452        IFS_save="$IFS"
36453        IFS=:
36454        for p in $PATH; do
36455          if test -f "$p/$path" && test -x "$p/$path"; then
36456            new_path="$p/$path"
36457            break
36458          fi
36459        done
36460        IFS="$IFS_save"
36461      else
36462        # This is an absolute path, we can use it without further modifications.
36463        new_path="$path"
36464      fi
36465
36466      if test "x$new_path" = x; then
36467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36468$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36469        has_space=`$ECHO "$complete" | $GREP " "`
36470        if test "x$has_space" != x; then
36471          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36472$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36473        fi
36474        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36475      fi
36476    fi
36477
36478    # Now join together the path and the arguments once again
36479    if test "x$arguments" != xEOL; then
36480      new_complete="$new_path ${arguments% *}"
36481    else
36482      new_complete="$new_path"
36483    fi
36484
36485    if test "x$complete" != "x$new_complete"; then
36486      STRIP="$new_complete"
36487      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36488$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36489    fi
36490  fi
36491
36492
36493
36494  # Publish this variable in the help.
36495
36496
36497  if [ -z "${NM+x}" ]; then
36498    # The variable is not set by user, try to locate tool using the code snippet
36499    for ac_prog in nm
36500do
36501  # Extract the first word of "$ac_prog", so it can be a program name with args.
36502set dummy $ac_prog; ac_word=$2
36503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36504$as_echo_n "checking for $ac_word... " >&6; }
36505if ${ac_cv_path_NM+:} false; then :
36506  $as_echo_n "(cached) " >&6
36507else
36508  case $NM in
36509  [\\/]* | ?:[\\/]*)
36510  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36511  ;;
36512  *)
36513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36514for as_dir in $PATH
36515do
36516  IFS=$as_save_IFS
36517  test -z "$as_dir" && as_dir=.
36518    for ac_exec_ext in '' $ac_executable_extensions; do
36519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36520    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36522    break 2
36523  fi
36524done
36525  done
36526IFS=$as_save_IFS
36527
36528  ;;
36529esac
36530fi
36531NM=$ac_cv_path_NM
36532if test -n "$NM"; then
36533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36534$as_echo "$NM" >&6; }
36535else
36536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36537$as_echo "no" >&6; }
36538fi
36539
36540
36541  test -n "$NM" && break
36542done
36543
36544  else
36545    # The variable is set, but is it from the command line or the environment?
36546
36547    # Try to remove the string !NM! from our list.
36548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36550      # If it failed, the variable was not from the command line. Ignore it,
36551      # but warn the user (except for BASH, which is always set by the calling BASH).
36552      if test "xNM" != xBASH; then
36553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36554$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36555      fi
36556      # Try to locate tool using the code snippet
36557      for ac_prog in nm
36558do
36559  # Extract the first word of "$ac_prog", so it can be a program name with args.
36560set dummy $ac_prog; ac_word=$2
36561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36562$as_echo_n "checking for $ac_word... " >&6; }
36563if ${ac_cv_path_NM+:} false; then :
36564  $as_echo_n "(cached) " >&6
36565else
36566  case $NM in
36567  [\\/]* | ?:[\\/]*)
36568  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36569  ;;
36570  *)
36571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36572for as_dir in $PATH
36573do
36574  IFS=$as_save_IFS
36575  test -z "$as_dir" && as_dir=.
36576    for ac_exec_ext in '' $ac_executable_extensions; do
36577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36578    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36580    break 2
36581  fi
36582done
36583  done
36584IFS=$as_save_IFS
36585
36586  ;;
36587esac
36588fi
36589NM=$ac_cv_path_NM
36590if test -n "$NM"; then
36591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36592$as_echo "$NM" >&6; }
36593else
36594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36595$as_echo "no" >&6; }
36596fi
36597
36598
36599  test -n "$NM" && break
36600done
36601
36602    else
36603      # If it succeeded, then it was overridden by the user. We will use it
36604      # for the tool.
36605
36606      # First remove it from the list of overridden variables, so we can test
36607      # for unknown variables in the end.
36608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36609
36610      # Check if we try to supply an empty value
36611      if test "x$NM" = x; then
36612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
36613$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
36614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36615$as_echo_n "checking for NM... " >&6; }
36616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36617$as_echo "disabled" >&6; }
36618      else
36619        # Check if the provided tool contains a complete path.
36620        tool_specified="$NM"
36621        tool_basename="${tool_specified##*/}"
36622        if test "x$tool_basename" = "x$tool_specified"; then
36623          # A command without a complete path is provided, search $PATH.
36624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36625$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36626          # Extract the first word of "$tool_basename", so it can be a program name with args.
36627set dummy $tool_basename; ac_word=$2
36628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36629$as_echo_n "checking for $ac_word... " >&6; }
36630if ${ac_cv_path_NM+:} false; then :
36631  $as_echo_n "(cached) " >&6
36632else
36633  case $NM in
36634  [\\/]* | ?:[\\/]*)
36635  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36636  ;;
36637  *)
36638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36639for as_dir in $PATH
36640do
36641  IFS=$as_save_IFS
36642  test -z "$as_dir" && as_dir=.
36643    for ac_exec_ext in '' $ac_executable_extensions; do
36644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36645    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36647    break 2
36648  fi
36649done
36650  done
36651IFS=$as_save_IFS
36652
36653  ;;
36654esac
36655fi
36656NM=$ac_cv_path_NM
36657if test -n "$NM"; then
36658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36659$as_echo "$NM" >&6; }
36660else
36661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36662$as_echo "no" >&6; }
36663fi
36664
36665
36666          if test "x$NM" = x; then
36667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36668          fi
36669        else
36670          # Otherwise we believe it is a complete path. Use it as it is.
36671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36672$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36674$as_echo_n "checking for NM... " >&6; }
36675          if test ! -x "$tool_specified"; then
36676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36677$as_echo "not found" >&6; }
36678            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36679          fi
36680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36681$as_echo "$tool_specified" >&6; }
36682        fi
36683      fi
36684    fi
36685  fi
36686
36687
36688
36689  # Only process if variable expands to non-empty
36690
36691  if test "x$NM" != x; then
36692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36693
36694  # First separate the path from the arguments. This will split at the first
36695  # space.
36696  complete="$NM"
36697  path="${complete%% *}"
36698  tmp="$complete EOL"
36699  arguments="${tmp#* }"
36700
36701  # Input might be given as Windows format, start by converting to
36702  # unix format.
36703  new_path=`$CYGPATH -u "$path"`
36704
36705  # Now try to locate executable using which
36706  new_path=`$WHICH "$new_path" 2> /dev/null`
36707  # bat and cmd files are not always considered executable in cygwin causing which
36708  # to not find them
36709  if test "x$new_path" = x \
36710      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36711      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36712    new_path=`$CYGPATH -u "$path"`
36713  fi
36714  if test "x$new_path" = x; then
36715    # Oops. Which didn't find the executable.
36716    # The splitting of arguments from the executable at a space might have been incorrect,
36717    # since paths with space are more likely in Windows. Give it another try with the whole
36718    # argument.
36719    path="$complete"
36720    arguments="EOL"
36721    new_path=`$CYGPATH -u "$path"`
36722    new_path=`$WHICH "$new_path" 2> /dev/null`
36723    # bat and cmd files are not always considered executable in cygwin causing which
36724    # to not find them
36725    if test "x$new_path" = x \
36726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36728      new_path=`$CYGPATH -u "$path"`
36729    fi
36730    if test "x$new_path" = x; then
36731      # It's still not found. Now this is an unrecoverable error.
36732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36733$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36734      has_space=`$ECHO "$complete" | $GREP " "`
36735      if test "x$has_space" != x; then
36736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36738      fi
36739      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36740    fi
36741  fi
36742
36743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36746  # "foo.exe" is OK but "foo" is an error.
36747  #
36748  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36749  # It is also a way to make sure we got the proper file name for the real test later on.
36750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36751  if test "x$test_shortpath" = x; then
36752    # Short path failed, file does not exist as specified.
36753    # Try adding .exe or .cmd
36754    if test -f "${new_path}.exe"; then
36755      input_to_shortpath="${new_path}.exe"
36756    elif test -f "${new_path}.cmd"; then
36757      input_to_shortpath="${new_path}.cmd"
36758    else
36759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36760$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36761      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36762$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36763      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36764    fi
36765  else
36766    input_to_shortpath="$new_path"
36767  fi
36768
36769  # Call helper function which possibly converts this using DOS-style short mode.
36770  # If so, the updated path is stored in $new_path.
36771  new_path="$input_to_shortpath"
36772
36773  input_path="$input_to_shortpath"
36774  # Check if we need to convert this using DOS-style short mode. If the path
36775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36776  # take no chances and rewrite it.
36777  # Note: m4 eats our [], so we need to use [ and ] instead.
36778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36779  if test "x$has_forbidden_chars" != x; then
36780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36784      # Going to short mode and back again did indeed matter. Since short mode is
36785      # case insensitive, let's make it lowercase to improve readability.
36786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36787      # Now convert it back to Unix-style (cygpath)
36788      input_path=`$CYGPATH -u "$shortmode_path"`
36789      new_path="$input_path"
36790    fi
36791  fi
36792
36793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36794  if test "x$test_cygdrive_prefix" = x; then
36795    # As a simple fix, exclude /usr/bin since it's not a real path.
36796    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36798      # a path prefixed by /cygdrive for fixpath to work.
36799      new_path="$CYGWIN_ROOT_PATH$input_path"
36800    fi
36801  fi
36802
36803  # remove trailing .exe if any
36804  new_path="${new_path/%.exe/}"
36805
36806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36807
36808  # First separate the path from the arguments. This will split at the first
36809  # space.
36810  complete="$NM"
36811  path="${complete%% *}"
36812  tmp="$complete EOL"
36813  arguments="${tmp#* }"
36814
36815  # Input might be given as Windows format, start by converting to
36816  # unix format.
36817  new_path="$path"
36818
36819  windows_path="$new_path"
36820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36821    unix_path=`$CYGPATH -u "$windows_path"`
36822    new_path="$unix_path"
36823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36825    new_path="$unix_path"
36826  fi
36827
36828
36829  # Now try to locate executable using which
36830  new_path=`$WHICH "$new_path" 2> /dev/null`
36831
36832  if test "x$new_path" = x; then
36833    # Oops. Which didn't find the executable.
36834    # The splitting of arguments from the executable at a space might have been incorrect,
36835    # since paths with space are more likely in Windows. Give it another try with the whole
36836    # argument.
36837    path="$complete"
36838    arguments="EOL"
36839    new_path="$path"
36840
36841  windows_path="$new_path"
36842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36843    unix_path=`$CYGPATH -u "$windows_path"`
36844    new_path="$unix_path"
36845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36847    new_path="$unix_path"
36848  fi
36849
36850
36851    new_path=`$WHICH "$new_path" 2> /dev/null`
36852    # bat and cmd files are not always considered executable in MSYS causing which
36853    # to not find them
36854    if test "x$new_path" = x \
36855        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36856        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36857      new_path="$path"
36858
36859  windows_path="$new_path"
36860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36861    unix_path=`$CYGPATH -u "$windows_path"`
36862    new_path="$unix_path"
36863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36865    new_path="$unix_path"
36866  fi
36867
36868    fi
36869
36870    if test "x$new_path" = x; then
36871      # It's still not found. Now this is an unrecoverable error.
36872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36873$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36874      has_space=`$ECHO "$complete" | $GREP " "`
36875      if test "x$has_space" != x; then
36876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36878      fi
36879      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36880    fi
36881  fi
36882
36883  # Now new_path has a complete unix path to the binary
36884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36885    # Keep paths in /bin as-is, but remove trailing .exe if any
36886    new_path="${new_path/%.exe/}"
36887    # Do not save /bin paths to all_fixpath_prefixes!
36888  else
36889    # Not in mixed or Windows style, start by that.
36890    new_path=`cmd //c echo $new_path`
36891
36892  input_path="$new_path"
36893  # Check if we need to convert this using DOS-style short mode. If the path
36894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36895  # take no chances and rewrite it.
36896  # Note: m4 eats our [], so we need to use [ and ] instead.
36897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36898  if test "x$has_forbidden_chars" != x; then
36899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36901  fi
36902
36903    # Output is in $new_path
36904
36905  windows_path="$new_path"
36906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36907    unix_path=`$CYGPATH -u "$windows_path"`
36908    new_path="$unix_path"
36909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36911    new_path="$unix_path"
36912  fi
36913
36914    # remove trailing .exe if any
36915    new_path="${new_path/%.exe/}"
36916
36917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36919  fi
36920
36921    else
36922      # We're on a unix platform. Hooray! :)
36923      # First separate the path from the arguments. This will split at the first
36924      # space.
36925      complete="$NM"
36926      path="${complete%% *}"
36927      tmp="$complete EOL"
36928      arguments="${tmp#* }"
36929
36930      # Cannot rely on the command "which" here since it doesn't always work.
36931      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36932      if test -z "$is_absolute_path"; then
36933        # Path to executable is not absolute. Find it.
36934        IFS_save="$IFS"
36935        IFS=:
36936        for p in $PATH; do
36937          if test -f "$p/$path" && test -x "$p/$path"; then
36938            new_path="$p/$path"
36939            break
36940          fi
36941        done
36942        IFS="$IFS_save"
36943      else
36944        # This is an absolute path, we can use it without further modifications.
36945        new_path="$path"
36946      fi
36947
36948      if test "x$new_path" = x; then
36949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36950$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36951        has_space=`$ECHO "$complete" | $GREP " "`
36952        if test "x$has_space" != x; then
36953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36955        fi
36956        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36957      fi
36958    fi
36959
36960    # Now join together the path and the arguments once again
36961    if test "x$arguments" != xEOL; then
36962      new_complete="$new_path ${arguments% *}"
36963    else
36964      new_complete="$new_path"
36965    fi
36966
36967    if test "x$complete" != "x$new_complete"; then
36968      NM="$new_complete"
36969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36970$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36971    fi
36972  fi
36973
36974
36975
36976  # Publish this variable in the help.
36977
36978
36979  if [ -z "${GNM+x}" ]; then
36980    # The variable is not set by user, try to locate tool using the code snippet
36981    for ac_prog in gnm
36982do
36983  # Extract the first word of "$ac_prog", so it can be a program name with args.
36984set dummy $ac_prog; ac_word=$2
36985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36986$as_echo_n "checking for $ac_word... " >&6; }
36987if ${ac_cv_path_GNM+:} false; then :
36988  $as_echo_n "(cached) " >&6
36989else
36990  case $GNM in
36991  [\\/]* | ?:[\\/]*)
36992  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36993  ;;
36994  *)
36995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36996for as_dir in $PATH
36997do
36998  IFS=$as_save_IFS
36999  test -z "$as_dir" && as_dir=.
37000    for ac_exec_ext in '' $ac_executable_extensions; do
37001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37002    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37004    break 2
37005  fi
37006done
37007  done
37008IFS=$as_save_IFS
37009
37010  ;;
37011esac
37012fi
37013GNM=$ac_cv_path_GNM
37014if test -n "$GNM"; then
37015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37016$as_echo "$GNM" >&6; }
37017else
37018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37019$as_echo "no" >&6; }
37020fi
37021
37022
37023  test -n "$GNM" && break
37024done
37025
37026  else
37027    # The variable is set, but is it from the command line or the environment?
37028
37029    # Try to remove the string !GNM! from our list.
37030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
37031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37032      # If it failed, the variable was not from the command line. Ignore it,
37033      # but warn the user (except for BASH, which is always set by the calling BASH).
37034      if test "xGNM" != xBASH; then
37035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
37036$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
37037      fi
37038      # Try to locate tool using the code snippet
37039      for ac_prog in gnm
37040do
37041  # Extract the first word of "$ac_prog", so it can be a program name with args.
37042set dummy $ac_prog; ac_word=$2
37043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37044$as_echo_n "checking for $ac_word... " >&6; }
37045if ${ac_cv_path_GNM+:} false; then :
37046  $as_echo_n "(cached) " >&6
37047else
37048  case $GNM in
37049  [\\/]* | ?:[\\/]*)
37050  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37051  ;;
37052  *)
37053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37054for as_dir in $PATH
37055do
37056  IFS=$as_save_IFS
37057  test -z "$as_dir" && as_dir=.
37058    for ac_exec_ext in '' $ac_executable_extensions; do
37059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37060    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37062    break 2
37063  fi
37064done
37065  done
37066IFS=$as_save_IFS
37067
37068  ;;
37069esac
37070fi
37071GNM=$ac_cv_path_GNM
37072if test -n "$GNM"; then
37073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37074$as_echo "$GNM" >&6; }
37075else
37076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37077$as_echo "no" >&6; }
37078fi
37079
37080
37081  test -n "$GNM" && break
37082done
37083
37084    else
37085      # If it succeeded, then it was overridden by the user. We will use it
37086      # for the tool.
37087
37088      # First remove it from the list of overridden variables, so we can test
37089      # for unknown variables in the end.
37090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37091
37092      # Check if we try to supply an empty value
37093      if test "x$GNM" = x; then
37094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
37095$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
37096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37097$as_echo_n "checking for GNM... " >&6; }
37098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37099$as_echo "disabled" >&6; }
37100      else
37101        # Check if the provided tool contains a complete path.
37102        tool_specified="$GNM"
37103        tool_basename="${tool_specified##*/}"
37104        if test "x$tool_basename" = "x$tool_specified"; then
37105          # A command without a complete path is provided, search $PATH.
37106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
37107$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
37108          # Extract the first word of "$tool_basename", so it can be a program name with args.
37109set dummy $tool_basename; ac_word=$2
37110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37111$as_echo_n "checking for $ac_word... " >&6; }
37112if ${ac_cv_path_GNM+:} false; then :
37113  $as_echo_n "(cached) " >&6
37114else
37115  case $GNM in
37116  [\\/]* | ?:[\\/]*)
37117  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37118  ;;
37119  *)
37120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37121for as_dir in $PATH
37122do
37123  IFS=$as_save_IFS
37124  test -z "$as_dir" && as_dir=.
37125    for ac_exec_ext in '' $ac_executable_extensions; do
37126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37127    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37129    break 2
37130  fi
37131done
37132  done
37133IFS=$as_save_IFS
37134
37135  ;;
37136esac
37137fi
37138GNM=$ac_cv_path_GNM
37139if test -n "$GNM"; then
37140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37141$as_echo "$GNM" >&6; }
37142else
37143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37144$as_echo "no" >&6; }
37145fi
37146
37147
37148          if test "x$GNM" = x; then
37149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37150          fi
37151        else
37152          # Otherwise we believe it is a complete path. Use it as it is.
37153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37154$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37156$as_echo_n "checking for GNM... " >&6; }
37157          if test ! -x "$tool_specified"; then
37158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37159$as_echo "not found" >&6; }
37160            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37161          fi
37162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37163$as_echo "$tool_specified" >&6; }
37164        fi
37165      fi
37166    fi
37167  fi
37168
37169
37170
37171  # Only process if variable expands to non-empty
37172
37173  if test "x$GNM" != x; then
37174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37175
37176  # First separate the path from the arguments. This will split at the first
37177  # space.
37178  complete="$GNM"
37179  path="${complete%% *}"
37180  tmp="$complete EOL"
37181  arguments="${tmp#* }"
37182
37183  # Input might be given as Windows format, start by converting to
37184  # unix format.
37185  new_path=`$CYGPATH -u "$path"`
37186
37187  # Now try to locate executable using which
37188  new_path=`$WHICH "$new_path" 2> /dev/null`
37189  # bat and cmd files are not always considered executable in cygwin causing which
37190  # to not find them
37191  if test "x$new_path" = x \
37192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37194    new_path=`$CYGPATH -u "$path"`
37195  fi
37196  if test "x$new_path" = x; then
37197    # Oops. Which didn't find the executable.
37198    # The splitting of arguments from the executable at a space might have been incorrect,
37199    # since paths with space are more likely in Windows. Give it another try with the whole
37200    # argument.
37201    path="$complete"
37202    arguments="EOL"
37203    new_path=`$CYGPATH -u "$path"`
37204    new_path=`$WHICH "$new_path" 2> /dev/null`
37205    # bat and cmd files are not always considered executable in cygwin causing which
37206    # to not find them
37207    if test "x$new_path" = x \
37208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37210      new_path=`$CYGPATH -u "$path"`
37211    fi
37212    if test "x$new_path" = x; then
37213      # It's still not found. Now this is an unrecoverable error.
37214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37215$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37216      has_space=`$ECHO "$complete" | $GREP " "`
37217      if test "x$has_space" != x; then
37218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37220      fi
37221      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37222    fi
37223  fi
37224
37225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37228  # "foo.exe" is OK but "foo" is an error.
37229  #
37230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37231  # It is also a way to make sure we got the proper file name for the real test later on.
37232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37233  if test "x$test_shortpath" = x; then
37234    # Short path failed, file does not exist as specified.
37235    # Try adding .exe or .cmd
37236    if test -f "${new_path}.exe"; then
37237      input_to_shortpath="${new_path}.exe"
37238    elif test -f "${new_path}.cmd"; then
37239      input_to_shortpath="${new_path}.cmd"
37240    else
37241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37242$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37245      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37246    fi
37247  else
37248    input_to_shortpath="$new_path"
37249  fi
37250
37251  # Call helper function which possibly converts this using DOS-style short mode.
37252  # If so, the updated path is stored in $new_path.
37253  new_path="$input_to_shortpath"
37254
37255  input_path="$input_to_shortpath"
37256  # Check if we need to convert this using DOS-style short mode. If the path
37257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37258  # take no chances and rewrite it.
37259  # Note: m4 eats our [], so we need to use [ and ] instead.
37260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37261  if test "x$has_forbidden_chars" != x; then
37262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37266      # Going to short mode and back again did indeed matter. Since short mode is
37267      # case insensitive, let's make it lowercase to improve readability.
37268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37269      # Now convert it back to Unix-style (cygpath)
37270      input_path=`$CYGPATH -u "$shortmode_path"`
37271      new_path="$input_path"
37272    fi
37273  fi
37274
37275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37276  if test "x$test_cygdrive_prefix" = x; then
37277    # As a simple fix, exclude /usr/bin since it's not a real path.
37278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37280      # a path prefixed by /cygdrive for fixpath to work.
37281      new_path="$CYGWIN_ROOT_PATH$input_path"
37282    fi
37283  fi
37284
37285  # remove trailing .exe if any
37286  new_path="${new_path/%.exe/}"
37287
37288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37289
37290  # First separate the path from the arguments. This will split at the first
37291  # space.
37292  complete="$GNM"
37293  path="${complete%% *}"
37294  tmp="$complete EOL"
37295  arguments="${tmp#* }"
37296
37297  # Input might be given as Windows format, start by converting to
37298  # unix format.
37299  new_path="$path"
37300
37301  windows_path="$new_path"
37302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37303    unix_path=`$CYGPATH -u "$windows_path"`
37304    new_path="$unix_path"
37305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37307    new_path="$unix_path"
37308  fi
37309
37310
37311  # Now try to locate executable using which
37312  new_path=`$WHICH "$new_path" 2> /dev/null`
37313
37314  if test "x$new_path" = x; then
37315    # Oops. Which didn't find the executable.
37316    # The splitting of arguments from the executable at a space might have been incorrect,
37317    # since paths with space are more likely in Windows. Give it another try with the whole
37318    # argument.
37319    path="$complete"
37320    arguments="EOL"
37321    new_path="$path"
37322
37323  windows_path="$new_path"
37324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37325    unix_path=`$CYGPATH -u "$windows_path"`
37326    new_path="$unix_path"
37327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37329    new_path="$unix_path"
37330  fi
37331
37332
37333    new_path=`$WHICH "$new_path" 2> /dev/null`
37334    # bat and cmd files are not always considered executable in MSYS causing which
37335    # to not find them
37336    if test "x$new_path" = x \
37337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37339      new_path="$path"
37340
37341  windows_path="$new_path"
37342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37343    unix_path=`$CYGPATH -u "$windows_path"`
37344    new_path="$unix_path"
37345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37347    new_path="$unix_path"
37348  fi
37349
37350    fi
37351
37352    if test "x$new_path" = x; then
37353      # It's still not found. Now this is an unrecoverable error.
37354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37355$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37356      has_space=`$ECHO "$complete" | $GREP " "`
37357      if test "x$has_space" != x; then
37358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37360      fi
37361      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37362    fi
37363  fi
37364
37365  # Now new_path has a complete unix path to the binary
37366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37367    # Keep paths in /bin as-is, but remove trailing .exe if any
37368    new_path="${new_path/%.exe/}"
37369    # Do not save /bin paths to all_fixpath_prefixes!
37370  else
37371    # Not in mixed or Windows style, start by that.
37372    new_path=`cmd //c echo $new_path`
37373
37374  input_path="$new_path"
37375  # Check if we need to convert this using DOS-style short mode. If the path
37376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37377  # take no chances and rewrite it.
37378  # Note: m4 eats our [], so we need to use [ and ] instead.
37379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37380  if test "x$has_forbidden_chars" != x; then
37381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37383  fi
37384
37385    # Output is in $new_path
37386
37387  windows_path="$new_path"
37388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37389    unix_path=`$CYGPATH -u "$windows_path"`
37390    new_path="$unix_path"
37391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37393    new_path="$unix_path"
37394  fi
37395
37396    # remove trailing .exe if any
37397    new_path="${new_path/%.exe/}"
37398
37399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37401  fi
37402
37403    else
37404      # We're on a unix platform. Hooray! :)
37405      # First separate the path from the arguments. This will split at the first
37406      # space.
37407      complete="$GNM"
37408      path="${complete%% *}"
37409      tmp="$complete EOL"
37410      arguments="${tmp#* }"
37411
37412      # Cannot rely on the command "which" here since it doesn't always work.
37413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37414      if test -z "$is_absolute_path"; then
37415        # Path to executable is not absolute. Find it.
37416        IFS_save="$IFS"
37417        IFS=:
37418        for p in $PATH; do
37419          if test -f "$p/$path" && test -x "$p/$path"; then
37420            new_path="$p/$path"
37421            break
37422          fi
37423        done
37424        IFS="$IFS_save"
37425      else
37426        # This is an absolute path, we can use it without further modifications.
37427        new_path="$path"
37428      fi
37429
37430      if test "x$new_path" = x; then
37431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37432$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37433        has_space=`$ECHO "$complete" | $GREP " "`
37434        if test "x$has_space" != x; then
37435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37437        fi
37438        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37439      fi
37440    fi
37441
37442    # Now join together the path and the arguments once again
37443    if test "x$arguments" != xEOL; then
37444      new_complete="$new_path ${arguments% *}"
37445    else
37446      new_complete="$new_path"
37447    fi
37448
37449    if test "x$complete" != "x$new_complete"; then
37450      GNM="$new_complete"
37451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37452$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37453    fi
37454  fi
37455
37456  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37457    # FIXME: we should unify this with the solaris case above.
37458
37459
37460  # Publish this variable in the help.
37461
37462
37463  if [ -z "${STRIP+x}" ]; then
37464    # The variable is not set by user, try to locate tool using the code snippet
37465    if test -n "$ac_tool_prefix"; then
37466  for ac_prog in strip
37467  do
37468    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37469set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37471$as_echo_n "checking for $ac_word... " >&6; }
37472if ${ac_cv_prog_STRIP+:} false; then :
37473  $as_echo_n "(cached) " >&6
37474else
37475  if test -n "$STRIP"; then
37476  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37477else
37478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37479for as_dir in $PATH
37480do
37481  IFS=$as_save_IFS
37482  test -z "$as_dir" && as_dir=.
37483    for ac_exec_ext in '' $ac_executable_extensions; do
37484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37485    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37487    break 2
37488  fi
37489done
37490  done
37491IFS=$as_save_IFS
37492
37493fi
37494fi
37495STRIP=$ac_cv_prog_STRIP
37496if test -n "$STRIP"; then
37497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37498$as_echo "$STRIP" >&6; }
37499else
37500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37501$as_echo "no" >&6; }
37502fi
37503
37504
37505    test -n "$STRIP" && break
37506  done
37507fi
37508if test -z "$STRIP"; then
37509  ac_ct_STRIP=$STRIP
37510  for ac_prog in strip
37511do
37512  # Extract the first word of "$ac_prog", so it can be a program name with args.
37513set dummy $ac_prog; ac_word=$2
37514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37515$as_echo_n "checking for $ac_word... " >&6; }
37516if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37517  $as_echo_n "(cached) " >&6
37518else
37519  if test -n "$ac_ct_STRIP"; then
37520  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37521else
37522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37523for as_dir in $PATH
37524do
37525  IFS=$as_save_IFS
37526  test -z "$as_dir" && as_dir=.
37527    for ac_exec_ext in '' $ac_executable_extensions; do
37528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37529    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37531    break 2
37532  fi
37533done
37534  done
37535IFS=$as_save_IFS
37536
37537fi
37538fi
37539ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37540if test -n "$ac_ct_STRIP"; then
37541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37542$as_echo "$ac_ct_STRIP" >&6; }
37543else
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37545$as_echo "no" >&6; }
37546fi
37547
37548
37549  test -n "$ac_ct_STRIP" && break
37550done
37551
37552  if test "x$ac_ct_STRIP" = x; then
37553    STRIP=""
37554  else
37555    case $cross_compiling:$ac_tool_warned in
37556yes:)
37557{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37558$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37559ac_tool_warned=yes ;;
37560esac
37561    STRIP=$ac_ct_STRIP
37562  fi
37563fi
37564
37565  else
37566    # The variable is set, but is it from the command line or the environment?
37567
37568    # Try to remove the string !STRIP! from our list.
37569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37571      # If it failed, the variable was not from the command line. Ignore it,
37572      # but warn the user (except for BASH, which is always set by the calling BASH).
37573      if test "xSTRIP" != xBASH; then
37574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37575$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37576      fi
37577      # Try to locate tool using the code snippet
37578      if test -n "$ac_tool_prefix"; then
37579  for ac_prog in strip
37580  do
37581    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37584$as_echo_n "checking for $ac_word... " >&6; }
37585if ${ac_cv_prog_STRIP+:} false; then :
37586  $as_echo_n "(cached) " >&6
37587else
37588  if test -n "$STRIP"; then
37589  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37590else
37591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37592for as_dir in $PATH
37593do
37594  IFS=$as_save_IFS
37595  test -z "$as_dir" && as_dir=.
37596    for ac_exec_ext in '' $ac_executable_extensions; do
37597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37598    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37600    break 2
37601  fi
37602done
37603  done
37604IFS=$as_save_IFS
37605
37606fi
37607fi
37608STRIP=$ac_cv_prog_STRIP
37609if test -n "$STRIP"; then
37610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37611$as_echo "$STRIP" >&6; }
37612else
37613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37614$as_echo "no" >&6; }
37615fi
37616
37617
37618    test -n "$STRIP" && break
37619  done
37620fi
37621if test -z "$STRIP"; then
37622  ac_ct_STRIP=$STRIP
37623  for ac_prog in strip
37624do
37625  # Extract the first word of "$ac_prog", so it can be a program name with args.
37626set dummy $ac_prog; ac_word=$2
37627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37628$as_echo_n "checking for $ac_word... " >&6; }
37629if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37630  $as_echo_n "(cached) " >&6
37631else
37632  if test -n "$ac_ct_STRIP"; then
37633  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37634else
37635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37636for as_dir in $PATH
37637do
37638  IFS=$as_save_IFS
37639  test -z "$as_dir" && as_dir=.
37640    for ac_exec_ext in '' $ac_executable_extensions; do
37641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37642    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37644    break 2
37645  fi
37646done
37647  done
37648IFS=$as_save_IFS
37649
37650fi
37651fi
37652ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37653if test -n "$ac_ct_STRIP"; then
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37655$as_echo "$ac_ct_STRIP" >&6; }
37656else
37657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37658$as_echo "no" >&6; }
37659fi
37660
37661
37662  test -n "$ac_ct_STRIP" && break
37663done
37664
37665  if test "x$ac_ct_STRIP" = x; then
37666    STRIP=""
37667  else
37668    case $cross_compiling:$ac_tool_warned in
37669yes:)
37670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37672ac_tool_warned=yes ;;
37673esac
37674    STRIP=$ac_ct_STRIP
37675  fi
37676fi
37677
37678    else
37679      # If it succeeded, then it was overridden by the user. We will use it
37680      # for the tool.
37681
37682      # First remove it from the list of overridden variables, so we can test
37683      # for unknown variables in the end.
37684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37685
37686      # Check if we try to supply an empty value
37687      if test "x$STRIP" = x; then
37688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37689$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37691$as_echo_n "checking for STRIP... " >&6; }
37692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37693$as_echo "disabled" >&6; }
37694      else
37695        # Check if the provided tool contains a complete path.
37696        tool_specified="$STRIP"
37697        tool_basename="${tool_specified##*/}"
37698        if test "x$tool_basename" = "x$tool_specified"; then
37699          # A command without a complete path is provided, search $PATH.
37700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37701$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37702          # Extract the first word of "$tool_basename", so it can be a program name with args.
37703set dummy $tool_basename; ac_word=$2
37704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37705$as_echo_n "checking for $ac_word... " >&6; }
37706if ${ac_cv_path_STRIP+:} false; then :
37707  $as_echo_n "(cached) " >&6
37708else
37709  case $STRIP in
37710  [\\/]* | ?:[\\/]*)
37711  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37712  ;;
37713  *)
37714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37715for as_dir in $PATH
37716do
37717  IFS=$as_save_IFS
37718  test -z "$as_dir" && as_dir=.
37719    for ac_exec_ext in '' $ac_executable_extensions; do
37720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37721    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37723    break 2
37724  fi
37725done
37726  done
37727IFS=$as_save_IFS
37728
37729  ;;
37730esac
37731fi
37732STRIP=$ac_cv_path_STRIP
37733if test -n "$STRIP"; then
37734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37735$as_echo "$STRIP" >&6; }
37736else
37737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37738$as_echo "no" >&6; }
37739fi
37740
37741
37742          if test "x$STRIP" = x; then
37743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37744          fi
37745        else
37746          # Otherwise we believe it is a complete path. Use it as it is.
37747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37748$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37750$as_echo_n "checking for STRIP... " >&6; }
37751          if test ! -x "$tool_specified"; then
37752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37753$as_echo "not found" >&6; }
37754            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37755          fi
37756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37757$as_echo "$tool_specified" >&6; }
37758        fi
37759      fi
37760    fi
37761  fi
37762
37763
37764
37765  # Only process if variable expands to non-empty
37766
37767  if test "x$STRIP" != x; then
37768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37769
37770  # First separate the path from the arguments. This will split at the first
37771  # space.
37772  complete="$STRIP"
37773  path="${complete%% *}"
37774  tmp="$complete EOL"
37775  arguments="${tmp#* }"
37776
37777  # Input might be given as Windows format, start by converting to
37778  # unix format.
37779  new_path=`$CYGPATH -u "$path"`
37780
37781  # Now try to locate executable using which
37782  new_path=`$WHICH "$new_path" 2> /dev/null`
37783  # bat and cmd files are not always considered executable in cygwin causing which
37784  # to not find them
37785  if test "x$new_path" = x \
37786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37788    new_path=`$CYGPATH -u "$path"`
37789  fi
37790  if test "x$new_path" = x; then
37791    # Oops. Which didn't find the executable.
37792    # The splitting of arguments from the executable at a space might have been incorrect,
37793    # since paths with space are more likely in Windows. Give it another try with the whole
37794    # argument.
37795    path="$complete"
37796    arguments="EOL"
37797    new_path=`$CYGPATH -u "$path"`
37798    new_path=`$WHICH "$new_path" 2> /dev/null`
37799    # bat and cmd files are not always considered executable in cygwin causing which
37800    # to not find them
37801    if test "x$new_path" = x \
37802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37804      new_path=`$CYGPATH -u "$path"`
37805    fi
37806    if test "x$new_path" = x; then
37807      # It's still not found. Now this is an unrecoverable error.
37808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37809$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37810      has_space=`$ECHO "$complete" | $GREP " "`
37811      if test "x$has_space" != x; then
37812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37814      fi
37815      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37816    fi
37817  fi
37818
37819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37822  # "foo.exe" is OK but "foo" is an error.
37823  #
37824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37825  # It is also a way to make sure we got the proper file name for the real test later on.
37826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37827  if test "x$test_shortpath" = x; then
37828    # Short path failed, file does not exist as specified.
37829    # Try adding .exe or .cmd
37830    if test -f "${new_path}.exe"; then
37831      input_to_shortpath="${new_path}.exe"
37832    elif test -f "${new_path}.cmd"; then
37833      input_to_shortpath="${new_path}.cmd"
37834    else
37835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37836$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37839      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37840    fi
37841  else
37842    input_to_shortpath="$new_path"
37843  fi
37844
37845  # Call helper function which possibly converts this using DOS-style short mode.
37846  # If so, the updated path is stored in $new_path.
37847  new_path="$input_to_shortpath"
37848
37849  input_path="$input_to_shortpath"
37850  # Check if we need to convert this using DOS-style short mode. If the path
37851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37852  # take no chances and rewrite it.
37853  # Note: m4 eats our [], so we need to use [ and ] instead.
37854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37855  if test "x$has_forbidden_chars" != x; then
37856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37860      # Going to short mode and back again did indeed matter. Since short mode is
37861      # case insensitive, let's make it lowercase to improve readability.
37862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37863      # Now convert it back to Unix-style (cygpath)
37864      input_path=`$CYGPATH -u "$shortmode_path"`
37865      new_path="$input_path"
37866    fi
37867  fi
37868
37869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37870  if test "x$test_cygdrive_prefix" = x; then
37871    # As a simple fix, exclude /usr/bin since it's not a real path.
37872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37874      # a path prefixed by /cygdrive for fixpath to work.
37875      new_path="$CYGWIN_ROOT_PATH$input_path"
37876    fi
37877  fi
37878
37879  # remove trailing .exe if any
37880  new_path="${new_path/%.exe/}"
37881
37882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37883
37884  # First separate the path from the arguments. This will split at the first
37885  # space.
37886  complete="$STRIP"
37887  path="${complete%% *}"
37888  tmp="$complete EOL"
37889  arguments="${tmp#* }"
37890
37891  # Input might be given as Windows format, start by converting to
37892  # unix format.
37893  new_path="$path"
37894
37895  windows_path="$new_path"
37896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37897    unix_path=`$CYGPATH -u "$windows_path"`
37898    new_path="$unix_path"
37899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37901    new_path="$unix_path"
37902  fi
37903
37904
37905  # Now try to locate executable using which
37906  new_path=`$WHICH "$new_path" 2> /dev/null`
37907
37908  if test "x$new_path" = x; then
37909    # Oops. Which didn't find the executable.
37910    # The splitting of arguments from the executable at a space might have been incorrect,
37911    # since paths with space are more likely in Windows. Give it another try with the whole
37912    # argument.
37913    path="$complete"
37914    arguments="EOL"
37915    new_path="$path"
37916
37917  windows_path="$new_path"
37918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37919    unix_path=`$CYGPATH -u "$windows_path"`
37920    new_path="$unix_path"
37921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37923    new_path="$unix_path"
37924  fi
37925
37926
37927    new_path=`$WHICH "$new_path" 2> /dev/null`
37928    # bat and cmd files are not always considered executable in MSYS causing which
37929    # to not find them
37930    if test "x$new_path" = x \
37931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37933      new_path="$path"
37934
37935  windows_path="$new_path"
37936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37937    unix_path=`$CYGPATH -u "$windows_path"`
37938    new_path="$unix_path"
37939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37941    new_path="$unix_path"
37942  fi
37943
37944    fi
37945
37946    if test "x$new_path" = x; then
37947      # It's still not found. Now this is an unrecoverable error.
37948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37949$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37950      has_space=`$ECHO "$complete" | $GREP " "`
37951      if test "x$has_space" != x; then
37952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37954      fi
37955      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37956    fi
37957  fi
37958
37959  # Now new_path has a complete unix path to the binary
37960  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37961    # Keep paths in /bin as-is, but remove trailing .exe if any
37962    new_path="${new_path/%.exe/}"
37963    # Do not save /bin paths to all_fixpath_prefixes!
37964  else
37965    # Not in mixed or Windows style, start by that.
37966    new_path=`cmd //c echo $new_path`
37967
37968  input_path="$new_path"
37969  # Check if we need to convert this using DOS-style short mode. If the path
37970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37971  # take no chances and rewrite it.
37972  # Note: m4 eats our [], so we need to use [ and ] instead.
37973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37974  if test "x$has_forbidden_chars" != x; then
37975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37977  fi
37978
37979    # Output is in $new_path
37980
37981  windows_path="$new_path"
37982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37983    unix_path=`$CYGPATH -u "$windows_path"`
37984    new_path="$unix_path"
37985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37987    new_path="$unix_path"
37988  fi
37989
37990    # remove trailing .exe if any
37991    new_path="${new_path/%.exe/}"
37992
37993    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37994    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37995  fi
37996
37997    else
37998      # We're on a unix platform. Hooray! :)
37999      # First separate the path from the arguments. This will split at the first
38000      # space.
38001      complete="$STRIP"
38002      path="${complete%% *}"
38003      tmp="$complete EOL"
38004      arguments="${tmp#* }"
38005
38006      # Cannot rely on the command "which" here since it doesn't always work.
38007      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38008      if test -z "$is_absolute_path"; then
38009        # Path to executable is not absolute. Find it.
38010        IFS_save="$IFS"
38011        IFS=:
38012        for p in $PATH; do
38013          if test -f "$p/$path" && test -x "$p/$path"; then
38014            new_path="$p/$path"
38015            break
38016          fi
38017        done
38018        IFS="$IFS_save"
38019      else
38020        # This is an absolute path, we can use it without further modifications.
38021        new_path="$path"
38022      fi
38023
38024      if test "x$new_path" = x; then
38025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38026$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38027        has_space=`$ECHO "$complete" | $GREP " "`
38028        if test "x$has_space" != x; then
38029          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38030$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38031        fi
38032        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38033      fi
38034    fi
38035
38036    # Now join together the path and the arguments once again
38037    if test "x$arguments" != xEOL; then
38038      new_complete="$new_path ${arguments% *}"
38039    else
38040      new_complete="$new_path"
38041    fi
38042
38043    if test "x$complete" != "x$new_complete"; then
38044      STRIP="$new_complete"
38045      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38046$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38047    fi
38048  fi
38049
38050
38051
38052  # Publish this variable in the help.
38053
38054
38055  if [ -z "${NM+x}" ]; then
38056    # The variable is not set by user, try to locate tool using the code snippet
38057    if test -n "$ac_tool_prefix"; then
38058  for ac_prog in nm
38059  do
38060    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38061set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38063$as_echo_n "checking for $ac_word... " >&6; }
38064if ${ac_cv_prog_NM+:} false; then :
38065  $as_echo_n "(cached) " >&6
38066else
38067  if test -n "$NM"; then
38068  ac_cv_prog_NM="$NM" # Let the user override the test.
38069else
38070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38071for as_dir in $PATH
38072do
38073  IFS=$as_save_IFS
38074  test -z "$as_dir" && as_dir=.
38075    for ac_exec_ext in '' $ac_executable_extensions; do
38076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38077    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38079    break 2
38080  fi
38081done
38082  done
38083IFS=$as_save_IFS
38084
38085fi
38086fi
38087NM=$ac_cv_prog_NM
38088if test -n "$NM"; then
38089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38090$as_echo "$NM" >&6; }
38091else
38092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38093$as_echo "no" >&6; }
38094fi
38095
38096
38097    test -n "$NM" && break
38098  done
38099fi
38100if test -z "$NM"; then
38101  ac_ct_NM=$NM
38102  for ac_prog in nm
38103do
38104  # Extract the first word of "$ac_prog", so it can be a program name with args.
38105set dummy $ac_prog; ac_word=$2
38106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38107$as_echo_n "checking for $ac_word... " >&6; }
38108if ${ac_cv_prog_ac_ct_NM+:} false; then :
38109  $as_echo_n "(cached) " >&6
38110else
38111  if test -n "$ac_ct_NM"; then
38112  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38113else
38114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38115for as_dir in $PATH
38116do
38117  IFS=$as_save_IFS
38118  test -z "$as_dir" && as_dir=.
38119    for ac_exec_ext in '' $ac_executable_extensions; do
38120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38121    ac_cv_prog_ac_ct_NM="$ac_prog"
38122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38123    break 2
38124  fi
38125done
38126  done
38127IFS=$as_save_IFS
38128
38129fi
38130fi
38131ac_ct_NM=$ac_cv_prog_ac_ct_NM
38132if test -n "$ac_ct_NM"; then
38133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38134$as_echo "$ac_ct_NM" >&6; }
38135else
38136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38137$as_echo "no" >&6; }
38138fi
38139
38140
38141  test -n "$ac_ct_NM" && break
38142done
38143
38144  if test "x$ac_ct_NM" = x; then
38145    NM=""
38146  else
38147    case $cross_compiling:$ac_tool_warned in
38148yes:)
38149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38151ac_tool_warned=yes ;;
38152esac
38153    NM=$ac_ct_NM
38154  fi
38155fi
38156
38157  else
38158    # The variable is set, but is it from the command line or the environment?
38159
38160    # Try to remove the string !NM! from our list.
38161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38163      # If it failed, the variable was not from the command line. Ignore it,
38164      # but warn the user (except for BASH, which is always set by the calling BASH).
38165      if test "xNM" != xBASH; then
38166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38167$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38168      fi
38169      # Try to locate tool using the code snippet
38170      if test -n "$ac_tool_prefix"; then
38171  for ac_prog in nm
38172  do
38173    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38174set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38176$as_echo_n "checking for $ac_word... " >&6; }
38177if ${ac_cv_prog_NM+:} false; then :
38178  $as_echo_n "(cached) " >&6
38179else
38180  if test -n "$NM"; then
38181  ac_cv_prog_NM="$NM" # Let the user override the test.
38182else
38183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38184for as_dir in $PATH
38185do
38186  IFS=$as_save_IFS
38187  test -z "$as_dir" && as_dir=.
38188    for ac_exec_ext in '' $ac_executable_extensions; do
38189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38190    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38192    break 2
38193  fi
38194done
38195  done
38196IFS=$as_save_IFS
38197
38198fi
38199fi
38200NM=$ac_cv_prog_NM
38201if test -n "$NM"; then
38202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38203$as_echo "$NM" >&6; }
38204else
38205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38206$as_echo "no" >&6; }
38207fi
38208
38209
38210    test -n "$NM" && break
38211  done
38212fi
38213if test -z "$NM"; then
38214  ac_ct_NM=$NM
38215  for ac_prog in nm
38216do
38217  # Extract the first word of "$ac_prog", so it can be a program name with args.
38218set dummy $ac_prog; ac_word=$2
38219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38220$as_echo_n "checking for $ac_word... " >&6; }
38221if ${ac_cv_prog_ac_ct_NM+:} false; then :
38222  $as_echo_n "(cached) " >&6
38223else
38224  if test -n "$ac_ct_NM"; then
38225  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38226else
38227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38228for as_dir in $PATH
38229do
38230  IFS=$as_save_IFS
38231  test -z "$as_dir" && as_dir=.
38232    for ac_exec_ext in '' $ac_executable_extensions; do
38233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38234    ac_cv_prog_ac_ct_NM="$ac_prog"
38235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38236    break 2
38237  fi
38238done
38239  done
38240IFS=$as_save_IFS
38241
38242fi
38243fi
38244ac_ct_NM=$ac_cv_prog_ac_ct_NM
38245if test -n "$ac_ct_NM"; then
38246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38247$as_echo "$ac_ct_NM" >&6; }
38248else
38249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38250$as_echo "no" >&6; }
38251fi
38252
38253
38254  test -n "$ac_ct_NM" && break
38255done
38256
38257  if test "x$ac_ct_NM" = x; then
38258    NM=""
38259  else
38260    case $cross_compiling:$ac_tool_warned in
38261yes:)
38262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38264ac_tool_warned=yes ;;
38265esac
38266    NM=$ac_ct_NM
38267  fi
38268fi
38269
38270    else
38271      # If it succeeded, then it was overridden by the user. We will use it
38272      # for the tool.
38273
38274      # First remove it from the list of overridden variables, so we can test
38275      # for unknown variables in the end.
38276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38277
38278      # Check if we try to supply an empty value
38279      if test "x$NM" = x; then
38280        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38281$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38283$as_echo_n "checking for NM... " >&6; }
38284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38285$as_echo "disabled" >&6; }
38286      else
38287        # Check if the provided tool contains a complete path.
38288        tool_specified="$NM"
38289        tool_basename="${tool_specified##*/}"
38290        if test "x$tool_basename" = "x$tool_specified"; then
38291          # A command without a complete path is provided, search $PATH.
38292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38293$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38294          # Extract the first word of "$tool_basename", so it can be a program name with args.
38295set dummy $tool_basename; ac_word=$2
38296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38297$as_echo_n "checking for $ac_word... " >&6; }
38298if ${ac_cv_path_NM+:} false; then :
38299  $as_echo_n "(cached) " >&6
38300else
38301  case $NM in
38302  [\\/]* | ?:[\\/]*)
38303  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38304  ;;
38305  *)
38306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38307for as_dir in $PATH
38308do
38309  IFS=$as_save_IFS
38310  test -z "$as_dir" && as_dir=.
38311    for ac_exec_ext in '' $ac_executable_extensions; do
38312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38313    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38315    break 2
38316  fi
38317done
38318  done
38319IFS=$as_save_IFS
38320
38321  ;;
38322esac
38323fi
38324NM=$ac_cv_path_NM
38325if test -n "$NM"; then
38326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38327$as_echo "$NM" >&6; }
38328else
38329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38330$as_echo "no" >&6; }
38331fi
38332
38333
38334          if test "x$NM" = x; then
38335            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38336          fi
38337        else
38338          # Otherwise we believe it is a complete path. Use it as it is.
38339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38340$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38341          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38342$as_echo_n "checking for NM... " >&6; }
38343          if test ! -x "$tool_specified"; then
38344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38345$as_echo "not found" >&6; }
38346            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38347          fi
38348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38349$as_echo "$tool_specified" >&6; }
38350        fi
38351      fi
38352    fi
38353  fi
38354
38355
38356
38357  # Only process if variable expands to non-empty
38358
38359  if test "x$NM" != x; then
38360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38361
38362  # First separate the path from the arguments. This will split at the first
38363  # space.
38364  complete="$NM"
38365  path="${complete%% *}"
38366  tmp="$complete EOL"
38367  arguments="${tmp#* }"
38368
38369  # Input might be given as Windows format, start by converting to
38370  # unix format.
38371  new_path=`$CYGPATH -u "$path"`
38372
38373  # Now try to locate executable using which
38374  new_path=`$WHICH "$new_path" 2> /dev/null`
38375  # bat and cmd files are not always considered executable in cygwin causing which
38376  # to not find them
38377  if test "x$new_path" = x \
38378      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38379      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38380    new_path=`$CYGPATH -u "$path"`
38381  fi
38382  if test "x$new_path" = x; then
38383    # Oops. Which didn't find the executable.
38384    # The splitting of arguments from the executable at a space might have been incorrect,
38385    # since paths with space are more likely in Windows. Give it another try with the whole
38386    # argument.
38387    path="$complete"
38388    arguments="EOL"
38389    new_path=`$CYGPATH -u "$path"`
38390    new_path=`$WHICH "$new_path" 2> /dev/null`
38391    # bat and cmd files are not always considered executable in cygwin causing which
38392    # to not find them
38393    if test "x$new_path" = x \
38394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38396      new_path=`$CYGPATH -u "$path"`
38397    fi
38398    if test "x$new_path" = x; then
38399      # It's still not found. Now this is an unrecoverable error.
38400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38401$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38402      has_space=`$ECHO "$complete" | $GREP " "`
38403      if test "x$has_space" != x; then
38404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38406      fi
38407      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38408    fi
38409  fi
38410
38411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38414  # "foo.exe" is OK but "foo" is an error.
38415  #
38416  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38417  # It is also a way to make sure we got the proper file name for the real test later on.
38418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38419  if test "x$test_shortpath" = x; then
38420    # Short path failed, file does not exist as specified.
38421    # Try adding .exe or .cmd
38422    if test -f "${new_path}.exe"; then
38423      input_to_shortpath="${new_path}.exe"
38424    elif test -f "${new_path}.cmd"; then
38425      input_to_shortpath="${new_path}.cmd"
38426    else
38427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38428$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38429      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38430$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38431      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38432    fi
38433  else
38434    input_to_shortpath="$new_path"
38435  fi
38436
38437  # Call helper function which possibly converts this using DOS-style short mode.
38438  # If so, the updated path is stored in $new_path.
38439  new_path="$input_to_shortpath"
38440
38441  input_path="$input_to_shortpath"
38442  # Check if we need to convert this using DOS-style short mode. If the path
38443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38444  # take no chances and rewrite it.
38445  # Note: m4 eats our [], so we need to use [ and ] instead.
38446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38447  if test "x$has_forbidden_chars" != x; then
38448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38452      # Going to short mode and back again did indeed matter. Since short mode is
38453      # case insensitive, let's make it lowercase to improve readability.
38454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38455      # Now convert it back to Unix-style (cygpath)
38456      input_path=`$CYGPATH -u "$shortmode_path"`
38457      new_path="$input_path"
38458    fi
38459  fi
38460
38461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38462  if test "x$test_cygdrive_prefix" = x; then
38463    # As a simple fix, exclude /usr/bin since it's not a real path.
38464    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38466      # a path prefixed by /cygdrive for fixpath to work.
38467      new_path="$CYGWIN_ROOT_PATH$input_path"
38468    fi
38469  fi
38470
38471  # remove trailing .exe if any
38472  new_path="${new_path/%.exe/}"
38473
38474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38475
38476  # First separate the path from the arguments. This will split at the first
38477  # space.
38478  complete="$NM"
38479  path="${complete%% *}"
38480  tmp="$complete EOL"
38481  arguments="${tmp#* }"
38482
38483  # Input might be given as Windows format, start by converting to
38484  # unix format.
38485  new_path="$path"
38486
38487  windows_path="$new_path"
38488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38489    unix_path=`$CYGPATH -u "$windows_path"`
38490    new_path="$unix_path"
38491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38493    new_path="$unix_path"
38494  fi
38495
38496
38497  # Now try to locate executable using which
38498  new_path=`$WHICH "$new_path" 2> /dev/null`
38499
38500  if test "x$new_path" = x; then
38501    # Oops. Which didn't find the executable.
38502    # The splitting of arguments from the executable at a space might have been incorrect,
38503    # since paths with space are more likely in Windows. Give it another try with the whole
38504    # argument.
38505    path="$complete"
38506    arguments="EOL"
38507    new_path="$path"
38508
38509  windows_path="$new_path"
38510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38511    unix_path=`$CYGPATH -u "$windows_path"`
38512    new_path="$unix_path"
38513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38515    new_path="$unix_path"
38516  fi
38517
38518
38519    new_path=`$WHICH "$new_path" 2> /dev/null`
38520    # bat and cmd files are not always considered executable in MSYS causing which
38521    # to not find them
38522    if test "x$new_path" = x \
38523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38525      new_path="$path"
38526
38527  windows_path="$new_path"
38528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38529    unix_path=`$CYGPATH -u "$windows_path"`
38530    new_path="$unix_path"
38531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38533    new_path="$unix_path"
38534  fi
38535
38536    fi
38537
38538    if test "x$new_path" = x; then
38539      # It's still not found. Now this is an unrecoverable error.
38540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38541$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38542      has_space=`$ECHO "$complete" | $GREP " "`
38543      if test "x$has_space" != x; then
38544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38546      fi
38547      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38548    fi
38549  fi
38550
38551  # Now new_path has a complete unix path to the binary
38552  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38553    # Keep paths in /bin as-is, but remove trailing .exe if any
38554    new_path="${new_path/%.exe/}"
38555    # Do not save /bin paths to all_fixpath_prefixes!
38556  else
38557    # Not in mixed or Windows style, start by that.
38558    new_path=`cmd //c echo $new_path`
38559
38560  input_path="$new_path"
38561  # Check if we need to convert this using DOS-style short mode. If the path
38562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38563  # take no chances and rewrite it.
38564  # Note: m4 eats our [], so we need to use [ and ] instead.
38565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38566  if test "x$has_forbidden_chars" != x; then
38567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38569  fi
38570
38571    # Output is in $new_path
38572
38573  windows_path="$new_path"
38574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38575    unix_path=`$CYGPATH -u "$windows_path"`
38576    new_path="$unix_path"
38577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38579    new_path="$unix_path"
38580  fi
38581
38582    # remove trailing .exe if any
38583    new_path="${new_path/%.exe/}"
38584
38585    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38586    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38587  fi
38588
38589    else
38590      # We're on a unix platform. Hooray! :)
38591      # First separate the path from the arguments. This will split at the first
38592      # space.
38593      complete="$NM"
38594      path="${complete%% *}"
38595      tmp="$complete EOL"
38596      arguments="${tmp#* }"
38597
38598      # Cannot rely on the command "which" here since it doesn't always work.
38599      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38600      if test -z "$is_absolute_path"; then
38601        # Path to executable is not absolute. Find it.
38602        IFS_save="$IFS"
38603        IFS=:
38604        for p in $PATH; do
38605          if test -f "$p/$path" && test -x "$p/$path"; then
38606            new_path="$p/$path"
38607            break
38608          fi
38609        done
38610        IFS="$IFS_save"
38611      else
38612        # This is an absolute path, we can use it without further modifications.
38613        new_path="$path"
38614      fi
38615
38616      if test "x$new_path" = x; then
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38618$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38619        has_space=`$ECHO "$complete" | $GREP " "`
38620        if test "x$has_space" != x; then
38621          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38622$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38623        fi
38624        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38625      fi
38626    fi
38627
38628    # Now join together the path and the arguments once again
38629    if test "x$arguments" != xEOL; then
38630      new_complete="$new_path ${arguments% *}"
38631    else
38632      new_complete="$new_path"
38633    fi
38634
38635    if test "x$complete" != "x$new_complete"; then
38636      NM="$new_complete"
38637      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38638$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38639    fi
38640  fi
38641
38642    GNM="$NM"
38643
38644  fi
38645
38646  # objcopy is used for moving debug symbols to separate files when
38647  # full debug symbols are enabled.
38648  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38649
38650
38651  # Publish this variable in the help.
38652
38653
38654  if [ -z "${OBJCOPY+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 gobjcopy objcopy
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_OBJCOPY+:} false; then :
38664  $as_echo_n "(cached) " >&6
38665else
38666  if test -n "$OBJCOPY"; then
38667  ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$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
38686OBJCOPY=$ac_cv_prog_OBJCOPY
38687if test -n "$OBJCOPY"; then
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38689$as_echo "$OBJCOPY" >&6; }
38690else
38691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38692$as_echo "no" >&6; }
38693fi
38694
38695
38696    test -n "$OBJCOPY" && break
38697  done
38698fi
38699if test -z "$OBJCOPY"; then
38700  ac_ct_OBJCOPY=$OBJCOPY
38701  for ac_prog in gobjcopy objcopy
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_OBJCOPY+:} false; then :
38708  $as_echo_n "(cached) " >&6
38709else
38710  if test -n "$ac_ct_OBJCOPY"; then
38711  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # 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_OBJCOPY="$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_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38731if test -n "$ac_ct_OBJCOPY"; then
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38733$as_echo "$ac_ct_OBJCOPY" >&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_OBJCOPY" && break
38741done
38742
38743  if test "x$ac_ct_OBJCOPY" = x; then
38744    OBJCOPY=""
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    OBJCOPY=$ac_ct_OBJCOPY
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 !OBJCOPY! from our list.
38760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
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 "xOBJCOPY" != xBASH; then
38765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38766$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY 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 gobjcopy objcopy
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_OBJCOPY+:} false; then :
38777  $as_echo_n "(cached) " >&6
38778else
38779  if test -n "$OBJCOPY"; then
38780  ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$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
38799OBJCOPY=$ac_cv_prog_OBJCOPY
38800if test -n "$OBJCOPY"; then
38801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38802$as_echo "$OBJCOPY" >&6; }
38803else
38804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38805$as_echo "no" >&6; }
38806fi
38807
38808
38809    test -n "$OBJCOPY" && break
38810  done
38811fi
38812if test -z "$OBJCOPY"; then
38813  ac_ct_OBJCOPY=$OBJCOPY
38814  for ac_prog in gobjcopy objcopy
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_OBJCOPY+:} false; then :
38821  $as_echo_n "(cached) " >&6
38822else
38823  if test -n "$ac_ct_OBJCOPY"; then
38824  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # 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_OBJCOPY="$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_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38844if test -n "$ac_ct_OBJCOPY"; then
38845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38846$as_echo "$ac_ct_OBJCOPY" >&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_OBJCOPY" && break
38854done
38855
38856  if test "x$ac_ct_OBJCOPY" = x; then
38857    OBJCOPY=""
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    OBJCOPY=$ac_ct_OBJCOPY
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 we try to supply an empty value
38878      if test "x$OBJCOPY" = x; then
38879        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
38880$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
38881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38882$as_echo_n "checking for OBJCOPY... " >&6; }
38883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38884$as_echo "disabled" >&6; }
38885      else
38886        # Check if the provided tool contains a complete path.
38887        tool_specified="$OBJCOPY"
38888        tool_basename="${tool_specified##*/}"
38889        if test "x$tool_basename" = "x$tool_specified"; then
38890          # A command without a complete path is provided, search $PATH.
38891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38892$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38893          # Extract the first word of "$tool_basename", so it can be a program name with args.
38894set dummy $tool_basename; ac_word=$2
38895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38896$as_echo_n "checking for $ac_word... " >&6; }
38897if ${ac_cv_path_OBJCOPY+:} false; then :
38898  $as_echo_n "(cached) " >&6
38899else
38900  case $OBJCOPY in
38901  [\\/]* | ?:[\\/]*)
38902  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38903  ;;
38904  *)
38905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38906for as_dir in $PATH
38907do
38908  IFS=$as_save_IFS
38909  test -z "$as_dir" && as_dir=.
38910    for ac_exec_ext in '' $ac_executable_extensions; do
38911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38912    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38914    break 2
38915  fi
38916done
38917  done
38918IFS=$as_save_IFS
38919
38920  ;;
38921esac
38922fi
38923OBJCOPY=$ac_cv_path_OBJCOPY
38924if test -n "$OBJCOPY"; then
38925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38926$as_echo "$OBJCOPY" >&6; }
38927else
38928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38929$as_echo "no" >&6; }
38930fi
38931
38932
38933          if test "x$OBJCOPY" = x; then
38934            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38935          fi
38936        else
38937          # Otherwise we believe it is a complete path. Use it as it is.
38938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38939$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38940          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38941$as_echo_n "checking for OBJCOPY... " >&6; }
38942          if test ! -x "$tool_specified"; then
38943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38944$as_echo "not found" >&6; }
38945            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38946          fi
38947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38948$as_echo "$tool_specified" >&6; }
38949        fi
38950      fi
38951    fi
38952  fi
38953
38954
38955    # Only call fixup if objcopy was found.
38956    if test -n "$OBJCOPY"; then
38957
38958  # Only process if variable expands to non-empty
38959
38960  if test "x$OBJCOPY" != x; then
38961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38962
38963  # First separate the path from the arguments. This will split at the first
38964  # space.
38965  complete="$OBJCOPY"
38966  path="${complete%% *}"
38967  tmp="$complete EOL"
38968  arguments="${tmp#* }"
38969
38970  # Input might be given as Windows format, start by converting to
38971  # unix format.
38972  new_path=`$CYGPATH -u "$path"`
38973
38974  # Now try to locate executable using which
38975  new_path=`$WHICH "$new_path" 2> /dev/null`
38976  # bat and cmd files are not always considered executable in cygwin causing which
38977  # to not find them
38978  if test "x$new_path" = x \
38979      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38980      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38981    new_path=`$CYGPATH -u "$path"`
38982  fi
38983  if test "x$new_path" = x; then
38984    # Oops. Which didn't find the executable.
38985    # The splitting of arguments from the executable at a space might have been incorrect,
38986    # since paths with space are more likely in Windows. Give it another try with the whole
38987    # argument.
38988    path="$complete"
38989    arguments="EOL"
38990    new_path=`$CYGPATH -u "$path"`
38991    new_path=`$WHICH "$new_path" 2> /dev/null`
38992    # bat and cmd files are not always considered executable in cygwin causing which
38993    # to not find them
38994    if test "x$new_path" = x \
38995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38997      new_path=`$CYGPATH -u "$path"`
38998    fi
38999    if test "x$new_path" = x; then
39000      # It's still not found. Now this is an unrecoverable error.
39001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39002$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39003      has_space=`$ECHO "$complete" | $GREP " "`
39004      if test "x$has_space" != x; then
39005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39007      fi
39008      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39009    fi
39010  fi
39011
39012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39015  # "foo.exe" is OK but "foo" is an error.
39016  #
39017  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39018  # It is also a way to make sure we got the proper file name for the real test later on.
39019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39020  if test "x$test_shortpath" = x; then
39021    # Short path failed, file does not exist as specified.
39022    # Try adding .exe or .cmd
39023    if test -f "${new_path}.exe"; then
39024      input_to_shortpath="${new_path}.exe"
39025    elif test -f "${new_path}.cmd"; then
39026      input_to_shortpath="${new_path}.cmd"
39027    else
39028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39029$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39032      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39033    fi
39034  else
39035    input_to_shortpath="$new_path"
39036  fi
39037
39038  # Call helper function which possibly converts this using DOS-style short mode.
39039  # If so, the updated path is stored in $new_path.
39040  new_path="$input_to_shortpath"
39041
39042  input_path="$input_to_shortpath"
39043  # Check if we need to convert this using DOS-style short mode. If the path
39044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39045  # take no chances and rewrite it.
39046  # Note: m4 eats our [], so we need to use [ and ] instead.
39047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39048  if test "x$has_forbidden_chars" != x; then
39049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39053      # Going to short mode and back again did indeed matter. Since short mode is
39054      # case insensitive, let's make it lowercase to improve readability.
39055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39056      # Now convert it back to Unix-style (cygpath)
39057      input_path=`$CYGPATH -u "$shortmode_path"`
39058      new_path="$input_path"
39059    fi
39060  fi
39061
39062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39063  if test "x$test_cygdrive_prefix" = x; then
39064    # As a simple fix, exclude /usr/bin since it's not a real path.
39065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39067      # a path prefixed by /cygdrive for fixpath to work.
39068      new_path="$CYGWIN_ROOT_PATH$input_path"
39069    fi
39070  fi
39071
39072  # remove trailing .exe if any
39073  new_path="${new_path/%.exe/}"
39074
39075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39076
39077  # First separate the path from the arguments. This will split at the first
39078  # space.
39079  complete="$OBJCOPY"
39080  path="${complete%% *}"
39081  tmp="$complete EOL"
39082  arguments="${tmp#* }"
39083
39084  # Input might be given as Windows format, start by converting to
39085  # unix format.
39086  new_path="$path"
39087
39088  windows_path="$new_path"
39089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39090    unix_path=`$CYGPATH -u "$windows_path"`
39091    new_path="$unix_path"
39092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39094    new_path="$unix_path"
39095  fi
39096
39097
39098  # Now try to locate executable using which
39099  new_path=`$WHICH "$new_path" 2> /dev/null`
39100
39101  if test "x$new_path" = x; then
39102    # Oops. Which didn't find the executable.
39103    # The splitting of arguments from the executable at a space might have been incorrect,
39104    # since paths with space are more likely in Windows. Give it another try with the whole
39105    # argument.
39106    path="$complete"
39107    arguments="EOL"
39108    new_path="$path"
39109
39110  windows_path="$new_path"
39111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39112    unix_path=`$CYGPATH -u "$windows_path"`
39113    new_path="$unix_path"
39114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39116    new_path="$unix_path"
39117  fi
39118
39119
39120    new_path=`$WHICH "$new_path" 2> /dev/null`
39121    # bat and cmd files are not always considered executable in MSYS causing which
39122    # to not find them
39123    if test "x$new_path" = x \
39124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39126      new_path="$path"
39127
39128  windows_path="$new_path"
39129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130    unix_path=`$CYGPATH -u "$windows_path"`
39131    new_path="$unix_path"
39132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39134    new_path="$unix_path"
39135  fi
39136
39137    fi
39138
39139    if test "x$new_path" = x; then
39140      # It's still not found. Now this is an unrecoverable error.
39141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39142$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39143      has_space=`$ECHO "$complete" | $GREP " "`
39144      if test "x$has_space" != x; then
39145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39147      fi
39148      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39149    fi
39150  fi
39151
39152  # Now new_path has a complete unix path to the binary
39153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39154    # Keep paths in /bin as-is, but remove trailing .exe if any
39155    new_path="${new_path/%.exe/}"
39156    # Do not save /bin paths to all_fixpath_prefixes!
39157  else
39158    # Not in mixed or Windows style, start by that.
39159    new_path=`cmd //c echo $new_path`
39160
39161  input_path="$new_path"
39162  # Check if we need to convert this using DOS-style short mode. If the path
39163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39164  # take no chances and rewrite it.
39165  # Note: m4 eats our [], so we need to use [ and ] instead.
39166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39167  if test "x$has_forbidden_chars" != x; then
39168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39170  fi
39171
39172    # Output is in $new_path
39173
39174  windows_path="$new_path"
39175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39176    unix_path=`$CYGPATH -u "$windows_path"`
39177    new_path="$unix_path"
39178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39180    new_path="$unix_path"
39181  fi
39182
39183    # remove trailing .exe if any
39184    new_path="${new_path/%.exe/}"
39185
39186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39188  fi
39189
39190    else
39191      # We're on a unix platform. Hooray! :)
39192      # First separate the path from the arguments. This will split at the first
39193      # space.
39194      complete="$OBJCOPY"
39195      path="${complete%% *}"
39196      tmp="$complete EOL"
39197      arguments="${tmp#* }"
39198
39199      # Cannot rely on the command "which" here since it doesn't always work.
39200      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39201      if test -z "$is_absolute_path"; then
39202        # Path to executable is not absolute. Find it.
39203        IFS_save="$IFS"
39204        IFS=:
39205        for p in $PATH; do
39206          if test -f "$p/$path" && test -x "$p/$path"; then
39207            new_path="$p/$path"
39208            break
39209          fi
39210        done
39211        IFS="$IFS_save"
39212      else
39213        # This is an absolute path, we can use it without further modifications.
39214        new_path="$path"
39215      fi
39216
39217      if test "x$new_path" = x; then
39218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39219$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39220        has_space=`$ECHO "$complete" | $GREP " "`
39221        if test "x$has_space" != x; then
39222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39224        fi
39225        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39226      fi
39227    fi
39228
39229    # Now join together the path and the arguments once again
39230    if test "x$arguments" != xEOL; then
39231      new_complete="$new_path ${arguments% *}"
39232    else
39233      new_complete="$new_path"
39234    fi
39235
39236    if test "x$complete" != "x$new_complete"; then
39237      OBJCOPY="$new_complete"
39238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39239$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39240    fi
39241  fi
39242
39243      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
39244        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
39245        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
39246        # - version number is last blank separate word on first line
39247        # - version number formats that have been seen:
39248        #   - <major>.<minor>
39249        #   - <major>.<minor>.<micro>
39250        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
39251        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
39252         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
39253              -e 's/.* //' \
39254              -e '/^[01]\./b bad' \
39255              -e '/^2\./{' \
39256              -e '  s/^2\.//' \
39257              -e '  /^[0-9]$/b bad' \
39258              -e '  /^[0-9]\./b bad' \
39259              -e '  /^1[0-9]$/b bad' \
39260              -e '  /^1[0-9]\./b bad' \
39261              -e '  /^20\./b bad' \
39262              -e '  /^21\.0$/b bad' \
39263              -e '  /^21\.0\./b bad' \
39264              -e '}' \
39265              -e ':good' \
39266              -e 's/.*/VALID_VERSION/p' \
39267              -e 'q' \
39268              -e ':bad' \
39269              -e 's/.*/BAD_VERSION/p' \
39270              -e 'q'`
39271        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
39272          OBJCOPY=
39273          { $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
39274$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
39275          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
39276$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
39277          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
39278$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
39279          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
39280$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
39281          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
39282$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
39283        fi
39284      fi
39285    fi
39286  fi
39287
39288
39289
39290  # Publish this variable in the help.
39291
39292
39293  if [ -z "${OBJDUMP+x}" ]; then
39294    # The variable is not set by user, try to locate tool using the code snippet
39295    if test -n "$ac_tool_prefix"; then
39296  for ac_prog in gobjdump objdump
39297  do
39298    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39299set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39301$as_echo_n "checking for $ac_word... " >&6; }
39302if ${ac_cv_prog_OBJDUMP+:} false; then :
39303  $as_echo_n "(cached) " >&6
39304else
39305  if test -n "$OBJDUMP"; then
39306  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39307else
39308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39309for as_dir in $PATH
39310do
39311  IFS=$as_save_IFS
39312  test -z "$as_dir" && as_dir=.
39313    for ac_exec_ext in '' $ac_executable_extensions; do
39314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39315    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39317    break 2
39318  fi
39319done
39320  done
39321IFS=$as_save_IFS
39322
39323fi
39324fi
39325OBJDUMP=$ac_cv_prog_OBJDUMP
39326if test -n "$OBJDUMP"; then
39327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39328$as_echo "$OBJDUMP" >&6; }
39329else
39330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39331$as_echo "no" >&6; }
39332fi
39333
39334
39335    test -n "$OBJDUMP" && break
39336  done
39337fi
39338if test -z "$OBJDUMP"; then
39339  ac_ct_OBJDUMP=$OBJDUMP
39340  for ac_prog in gobjdump objdump
39341do
39342  # Extract the first word of "$ac_prog", so it can be a program name with args.
39343set dummy $ac_prog; ac_word=$2
39344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39345$as_echo_n "checking for $ac_word... " >&6; }
39346if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39347  $as_echo_n "(cached) " >&6
39348else
39349  if test -n "$ac_ct_OBJDUMP"; then
39350  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39351else
39352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39353for as_dir in $PATH
39354do
39355  IFS=$as_save_IFS
39356  test -z "$as_dir" && as_dir=.
39357    for ac_exec_ext in '' $ac_executable_extensions; do
39358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39359    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39361    break 2
39362  fi
39363done
39364  done
39365IFS=$as_save_IFS
39366
39367fi
39368fi
39369ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39370if test -n "$ac_ct_OBJDUMP"; then
39371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39372$as_echo "$ac_ct_OBJDUMP" >&6; }
39373else
39374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39375$as_echo "no" >&6; }
39376fi
39377
39378
39379  test -n "$ac_ct_OBJDUMP" && break
39380done
39381
39382  if test "x$ac_ct_OBJDUMP" = x; then
39383    OBJDUMP=""
39384  else
39385    case $cross_compiling:$ac_tool_warned in
39386yes:)
39387{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39388$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39389ac_tool_warned=yes ;;
39390esac
39391    OBJDUMP=$ac_ct_OBJDUMP
39392  fi
39393fi
39394
39395  else
39396    # The variable is set, but is it from the command line or the environment?
39397
39398    # Try to remove the string !OBJDUMP! from our list.
39399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39401      # If it failed, the variable was not from the command line. Ignore it,
39402      # but warn the user (except for BASH, which is always set by the calling BASH).
39403      if test "xOBJDUMP" != xBASH; then
39404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39405$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39406      fi
39407      # Try to locate tool using the code snippet
39408      if test -n "$ac_tool_prefix"; then
39409  for ac_prog in gobjdump objdump
39410  do
39411    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39412set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39414$as_echo_n "checking for $ac_word... " >&6; }
39415if ${ac_cv_prog_OBJDUMP+:} false; then :
39416  $as_echo_n "(cached) " >&6
39417else
39418  if test -n "$OBJDUMP"; then
39419  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39420else
39421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39422for as_dir in $PATH
39423do
39424  IFS=$as_save_IFS
39425  test -z "$as_dir" && as_dir=.
39426    for ac_exec_ext in '' $ac_executable_extensions; do
39427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39428    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39430    break 2
39431  fi
39432done
39433  done
39434IFS=$as_save_IFS
39435
39436fi
39437fi
39438OBJDUMP=$ac_cv_prog_OBJDUMP
39439if test -n "$OBJDUMP"; then
39440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39441$as_echo "$OBJDUMP" >&6; }
39442else
39443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39444$as_echo "no" >&6; }
39445fi
39446
39447
39448    test -n "$OBJDUMP" && break
39449  done
39450fi
39451if test -z "$OBJDUMP"; then
39452  ac_ct_OBJDUMP=$OBJDUMP
39453  for ac_prog in gobjdump objdump
39454do
39455  # Extract the first word of "$ac_prog", so it can be a program name with args.
39456set dummy $ac_prog; ac_word=$2
39457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39458$as_echo_n "checking for $ac_word... " >&6; }
39459if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39460  $as_echo_n "(cached) " >&6
39461else
39462  if test -n "$ac_ct_OBJDUMP"; then
39463  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39464else
39465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39466for as_dir in $PATH
39467do
39468  IFS=$as_save_IFS
39469  test -z "$as_dir" && as_dir=.
39470    for ac_exec_ext in '' $ac_executable_extensions; do
39471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39472    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39474    break 2
39475  fi
39476done
39477  done
39478IFS=$as_save_IFS
39479
39480fi
39481fi
39482ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39483if test -n "$ac_ct_OBJDUMP"; then
39484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39485$as_echo "$ac_ct_OBJDUMP" >&6; }
39486else
39487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39488$as_echo "no" >&6; }
39489fi
39490
39491
39492  test -n "$ac_ct_OBJDUMP" && break
39493done
39494
39495  if test "x$ac_ct_OBJDUMP" = x; then
39496    OBJDUMP=""
39497  else
39498    case $cross_compiling:$ac_tool_warned in
39499yes:)
39500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39502ac_tool_warned=yes ;;
39503esac
39504    OBJDUMP=$ac_ct_OBJDUMP
39505  fi
39506fi
39507
39508    else
39509      # If it succeeded, then it was overridden by the user. We will use it
39510      # for the tool.
39511
39512      # First remove it from the list of overridden variables, so we can test
39513      # for unknown variables in the end.
39514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39515
39516      # Check if we try to supply an empty value
39517      if test "x$OBJDUMP" = x; then
39518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
39519$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
39520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39521$as_echo_n "checking for OBJDUMP... " >&6; }
39522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39523$as_echo "disabled" >&6; }
39524      else
39525        # Check if the provided tool contains a complete path.
39526        tool_specified="$OBJDUMP"
39527        tool_basename="${tool_specified##*/}"
39528        if test "x$tool_basename" = "x$tool_specified"; then
39529          # A command without a complete path is provided, search $PATH.
39530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39531$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39532          # Extract the first word of "$tool_basename", so it can be a program name with args.
39533set dummy $tool_basename; ac_word=$2
39534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39535$as_echo_n "checking for $ac_word... " >&6; }
39536if ${ac_cv_path_OBJDUMP+:} false; then :
39537  $as_echo_n "(cached) " >&6
39538else
39539  case $OBJDUMP in
39540  [\\/]* | ?:[\\/]*)
39541  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39542  ;;
39543  *)
39544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39545for as_dir in $PATH
39546do
39547  IFS=$as_save_IFS
39548  test -z "$as_dir" && as_dir=.
39549    for ac_exec_ext in '' $ac_executable_extensions; do
39550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39551    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39553    break 2
39554  fi
39555done
39556  done
39557IFS=$as_save_IFS
39558
39559  ;;
39560esac
39561fi
39562OBJDUMP=$ac_cv_path_OBJDUMP
39563if test -n "$OBJDUMP"; then
39564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39565$as_echo "$OBJDUMP" >&6; }
39566else
39567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39568$as_echo "no" >&6; }
39569fi
39570
39571
39572          if test "x$OBJDUMP" = x; then
39573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39574          fi
39575        else
39576          # Otherwise we believe it is a complete path. Use it as it is.
39577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39578$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39580$as_echo_n "checking for OBJDUMP... " >&6; }
39581          if test ! -x "$tool_specified"; then
39582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39583$as_echo "not found" >&6; }
39584            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39585          fi
39586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39587$as_echo "$tool_specified" >&6; }
39588        fi
39589      fi
39590    fi
39591  fi
39592
39593
39594  if test "x$OBJDUMP" != x; then
39595    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39596    # bails if argument is missing.
39597
39598  # Only process if variable expands to non-empty
39599
39600  if test "x$OBJDUMP" != x; then
39601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39602
39603  # First separate the path from the arguments. This will split at the first
39604  # space.
39605  complete="$OBJDUMP"
39606  path="${complete%% *}"
39607  tmp="$complete EOL"
39608  arguments="${tmp#* }"
39609
39610  # Input might be given as Windows format, start by converting to
39611  # unix format.
39612  new_path=`$CYGPATH -u "$path"`
39613
39614  # Now try to locate executable using which
39615  new_path=`$WHICH "$new_path" 2> /dev/null`
39616  # bat and cmd files are not always considered executable in cygwin causing which
39617  # to not find them
39618  if test "x$new_path" = x \
39619      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39620      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39621    new_path=`$CYGPATH -u "$path"`
39622  fi
39623  if test "x$new_path" = x; then
39624    # Oops. Which didn't find the executable.
39625    # The splitting of arguments from the executable at a space might have been incorrect,
39626    # since paths with space are more likely in Windows. Give it another try with the whole
39627    # argument.
39628    path="$complete"
39629    arguments="EOL"
39630    new_path=`$CYGPATH -u "$path"`
39631    new_path=`$WHICH "$new_path" 2> /dev/null`
39632    # bat and cmd files are not always considered executable in cygwin causing which
39633    # to not find them
39634    if test "x$new_path" = x \
39635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39637      new_path=`$CYGPATH -u "$path"`
39638    fi
39639    if test "x$new_path" = x; then
39640      # It's still not found. Now this is an unrecoverable error.
39641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39642$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39643      has_space=`$ECHO "$complete" | $GREP " "`
39644      if test "x$has_space" != x; then
39645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39647      fi
39648      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39649    fi
39650  fi
39651
39652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39655  # "foo.exe" is OK but "foo" is an error.
39656  #
39657  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39658  # It is also a way to make sure we got the proper file name for the real test later on.
39659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39660  if test "x$test_shortpath" = x; then
39661    # Short path failed, file does not exist as specified.
39662    # Try adding .exe or .cmd
39663    if test -f "${new_path}.exe"; then
39664      input_to_shortpath="${new_path}.exe"
39665    elif test -f "${new_path}.cmd"; then
39666      input_to_shortpath="${new_path}.cmd"
39667    else
39668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39669$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39670      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39671$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39672      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39673    fi
39674  else
39675    input_to_shortpath="$new_path"
39676  fi
39677
39678  # Call helper function which possibly converts this using DOS-style short mode.
39679  # If so, the updated path is stored in $new_path.
39680  new_path="$input_to_shortpath"
39681
39682  input_path="$input_to_shortpath"
39683  # Check if we need to convert this using DOS-style short mode. If the path
39684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39685  # take no chances and rewrite it.
39686  # Note: m4 eats our [], so we need to use [ and ] instead.
39687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39688  if test "x$has_forbidden_chars" != x; then
39689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39693      # Going to short mode and back again did indeed matter. Since short mode is
39694      # case insensitive, let's make it lowercase to improve readability.
39695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39696      # Now convert it back to Unix-style (cygpath)
39697      input_path=`$CYGPATH -u "$shortmode_path"`
39698      new_path="$input_path"
39699    fi
39700  fi
39701
39702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39703  if test "x$test_cygdrive_prefix" = x; then
39704    # As a simple fix, exclude /usr/bin since it's not a real path.
39705    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39707      # a path prefixed by /cygdrive for fixpath to work.
39708      new_path="$CYGWIN_ROOT_PATH$input_path"
39709    fi
39710  fi
39711
39712  # remove trailing .exe if any
39713  new_path="${new_path/%.exe/}"
39714
39715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39716
39717  # First separate the path from the arguments. This will split at the first
39718  # space.
39719  complete="$OBJDUMP"
39720  path="${complete%% *}"
39721  tmp="$complete EOL"
39722  arguments="${tmp#* }"
39723
39724  # Input might be given as Windows format, start by converting to
39725  # unix format.
39726  new_path="$path"
39727
39728  windows_path="$new_path"
39729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39730    unix_path=`$CYGPATH -u "$windows_path"`
39731    new_path="$unix_path"
39732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39734    new_path="$unix_path"
39735  fi
39736
39737
39738  # Now try to locate executable using which
39739  new_path=`$WHICH "$new_path" 2> /dev/null`
39740
39741  if test "x$new_path" = x; then
39742    # Oops. Which didn't find the executable.
39743    # The splitting of arguments from the executable at a space might have been incorrect,
39744    # since paths with space are more likely in Windows. Give it another try with the whole
39745    # argument.
39746    path="$complete"
39747    arguments="EOL"
39748    new_path="$path"
39749
39750  windows_path="$new_path"
39751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752    unix_path=`$CYGPATH -u "$windows_path"`
39753    new_path="$unix_path"
39754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39756    new_path="$unix_path"
39757  fi
39758
39759
39760    new_path=`$WHICH "$new_path" 2> /dev/null`
39761    # bat and cmd files are not always considered executable in MSYS causing which
39762    # to not find them
39763    if test "x$new_path" = x \
39764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39766      new_path="$path"
39767
39768  windows_path="$new_path"
39769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39770    unix_path=`$CYGPATH -u "$windows_path"`
39771    new_path="$unix_path"
39772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39774    new_path="$unix_path"
39775  fi
39776
39777    fi
39778
39779    if test "x$new_path" = x; then
39780      # It's still not found. Now this is an unrecoverable error.
39781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39782$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39783      has_space=`$ECHO "$complete" | $GREP " "`
39784      if test "x$has_space" != x; then
39785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39787      fi
39788      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39789    fi
39790  fi
39791
39792  # Now new_path has a complete unix path to the binary
39793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39794    # Keep paths in /bin as-is, but remove trailing .exe if any
39795    new_path="${new_path/%.exe/}"
39796    # Do not save /bin paths to all_fixpath_prefixes!
39797  else
39798    # Not in mixed or Windows style, start by that.
39799    new_path=`cmd //c echo $new_path`
39800
39801  input_path="$new_path"
39802  # Check if we need to convert this using DOS-style short mode. If the path
39803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39804  # take no chances and rewrite it.
39805  # Note: m4 eats our [], so we need to use [ and ] instead.
39806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39807  if test "x$has_forbidden_chars" != x; then
39808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39810  fi
39811
39812    # Output is in $new_path
39813
39814  windows_path="$new_path"
39815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39816    unix_path=`$CYGPATH -u "$windows_path"`
39817    new_path="$unix_path"
39818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39820    new_path="$unix_path"
39821  fi
39822
39823    # remove trailing .exe if any
39824    new_path="${new_path/%.exe/}"
39825
39826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39828  fi
39829
39830    else
39831      # We're on a unix platform. Hooray! :)
39832      # First separate the path from the arguments. This will split at the first
39833      # space.
39834      complete="$OBJDUMP"
39835      path="${complete%% *}"
39836      tmp="$complete EOL"
39837      arguments="${tmp#* }"
39838
39839      # Cannot rely on the command "which" here since it doesn't always work.
39840      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39841      if test -z "$is_absolute_path"; then
39842        # Path to executable is not absolute. Find it.
39843        IFS_save="$IFS"
39844        IFS=:
39845        for p in $PATH; do
39846          if test -f "$p/$path" && test -x "$p/$path"; then
39847            new_path="$p/$path"
39848            break
39849          fi
39850        done
39851        IFS="$IFS_save"
39852      else
39853        # This is an absolute path, we can use it without further modifications.
39854        new_path="$path"
39855      fi
39856
39857      if test "x$new_path" = x; then
39858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39859$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39860        has_space=`$ECHO "$complete" | $GREP " "`
39861        if test "x$has_space" != x; then
39862          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39864        fi
39865        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39866      fi
39867    fi
39868
39869    # Now join together the path and the arguments once again
39870    if test "x$arguments" != xEOL; then
39871      new_complete="$new_path ${arguments% *}"
39872    else
39873      new_complete="$new_path"
39874    fi
39875
39876    if test "x$complete" != "x$new_complete"; then
39877      OBJDUMP="$new_complete"
39878      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39879$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39880    fi
39881  fi
39882
39883  fi
39884
39885
39886  # Restore old path.
39887  PATH="$OLD_PATH"
39888
39889  # Restore the flags to the user specified values.
39890  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39891  CFLAGS="$ORG_CFLAGS"
39892  CXXFLAGS="$ORG_CXXFLAGS"
39893
39894
39895# Finally do some processing after the detection phase
39896
39897  if test "x$COMPILE_TYPE" = "xcross"; then
39898    # Now we need to find a C/C++ compiler that can build executables for the
39899    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39900    # used once. Also, we need to do this without adding a tools dir to the
39901    # path, otherwise we might pick up cross-compilers which don't use standard
39902    # naming.
39903
39904    # FIXME: we should list the discovered compilers as an exclude pattern!
39905    # If we do that, we can do this detection before POST_DETECTION, and still
39906    # find the build compilers in the tools dir, if needed.
39907
39908
39909  # Publish this variable in the help.
39910
39911
39912  if [ -z "${BUILD_CC+x}" ]; then
39913    # The variable is not set by user, try to locate tool using the code snippet
39914    for ac_prog in cl cc gcc
39915do
39916  # Extract the first word of "$ac_prog", so it can be a program name with args.
39917set dummy $ac_prog; ac_word=$2
39918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39919$as_echo_n "checking for $ac_word... " >&6; }
39920if ${ac_cv_path_BUILD_CC+:} false; then :
39921  $as_echo_n "(cached) " >&6
39922else
39923  case $BUILD_CC in
39924  [\\/]* | ?:[\\/]*)
39925  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39926  ;;
39927  *)
39928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39929for as_dir in $PATH
39930do
39931  IFS=$as_save_IFS
39932  test -z "$as_dir" && as_dir=.
39933    for ac_exec_ext in '' $ac_executable_extensions; do
39934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39935    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39937    break 2
39938  fi
39939done
39940  done
39941IFS=$as_save_IFS
39942
39943  ;;
39944esac
39945fi
39946BUILD_CC=$ac_cv_path_BUILD_CC
39947if test -n "$BUILD_CC"; then
39948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39949$as_echo "$BUILD_CC" >&6; }
39950else
39951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39952$as_echo "no" >&6; }
39953fi
39954
39955
39956  test -n "$BUILD_CC" && break
39957done
39958
39959  else
39960    # The variable is set, but is it from the command line or the environment?
39961
39962    # Try to remove the string !BUILD_CC! from our list.
39963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39965      # If it failed, the variable was not from the command line. Ignore it,
39966      # but warn the user (except for BASH, which is always set by the calling BASH).
39967      if test "xBUILD_CC" != xBASH; then
39968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39969$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39970      fi
39971      # Try to locate tool using the code snippet
39972      for ac_prog in cl cc gcc
39973do
39974  # Extract the first word of "$ac_prog", so it can be a program name with args.
39975set dummy $ac_prog; ac_word=$2
39976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39977$as_echo_n "checking for $ac_word... " >&6; }
39978if ${ac_cv_path_BUILD_CC+:} false; then :
39979  $as_echo_n "(cached) " >&6
39980else
39981  case $BUILD_CC in
39982  [\\/]* | ?:[\\/]*)
39983  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39984  ;;
39985  *)
39986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39987for as_dir in $PATH
39988do
39989  IFS=$as_save_IFS
39990  test -z "$as_dir" && as_dir=.
39991    for ac_exec_ext in '' $ac_executable_extensions; do
39992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39993    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39995    break 2
39996  fi
39997done
39998  done
39999IFS=$as_save_IFS
40000
40001  ;;
40002esac
40003fi
40004BUILD_CC=$ac_cv_path_BUILD_CC
40005if test -n "$BUILD_CC"; then
40006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40007$as_echo "$BUILD_CC" >&6; }
40008else
40009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40010$as_echo "no" >&6; }
40011fi
40012
40013
40014  test -n "$BUILD_CC" && break
40015done
40016
40017    else
40018      # If it succeeded, then it was overridden by the user. We will use it
40019      # for the tool.
40020
40021      # First remove it from the list of overridden variables, so we can test
40022      # for unknown variables in the end.
40023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40024
40025      # Check if we try to supply an empty value
40026      if test "x$BUILD_CC" = x; then
40027        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
40028$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
40029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40030$as_echo_n "checking for BUILD_CC... " >&6; }
40031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40032$as_echo "disabled" >&6; }
40033      else
40034        # Check if the provided tool contains a complete path.
40035        tool_specified="$BUILD_CC"
40036        tool_basename="${tool_specified##*/}"
40037        if test "x$tool_basename" = "x$tool_specified"; then
40038          # A command without a complete path is provided, search $PATH.
40039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
40040$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
40041          # Extract the first word of "$tool_basename", so it can be a program name with args.
40042set dummy $tool_basename; ac_word=$2
40043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40044$as_echo_n "checking for $ac_word... " >&6; }
40045if ${ac_cv_path_BUILD_CC+:} false; then :
40046  $as_echo_n "(cached) " >&6
40047else
40048  case $BUILD_CC in
40049  [\\/]* | ?:[\\/]*)
40050  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40051  ;;
40052  *)
40053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40054for as_dir in $PATH
40055do
40056  IFS=$as_save_IFS
40057  test -z "$as_dir" && as_dir=.
40058    for ac_exec_ext in '' $ac_executable_extensions; do
40059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40060    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40062    break 2
40063  fi
40064done
40065  done
40066IFS=$as_save_IFS
40067
40068  ;;
40069esac
40070fi
40071BUILD_CC=$ac_cv_path_BUILD_CC
40072if test -n "$BUILD_CC"; then
40073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40074$as_echo "$BUILD_CC" >&6; }
40075else
40076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40077$as_echo "no" >&6; }
40078fi
40079
40080
40081          if test "x$BUILD_CC" = x; then
40082            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40083          fi
40084        else
40085          # Otherwise we believe it is a complete path. Use it as it is.
40086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
40087$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
40088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40089$as_echo_n "checking for BUILD_CC... " >&6; }
40090          if test ! -x "$tool_specified"; then
40091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40092$as_echo "not found" >&6; }
40093            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
40094          fi
40095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40096$as_echo "$tool_specified" >&6; }
40097        fi
40098      fi
40099    fi
40100  fi
40101
40102
40103
40104  # Only process if variable expands to non-empty
40105
40106  if test "x$BUILD_CC" != x; then
40107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40108
40109  # First separate the path from the arguments. This will split at the first
40110  # space.
40111  complete="$BUILD_CC"
40112  path="${complete%% *}"
40113  tmp="$complete EOL"
40114  arguments="${tmp#* }"
40115
40116  # Input might be given as Windows format, start by converting to
40117  # unix format.
40118  new_path=`$CYGPATH -u "$path"`
40119
40120  # Now try to locate executable using which
40121  new_path=`$WHICH "$new_path" 2> /dev/null`
40122  # bat and cmd files are not always considered executable in cygwin causing which
40123  # to not find them
40124  if test "x$new_path" = x \
40125      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40126      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40127    new_path=`$CYGPATH -u "$path"`
40128  fi
40129  if test "x$new_path" = x; then
40130    # Oops. Which didn't find the executable.
40131    # The splitting of arguments from the executable at a space might have been incorrect,
40132    # since paths with space are more likely in Windows. Give it another try with the whole
40133    # argument.
40134    path="$complete"
40135    arguments="EOL"
40136    new_path=`$CYGPATH -u "$path"`
40137    new_path=`$WHICH "$new_path" 2> /dev/null`
40138    # bat and cmd files are not always considered executable in cygwin causing which
40139    # to not find them
40140    if test "x$new_path" = x \
40141        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40142        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40143      new_path=`$CYGPATH -u "$path"`
40144    fi
40145    if test "x$new_path" = x; then
40146      # It's still not found. Now this is an unrecoverable error.
40147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40148$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40149      has_space=`$ECHO "$complete" | $GREP " "`
40150      if test "x$has_space" != x; then
40151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40153      fi
40154      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40155    fi
40156  fi
40157
40158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40161  # "foo.exe" is OK but "foo" is an error.
40162  #
40163  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40164  # It is also a way to make sure we got the proper file name for the real test later on.
40165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40166  if test "x$test_shortpath" = x; then
40167    # Short path failed, file does not exist as specified.
40168    # Try adding .exe or .cmd
40169    if test -f "${new_path}.exe"; then
40170      input_to_shortpath="${new_path}.exe"
40171    elif test -f "${new_path}.cmd"; then
40172      input_to_shortpath="${new_path}.cmd"
40173    else
40174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
40175$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
40176      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40177$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40178      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40179    fi
40180  else
40181    input_to_shortpath="$new_path"
40182  fi
40183
40184  # Call helper function which possibly converts this using DOS-style short mode.
40185  # If so, the updated path is stored in $new_path.
40186  new_path="$input_to_shortpath"
40187
40188  input_path="$input_to_shortpath"
40189  # Check if we need to convert this using DOS-style short mode. If the path
40190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40191  # take no chances and rewrite it.
40192  # Note: m4 eats our [], so we need to use [ and ] instead.
40193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40194  if test "x$has_forbidden_chars" != x; then
40195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40199      # Going to short mode and back again did indeed matter. Since short mode is
40200      # case insensitive, let's make it lowercase to improve readability.
40201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40202      # Now convert it back to Unix-style (cygpath)
40203      input_path=`$CYGPATH -u "$shortmode_path"`
40204      new_path="$input_path"
40205    fi
40206  fi
40207
40208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40209  if test "x$test_cygdrive_prefix" = x; then
40210    # As a simple fix, exclude /usr/bin since it's not a real path.
40211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40213      # a path prefixed by /cygdrive for fixpath to work.
40214      new_path="$CYGWIN_ROOT_PATH$input_path"
40215    fi
40216  fi
40217
40218  # remove trailing .exe if any
40219  new_path="${new_path/%.exe/}"
40220
40221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40222
40223  # First separate the path from the arguments. This will split at the first
40224  # space.
40225  complete="$BUILD_CC"
40226  path="${complete%% *}"
40227  tmp="$complete EOL"
40228  arguments="${tmp#* }"
40229
40230  # Input might be given as Windows format, start by converting to
40231  # unix format.
40232  new_path="$path"
40233
40234  windows_path="$new_path"
40235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40236    unix_path=`$CYGPATH -u "$windows_path"`
40237    new_path="$unix_path"
40238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40240    new_path="$unix_path"
40241  fi
40242
40243
40244  # Now try to locate executable using which
40245  new_path=`$WHICH "$new_path" 2> /dev/null`
40246
40247  if test "x$new_path" = x; then
40248    # Oops. Which didn't find the executable.
40249    # The splitting of arguments from the executable at a space might have been incorrect,
40250    # since paths with space are more likely in Windows. Give it another try with the whole
40251    # argument.
40252    path="$complete"
40253    arguments="EOL"
40254    new_path="$path"
40255
40256  windows_path="$new_path"
40257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40258    unix_path=`$CYGPATH -u "$windows_path"`
40259    new_path="$unix_path"
40260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40262    new_path="$unix_path"
40263  fi
40264
40265
40266    new_path=`$WHICH "$new_path" 2> /dev/null`
40267    # bat and cmd files are not always considered executable in MSYS causing which
40268    # to not find them
40269    if test "x$new_path" = x \
40270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40272      new_path="$path"
40273
40274  windows_path="$new_path"
40275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40276    unix_path=`$CYGPATH -u "$windows_path"`
40277    new_path="$unix_path"
40278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40280    new_path="$unix_path"
40281  fi
40282
40283    fi
40284
40285    if test "x$new_path" = x; then
40286      # It's still not found. Now this is an unrecoverable error.
40287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40288$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40289      has_space=`$ECHO "$complete" | $GREP " "`
40290      if test "x$has_space" != x; then
40291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40293      fi
40294      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40295    fi
40296  fi
40297
40298  # Now new_path has a complete unix path to the binary
40299  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40300    # Keep paths in /bin as-is, but remove trailing .exe if any
40301    new_path="${new_path/%.exe/}"
40302    # Do not save /bin paths to all_fixpath_prefixes!
40303  else
40304    # Not in mixed or Windows style, start by that.
40305    new_path=`cmd //c echo $new_path`
40306
40307  input_path="$new_path"
40308  # Check if we need to convert this using DOS-style short mode. If the path
40309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40310  # take no chances and rewrite it.
40311  # Note: m4 eats our [], so we need to use [ and ] instead.
40312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40313  if test "x$has_forbidden_chars" != x; then
40314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40316  fi
40317
40318    # Output is in $new_path
40319
40320  windows_path="$new_path"
40321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40322    unix_path=`$CYGPATH -u "$windows_path"`
40323    new_path="$unix_path"
40324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40326    new_path="$unix_path"
40327  fi
40328
40329    # remove trailing .exe if any
40330    new_path="${new_path/%.exe/}"
40331
40332    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40333    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40334  fi
40335
40336    else
40337      # We're on a unix platform. Hooray! :)
40338      # First separate the path from the arguments. This will split at the first
40339      # space.
40340      complete="$BUILD_CC"
40341      path="${complete%% *}"
40342      tmp="$complete EOL"
40343      arguments="${tmp#* }"
40344
40345      # Cannot rely on the command "which" here since it doesn't always work.
40346      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40347      if test -z "$is_absolute_path"; then
40348        # Path to executable is not absolute. Find it.
40349        IFS_save="$IFS"
40350        IFS=:
40351        for p in $PATH; do
40352          if test -f "$p/$path" && test -x "$p/$path"; then
40353            new_path="$p/$path"
40354            break
40355          fi
40356        done
40357        IFS="$IFS_save"
40358      else
40359        # This is an absolute path, we can use it without further modifications.
40360        new_path="$path"
40361      fi
40362
40363      if test "x$new_path" = x; then
40364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40365$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40366        has_space=`$ECHO "$complete" | $GREP " "`
40367        if test "x$has_space" != x; then
40368          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40369$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40370        fi
40371        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40372      fi
40373    fi
40374
40375    # Now join together the path and the arguments once again
40376    if test "x$arguments" != xEOL; then
40377      new_complete="$new_path ${arguments% *}"
40378    else
40379      new_complete="$new_path"
40380    fi
40381
40382    if test "x$complete" != "x$new_complete"; then
40383      BUILD_CC="$new_complete"
40384      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40385$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40386    fi
40387  fi
40388
40389
40390
40391  # Publish this variable in the help.
40392
40393
40394  if [ -z "${BUILD_CXX+x}" ]; then
40395    # The variable is not set by user, try to locate tool using the code snippet
40396    for ac_prog in cl CC g++
40397do
40398  # Extract the first word of "$ac_prog", so it can be a program name with args.
40399set dummy $ac_prog; ac_word=$2
40400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40401$as_echo_n "checking for $ac_word... " >&6; }
40402if ${ac_cv_path_BUILD_CXX+:} false; then :
40403  $as_echo_n "(cached) " >&6
40404else
40405  case $BUILD_CXX in
40406  [\\/]* | ?:[\\/]*)
40407  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40408  ;;
40409  *)
40410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40411for as_dir in $PATH
40412do
40413  IFS=$as_save_IFS
40414  test -z "$as_dir" && as_dir=.
40415    for ac_exec_ext in '' $ac_executable_extensions; do
40416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40417    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40419    break 2
40420  fi
40421done
40422  done
40423IFS=$as_save_IFS
40424
40425  ;;
40426esac
40427fi
40428BUILD_CXX=$ac_cv_path_BUILD_CXX
40429if test -n "$BUILD_CXX"; then
40430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40431$as_echo "$BUILD_CXX" >&6; }
40432else
40433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40434$as_echo "no" >&6; }
40435fi
40436
40437
40438  test -n "$BUILD_CXX" && break
40439done
40440
40441  else
40442    # The variable is set, but is it from the command line or the environment?
40443
40444    # Try to remove the string !BUILD_CXX! from our list.
40445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40447      # If it failed, the variable was not from the command line. Ignore it,
40448      # but warn the user (except for BASH, which is always set by the calling BASH).
40449      if test "xBUILD_CXX" != xBASH; then
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40451$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40452      fi
40453      # Try to locate tool using the code snippet
40454      for ac_prog in cl CC g++
40455do
40456  # Extract the first word of "$ac_prog", so it can be a program name with args.
40457set dummy $ac_prog; ac_word=$2
40458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40459$as_echo_n "checking for $ac_word... " >&6; }
40460if ${ac_cv_path_BUILD_CXX+:} false; then :
40461  $as_echo_n "(cached) " >&6
40462else
40463  case $BUILD_CXX in
40464  [\\/]* | ?:[\\/]*)
40465  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40466  ;;
40467  *)
40468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40469for as_dir in $PATH
40470do
40471  IFS=$as_save_IFS
40472  test -z "$as_dir" && as_dir=.
40473    for ac_exec_ext in '' $ac_executable_extensions; do
40474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40475    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40477    break 2
40478  fi
40479done
40480  done
40481IFS=$as_save_IFS
40482
40483  ;;
40484esac
40485fi
40486BUILD_CXX=$ac_cv_path_BUILD_CXX
40487if test -n "$BUILD_CXX"; then
40488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40489$as_echo "$BUILD_CXX" >&6; }
40490else
40491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40492$as_echo "no" >&6; }
40493fi
40494
40495
40496  test -n "$BUILD_CXX" && break
40497done
40498
40499    else
40500      # If it succeeded, then it was overridden by the user. We will use it
40501      # for the tool.
40502
40503      # First remove it from the list of overridden variables, so we can test
40504      # for unknown variables in the end.
40505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40506
40507      # Check if we try to supply an empty value
40508      if test "x$BUILD_CXX" = x; then
40509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
40510$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
40511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40512$as_echo_n "checking for BUILD_CXX... " >&6; }
40513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40514$as_echo "disabled" >&6; }
40515      else
40516        # Check if the provided tool contains a complete path.
40517        tool_specified="$BUILD_CXX"
40518        tool_basename="${tool_specified##*/}"
40519        if test "x$tool_basename" = "x$tool_specified"; then
40520          # A command without a complete path is provided, search $PATH.
40521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40522$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40523          # Extract the first word of "$tool_basename", so it can be a program name with args.
40524set dummy $tool_basename; ac_word=$2
40525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40526$as_echo_n "checking for $ac_word... " >&6; }
40527if ${ac_cv_path_BUILD_CXX+:} false; then :
40528  $as_echo_n "(cached) " >&6
40529else
40530  case $BUILD_CXX in
40531  [\\/]* | ?:[\\/]*)
40532  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40533  ;;
40534  *)
40535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40536for as_dir in $PATH
40537do
40538  IFS=$as_save_IFS
40539  test -z "$as_dir" && as_dir=.
40540    for ac_exec_ext in '' $ac_executable_extensions; do
40541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40542    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40544    break 2
40545  fi
40546done
40547  done
40548IFS=$as_save_IFS
40549
40550  ;;
40551esac
40552fi
40553BUILD_CXX=$ac_cv_path_BUILD_CXX
40554if test -n "$BUILD_CXX"; then
40555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40556$as_echo "$BUILD_CXX" >&6; }
40557else
40558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40559$as_echo "no" >&6; }
40560fi
40561
40562
40563          if test "x$BUILD_CXX" = x; then
40564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40565          fi
40566        else
40567          # Otherwise we believe it is a complete path. Use it as it is.
40568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40569$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40571$as_echo_n "checking for BUILD_CXX... " >&6; }
40572          if test ! -x "$tool_specified"; then
40573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40574$as_echo "not found" >&6; }
40575            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40576          fi
40577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40578$as_echo "$tool_specified" >&6; }
40579        fi
40580      fi
40581    fi
40582  fi
40583
40584
40585
40586  # Only process if variable expands to non-empty
40587
40588  if test "x$BUILD_CXX" != x; then
40589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40590
40591  # First separate the path from the arguments. This will split at the first
40592  # space.
40593  complete="$BUILD_CXX"
40594  path="${complete%% *}"
40595  tmp="$complete EOL"
40596  arguments="${tmp#* }"
40597
40598  # Input might be given as Windows format, start by converting to
40599  # unix format.
40600  new_path=`$CYGPATH -u "$path"`
40601
40602  # Now try to locate executable using which
40603  new_path=`$WHICH "$new_path" 2> /dev/null`
40604  # bat and cmd files are not always considered executable in cygwin causing which
40605  # to not find them
40606  if test "x$new_path" = x \
40607      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40608      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40609    new_path=`$CYGPATH -u "$path"`
40610  fi
40611  if test "x$new_path" = x; then
40612    # Oops. Which didn't find the executable.
40613    # The splitting of arguments from the executable at a space might have been incorrect,
40614    # since paths with space are more likely in Windows. Give it another try with the whole
40615    # argument.
40616    path="$complete"
40617    arguments="EOL"
40618    new_path=`$CYGPATH -u "$path"`
40619    new_path=`$WHICH "$new_path" 2> /dev/null`
40620    # bat and cmd files are not always considered executable in cygwin causing which
40621    # to not find them
40622    if test "x$new_path" = x \
40623        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40624        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40625      new_path=`$CYGPATH -u "$path"`
40626    fi
40627    if test "x$new_path" = x; then
40628      # It's still not found. Now this is an unrecoverable error.
40629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40630$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40631      has_space=`$ECHO "$complete" | $GREP " "`
40632      if test "x$has_space" != x; then
40633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40635      fi
40636      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40637    fi
40638  fi
40639
40640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40643  # "foo.exe" is OK but "foo" is an error.
40644  #
40645  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40646  # It is also a way to make sure we got the proper file name for the real test later on.
40647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40648  if test "x$test_shortpath" = x; then
40649    # Short path failed, file does not exist as specified.
40650    # Try adding .exe or .cmd
40651    if test -f "${new_path}.exe"; then
40652      input_to_shortpath="${new_path}.exe"
40653    elif test -f "${new_path}.cmd"; then
40654      input_to_shortpath="${new_path}.cmd"
40655    else
40656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40657$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40658      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40659$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40660      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40661    fi
40662  else
40663    input_to_shortpath="$new_path"
40664  fi
40665
40666  # Call helper function which possibly converts this using DOS-style short mode.
40667  # If so, the updated path is stored in $new_path.
40668  new_path="$input_to_shortpath"
40669
40670  input_path="$input_to_shortpath"
40671  # Check if we need to convert this using DOS-style short mode. If the path
40672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40673  # take no chances and rewrite it.
40674  # Note: m4 eats our [], so we need to use [ and ] instead.
40675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40676  if test "x$has_forbidden_chars" != x; then
40677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40681      # Going to short mode and back again did indeed matter. Since short mode is
40682      # case insensitive, let's make it lowercase to improve readability.
40683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40684      # Now convert it back to Unix-style (cygpath)
40685      input_path=`$CYGPATH -u "$shortmode_path"`
40686      new_path="$input_path"
40687    fi
40688  fi
40689
40690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40691  if test "x$test_cygdrive_prefix" = x; then
40692    # As a simple fix, exclude /usr/bin since it's not a real path.
40693    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40695      # a path prefixed by /cygdrive for fixpath to work.
40696      new_path="$CYGWIN_ROOT_PATH$input_path"
40697    fi
40698  fi
40699
40700  # remove trailing .exe if any
40701  new_path="${new_path/%.exe/}"
40702
40703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40704
40705  # First separate the path from the arguments. This will split at the first
40706  # space.
40707  complete="$BUILD_CXX"
40708  path="${complete%% *}"
40709  tmp="$complete EOL"
40710  arguments="${tmp#* }"
40711
40712  # Input might be given as Windows format, start by converting to
40713  # unix format.
40714  new_path="$path"
40715
40716  windows_path="$new_path"
40717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40718    unix_path=`$CYGPATH -u "$windows_path"`
40719    new_path="$unix_path"
40720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40722    new_path="$unix_path"
40723  fi
40724
40725
40726  # Now try to locate executable using which
40727  new_path=`$WHICH "$new_path" 2> /dev/null`
40728
40729  if test "x$new_path" = x; then
40730    # Oops. Which didn't find the executable.
40731    # The splitting of arguments from the executable at a space might have been incorrect,
40732    # since paths with space are more likely in Windows. Give it another try with the whole
40733    # argument.
40734    path="$complete"
40735    arguments="EOL"
40736    new_path="$path"
40737
40738  windows_path="$new_path"
40739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40740    unix_path=`$CYGPATH -u "$windows_path"`
40741    new_path="$unix_path"
40742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40744    new_path="$unix_path"
40745  fi
40746
40747
40748    new_path=`$WHICH "$new_path" 2> /dev/null`
40749    # bat and cmd files are not always considered executable in MSYS causing which
40750    # to not find them
40751    if test "x$new_path" = x \
40752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40754      new_path="$path"
40755
40756  windows_path="$new_path"
40757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40758    unix_path=`$CYGPATH -u "$windows_path"`
40759    new_path="$unix_path"
40760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40762    new_path="$unix_path"
40763  fi
40764
40765    fi
40766
40767    if test "x$new_path" = x; then
40768      # It's still not found. Now this is an unrecoverable error.
40769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40770$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40771      has_space=`$ECHO "$complete" | $GREP " "`
40772      if test "x$has_space" != x; then
40773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40775      fi
40776      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40777    fi
40778  fi
40779
40780  # Now new_path has a complete unix path to the binary
40781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40782    # Keep paths in /bin as-is, but remove trailing .exe if any
40783    new_path="${new_path/%.exe/}"
40784    # Do not save /bin paths to all_fixpath_prefixes!
40785  else
40786    # Not in mixed or Windows style, start by that.
40787    new_path=`cmd //c echo $new_path`
40788
40789  input_path="$new_path"
40790  # Check if we need to convert this using DOS-style short mode. If the path
40791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40792  # take no chances and rewrite it.
40793  # Note: m4 eats our [], so we need to use [ and ] instead.
40794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40795  if test "x$has_forbidden_chars" != x; then
40796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40798  fi
40799
40800    # Output is in $new_path
40801
40802  windows_path="$new_path"
40803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40804    unix_path=`$CYGPATH -u "$windows_path"`
40805    new_path="$unix_path"
40806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40808    new_path="$unix_path"
40809  fi
40810
40811    # remove trailing .exe if any
40812    new_path="${new_path/%.exe/}"
40813
40814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40816  fi
40817
40818    else
40819      # We're on a unix platform. Hooray! :)
40820      # First separate the path from the arguments. This will split at the first
40821      # space.
40822      complete="$BUILD_CXX"
40823      path="${complete%% *}"
40824      tmp="$complete EOL"
40825      arguments="${tmp#* }"
40826
40827      # Cannot rely on the command "which" here since it doesn't always work.
40828      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40829      if test -z "$is_absolute_path"; then
40830        # Path to executable is not absolute. Find it.
40831        IFS_save="$IFS"
40832        IFS=:
40833        for p in $PATH; do
40834          if test -f "$p/$path" && test -x "$p/$path"; then
40835            new_path="$p/$path"
40836            break
40837          fi
40838        done
40839        IFS="$IFS_save"
40840      else
40841        # This is an absolute path, we can use it without further modifications.
40842        new_path="$path"
40843      fi
40844
40845      if test "x$new_path" = x; then
40846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40847$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40848        has_space=`$ECHO "$complete" | $GREP " "`
40849        if test "x$has_space" != x; then
40850          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40851$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40852        fi
40853        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40854      fi
40855    fi
40856
40857    # Now join together the path and the arguments once again
40858    if test "x$arguments" != xEOL; then
40859      new_complete="$new_path ${arguments% *}"
40860    else
40861      new_complete="$new_path"
40862    fi
40863
40864    if test "x$complete" != "x$new_complete"; then
40865      BUILD_CXX="$new_complete"
40866      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40867$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40868    fi
40869  fi
40870
40871
40872
40873  # Publish this variable in the help.
40874
40875
40876  if [ -z "${BUILD_LD+x}" ]; then
40877    # The variable is not set by user, try to locate tool using the code snippet
40878    for ac_prog in ld
40879do
40880  # Extract the first word of "$ac_prog", so it can be a program name with args.
40881set dummy $ac_prog; ac_word=$2
40882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40883$as_echo_n "checking for $ac_word... " >&6; }
40884if ${ac_cv_path_BUILD_LD+:} false; then :
40885  $as_echo_n "(cached) " >&6
40886else
40887  case $BUILD_LD in
40888  [\\/]* | ?:[\\/]*)
40889  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40890  ;;
40891  *)
40892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40893for as_dir in $PATH
40894do
40895  IFS=$as_save_IFS
40896  test -z "$as_dir" && as_dir=.
40897    for ac_exec_ext in '' $ac_executable_extensions; do
40898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40899    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40901    break 2
40902  fi
40903done
40904  done
40905IFS=$as_save_IFS
40906
40907  ;;
40908esac
40909fi
40910BUILD_LD=$ac_cv_path_BUILD_LD
40911if test -n "$BUILD_LD"; then
40912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40913$as_echo "$BUILD_LD" >&6; }
40914else
40915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40916$as_echo "no" >&6; }
40917fi
40918
40919
40920  test -n "$BUILD_LD" && break
40921done
40922
40923  else
40924    # The variable is set, but is it from the command line or the environment?
40925
40926    # Try to remove the string !BUILD_LD! from our list.
40927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40929      # If it failed, the variable was not from the command line. Ignore it,
40930      # but warn the user (except for BASH, which is always set by the calling BASH).
40931      if test "xBUILD_LD" != xBASH; then
40932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40933$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40934      fi
40935      # Try to locate tool using the code snippet
40936      for ac_prog in ld
40937do
40938  # Extract the first word of "$ac_prog", so it can be a program name with args.
40939set dummy $ac_prog; ac_word=$2
40940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40941$as_echo_n "checking for $ac_word... " >&6; }
40942if ${ac_cv_path_BUILD_LD+:} false; then :
40943  $as_echo_n "(cached) " >&6
40944else
40945  case $BUILD_LD in
40946  [\\/]* | ?:[\\/]*)
40947  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40948  ;;
40949  *)
40950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40951for as_dir in $PATH
40952do
40953  IFS=$as_save_IFS
40954  test -z "$as_dir" && as_dir=.
40955    for ac_exec_ext in '' $ac_executable_extensions; do
40956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40957    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40959    break 2
40960  fi
40961done
40962  done
40963IFS=$as_save_IFS
40964
40965  ;;
40966esac
40967fi
40968BUILD_LD=$ac_cv_path_BUILD_LD
40969if test -n "$BUILD_LD"; then
40970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40971$as_echo "$BUILD_LD" >&6; }
40972else
40973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40974$as_echo "no" >&6; }
40975fi
40976
40977
40978  test -n "$BUILD_LD" && break
40979done
40980
40981    else
40982      # If it succeeded, then it was overridden by the user. We will use it
40983      # for the tool.
40984
40985      # First remove it from the list of overridden variables, so we can test
40986      # for unknown variables in the end.
40987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40988
40989      # Check if we try to supply an empty value
40990      if test "x$BUILD_LD" = x; then
40991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_LD= (no value)" >&5
40992$as_echo "$as_me: Setting user supplied tool BUILD_LD= (no value)" >&6;}
40993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40994$as_echo_n "checking for BUILD_LD... " >&6; }
40995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40996$as_echo "disabled" >&6; }
40997      else
40998        # Check if the provided tool contains a complete path.
40999        tool_specified="$BUILD_LD"
41000        tool_basename="${tool_specified##*/}"
41001        if test "x$tool_basename" = "x$tool_specified"; then
41002          # A command without a complete path is provided, search $PATH.
41003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
41004$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
41005          # Extract the first word of "$tool_basename", so it can be a program name with args.
41006set dummy $tool_basename; ac_word=$2
41007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41008$as_echo_n "checking for $ac_word... " >&6; }
41009if ${ac_cv_path_BUILD_LD+:} false; then :
41010  $as_echo_n "(cached) " >&6
41011else
41012  case $BUILD_LD in
41013  [\\/]* | ?:[\\/]*)
41014  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
41015  ;;
41016  *)
41017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41018for as_dir in $PATH
41019do
41020  IFS=$as_save_IFS
41021  test -z "$as_dir" && as_dir=.
41022    for ac_exec_ext in '' $ac_executable_extensions; do
41023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41024    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
41025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41026    break 2
41027  fi
41028done
41029  done
41030IFS=$as_save_IFS
41031
41032  ;;
41033esac
41034fi
41035BUILD_LD=$ac_cv_path_BUILD_LD
41036if test -n "$BUILD_LD"; then
41037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
41038$as_echo "$BUILD_LD" >&6; }
41039else
41040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41041$as_echo "no" >&6; }
41042fi
41043
41044
41045          if test "x$BUILD_LD" = x; then
41046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41047          fi
41048        else
41049          # Otherwise we believe it is a complete path. Use it as it is.
41050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
41051$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
41052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
41053$as_echo_n "checking for BUILD_LD... " >&6; }
41054          if test ! -x "$tool_specified"; then
41055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41056$as_echo "not found" >&6; }
41057            as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
41058          fi
41059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41060$as_echo "$tool_specified" >&6; }
41061        fi
41062      fi
41063    fi
41064  fi
41065
41066
41067
41068  # Only process if variable expands to non-empty
41069
41070  if test "x$BUILD_LD" != x; then
41071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41072
41073  # First separate the path from the arguments. This will split at the first
41074  # space.
41075  complete="$BUILD_LD"
41076  path="${complete%% *}"
41077  tmp="$complete EOL"
41078  arguments="${tmp#* }"
41079
41080  # Input might be given as Windows format, start by converting to
41081  # unix format.
41082  new_path=`$CYGPATH -u "$path"`
41083
41084  # Now try to locate executable using which
41085  new_path=`$WHICH "$new_path" 2> /dev/null`
41086  # bat and cmd files are not always considered executable in cygwin causing which
41087  # to not find them
41088  if test "x$new_path" = x \
41089      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41090      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41091    new_path=`$CYGPATH -u "$path"`
41092  fi
41093  if test "x$new_path" = x; then
41094    # Oops. Which didn't find the executable.
41095    # The splitting of arguments from the executable at a space might have been incorrect,
41096    # since paths with space are more likely in Windows. Give it another try with the whole
41097    # argument.
41098    path="$complete"
41099    arguments="EOL"
41100    new_path=`$CYGPATH -u "$path"`
41101    new_path=`$WHICH "$new_path" 2> /dev/null`
41102    # bat and cmd files are not always considered executable in cygwin causing which
41103    # to not find them
41104    if test "x$new_path" = x \
41105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41107      new_path=`$CYGPATH -u "$path"`
41108    fi
41109    if test "x$new_path" = x; then
41110      # It's still not found. Now this is an unrecoverable error.
41111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41112$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41113      has_space=`$ECHO "$complete" | $GREP " "`
41114      if test "x$has_space" != x; then
41115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41117      fi
41118      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41119    fi
41120  fi
41121
41122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41125  # "foo.exe" is OK but "foo" is an error.
41126  #
41127  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41128  # It is also a way to make sure we got the proper file name for the real test later on.
41129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41130  if test "x$test_shortpath" = x; then
41131    # Short path failed, file does not exist as specified.
41132    # Try adding .exe or .cmd
41133    if test -f "${new_path}.exe"; then
41134      input_to_shortpath="${new_path}.exe"
41135    elif test -f "${new_path}.cmd"; then
41136      input_to_shortpath="${new_path}.cmd"
41137    else
41138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
41139$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
41140      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41141$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41142      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41143    fi
41144  else
41145    input_to_shortpath="$new_path"
41146  fi
41147
41148  # Call helper function which possibly converts this using DOS-style short mode.
41149  # If so, the updated path is stored in $new_path.
41150  new_path="$input_to_shortpath"
41151
41152  input_path="$input_to_shortpath"
41153  # Check if we need to convert this using DOS-style short mode. If the path
41154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41155  # take no chances and rewrite it.
41156  # Note: m4 eats our [], so we need to use [ and ] instead.
41157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41158  if test "x$has_forbidden_chars" != x; then
41159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41163      # Going to short mode and back again did indeed matter. Since short mode is
41164      # case insensitive, let's make it lowercase to improve readability.
41165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41166      # Now convert it back to Unix-style (cygpath)
41167      input_path=`$CYGPATH -u "$shortmode_path"`
41168      new_path="$input_path"
41169    fi
41170  fi
41171
41172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41173  if test "x$test_cygdrive_prefix" = x; then
41174    # As a simple fix, exclude /usr/bin since it's not a real path.
41175    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41177      # a path prefixed by /cygdrive for fixpath to work.
41178      new_path="$CYGWIN_ROOT_PATH$input_path"
41179    fi
41180  fi
41181
41182  # remove trailing .exe if any
41183  new_path="${new_path/%.exe/}"
41184
41185    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41186
41187  # First separate the path from the arguments. This will split at the first
41188  # space.
41189  complete="$BUILD_LD"
41190  path="${complete%% *}"
41191  tmp="$complete EOL"
41192  arguments="${tmp#* }"
41193
41194  # Input might be given as Windows format, start by converting to
41195  # unix format.
41196  new_path="$path"
41197
41198  windows_path="$new_path"
41199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41200    unix_path=`$CYGPATH -u "$windows_path"`
41201    new_path="$unix_path"
41202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41204    new_path="$unix_path"
41205  fi
41206
41207
41208  # Now try to locate executable using which
41209  new_path=`$WHICH "$new_path" 2> /dev/null`
41210
41211  if test "x$new_path" = x; then
41212    # Oops. Which didn't find the executable.
41213    # The splitting of arguments from the executable at a space might have been incorrect,
41214    # since paths with space are more likely in Windows. Give it another try with the whole
41215    # argument.
41216    path="$complete"
41217    arguments="EOL"
41218    new_path="$path"
41219
41220  windows_path="$new_path"
41221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41222    unix_path=`$CYGPATH -u "$windows_path"`
41223    new_path="$unix_path"
41224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41226    new_path="$unix_path"
41227  fi
41228
41229
41230    new_path=`$WHICH "$new_path" 2> /dev/null`
41231    # bat and cmd files are not always considered executable in MSYS causing which
41232    # to not find them
41233    if test "x$new_path" = x \
41234        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41235        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41236      new_path="$path"
41237
41238  windows_path="$new_path"
41239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41240    unix_path=`$CYGPATH -u "$windows_path"`
41241    new_path="$unix_path"
41242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41244    new_path="$unix_path"
41245  fi
41246
41247    fi
41248
41249    if test "x$new_path" = x; then
41250      # It's still not found. Now this is an unrecoverable error.
41251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41252$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41253      has_space=`$ECHO "$complete" | $GREP " "`
41254      if test "x$has_space" != x; then
41255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41257      fi
41258      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41259    fi
41260  fi
41261
41262  # Now new_path has a complete unix path to the binary
41263  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41264    # Keep paths in /bin as-is, but remove trailing .exe if any
41265    new_path="${new_path/%.exe/}"
41266    # Do not save /bin paths to all_fixpath_prefixes!
41267  else
41268    # Not in mixed or Windows style, start by that.
41269    new_path=`cmd //c echo $new_path`
41270
41271  input_path="$new_path"
41272  # Check if we need to convert this using DOS-style short mode. If the path
41273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41274  # take no chances and rewrite it.
41275  # Note: m4 eats our [], so we need to use [ and ] instead.
41276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41277  if test "x$has_forbidden_chars" != x; then
41278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41280  fi
41281
41282    # Output is in $new_path
41283
41284  windows_path="$new_path"
41285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41286    unix_path=`$CYGPATH -u "$windows_path"`
41287    new_path="$unix_path"
41288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41290    new_path="$unix_path"
41291  fi
41292
41293    # remove trailing .exe if any
41294    new_path="${new_path/%.exe/}"
41295
41296    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41297    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41298  fi
41299
41300    else
41301      # We're on a unix platform. Hooray! :)
41302      # First separate the path from the arguments. This will split at the first
41303      # space.
41304      complete="$BUILD_LD"
41305      path="${complete%% *}"
41306      tmp="$complete EOL"
41307      arguments="${tmp#* }"
41308
41309      # Cannot rely on the command "which" here since it doesn't always work.
41310      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41311      if test -z "$is_absolute_path"; then
41312        # Path to executable is not absolute. Find it.
41313        IFS_save="$IFS"
41314        IFS=:
41315        for p in $PATH; do
41316          if test -f "$p/$path" && test -x "$p/$path"; then
41317            new_path="$p/$path"
41318            break
41319          fi
41320        done
41321        IFS="$IFS_save"
41322      else
41323        # This is an absolute path, we can use it without further modifications.
41324        new_path="$path"
41325      fi
41326
41327      if test "x$new_path" = x; then
41328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41329$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41330        has_space=`$ECHO "$complete" | $GREP " "`
41331        if test "x$has_space" != x; then
41332          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41333$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41334        fi
41335        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41336      fi
41337    fi
41338
41339    # Now join together the path and the arguments once again
41340    if test "x$arguments" != xEOL; then
41341      new_complete="$new_path ${arguments% *}"
41342    else
41343      new_complete="$new_path"
41344    fi
41345
41346    if test "x$complete" != "x$new_complete"; then
41347      BUILD_LD="$new_complete"
41348      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
41349$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
41350    fi
41351  fi
41352
41353    BUILD_SYSROOT_CFLAGS=""
41354    BUILD_SYSROOT_LDFLAGS=""
41355  else
41356    # If we are not cross compiling, use the normal target compilers for
41357    # building the build platform executables.
41358    BUILD_CC="$CC"
41359    BUILD_CXX="$CXX"
41360    BUILD_LD="$LD"
41361    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
41362    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
41363  fi
41364
41365
41366
41367
41368
41369
41370
41371
41372  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41373    # For hotspot, we need these in Windows mixed path,
41374    # so rewrite them all. Need added .exe suffix.
41375    HOTSPOT_CXX="$CXX.exe"
41376    HOTSPOT_LD="$LD.exe"
41377    HOTSPOT_MT="$MT.exe"
41378    HOTSPOT_RC="$RC.exe"
41379
41380  unix_path="$HOTSPOT_CXX"
41381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41382    windows_path=`$CYGPATH -m "$unix_path"`
41383    HOTSPOT_CXX="$windows_path"
41384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41385    windows_path=`cmd //c echo $unix_path`
41386    HOTSPOT_CXX="$windows_path"
41387  fi
41388
41389
41390  unix_path="$HOTSPOT_LD"
41391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41392    windows_path=`$CYGPATH -m "$unix_path"`
41393    HOTSPOT_LD="$windows_path"
41394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41395    windows_path=`cmd //c echo $unix_path`
41396    HOTSPOT_LD="$windows_path"
41397  fi
41398
41399
41400  unix_path="$HOTSPOT_MT"
41401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41402    windows_path=`$CYGPATH -m "$unix_path"`
41403    HOTSPOT_MT="$windows_path"
41404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41405    windows_path=`cmd //c echo $unix_path`
41406    HOTSPOT_MT="$windows_path"
41407  fi
41408
41409
41410  unix_path="$HOTSPOT_RC"
41411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41412    windows_path=`$CYGPATH -m "$unix_path"`
41413    HOTSPOT_RC="$windows_path"
41414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41415    windows_path=`cmd //c echo $unix_path`
41416    HOTSPOT_RC="$windows_path"
41417  fi
41418
41419
41420
41421  else
41422    HOTSPOT_CXX="$CXX"
41423    HOTSPOT_LD="$LD"
41424  fi
41425
41426
41427
41428  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41429    USE_CLANG=true
41430  fi
41431
41432
41433
41434
41435
41436  # The package path is used only on macosx?
41437  # FIXME: clean this up, and/or move it elsewhere.
41438  PACKAGE_PATH=/opt/local
41439
41440
41441  # Check for extra potential brokenness.
41442  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41443    # On Windows, double-check that we got the right compiler.
41444    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41445    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41446    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41447      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41448        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
41449      fi
41450    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41451      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41452        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41453      fi
41454    fi
41455  fi
41456
41457  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41458    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41459    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41460    # This is later checked when setting flags.
41461
41462    # "-Og" suppported for GCC 4.8 and later
41463    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41464
41465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41466$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41467  supports=yes
41468
41469  saved_cflags="$CFLAGS"
41470  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41471  ac_ext=c
41472ac_cpp='$CPP $CPPFLAGS'
41473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41475ac_compiler_gnu=$ac_cv_c_compiler_gnu
41476
41477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41478/* end confdefs.h.  */
41479int i;
41480_ACEOF
41481if ac_fn_c_try_compile "$LINENO"; then :
41482
41483else
41484  supports=no
41485fi
41486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41487  ac_ext=cpp
41488ac_cpp='$CXXCPP $CPPFLAGS'
41489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41492
41493  CFLAGS="$saved_cflags"
41494
41495  saved_cxxflags="$CXXFLAGS"
41496  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41497  ac_ext=cpp
41498ac_cpp='$CXXCPP $CPPFLAGS'
41499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41502
41503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41504/* end confdefs.h.  */
41505int i;
41506_ACEOF
41507if ac_fn_cxx_try_compile "$LINENO"; then :
41508
41509else
41510  supports=no
41511fi
41512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41513  ac_ext=cpp
41514ac_cpp='$CXXCPP $CPPFLAGS'
41515ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41516ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41517ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41518
41519  CXXFLAGS="$saved_cxxflags"
41520
41521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41522$as_echo "$supports" >&6; }
41523  if test "x$supports" = "xyes" ; then
41524    HAS_CFLAG_OPTIMIZE_DEBUG=true
41525  else
41526    HAS_CFLAG_OPTIMIZE_DEBUG=false
41527  fi
41528
41529
41530    # "-z relro" supported in GNU binutils 2.17 and later
41531    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41532
41533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41534$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41535  supports=yes
41536
41537  saved_ldflags="$LDFLAGS"
41538  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41539  ac_ext=c
41540ac_cpp='$CPP $CPPFLAGS'
41541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41543ac_compiler_gnu=$ac_cv_c_compiler_gnu
41544
41545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41546/* end confdefs.h.  */
41547
41548int
41549main ()
41550{
41551
41552  ;
41553  return 0;
41554}
41555_ACEOF
41556if ac_fn_c_try_link "$LINENO"; then :
41557
41558else
41559  supports=no
41560fi
41561rm -f core conftest.err conftest.$ac_objext \
41562    conftest$ac_exeext conftest.$ac_ext
41563  ac_ext=cpp
41564ac_cpp='$CXXCPP $CPPFLAGS'
41565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41568
41569  LDFLAGS="$saved_ldflags"
41570
41571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41572$as_echo "$supports" >&6; }
41573  if test "x$supports" = "xyes" ; then
41574    HAS_LINKER_RELRO=true
41575  else
41576    HAS_LINKER_RELRO=false
41577  fi
41578
41579
41580    # "-z now" supported in GNU binutils 2.11 and later
41581    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41582
41583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41584$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41585  supports=yes
41586
41587  saved_ldflags="$LDFLAGS"
41588  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41589  ac_ext=c
41590ac_cpp='$CPP $CPPFLAGS'
41591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41593ac_compiler_gnu=$ac_cv_c_compiler_gnu
41594
41595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41596/* end confdefs.h.  */
41597
41598int
41599main ()
41600{
41601
41602  ;
41603  return 0;
41604}
41605_ACEOF
41606if ac_fn_c_try_link "$LINENO"; then :
41607
41608else
41609  supports=no
41610fi
41611rm -f core conftest.err conftest.$ac_objext \
41612    conftest$ac_exeext conftest.$ac_ext
41613  ac_ext=cpp
41614ac_cpp='$CXXCPP $CPPFLAGS'
41615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41618
41619  LDFLAGS="$saved_ldflags"
41620
41621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41622$as_echo "$supports" >&6; }
41623  if test "x$supports" = "xyes" ; then
41624    HAS_LINKER_NOW=true
41625  else
41626    HAS_LINKER_NOW=false
41627  fi
41628
41629  fi
41630
41631  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41632  # in executable.'
41633  USING_BROKEN_SUSE_LD=no
41634  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41636$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41637    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41638    $ECHO "int main() { }" > main.c
41639    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41641$as_echo "no" >&6; }
41642      USING_BROKEN_SUSE_LD=no
41643    else
41644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41645$as_echo "yes" >&6; }
41646      USING_BROKEN_SUSE_LD=yes
41647    fi
41648    rm -rf version-script.map main.c a.out
41649  fi
41650
41651
41652
41653# Setup the JTReg Regression Test Harness.
41654
41655
41656# Check whether --with-jtreg was given.
41657if test "${with_jtreg+set}" = set; then :
41658  withval=$with_jtreg;
41659else
41660  with_jtreg=no
41661fi
41662
41663
41664  if test "x$with_jtreg" = xno; then
41665    # jtreg disabled
41666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41667$as_echo_n "checking for jtreg... " >&6; }
41668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41669$as_echo "no" >&6; }
41670  else
41671    if test "x$with_jtreg" != xyes; then
41672      # with path specified.
41673      JT_HOME="$with_jtreg"
41674    fi
41675
41676    if test "x$JT_HOME" != x; then
41677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41678$as_echo_n "checking for jtreg... " >&6; }
41679
41680      # use JT_HOME enviroment var.
41681
41682  # Only process if variable expands to non-empty
41683
41684  if test "x$JT_HOME" != x; then
41685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41686
41687  # Input might be given as Windows format, start by converting to
41688  # unix format.
41689  path="$JT_HOME"
41690  new_path=`$CYGPATH -u "$path"`
41691
41692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41695  # "foo.exe" is OK but "foo" is an error.
41696  #
41697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41698  # It is also a way to make sure we got the proper file name for the real test later on.
41699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41700  if test "x$test_shortpath" = x; then
41701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41702$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41703    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41704  fi
41705
41706  # Call helper function which possibly converts this using DOS-style short mode.
41707  # If so, the updated path is stored in $new_path.
41708
41709  input_path="$new_path"
41710  # Check if we need to convert this using DOS-style short mode. If the path
41711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41712  # take no chances and rewrite it.
41713  # Note: m4 eats our [], so we need to use [ and ] instead.
41714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41715  if test "x$has_forbidden_chars" != x; then
41716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41720      # Going to short mode and back again did indeed matter. Since short mode is
41721      # case insensitive, let's make it lowercase to improve readability.
41722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41723      # Now convert it back to Unix-style (cygpath)
41724      input_path=`$CYGPATH -u "$shortmode_path"`
41725      new_path="$input_path"
41726    fi
41727  fi
41728
41729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41730  if test "x$test_cygdrive_prefix" = x; then
41731    # As a simple fix, exclude /usr/bin since it's not a real path.
41732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41734      # a path prefixed by /cygdrive for fixpath to work.
41735      new_path="$CYGWIN_ROOT_PATH$input_path"
41736    fi
41737  fi
41738
41739
41740  if test "x$path" != "x$new_path"; then
41741    JT_HOME="$new_path"
41742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41743$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41744  fi
41745
41746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41747
41748  path="$JT_HOME"
41749  has_colon=`$ECHO $path | $GREP ^.:`
41750  new_path="$path"
41751  if test "x$has_colon" = x; then
41752    # Not in mixed or Windows style, start by that.
41753    new_path=`cmd //c echo $path`
41754  fi
41755
41756
41757  input_path="$new_path"
41758  # Check if we need to convert this using DOS-style short mode. If the path
41759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41760  # take no chances and rewrite it.
41761  # Note: m4 eats our [], so we need to use [ and ] instead.
41762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41763  if test "x$has_forbidden_chars" != x; then
41764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41766  fi
41767
41768
41769  windows_path="$new_path"
41770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41771    unix_path=`$CYGPATH -u "$windows_path"`
41772    new_path="$unix_path"
41773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41775    new_path="$unix_path"
41776  fi
41777
41778  if test "x$path" != "x$new_path"; then
41779    JT_HOME="$new_path"
41780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41781$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41782  fi
41783
41784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41786
41787    else
41788      # We're on a unix platform. Hooray! :)
41789      path="$JT_HOME"
41790      has_space=`$ECHO "$path" | $GREP " "`
41791      if test "x$has_space" != x; then
41792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41793$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41795      fi
41796
41797      # Use eval to expand a potential ~
41798      eval path="$path"
41799      if test ! -f "$path" && test ! -d "$path"; then
41800        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41801      fi
41802
41803      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41804    fi
41805  fi
41806
41807
41808      # jtreg win32 script works for everybody
41809      JTREGEXE="$JT_HOME/bin/jtreg"
41810
41811      if test ! -f "$JTREGEXE"; then
41812        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41813      fi
41814
41815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41816$as_echo "$JTREGEXE" >&6; }
41817    else
41818      # try to find jtreg on path
41819
41820
41821
41822  # Publish this variable in the help.
41823
41824
41825  if [ -z "${JTREGEXE+x}" ]; then
41826    # The variable is not set by user, try to locate tool using the code snippet
41827    for ac_prog in jtreg
41828do
41829  # Extract the first word of "$ac_prog", so it can be a program name with args.
41830set dummy $ac_prog; ac_word=$2
41831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41832$as_echo_n "checking for $ac_word... " >&6; }
41833if ${ac_cv_path_JTREGEXE+:} false; then :
41834  $as_echo_n "(cached) " >&6
41835else
41836  case $JTREGEXE in
41837  [\\/]* | ?:[\\/]*)
41838  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41839  ;;
41840  *)
41841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41842for as_dir in $PATH
41843do
41844  IFS=$as_save_IFS
41845  test -z "$as_dir" && as_dir=.
41846    for ac_exec_ext in '' $ac_executable_extensions; do
41847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41848    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41850    break 2
41851  fi
41852done
41853  done
41854IFS=$as_save_IFS
41855
41856  ;;
41857esac
41858fi
41859JTREGEXE=$ac_cv_path_JTREGEXE
41860if test -n "$JTREGEXE"; then
41861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41862$as_echo "$JTREGEXE" >&6; }
41863else
41864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41865$as_echo "no" >&6; }
41866fi
41867
41868
41869  test -n "$JTREGEXE" && break
41870done
41871
41872  else
41873    # The variable is set, but is it from the command line or the environment?
41874
41875    # Try to remove the string !JTREGEXE! from our list.
41876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41878      # If it failed, the variable was not from the command line. Ignore it,
41879      # but warn the user (except for BASH, which is always set by the calling BASH).
41880      if test "xJTREGEXE" != xBASH; then
41881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41882$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41883      fi
41884      # Try to locate tool using the code snippet
41885      for ac_prog in jtreg
41886do
41887  # Extract the first word of "$ac_prog", so it can be a program name with args.
41888set dummy $ac_prog; ac_word=$2
41889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41890$as_echo_n "checking for $ac_word... " >&6; }
41891if ${ac_cv_path_JTREGEXE+:} false; then :
41892  $as_echo_n "(cached) " >&6
41893else
41894  case $JTREGEXE in
41895  [\\/]* | ?:[\\/]*)
41896  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41897  ;;
41898  *)
41899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41900for as_dir in $PATH
41901do
41902  IFS=$as_save_IFS
41903  test -z "$as_dir" && as_dir=.
41904    for ac_exec_ext in '' $ac_executable_extensions; do
41905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41906    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41908    break 2
41909  fi
41910done
41911  done
41912IFS=$as_save_IFS
41913
41914  ;;
41915esac
41916fi
41917JTREGEXE=$ac_cv_path_JTREGEXE
41918if test -n "$JTREGEXE"; then
41919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41920$as_echo "$JTREGEXE" >&6; }
41921else
41922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41923$as_echo "no" >&6; }
41924fi
41925
41926
41927  test -n "$JTREGEXE" && break
41928done
41929
41930    else
41931      # If it succeeded, then it was overridden by the user. We will use it
41932      # for the tool.
41933
41934      # First remove it from the list of overridden variables, so we can test
41935      # for unknown variables in the end.
41936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41937
41938      # Check if we try to supply an empty value
41939      if test "x$JTREGEXE" = x; then
41940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
41941$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
41942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41943$as_echo_n "checking for JTREGEXE... " >&6; }
41944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41945$as_echo "disabled" >&6; }
41946      else
41947        # Check if the provided tool contains a complete path.
41948        tool_specified="$JTREGEXE"
41949        tool_basename="${tool_specified##*/}"
41950        if test "x$tool_basename" = "x$tool_specified"; then
41951          # A command without a complete path is provided, search $PATH.
41952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41953$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41954          # Extract the first word of "$tool_basename", so it can be a program name with args.
41955set dummy $tool_basename; ac_word=$2
41956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41957$as_echo_n "checking for $ac_word... " >&6; }
41958if ${ac_cv_path_JTREGEXE+:} false; then :
41959  $as_echo_n "(cached) " >&6
41960else
41961  case $JTREGEXE in
41962  [\\/]* | ?:[\\/]*)
41963  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41964  ;;
41965  *)
41966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41967for as_dir in $PATH
41968do
41969  IFS=$as_save_IFS
41970  test -z "$as_dir" && as_dir=.
41971    for ac_exec_ext in '' $ac_executable_extensions; do
41972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41973    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41975    break 2
41976  fi
41977done
41978  done
41979IFS=$as_save_IFS
41980
41981  ;;
41982esac
41983fi
41984JTREGEXE=$ac_cv_path_JTREGEXE
41985if test -n "$JTREGEXE"; then
41986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41987$as_echo "$JTREGEXE" >&6; }
41988else
41989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41990$as_echo "no" >&6; }
41991fi
41992
41993
41994          if test "x$JTREGEXE" = x; then
41995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41996          fi
41997        else
41998          # Otherwise we believe it is a complete path. Use it as it is.
41999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
42000$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
42001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
42002$as_echo_n "checking for JTREGEXE... " >&6; }
42003          if test ! -x "$tool_specified"; then
42004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42005$as_echo "not found" >&6; }
42006            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
42007          fi
42008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42009$as_echo "$tool_specified" >&6; }
42010        fi
42011      fi
42012    fi
42013  fi
42014
42015
42016
42017  if test "x$JTREGEXE" = x; then
42018    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
42019  fi
42020
42021
42022      JT_HOME="`$DIRNAME $JTREGEXE`"
42023    fi
42024  fi
42025
42026
42027
42028
42029
42030
42031  # Option used to tell the compiler whether to create 32- or 64-bit executables
42032  if test "x$TOOLCHAIN_TYPE" = xxlc; then
42033    COMPILER_TARGET_BITS_FLAG="-q"
42034  else
42035    COMPILER_TARGET_BITS_FLAG="-m"
42036  fi
42037
42038
42039  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
42040  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42041    ARFLAGS="-r"
42042  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42043    ARFLAGS="-X64"
42044  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
42045    # lib.exe is used as AR to create static libraries.
42046    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
42047  else
42048    ARFLAGS=""
42049  fi
42050
42051
42052  ## Setup strip.
42053  # FIXME: should this really be per platform, or should it be per toolchain type?
42054  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
42055  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
42056  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42057    STRIPFLAGS="-g"
42058  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
42059    STRIPFLAGS="-x"
42060  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
42061    STRIPFLAGS="-S"
42062  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42063    STRIPFLAGS="-X32_64"
42064  fi
42065
42066
42067
42068  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42069    CC_OUT_OPTION=-Fo
42070    EXE_OUT_OPTION=-out:
42071    LD_OUT_OPTION=-out:
42072    AR_OUT_OPTION=-out:
42073  else
42074    # The option used to specify the target .o,.a or .so file.
42075    # When compiling, how to specify the to be created object file.
42076    CC_OUT_OPTION='-o$(SPACE)'
42077    # When linking, how to specify the to be created executable.
42078    EXE_OUT_OPTION='-o$(SPACE)'
42079    # When linking, how to specify the to be created dynamically linkable library.
42080    LD_OUT_OPTION='-o$(SPACE)'
42081    # When archiving, how to specify the to be create static archive for object files.
42082    AR_OUT_OPTION='rcs$(SPACE)'
42083  fi
42084
42085
42086
42087
42088
42089  # On Windows, we need to set RC flags.
42090  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42091    RC_FLAGS="-nologo -l0x409"
42092    if test "x$VARIANT" = xOPT; then
42093      RC_FLAGS="$RC_FLAGS -DNDEBUG"
42094    fi
42095
42096    # The version variables used to create RC_FLAGS may be overridden
42097    # in a custom configure script, or possibly the command line.
42098    # Let those variables be expanded at make time in spec.gmk.
42099    # The \$ are escaped to the shell, and the $(...) variables
42100    # are evaluated by make.
42101    RC_FLAGS="$RC_FLAGS \
42102        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
42103        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
42104        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
42105        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
42106        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
42107        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
42108        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
42109  fi
42110
42111
42112  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42113    # silence copyright notice and other headers.
42114    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
42115  fi
42116
42117
42118# FIXME: Currently we must test this after toolchain but before flags. Fix!
42119
42120# Now we can test some aspects on the target using configure macros.
42121
42122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
42123$as_echo_n "checking for ANSI C header files... " >&6; }
42124if ${ac_cv_header_stdc+:} false; then :
42125  $as_echo_n "(cached) " >&6
42126else
42127  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42128/* end confdefs.h.  */
42129#include <stdlib.h>
42130#include <stdarg.h>
42131#include <string.h>
42132#include <float.h>
42133
42134int
42135main ()
42136{
42137
42138  ;
42139  return 0;
42140}
42141_ACEOF
42142if ac_fn_cxx_try_compile "$LINENO"; then :
42143  ac_cv_header_stdc=yes
42144else
42145  ac_cv_header_stdc=no
42146fi
42147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42148
42149if test $ac_cv_header_stdc = yes; then
42150  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
42151  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42152/* end confdefs.h.  */
42153#include <string.h>
42154
42155_ACEOF
42156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42157  $EGREP "memchr" >/dev/null 2>&1; then :
42158
42159else
42160  ac_cv_header_stdc=no
42161fi
42162rm -f conftest*
42163
42164fi
42165
42166if test $ac_cv_header_stdc = yes; then
42167  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
42168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42169/* end confdefs.h.  */
42170#include <stdlib.h>
42171
42172_ACEOF
42173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42174  $EGREP "free" >/dev/null 2>&1; then :
42175
42176else
42177  ac_cv_header_stdc=no
42178fi
42179rm -f conftest*
42180
42181fi
42182
42183if test $ac_cv_header_stdc = yes; then
42184  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
42185  if test "$cross_compiling" = yes; then :
42186  :
42187else
42188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42189/* end confdefs.h.  */
42190#include <ctype.h>
42191#include <stdlib.h>
42192#if ((' ' & 0x0FF) == 0x020)
42193# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
42194# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
42195#else
42196# define ISLOWER(c) \
42197		   (('a' <= (c) && (c) <= 'i') \
42198		     || ('j' <= (c) && (c) <= 'r') \
42199		     || ('s' <= (c) && (c) <= 'z'))
42200# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
42201#endif
42202
42203#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
42204int
42205main ()
42206{
42207  int i;
42208  for (i = 0; i < 256; i++)
42209    if (XOR (islower (i), ISLOWER (i))
42210	|| toupper (i) != TOUPPER (i))
42211      return 2;
42212  return 0;
42213}
42214_ACEOF
42215if ac_fn_cxx_try_run "$LINENO"; then :
42216
42217else
42218  ac_cv_header_stdc=no
42219fi
42220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42221  conftest.$ac_objext conftest.beam conftest.$ac_ext
42222fi
42223
42224fi
42225fi
42226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
42227$as_echo "$ac_cv_header_stdc" >&6; }
42228if test $ac_cv_header_stdc = yes; then
42229
42230$as_echo "#define STDC_HEADERS 1" >>confdefs.h
42231
42232fi
42233
42234# On IRIX 5.3, sys/types and inttypes.h are conflicting.
42235for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
42236		  inttypes.h stdint.h unistd.h
42237do :
42238  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42239ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
42240"
42241if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42242  cat >>confdefs.h <<_ACEOF
42243#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42244_ACEOF
42245
42246fi
42247
42248done
42249
42250
42251
42252  ###############################################################################
42253  #
42254  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
42255  # (The JVM can use 32 or 64 bit Java pointers but that decision
42256  # is made at runtime.)
42257  #
42258
42259  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
42260    # Always specify -m flag on Solaris
42261    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
42262
42263  # When we add flags to the "official" CFLAGS etc, we need to
42264  # keep track of these additions in ADDED_CFLAGS etc. These
42265  # will later be checked to make sure only controlled additions
42266  # have been made to CFLAGS etc.
42267  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42268  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42269  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42270
42271  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42272  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42273  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42274
42275  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42276  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42277  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42278
42279  elif test "x$COMPILE_TYPE" = xreduced; then
42280    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
42281      # Specify -m if running reduced on unix platforms
42282
42283  # When we add flags to the "official" CFLAGS etc, we need to
42284  # keep track of these additions in ADDED_CFLAGS etc. These
42285  # will later be checked to make sure only controlled additions
42286  # have been made to CFLAGS etc.
42287  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42288  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42289  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42290
42291  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42292  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42293  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42294
42295  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42296  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42297  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42298
42299    fi
42300  fi
42301
42302  # Make compilation sanity check
42303  for ac_header in stdio.h
42304do :
42305  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
42306if test "x$ac_cv_header_stdio_h" = xyes; then :
42307  cat >>confdefs.h <<_ACEOF
42308#define HAVE_STDIO_H 1
42309_ACEOF
42310
42311else
42312
42313    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42314$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42315    if test "x$COMPILE_TYPE" = xreduced; then
42316
42317  # Print a helpful message on how to acquire the necessary build dependency.
42318  # reduced is the help tag: freetype, cups, alsa etc
42319  MISSING_DEPENDENCY=reduced
42320
42321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42322    cygwin_help $MISSING_DEPENDENCY
42323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42324    msys_help $MISSING_DEPENDENCY
42325  else
42326    PKGHANDLER_COMMAND=
42327
42328    case $PKGHANDLER in
42329      apt-get)
42330        apt_help     $MISSING_DEPENDENCY ;;
42331      yum)
42332        yum_help     $MISSING_DEPENDENCY ;;
42333      port)
42334        port_help    $MISSING_DEPENDENCY ;;
42335      pkgutil)
42336        pkgutil_help $MISSING_DEPENDENCY ;;
42337      pkgadd)
42338        pkgadd_help  $MISSING_DEPENDENCY ;;
42339    esac
42340
42341    if test "x$PKGHANDLER_COMMAND" != x; then
42342      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42343    fi
42344  fi
42345
42346      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42347$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42348    elif test "x$COMPILE_TYPE" = xcross; then
42349      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42350$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42351    fi
42352    as_fn_error $? "Cannot continue." "$LINENO" 5
42353
42354fi
42355
42356done
42357
42358
42359  # The cast to long int works around a bug in the HP C Compiler
42360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42362# This bug is HP SR number 8606223364.
42363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42364$as_echo_n "checking size of int *... " >&6; }
42365if ${ac_cv_sizeof_int_p+:} false; then :
42366  $as_echo_n "(cached) " >&6
42367else
42368  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42369
42370else
42371  if test "$ac_cv_type_int_p" = yes; then
42372     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42374as_fn_error 77 "cannot compute sizeof (int *)
42375See \`config.log' for more details" "$LINENO" 5; }
42376   else
42377     ac_cv_sizeof_int_p=0
42378   fi
42379fi
42380
42381fi
42382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42383$as_echo "$ac_cv_sizeof_int_p" >&6; }
42384
42385
42386
42387cat >>confdefs.h <<_ACEOF
42388#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42389_ACEOF
42390
42391
42392
42393  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42394  if test "x$ac_cv_sizeof_int_p" = x; then
42395    # The test failed, lets stick to the assumed value.
42396    { $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
42397$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42398  else
42399    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42400
42401    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42402      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42403      # Let's try to implicitely set the compilers target architecture and retry the test
42404      { $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
42405$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;}
42406      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
42407$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
42408
42409  # When we add flags to the "official" CFLAGS etc, we need to
42410  # keep track of these additions in ADDED_CFLAGS etc. These
42411  # will later be checked to make sure only controlled additions
42412  # have been made to CFLAGS etc.
42413  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42414  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42415  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42416
42417  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42418  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42419  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42420
42421  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42422  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42423  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42424
42425
42426      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42427      unset ac_cv_sizeof_int_p
42428      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42429      cat >>confdefs.h <<_ACEOF
42430#undef SIZEOF_INT_P
42431_ACEOF
42432
42433      # The cast to long int works around a bug in the HP C Compiler
42434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42436# This bug is HP SR number 8606223364.
42437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42438$as_echo_n "checking size of int *... " >&6; }
42439if ${ac_cv_sizeof_int_p+:} false; then :
42440  $as_echo_n "(cached) " >&6
42441else
42442  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42443
42444else
42445  if test "$ac_cv_type_int_p" = yes; then
42446     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42448as_fn_error 77 "cannot compute sizeof (int *)
42449See \`config.log' for more details" "$LINENO" 5; }
42450   else
42451     ac_cv_sizeof_int_p=0
42452   fi
42453fi
42454
42455fi
42456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42457$as_echo "$ac_cv_sizeof_int_p" >&6; }
42458
42459
42460
42461cat >>confdefs.h <<_ACEOF
42462#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42463_ACEOF
42464
42465
42466
42467      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42468
42469      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42470        { $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
42471$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;}
42472        if test "x$COMPILE_TYPE" = xreduced; then
42473
42474  # Print a helpful message on how to acquire the necessary build dependency.
42475  # reduced is the help tag: freetype, cups, alsa etc
42476  MISSING_DEPENDENCY=reduced
42477
42478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42479    cygwin_help $MISSING_DEPENDENCY
42480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42481    msys_help $MISSING_DEPENDENCY
42482  else
42483    PKGHANDLER_COMMAND=
42484
42485    case $PKGHANDLER in
42486      apt-get)
42487        apt_help     $MISSING_DEPENDENCY ;;
42488      yum)
42489        yum_help     $MISSING_DEPENDENCY ;;
42490      port)
42491        port_help    $MISSING_DEPENDENCY ;;
42492      pkgutil)
42493        pkgutil_help $MISSING_DEPENDENCY ;;
42494      pkgadd)
42495        pkgadd_help  $MISSING_DEPENDENCY ;;
42496    esac
42497
42498    if test "x$PKGHANDLER_COMMAND" != x; then
42499      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42500    fi
42501  fi
42502
42503          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42504$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42505        elif test "x$COMPILE_TYPE" = xcross; then
42506          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42507$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42508        fi
42509        as_fn_error $? "Cannot continue." "$LINENO" 5
42510      fi
42511    fi
42512  fi
42513
42514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42515$as_echo_n "checking for target address size... " >&6; }
42516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42517$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42518
42519
42520  ###############################################################################
42521  #
42522  # Is the target little of big endian?
42523  #
42524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42525$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42526if ${ac_cv_c_bigendian+:} false; then :
42527  $as_echo_n "(cached) " >&6
42528else
42529  ac_cv_c_bigendian=unknown
42530    # See if we're dealing with a universal compiler.
42531    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42532/* end confdefs.h.  */
42533#ifndef __APPLE_CC__
42534	       not a universal capable compiler
42535	     #endif
42536	     typedef int dummy;
42537
42538_ACEOF
42539if ac_fn_cxx_try_compile "$LINENO"; then :
42540
42541	# Check for potential -arch flags.  It is not universal unless
42542	# there are at least two -arch flags with different values.
42543	ac_arch=
42544	ac_prev=
42545	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42546	 if test -n "$ac_prev"; then
42547	   case $ac_word in
42548	     i?86 | x86_64 | ppc | ppc64)
42549	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42550		 ac_arch=$ac_word
42551	       else
42552		 ac_cv_c_bigendian=universal
42553		 break
42554	       fi
42555	       ;;
42556	   esac
42557	   ac_prev=
42558	 elif test "x$ac_word" = "x-arch"; then
42559	   ac_prev=arch
42560	 fi
42561       done
42562fi
42563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42564    if test $ac_cv_c_bigendian = unknown; then
42565      # See if sys/param.h defines the BYTE_ORDER macro.
42566      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42567/* end confdefs.h.  */
42568#include <sys/types.h>
42569	     #include <sys/param.h>
42570
42571int
42572main ()
42573{
42574#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42575		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42576		     && LITTLE_ENDIAN)
42577	      bogus endian macros
42578	     #endif
42579
42580  ;
42581  return 0;
42582}
42583_ACEOF
42584if ac_fn_cxx_try_compile "$LINENO"; then :
42585  # It does; now see whether it defined to BIG_ENDIAN or not.
42586	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42587/* end confdefs.h.  */
42588#include <sys/types.h>
42589		#include <sys/param.h>
42590
42591int
42592main ()
42593{
42594#if BYTE_ORDER != BIG_ENDIAN
42595		 not big endian
42596		#endif
42597
42598  ;
42599  return 0;
42600}
42601_ACEOF
42602if ac_fn_cxx_try_compile "$LINENO"; then :
42603  ac_cv_c_bigendian=yes
42604else
42605  ac_cv_c_bigendian=no
42606fi
42607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42608fi
42609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42610    fi
42611    if test $ac_cv_c_bigendian = unknown; then
42612      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42613      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42614/* end confdefs.h.  */
42615#include <limits.h>
42616
42617int
42618main ()
42619{
42620#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42621	      bogus endian macros
42622	     #endif
42623
42624  ;
42625  return 0;
42626}
42627_ACEOF
42628if ac_fn_cxx_try_compile "$LINENO"; then :
42629  # It does; now see whether it defined to _BIG_ENDIAN or not.
42630	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42631/* end confdefs.h.  */
42632#include <limits.h>
42633
42634int
42635main ()
42636{
42637#ifndef _BIG_ENDIAN
42638		 not big endian
42639		#endif
42640
42641  ;
42642  return 0;
42643}
42644_ACEOF
42645if ac_fn_cxx_try_compile "$LINENO"; then :
42646  ac_cv_c_bigendian=yes
42647else
42648  ac_cv_c_bigendian=no
42649fi
42650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42651fi
42652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42653    fi
42654    if test $ac_cv_c_bigendian = unknown; then
42655      # Compile a test program.
42656      if test "$cross_compiling" = yes; then :
42657  # Try to guess by grepping values from an object file.
42658	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42659/* end confdefs.h.  */
42660short int ascii_mm[] =
42661		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42662		short int ascii_ii[] =
42663		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42664		int use_ascii (int i) {
42665		  return ascii_mm[i] + ascii_ii[i];
42666		}
42667		short int ebcdic_ii[] =
42668		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42669		short int ebcdic_mm[] =
42670		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42671		int use_ebcdic (int i) {
42672		  return ebcdic_mm[i] + ebcdic_ii[i];
42673		}
42674		extern int foo;
42675
42676int
42677main ()
42678{
42679return use_ascii (foo) == use_ebcdic (foo);
42680  ;
42681  return 0;
42682}
42683_ACEOF
42684if ac_fn_cxx_try_compile "$LINENO"; then :
42685  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42686	      ac_cv_c_bigendian=yes
42687	    fi
42688	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42689	      if test "$ac_cv_c_bigendian" = unknown; then
42690		ac_cv_c_bigendian=no
42691	      else
42692		# finding both strings is unlikely to happen, but who knows?
42693		ac_cv_c_bigendian=unknown
42694	      fi
42695	    fi
42696fi
42697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42698else
42699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42700/* end confdefs.h.  */
42701$ac_includes_default
42702int
42703main ()
42704{
42705
42706	     /* Are we little or big endian?  From Harbison&Steele.  */
42707	     union
42708	     {
42709	       long int l;
42710	       char c[sizeof (long int)];
42711	     } u;
42712	     u.l = 1;
42713	     return u.c[sizeof (long int) - 1] == 1;
42714
42715  ;
42716  return 0;
42717}
42718_ACEOF
42719if ac_fn_cxx_try_run "$LINENO"; then :
42720  ac_cv_c_bigendian=no
42721else
42722  ac_cv_c_bigendian=yes
42723fi
42724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42725  conftest.$ac_objext conftest.beam conftest.$ac_ext
42726fi
42727
42728    fi
42729fi
42730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42731$as_echo "$ac_cv_c_bigendian" >&6; }
42732 case $ac_cv_c_bigendian in #(
42733   yes)
42734     ENDIAN="big";; #(
42735   no)
42736     ENDIAN="little" ;; #(
42737   universal)
42738     ENDIAN="universal_endianness"
42739     ;; #(
42740   *)
42741     ENDIAN="unknown" ;;
42742 esac
42743
42744
42745  if test "x$ENDIAN" = xuniversal_endianness; then
42746    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42747  fi
42748  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42749    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
42750  fi
42751
42752
42753# Configure flags for the tools
42754
42755  ###############################################################################
42756  #
42757  # How to compile shared libraries.
42758  #
42759
42760  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42761    PICFLAG="-fPIC"
42762    C_FLAG_REORDER=''
42763    CXX_FLAG_REORDER=''
42764
42765    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42766      # Linking is different on MacOSX
42767      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42768      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42769      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42770      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42771      SET_SHARED_LIBRARY_MAPFILE=''
42772    else
42773      # Default works for linux, might work on other platforms as well.
42774      SHARED_LIBRARY_FLAGS='-shared'
42775      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42776      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42777      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42778      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42779    fi
42780  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42781    PICFLAG=''
42782    C_FLAG_REORDER=''
42783    CXX_FLAG_REORDER=''
42784
42785    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42786      # Linking is different on MacOSX
42787      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42788      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42789      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42790      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42791      SET_SHARED_LIBRARY_MAPFILE=''
42792    else
42793      # Default works for linux, might work on other platforms as well.
42794      SHARED_LIBRARY_FLAGS='-shared'
42795      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42796      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42797      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42798      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42799    fi
42800  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42801    PICFLAG="-KPIC"
42802    C_FLAG_REORDER='-xF'
42803    CXX_FLAG_REORDER='-xF'
42804    SHARED_LIBRARY_FLAGS="-G"
42805    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42806    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42807    SET_SHARED_LIBRARY_NAME=''
42808    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42809  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42810    PICFLAG="-qpic=large"
42811    C_FLAG_REORDER=''
42812    CXX_FLAG_REORDER=''
42813    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42814    SET_EXECUTABLE_ORIGIN=""
42815    SET_SHARED_LIBRARY_ORIGIN=''
42816    SET_SHARED_LIBRARY_NAME=''
42817    SET_SHARED_LIBRARY_MAPFILE=''
42818  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42819    PICFLAG=""
42820    C_FLAG_REORDER=''
42821    CXX_FLAG_REORDER=''
42822    SHARED_LIBRARY_FLAGS="-LD"
42823    SET_EXECUTABLE_ORIGIN=''
42824    SET_SHARED_LIBRARY_ORIGIN=''
42825    SET_SHARED_LIBRARY_NAME=''
42826    SET_SHARED_LIBRARY_MAPFILE=''
42827  fi
42828
42829
42830
42831
42832
42833
42834
42835
42836  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42837    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42838    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42839    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42840  fi
42841  # The (cross) compiler is now configured, we can now test capabilities
42842  # of the target platform.
42843
42844
42845
42846  ###############################################################################
42847  #
42848  # Setup the opt flags for different compilers
42849  # and different operating systems.
42850  #
42851
42852  # FIXME: this was indirectly the old default, but just inherited.
42853  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42854  #   C_FLAG_DEPS="-MMD -MF"
42855  # fi
42856
42857  # Generate make dependency files
42858  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42859    C_FLAG_DEPS="-MMD -MF"
42860  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42861    C_FLAG_DEPS="-MMD -MF"
42862  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42863    C_FLAG_DEPS="-xMMD -xMF"
42864  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42865    C_FLAG_DEPS="-qmakedep=gcc -MF"
42866  fi
42867  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42868
42869
42870
42871  # Debug symbols
42872  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42873    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42874      # reduce from default "-g2" option to save space
42875      CFLAGS_DEBUG_SYMBOLS="-g1"
42876      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42877    else
42878      CFLAGS_DEBUG_SYMBOLS="-g"
42879      CXXFLAGS_DEBUG_SYMBOLS="-g"
42880    fi
42881  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42882    CFLAGS_DEBUG_SYMBOLS="-g"
42883    CXXFLAGS_DEBUG_SYMBOLS="-g"
42884  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42885    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42886    # FIXME: likely a bug, this disables debug symbols rather than enables them
42887    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42888  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42889    CFLAGS_DEBUG_SYMBOLS="-g"
42890    CXXFLAGS_DEBUG_SYMBOLS="-g"
42891  fi
42892
42893
42894
42895  # bounds, memory and behavior checking options
42896  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42897    case $DEBUG_LEVEL in
42898    release )
42899      # no adjustment
42900      ;;
42901    fastdebug )
42902      # no adjustment
42903      ;;
42904    slowdebug )
42905      # Add runtime stack smashing and undefined behavior checks.
42906      # Not all versions of gcc support -fstack-protector
42907      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42908
42909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42910$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42911  supports=yes
42912
42913  saved_cflags="$CFLAGS"
42914  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42915  ac_ext=c
42916ac_cpp='$CPP $CPPFLAGS'
42917ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42918ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42919ac_compiler_gnu=$ac_cv_c_compiler_gnu
42920
42921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42922/* end confdefs.h.  */
42923int i;
42924_ACEOF
42925if ac_fn_c_try_compile "$LINENO"; then :
42926
42927else
42928  supports=no
42929fi
42930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42931  ac_ext=cpp
42932ac_cpp='$CXXCPP $CPPFLAGS'
42933ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42934ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42935ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42936
42937  CFLAGS="$saved_cflags"
42938
42939  saved_cxxflags="$CXXFLAGS"
42940  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42941  ac_ext=cpp
42942ac_cpp='$CXXCPP $CPPFLAGS'
42943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42946
42947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42948/* end confdefs.h.  */
42949int i;
42950_ACEOF
42951if ac_fn_cxx_try_compile "$LINENO"; then :
42952
42953else
42954  supports=no
42955fi
42956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42957  ac_ext=cpp
42958ac_cpp='$CXXCPP $CPPFLAGS'
42959ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42960ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42961ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42962
42963  CXXFLAGS="$saved_cxxflags"
42964
42965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42966$as_echo "$supports" >&6; }
42967  if test "x$supports" = "xyes" ; then
42968    :
42969  else
42970    STACK_PROTECTOR_CFLAG=""
42971  fi
42972
42973
42974      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42975      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42976      ;;
42977    esac
42978  fi
42979
42980  # Optimization levels
42981  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42982    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42983
42984    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42985      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42986      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42987      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42988      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42989      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42990      C_O_FLAG_NONE="-xregs=no%frameptr"
42991      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42992      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42993      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42994      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42995      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42996      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42997        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42998        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42999      fi
43000    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43001      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
43002      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
43003      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
43004      C_O_FLAG_DEBUG=""
43005      C_O_FLAG_NONE=""
43006      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
43007      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
43008      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
43009      C_O_FLAG_DEBUG=""
43010      CXX_O_FLAG_NONE=""
43011    fi
43012  else
43013    # The remaining toolchains share opt flags between CC and CXX;
43014    # setup for C and duplicate afterwards.
43015    if test "x$TOOLCHAIN_TYPE" = xgcc; then
43016      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43017        # On MacOSX we optimize for size, something
43018        # we should do for all platforms?
43019        C_O_FLAG_HIGHEST="-Os"
43020        C_O_FLAG_HI="-Os"
43021        C_O_FLAG_NORM="-Os"
43022      else
43023        C_O_FLAG_HIGHEST="-O3"
43024        C_O_FLAG_HI="-O3"
43025        C_O_FLAG_NORM="-O2"
43026      fi
43027      C_O_FLAG_DEBUG="-O0"
43028      C_O_FLAG_NONE="-O0"
43029    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43030      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43031        # On MacOSX we optimize for size, something
43032        # we should do for all platforms?
43033        C_O_FLAG_HIGHEST="-Os"
43034        C_O_FLAG_HI="-Os"
43035        C_O_FLAG_NORM="-Os"
43036      else
43037        C_O_FLAG_HIGHEST="-O3"
43038        C_O_FLAG_HI="-O3"
43039        C_O_FLAG_NORM="-O2"
43040      fi
43041      C_O_FLAG_DEBUG="-O0"
43042      C_O_FLAG_NONE="-O0"
43043    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43044      C_O_FLAG_HIGHEST="-O3"
43045      C_O_FLAG_HI="-O3 -qstrict"
43046      C_O_FLAG_NORM="-O2"
43047      C_O_FLAG_DEBUG="-qnoopt"
43048      C_O_FLAG_NONE="-qnoop"
43049    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43050      C_O_FLAG_HIGHEST="-O2"
43051      C_O_FLAG_HI="-O1"
43052      C_O_FLAG_NORM="-O1"
43053      C_O_FLAG_DEBUG="-Od"
43054      C_O_FLAG_NONE="-Od"
43055    fi
43056    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
43057    CXX_O_FLAG_HI="$C_O_FLAG_HI"
43058    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
43059    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
43060    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
43061  fi
43062
43063  # Adjust optimization flags according to debug level.
43064  case $DEBUG_LEVEL in
43065    release )
43066      # no adjustment
43067      ;;
43068    fastdebug )
43069      # Not quite so much optimization
43070      C_O_FLAG_HI="$C_O_FLAG_NORM"
43071      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
43072      ;;
43073    slowdebug )
43074      # Disable optimization
43075      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
43076      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
43077      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
43078      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
43079      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
43080      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
43081      ;;
43082  esac
43083
43084
43085
43086
43087
43088
43089
43090
43091
43092
43093
43094
43095
43096  # Special extras...
43097  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43098    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43099      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43100      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43101    fi
43102    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43103    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43104  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43105    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43106    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43107  fi
43108
43109  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
43110  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
43111  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
43112
43113  ###############################################################################
43114  #
43115  # Now setup the CFLAGS and LDFLAGS for the JDK build.
43116  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
43117  #
43118
43119  # Setup compiler/platform specific flags into
43120  #    CFLAGS_JDK    - C Compiler flags
43121  #    CXXFLAGS_JDK  - C++ Compiler flags
43122  #    COMMON_CCXXFLAGS_JDK - common to C and C++
43123  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43124    if test "x$OPENJDK_TARGET_CPU" = xx86; then
43125      # Force compatibility with i586 on 32 bit intel platforms.
43126      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
43127    fi
43128    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
43129        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
43130    case $OPENJDK_TARGET_CPU_ARCH in
43131      arm )
43132        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43133        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43134        ;;
43135      ppc )
43136        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43137        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43138        ;;
43139      * )
43140        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
43141        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43142        ;;
43143    esac
43144  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43145    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
43146    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
43147      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
43148    fi
43149
43150    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
43151    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
43152  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43153    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43154    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43155  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43156    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
43157        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
43158        -DWIN32_LEAN_AND_MEAN \
43159        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
43160        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
43161        -DWIN32 -DIAL"
43162    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43163      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
43164    else
43165      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
43166    fi
43167    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
43168    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
43169    # studio.
43170    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
43171      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43172          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
43173    fi
43174  fi
43175
43176  ###############################################################################
43177
43178  # Adjust flags according to debug level.
43179  case $DEBUG_LEVEL in
43180    fastdebug | slowdebug )
43181      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
43182      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
43183      JAVAC_FLAGS="$JAVAC_FLAGS -g"
43184      ;;
43185    release )
43186      ;;
43187    * )
43188      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43189      ;;
43190  esac
43191
43192  # Setup LP64
43193  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
43194
43195  # Set some common defines. These works for all compilers, but assume
43196  # -D is universally accepted.
43197
43198  # Setup endianness
43199  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
43200    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
43201    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
43202    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
43203    #   Note: -Dmacro         is the same as    #define macro 1
43204    #         -Dmacro=        is the same as    #define macro
43205    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43206      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
43207    else
43208      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
43209    fi
43210  else
43211    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
43212    # are defined in the system?
43213    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43214      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
43215    else
43216      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
43217    fi
43218  fi
43219
43220  # Setup target OS define. Use OS target name but in upper case.
43221  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
43222  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
43223
43224  # Setup target CPU
43225  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
43226
43227  # Setup debug/release defines
43228  if test "x$DEBUG_LEVEL" = xrelease; then
43229    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
43230    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43231      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
43232    fi
43233  else
43234    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
43235  fi
43236
43237  # Setup release name
43238  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
43239
43240
43241  # Set some additional per-OS defines.
43242  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43243    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
43244  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43245    # FIXME: PPC64 should not be here.
43246    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
43247  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
43248    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
43249  fi
43250
43251  # Additional macosx handling
43252  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43253    # Setting these parameters makes it an error to link to macosx APIs that are
43254    # newer than the given OS version and makes the linked binaries compatible
43255    # even if built on a newer version of the OS.
43256    # The expected format is X.Y.Z
43257    MACOSX_VERSION_MIN=10.7.0
43258
43259
43260    # The macro takes the version with no dots, ex: 1070
43261    # Let the flags variables get resolved in make for easier override on make
43262    # command line.
43263    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43264    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43265  fi
43266
43267  # Setup some hard coded includes
43268  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43269      -I${JDK_TOPDIR}/src/java.base/share/native/include \
43270      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43271      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
43272
43273  # The shared libraries are compiled using the picflag.
43274  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43275  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43276
43277  # Executable flags
43278  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43279  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43280
43281
43282
43283
43284
43285
43286  # Flags for compiling test libraries
43287  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43288  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43289
43290  # Flags for compiling test executables
43291  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43292  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43293
43294
43295
43296
43297
43298
43299  # Setup LDFLAGS et al.
43300  #
43301
43302  # Now this is odd. The JDK native libraries have to link against libjvm.so
43303  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
43304  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
43305  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
43306  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
43307  # libraries will link to whatever is in memory. Yuck.
43308  #
43309  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
43310  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43311    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
43312    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43313      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
43314    fi
43315    # TODO: make -debug optional "--disable-full-debug-symbols"
43316    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
43317  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43318    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43319    # We have previously set HAS_GNU_HASH if this is the case
43320    if test -n "$HAS_GNU_HASH"; then
43321      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
43322    fi
43323    if test "x$OPENJDK_TARGET_OS" = xlinux; then
43324      # And since we now know that the linker is gnu, then add -z defs, to forbid
43325      # undefined symbols in object files.
43326      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
43327      case $DEBUG_LEVEL in
43328        release )
43329          # tell linker to optimize libraries.
43330          # Should this be supplied to the OSS linker as well?
43331          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
43332          ;;
43333        slowdebug )
43334          if test "x$HAS_LINKER_NOW" = "xtrue"; then
43335            # do relocations at load
43336            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
43337            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
43338          fi
43339          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43340            # mark relocations read only
43341            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43342            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43343          fi
43344          ;;
43345        fastdebug )
43346          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43347            # mark relocations read only
43348            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43349            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43350          fi
43351          ;;
43352        * )
43353          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43354          ;;
43355        esac
43356    fi
43357  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43358    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43359    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43360  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43361    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
43362  fi
43363
43364  # Customize LDFLAGS for executables
43365
43366  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43367
43368  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43369    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43370      LDFLAGS_STACK_SIZE=1048576
43371    else
43372      LDFLAGS_STACK_SIZE=327680
43373    fi
43374    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43375  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43376    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43377  fi
43378
43379  # Customize LDFLAGS for libs
43380  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43381
43382  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43383    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43384    LDFLAGS_JDKLIB_SUFFIX=""
43385  else
43386    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43387        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43388
43389    # On some platforms (mac) the linker warns about non existing -L dirs.
43390    # Add server first if available. Linking aginst client does not always produce the same results.
43391    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43392    # Default to server for other variants.
43393    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43394      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43395    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43396      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43397    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43398      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43399    else
43400      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43401    fi
43402
43403    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43404    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43405      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43406    fi
43407  fi
43408
43409
43410
43411
43412
43413
43414
43415  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
43416  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
43417  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
43418  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
43419
43420
43421
43422
43423
43424
43425
43426  # Some Zero and Shark settings.
43427  # ZERO_ARCHFLAG tells the compiler which mode to build for
43428  case "${OPENJDK_TARGET_CPU}" in
43429    s390)
43430      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43431      ;;
43432    *)
43433      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43434  esac
43435
43436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43437$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43438  supports=yes
43439
43440  saved_cflags="$CFLAGS"
43441  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43442  ac_ext=c
43443ac_cpp='$CPP $CPPFLAGS'
43444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43446ac_compiler_gnu=$ac_cv_c_compiler_gnu
43447
43448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43449/* end confdefs.h.  */
43450int i;
43451_ACEOF
43452if ac_fn_c_try_compile "$LINENO"; then :
43453
43454else
43455  supports=no
43456fi
43457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43458  ac_ext=cpp
43459ac_cpp='$CXXCPP $CPPFLAGS'
43460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43463
43464  CFLAGS="$saved_cflags"
43465
43466  saved_cxxflags="$CXXFLAGS"
43467  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43468  ac_ext=cpp
43469ac_cpp='$CXXCPP $CPPFLAGS'
43470ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43471ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43472ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43473
43474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43475/* end confdefs.h.  */
43476int i;
43477_ACEOF
43478if ac_fn_cxx_try_compile "$LINENO"; then :
43479
43480else
43481  supports=no
43482fi
43483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43484  ac_ext=cpp
43485ac_cpp='$CXXCPP $CPPFLAGS'
43486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43489
43490  CXXFLAGS="$saved_cxxflags"
43491
43492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43493$as_echo "$supports" >&6; }
43494  if test "x$supports" = "xyes" ; then
43495    :
43496  else
43497    ZERO_ARCHFLAG=""
43498  fi
43499
43500
43501
43502  # Check that the compiler supports -mX (or -qX on AIX) flags
43503  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43504
43505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43506$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43507  supports=yes
43508
43509  saved_cflags="$CFLAGS"
43510  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43511  ac_ext=c
43512ac_cpp='$CPP $CPPFLAGS'
43513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43515ac_compiler_gnu=$ac_cv_c_compiler_gnu
43516
43517  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43518/* end confdefs.h.  */
43519int i;
43520_ACEOF
43521if ac_fn_c_try_compile "$LINENO"; then :
43522
43523else
43524  supports=no
43525fi
43526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43527  ac_ext=cpp
43528ac_cpp='$CXXCPP $CPPFLAGS'
43529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43532
43533  CFLAGS="$saved_cflags"
43534
43535  saved_cxxflags="$CXXFLAGS"
43536  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43537  ac_ext=cpp
43538ac_cpp='$CXXCPP $CPPFLAGS'
43539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43542
43543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43544/* end confdefs.h.  */
43545int i;
43546_ACEOF
43547if ac_fn_cxx_try_compile "$LINENO"; then :
43548
43549else
43550  supports=no
43551fi
43552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43553  ac_ext=cpp
43554ac_cpp='$CXXCPP $CPPFLAGS'
43555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43558
43559  CXXFLAGS="$saved_cxxflags"
43560
43561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43562$as_echo "$supports" >&6; }
43563  if test "x$supports" = "xyes" ; then
43564    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43565  else
43566    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43567  fi
43568
43569
43570
43571  # Check whether --enable-warnings-as-errors was given.
43572if test "${enable_warnings_as_errors+set}" = set; then :
43573  enableval=$enable_warnings_as_errors;
43574fi
43575
43576
43577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43578$as_echo_n "checking if native warnings are errors... " >&6; }
43579  if test "x$enable_warnings_as_errors" = "xyes"; then
43580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43581$as_echo "yes (explicitely set)" >&6; }
43582    WARNINGS_AS_ERRORS=true
43583  elif test "x$enable_warnings_as_errors" = "xno"; then
43584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43585$as_echo "no" >&6; }
43586    WARNINGS_AS_ERRORS=false
43587  elif test "x$enable_warnings_as_errors" = "x"; then
43588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43589$as_echo "yes (default)" >&6; }
43590    WARNINGS_AS_ERRORS=true
43591  else
43592    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43593  fi
43594
43595
43596  case "${TOOLCHAIN_TYPE}" in
43597    microsoft)
43598      DISABLE_WARNING_PREFIX="-wd"
43599      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43600      ;;
43601    solstudio)
43602      DISABLE_WARNING_PREFIX="-erroff="
43603      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43604      ;;
43605    gcc)
43606      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43607
43608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43609$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43610  supports=yes
43611
43612  saved_cflags="$CFLAGS"
43613  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43614  ac_ext=c
43615ac_cpp='$CPP $CPPFLAGS'
43616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43618ac_compiler_gnu=$ac_cv_c_compiler_gnu
43619
43620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43621/* end confdefs.h.  */
43622int i;
43623_ACEOF
43624if ac_fn_c_try_compile "$LINENO"; then :
43625
43626else
43627  supports=no
43628fi
43629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43630  ac_ext=cpp
43631ac_cpp='$CXXCPP $CPPFLAGS'
43632ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43633ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43634ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43635
43636  CFLAGS="$saved_cflags"
43637
43638  saved_cxxflags="$CXXFLAGS"
43639  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43640  ac_ext=cpp
43641ac_cpp='$CXXCPP $CPPFLAGS'
43642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43645
43646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43647/* end confdefs.h.  */
43648int i;
43649_ACEOF
43650if ac_fn_cxx_try_compile "$LINENO"; then :
43651
43652else
43653  supports=no
43654fi
43655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43656  ac_ext=cpp
43657ac_cpp='$CXXCPP $CPPFLAGS'
43658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43661
43662  CXXFLAGS="$saved_cxxflags"
43663
43664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43665$as_echo "$supports" >&6; }
43666  if test "x$supports" = "xyes" ; then
43667    GCC_CAN_DISABLE_WARNINGS=true
43668  else
43669    GCC_CAN_DISABLE_WARNINGS=false
43670
43671  fi
43672
43673      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43674        DISABLE_WARNING_PREFIX="-Wno-"
43675      else
43676        DISABLE_WARNING_PREFIX=
43677      fi
43678      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43679      ;;
43680    clang)
43681      DISABLE_WARNING_PREFIX="-Wno-"
43682      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43683      ;;
43684  esac
43685
43686
43687
43688
43689# Setup debug symbols (need objcopy from the toolchain for that)
43690
43691  #
43692  # ENABLE_DEBUG_SYMBOLS
43693  # This must be done after the toolchain is setup, since we're looking at objcopy.
43694  #
43695  # Check whether --enable-debug-symbols was given.
43696if test "${enable_debug_symbols+set}" = set; then :
43697  enableval=$enable_debug_symbols;
43698fi
43699
43700
43701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43702$as_echo_n "checking if we should generate debug symbols... " >&6; }
43703
43704  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43705    # explicit enabling of enable-debug-symbols and can't find objcopy
43706    #   this is an error
43707    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43708  fi
43709
43710  if test "x$enable_debug_symbols" = "xyes"; then
43711    ENABLE_DEBUG_SYMBOLS=true
43712  elif test "x$enable_debug_symbols" = "xno"; then
43713    ENABLE_DEBUG_SYMBOLS=false
43714  else
43715    # Default is on if objcopy is found
43716    if test "x$OBJCOPY" != x; then
43717      ENABLE_DEBUG_SYMBOLS=true
43718    # MacOS X and Windows don't use objcopy but default is on for those OSes
43719    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43720      ENABLE_DEBUG_SYMBOLS=true
43721    else
43722      ENABLE_DEBUG_SYMBOLS=false
43723    fi
43724  fi
43725
43726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43727$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43728
43729  #
43730  # ZIP_DEBUGINFO_FILES
43731  #
43732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43733$as_echo_n "checking if we should zip debug-info files... " >&6; }
43734  # Check whether --enable-zip-debug-info was given.
43735if test "${enable_zip_debug_info+set}" = set; then :
43736  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43737else
43738  enable_zip_debug_info="yes"
43739fi
43740
43741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43742$as_echo "${enable_zip_debug_info}" >&6; }
43743
43744  if test "x${enable_zip_debug_info}" = "xno"; then
43745    ZIP_DEBUGINFO_FILES=false
43746  else
43747    ZIP_DEBUGINFO_FILES=true
43748  fi
43749
43750
43751
43752
43753
43754  # Check whether --enable-native-coverage was given.
43755if test "${enable_native_coverage+set}" = set; then :
43756  enableval=$enable_native_coverage;
43757fi
43758
43759  GCOV_ENABLED="false"
43760  if test "x$enable_native_coverage" = "xyes"; then
43761    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43763$as_echo_n "checking if native coverage is enabled... " >&6; }
43764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43765$as_echo "yes" >&6; }
43766      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43767      GCOV_LDFLAGS="-fprofile-arcs"
43768      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43769      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43770      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43771      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43772      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43773      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43774      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43775      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43776      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43777      GCOV_ENABLED="true"
43778    else
43779      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43780    fi
43781  elif test "x$enable_native_coverage" = "xno"; then
43782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43783$as_echo_n "checking if native coverage is enabled... " >&6; }
43784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43785$as_echo "no" >&6; }
43786  elif test "x$enable_native_coverage" != "x"; then
43787    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43788  fi
43789
43790
43791
43792
43793###############################################################################
43794#
43795# Check dependencies for external and internal libraries.
43796#
43797###############################################################################
43798
43799# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43800
43801  # When using cygwin or msys, we need a wrapper binary that renames
43802  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43803  # @files and rewrites these too! This wrapper binary is
43804  # called fixpath.
43805  FIXPATH=
43806  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43808$as_echo_n "checking if fixpath can be created... " >&6; }
43809    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43810    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43811    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43812    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43813      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43814      FIXPATH="$FIXPATH_BIN -c"
43815    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43816      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43817      # @ was chosen as separator to minimize risk of other tools messing around with it
43818      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43819          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43820      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43821      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43822    fi
43823    FIXPATH_SRC_W="$FIXPATH_SRC"
43824    FIXPATH_BIN_W="$FIXPATH_BIN"
43825
43826  unix_path="$FIXPATH_SRC_W"
43827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43828    windows_path=`$CYGPATH -m "$unix_path"`
43829    FIXPATH_SRC_W="$windows_path"
43830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43831    windows_path=`cmd //c echo $unix_path`
43832    FIXPATH_SRC_W="$windows_path"
43833  fi
43834
43835
43836  unix_path="$FIXPATH_BIN_W"
43837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43838    windows_path=`$CYGPATH -m "$unix_path"`
43839    FIXPATH_BIN_W="$windows_path"
43840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43841    windows_path=`cmd //c echo $unix_path`
43842    FIXPATH_BIN_W="$windows_path"
43843  fi
43844
43845    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43846    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43847    cd $FIXPATH_DIR
43848    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43849    cd $CURDIR
43850
43851    if test ! -x $FIXPATH_BIN; then
43852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43853$as_echo "no" >&6; }
43854      cat $FIXPATH_DIR/fixpath1.log
43855      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43856    fi
43857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43858$as_echo "yes" >&6; }
43859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43860$as_echo_n "checking if fixpath.exe works... " >&6; }
43861    cd $FIXPATH_DIR
43862    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43863        > $FIXPATH_DIR/fixpath2.log 2>&1
43864    cd $CURDIR
43865    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43867$as_echo "no" >&6; }
43868      cat $FIXPATH_DIR/fixpath2.log
43869      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43870    fi
43871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43872$as_echo "yes" >&6; }
43873  fi
43874
43875
43876
43877
43878
43879  # Check if X11 is needed
43880  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
43881    # No X11 support on windows or macosx
43882    NEEDS_LIB_X11=false
43883  else
43884    if test "x$SUPPORT_HEADFUL" = xno; then
43885      # No X11 support if building headless-only
43886      NEEDS_LIB_X11=false
43887    else
43888      # All other instances need X11
43889      NEEDS_LIB_X11=true
43890    fi
43891  fi
43892
43893  # Check if cups is needed
43894  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43895    # Windows have a separate print system
43896    NEEDS_LIB_CUPS=false
43897  else
43898    NEEDS_LIB_CUPS=true
43899  fi
43900
43901  # Check if freetype is needed
43902  if test "x$OPENJDK" = "xtrue"; then
43903    NEEDS_LIB_FREETYPE=true
43904  else
43905    NEEDS_LIB_FREETYPE=false
43906  fi
43907
43908  # Check if alsa is needed
43909  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43910    NEEDS_LIB_ALSA=true
43911  else
43912    NEEDS_LIB_ALSA=false
43913  fi
43914
43915  # Check if ffi is needed
43916  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
43917    NEEDS_LIB_FFI=true
43918  else
43919    NEEDS_LIB_FFI=false
43920  fi
43921
43922
43923  # statically link libstdc++ before C++ ABI is stablized on Linux unless
43924  # dynamic build is configured on command line.
43925
43926# Check whether --with-stdc++lib was given.
43927if test "${with_stdc__lib+set}" = set; then :
43928  withval=$with_stdc__lib;
43929        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
43930                && test "x$with_stdc__lib" != xdefault; then
43931          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
43932        fi
43933
43934else
43935  with_stdc__lib=default
43936
43937fi
43938
43939
43940  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43941    # Test if -lstdc++ works.
43942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
43943$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
43944    ac_ext=cpp
43945ac_cpp='$CXXCPP $CPPFLAGS'
43946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43949
43950    OLD_CXXFLAGS="$CXXFLAGS"
43951    CXXFLAGS="$CXXFLAGS -lstdc++"
43952    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43953/* end confdefs.h.  */
43954
43955int
43956main ()
43957{
43958return 0;
43959  ;
43960  return 0;
43961}
43962_ACEOF
43963if ac_fn_cxx_try_link "$LINENO"; then :
43964  has_dynamic_libstdcxx=yes
43965else
43966  has_dynamic_libstdcxx=no
43967fi
43968rm -f core conftest.err conftest.$ac_objext \
43969    conftest$ac_exeext conftest.$ac_ext
43970    CXXFLAGS="$OLD_CXXFLAGS"
43971    ac_ext=cpp
43972ac_cpp='$CXXCPP $CPPFLAGS'
43973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43976
43977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
43978$as_echo "$has_dynamic_libstdcxx" >&6; }
43979
43980    # Test if stdc++ can be linked statically.
43981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
43982$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
43983    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
43984    ac_ext=cpp
43985ac_cpp='$CXXCPP $CPPFLAGS'
43986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43989
43990    OLD_LIBS="$LIBS"
43991    OLD_CXX="$CXX"
43992    LIBS="$STATIC_STDCXX_FLAGS"
43993    CXX="$CC"
43994    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43995/* end confdefs.h.  */
43996
43997int
43998main ()
43999{
44000return 0;
44001  ;
44002  return 0;
44003}
44004_ACEOF
44005if ac_fn_cxx_try_link "$LINENO"; then :
44006  has_static_libstdcxx=yes
44007else
44008  has_static_libstdcxx=no
44009fi
44010rm -f core conftest.err conftest.$ac_objext \
44011    conftest$ac_exeext conftest.$ac_ext
44012    LIBS="$OLD_LIBS"
44013    CXX="$OLD_CXX"
44014    ac_ext=cpp
44015ac_cpp='$CXXCPP $CPPFLAGS'
44016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44019
44020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
44021$as_echo "$has_static_libstdcxx" >&6; }
44022
44023    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
44024      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
44025    fi
44026
44027    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
44028      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
44029    fi
44030
44031    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
44032      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
44033    fi
44034
44035    # If dynamic was requested, it's available since it would fail above otherwise.
44036    # If dynamic wasn't requested, go with static unless it isn't available.
44037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
44038$as_echo_n "checking how to link with libstdc++... " >&6; }
44039    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
44040      LIBCXX="$LIBCXX -lstdc++"
44041      LDCXX="$CXX"
44042      STATIC_CXX_SETTING="STATIC_CXX=false"
44043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
44044$as_echo "dynamic" >&6; }
44045    else
44046      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
44047      LDCXX="$CC"
44048      STATIC_CXX_SETTING="STATIC_CXX=true"
44049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
44050$as_echo "static" >&6; }
44051    fi
44052  fi
44053
44054
44055  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
44056  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
44057    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
44058  fi
44059
44060  # TODO better (platform agnostic) test
44061  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
44062    LIBCXX="-lstdc++"
44063  fi
44064
44065
44066  # Setup Windows runtime dlls
44067  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
44068
44069
44070# Check whether --with-msvcr-dll was given.
44071if test "${with_msvcr_dll+set}" = set; then :
44072  withval=$with_msvcr_dll;
44073fi
44074
44075
44076  if test "x$with_msvcr_dll" != x; then
44077    # If given explicitely by user, do not probe. If not present, fail directly.
44078
44079  DLL_NAME="$MSVCR_NAME"
44080  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
44081  METHOD="--with-msvcr-dll"
44082  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44084$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44085
44086    # Need to check if the found msvcr is correct architecture
44087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44088$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44089    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44091      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44092      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44093      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44094        CORRECT_MSVCR_ARCH="PE32 executable"
44095      else
44096        CORRECT_MSVCR_ARCH="PE32+ executable"
44097      fi
44098    else
44099      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44100        CORRECT_MSVCR_ARCH=386
44101      else
44102        CORRECT_MSVCR_ARCH=x86-64
44103      fi
44104    fi
44105    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44107$as_echo "ok" >&6; }
44108      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44109
44110  # Only process if variable expands to non-empty
44111
44112  if test "x$MSVC_DLL" != x; then
44113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44114
44115  # Input might be given as Windows format, start by converting to
44116  # unix format.
44117  path="$MSVC_DLL"
44118  new_path=`$CYGPATH -u "$path"`
44119
44120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44123  # "foo.exe" is OK but "foo" is an error.
44124  #
44125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44126  # It is also a way to make sure we got the proper file name for the real test later on.
44127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44128  if test "x$test_shortpath" = x; then
44129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44130$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44131    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44132  fi
44133
44134  # Call helper function which possibly converts this using DOS-style short mode.
44135  # If so, the updated path is stored in $new_path.
44136
44137  input_path="$new_path"
44138  # Check if we need to convert this using DOS-style short mode. If the path
44139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44140  # take no chances and rewrite it.
44141  # Note: m4 eats our [], so we need to use [ and ] instead.
44142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44143  if test "x$has_forbidden_chars" != x; then
44144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44148      # Going to short mode and back again did indeed matter. Since short mode is
44149      # case insensitive, let's make it lowercase to improve readability.
44150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44151      # Now convert it back to Unix-style (cygpath)
44152      input_path=`$CYGPATH -u "$shortmode_path"`
44153      new_path="$input_path"
44154    fi
44155  fi
44156
44157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44158  if test "x$test_cygdrive_prefix" = x; then
44159    # As a simple fix, exclude /usr/bin since it's not a real path.
44160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44162      # a path prefixed by /cygdrive for fixpath to work.
44163      new_path="$CYGWIN_ROOT_PATH$input_path"
44164    fi
44165  fi
44166
44167
44168  if test "x$path" != "x$new_path"; then
44169    MSVC_DLL="$new_path"
44170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44171$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44172  fi
44173
44174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44175
44176  path="$MSVC_DLL"
44177  has_colon=`$ECHO $path | $GREP ^.:`
44178  new_path="$path"
44179  if test "x$has_colon" = x; then
44180    # Not in mixed or Windows style, start by that.
44181    new_path=`cmd //c echo $path`
44182  fi
44183
44184
44185  input_path="$new_path"
44186  # Check if we need to convert this using DOS-style short mode. If the path
44187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44188  # take no chances and rewrite it.
44189  # Note: m4 eats our [], so we need to use [ and ] instead.
44190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44191  if test "x$has_forbidden_chars" != x; then
44192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44194  fi
44195
44196
44197  windows_path="$new_path"
44198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44199    unix_path=`$CYGPATH -u "$windows_path"`
44200    new_path="$unix_path"
44201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44203    new_path="$unix_path"
44204  fi
44205
44206  if test "x$path" != "x$new_path"; then
44207    MSVC_DLL="$new_path"
44208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44209$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44210  fi
44211
44212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44214
44215    else
44216      # We're on a unix platform. Hooray! :)
44217      path="$MSVC_DLL"
44218      has_space=`$ECHO "$path" | $GREP " "`
44219      if test "x$has_space" != x; then
44220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44223      fi
44224
44225      # Use eval to expand a potential ~
44226      eval path="$path"
44227      if test ! -f "$path" && test ! -d "$path"; then
44228        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44229      fi
44230
44231      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44232    fi
44233  fi
44234
44235      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44236$as_echo_n "checking for $DLL_NAME... " >&6; }
44237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44238$as_echo "$MSVC_DLL" >&6; }
44239    else
44240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44241$as_echo "incorrect, ignoring" >&6; }
44242      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44243$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44244    fi
44245  fi
44246
44247    if test "x$MSVC_DLL" = x; then
44248      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
44249    fi
44250    MSVCR_DLL="$MSVC_DLL"
44251  elif test "x$DEVKIT_MSVCR_DLL" != x; then
44252
44253  DLL_NAME="$MSVCR_NAME"
44254  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
44255  METHOD="devkit"
44256  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44258$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44259
44260    # Need to check if the found msvcr is correct architecture
44261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44262$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44263    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44265      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44266      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44267      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44268        CORRECT_MSVCR_ARCH="PE32 executable"
44269      else
44270        CORRECT_MSVCR_ARCH="PE32+ executable"
44271      fi
44272    else
44273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44274        CORRECT_MSVCR_ARCH=386
44275      else
44276        CORRECT_MSVCR_ARCH=x86-64
44277      fi
44278    fi
44279    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44281$as_echo "ok" >&6; }
44282      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44283
44284  # Only process if variable expands to non-empty
44285
44286  if test "x$MSVC_DLL" != x; then
44287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44288
44289  # Input might be given as Windows format, start by converting to
44290  # unix format.
44291  path="$MSVC_DLL"
44292  new_path=`$CYGPATH -u "$path"`
44293
44294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44297  # "foo.exe" is OK but "foo" is an error.
44298  #
44299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44300  # It is also a way to make sure we got the proper file name for the real test later on.
44301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44302  if test "x$test_shortpath" = x; then
44303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44305    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44306  fi
44307
44308  # Call helper function which possibly converts this using DOS-style short mode.
44309  # If so, the updated path is stored in $new_path.
44310
44311  input_path="$new_path"
44312  # Check if we need to convert this using DOS-style short mode. If the path
44313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44314  # take no chances and rewrite it.
44315  # Note: m4 eats our [], so we need to use [ and ] instead.
44316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44317  if test "x$has_forbidden_chars" != x; then
44318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44322      # Going to short mode and back again did indeed matter. Since short mode is
44323      # case insensitive, let's make it lowercase to improve readability.
44324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44325      # Now convert it back to Unix-style (cygpath)
44326      input_path=`$CYGPATH -u "$shortmode_path"`
44327      new_path="$input_path"
44328    fi
44329  fi
44330
44331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44332  if test "x$test_cygdrive_prefix" = x; then
44333    # As a simple fix, exclude /usr/bin since it's not a real path.
44334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44336      # a path prefixed by /cygdrive for fixpath to work.
44337      new_path="$CYGWIN_ROOT_PATH$input_path"
44338    fi
44339  fi
44340
44341
44342  if test "x$path" != "x$new_path"; then
44343    MSVC_DLL="$new_path"
44344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44345$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44346  fi
44347
44348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44349
44350  path="$MSVC_DLL"
44351  has_colon=`$ECHO $path | $GREP ^.:`
44352  new_path="$path"
44353  if test "x$has_colon" = x; then
44354    # Not in mixed or Windows style, start by that.
44355    new_path=`cmd //c echo $path`
44356  fi
44357
44358
44359  input_path="$new_path"
44360  # Check if we need to convert this using DOS-style short mode. If the path
44361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44362  # take no chances and rewrite it.
44363  # Note: m4 eats our [], so we need to use [ and ] instead.
44364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44365  if test "x$has_forbidden_chars" != x; then
44366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44368  fi
44369
44370
44371  windows_path="$new_path"
44372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44373    unix_path=`$CYGPATH -u "$windows_path"`
44374    new_path="$unix_path"
44375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44377    new_path="$unix_path"
44378  fi
44379
44380  if test "x$path" != "x$new_path"; then
44381    MSVC_DLL="$new_path"
44382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44384  fi
44385
44386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44388
44389    else
44390      # We're on a unix platform. Hooray! :)
44391      path="$MSVC_DLL"
44392      has_space=`$ECHO "$path" | $GREP " "`
44393      if test "x$has_space" != x; then
44394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44397      fi
44398
44399      # Use eval to expand a potential ~
44400      eval path="$path"
44401      if test ! -f "$path" && test ! -d "$path"; then
44402        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44403      fi
44404
44405      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44406    fi
44407  fi
44408
44409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44410$as_echo_n "checking for $DLL_NAME... " >&6; }
44411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44412$as_echo "$MSVC_DLL" >&6; }
44413    else
44414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44415$as_echo "incorrect, ignoring" >&6; }
44416      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44417$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44418    fi
44419  fi
44420
44421    if test "x$MSVC_DLL" = x; then
44422      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
44423    fi
44424    MSVCR_DLL="$MSVC_DLL"
44425  else
44426
44427  DLL_NAME="${MSVCR_NAME}"
44428  MSVC_DLL=
44429
44430  if test "x$MSVC_DLL" = x; then
44431    # Probe: Using well-known location from Visual Studio 10.0
44432    if test "x$VCINSTALLDIR" != x; then
44433      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
44434
44435  windows_path="$CYGWIN_VC_INSTALL_DIR"
44436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44437    unix_path=`$CYGPATH -u "$windows_path"`
44438    CYGWIN_VC_INSTALL_DIR="$unix_path"
44439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44441    CYGWIN_VC_INSTALL_DIR="$unix_path"
44442  fi
44443
44444      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44445        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44446      else
44447        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44448      fi
44449      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
44450
44451  DLL_NAME="$DLL_NAME"
44452  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44453  METHOD="well-known location in VCINSTALLDIR"
44454  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44455    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44456$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44457
44458    # Need to check if the found msvcr is correct architecture
44459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44460$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44461    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44463      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44464      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44465      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44466        CORRECT_MSVCR_ARCH="PE32 executable"
44467      else
44468        CORRECT_MSVCR_ARCH="PE32+ executable"
44469      fi
44470    else
44471      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44472        CORRECT_MSVCR_ARCH=386
44473      else
44474        CORRECT_MSVCR_ARCH=x86-64
44475      fi
44476    fi
44477    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44479$as_echo "ok" >&6; }
44480      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44481
44482  # Only process if variable expands to non-empty
44483
44484  if test "x$MSVC_DLL" != x; then
44485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44486
44487  # Input might be given as Windows format, start by converting to
44488  # unix format.
44489  path="$MSVC_DLL"
44490  new_path=`$CYGPATH -u "$path"`
44491
44492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44495  # "foo.exe" is OK but "foo" is an error.
44496  #
44497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44498  # It is also a way to make sure we got the proper file name for the real test later on.
44499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44500  if test "x$test_shortpath" = x; then
44501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44502$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44503    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44504  fi
44505
44506  # Call helper function which possibly converts this using DOS-style short mode.
44507  # If so, the updated path is stored in $new_path.
44508
44509  input_path="$new_path"
44510  # Check if we need to convert this using DOS-style short mode. If the path
44511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44512  # take no chances and rewrite it.
44513  # Note: m4 eats our [], so we need to use [ and ] instead.
44514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44515  if test "x$has_forbidden_chars" != x; then
44516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44520      # Going to short mode and back again did indeed matter. Since short mode is
44521      # case insensitive, let's make it lowercase to improve readability.
44522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44523      # Now convert it back to Unix-style (cygpath)
44524      input_path=`$CYGPATH -u "$shortmode_path"`
44525      new_path="$input_path"
44526    fi
44527  fi
44528
44529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44530  if test "x$test_cygdrive_prefix" = x; then
44531    # As a simple fix, exclude /usr/bin since it's not a real path.
44532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44534      # a path prefixed by /cygdrive for fixpath to work.
44535      new_path="$CYGWIN_ROOT_PATH$input_path"
44536    fi
44537  fi
44538
44539
44540  if test "x$path" != "x$new_path"; then
44541    MSVC_DLL="$new_path"
44542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44543$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44544  fi
44545
44546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44547
44548  path="$MSVC_DLL"
44549  has_colon=`$ECHO $path | $GREP ^.:`
44550  new_path="$path"
44551  if test "x$has_colon" = x; then
44552    # Not in mixed or Windows style, start by that.
44553    new_path=`cmd //c echo $path`
44554  fi
44555
44556
44557  input_path="$new_path"
44558  # Check if we need to convert this using DOS-style short mode. If the path
44559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44560  # take no chances and rewrite it.
44561  # Note: m4 eats our [], so we need to use [ and ] instead.
44562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44563  if test "x$has_forbidden_chars" != x; then
44564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44566  fi
44567
44568
44569  windows_path="$new_path"
44570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44571    unix_path=`$CYGPATH -u "$windows_path"`
44572    new_path="$unix_path"
44573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44575    new_path="$unix_path"
44576  fi
44577
44578  if test "x$path" != "x$new_path"; then
44579    MSVC_DLL="$new_path"
44580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44581$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44582  fi
44583
44584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44586
44587    else
44588      # We're on a unix platform. Hooray! :)
44589      path="$MSVC_DLL"
44590      has_space=`$ECHO "$path" | $GREP " "`
44591      if test "x$has_space" != x; then
44592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44593$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44595      fi
44596
44597      # Use eval to expand a potential ~
44598      eval path="$path"
44599      if test ! -f "$path" && test ! -d "$path"; then
44600        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44601      fi
44602
44603      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44604    fi
44605  fi
44606
44607      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44608$as_echo_n "checking for $DLL_NAME... " >&6; }
44609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44610$as_echo "$MSVC_DLL" >&6; }
44611    else
44612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44613$as_echo "incorrect, ignoring" >&6; }
44614      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44615$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44616    fi
44617  fi
44618
44619    fi
44620  fi
44621
44622  if test "x$MSVC_DLL" = x; then
44623    # Probe: Check in the Boot JDK directory.
44624    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
44625
44626  DLL_NAME="$DLL_NAME"
44627  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44628  METHOD="well-known location in Boot JDK"
44629  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44630    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44631$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44632
44633    # Need to check if the found msvcr is correct architecture
44634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44635$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44636    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44638      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44639      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44640      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44641        CORRECT_MSVCR_ARCH="PE32 executable"
44642      else
44643        CORRECT_MSVCR_ARCH="PE32+ executable"
44644      fi
44645    else
44646      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44647        CORRECT_MSVCR_ARCH=386
44648      else
44649        CORRECT_MSVCR_ARCH=x86-64
44650      fi
44651    fi
44652    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44654$as_echo "ok" >&6; }
44655      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44656
44657  # Only process if variable expands to non-empty
44658
44659  if test "x$MSVC_DLL" != x; then
44660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44661
44662  # Input might be given as Windows format, start by converting to
44663  # unix format.
44664  path="$MSVC_DLL"
44665  new_path=`$CYGPATH -u "$path"`
44666
44667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44670  # "foo.exe" is OK but "foo" is an error.
44671  #
44672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44673  # It is also a way to make sure we got the proper file name for the real test later on.
44674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44675  if test "x$test_shortpath" = x; then
44676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44677$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44678    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44679  fi
44680
44681  # Call helper function which possibly converts this using DOS-style short mode.
44682  # If so, the updated path is stored in $new_path.
44683
44684  input_path="$new_path"
44685  # Check if we need to convert this using DOS-style short mode. If the path
44686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44687  # take no chances and rewrite it.
44688  # Note: m4 eats our [], so we need to use [ and ] instead.
44689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44690  if test "x$has_forbidden_chars" != x; then
44691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44695      # Going to short mode and back again did indeed matter. Since short mode is
44696      # case insensitive, let's make it lowercase to improve readability.
44697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44698      # Now convert it back to Unix-style (cygpath)
44699      input_path=`$CYGPATH -u "$shortmode_path"`
44700      new_path="$input_path"
44701    fi
44702  fi
44703
44704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44705  if test "x$test_cygdrive_prefix" = x; then
44706    # As a simple fix, exclude /usr/bin since it's not a real path.
44707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44709      # a path prefixed by /cygdrive for fixpath to work.
44710      new_path="$CYGWIN_ROOT_PATH$input_path"
44711    fi
44712  fi
44713
44714
44715  if test "x$path" != "x$new_path"; then
44716    MSVC_DLL="$new_path"
44717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44718$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44719  fi
44720
44721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44722
44723  path="$MSVC_DLL"
44724  has_colon=`$ECHO $path | $GREP ^.:`
44725  new_path="$path"
44726  if test "x$has_colon" = x; then
44727    # Not in mixed or Windows style, start by that.
44728    new_path=`cmd //c echo $path`
44729  fi
44730
44731
44732  input_path="$new_path"
44733  # Check if we need to convert this using DOS-style short mode. If the path
44734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44735  # take no chances and rewrite it.
44736  # Note: m4 eats our [], so we need to use [ and ] instead.
44737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44738  if test "x$has_forbidden_chars" != x; then
44739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44741  fi
44742
44743
44744  windows_path="$new_path"
44745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746    unix_path=`$CYGPATH -u "$windows_path"`
44747    new_path="$unix_path"
44748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44750    new_path="$unix_path"
44751  fi
44752
44753  if test "x$path" != "x$new_path"; then
44754    MSVC_DLL="$new_path"
44755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44756$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44757  fi
44758
44759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44761
44762    else
44763      # We're on a unix platform. Hooray! :)
44764      path="$MSVC_DLL"
44765      has_space=`$ECHO "$path" | $GREP " "`
44766      if test "x$has_space" != x; then
44767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44768$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44770      fi
44771
44772      # Use eval to expand a potential ~
44773      eval path="$path"
44774      if test ! -f "$path" && test ! -d "$path"; then
44775        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44776      fi
44777
44778      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44779    fi
44780  fi
44781
44782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44783$as_echo_n "checking for $DLL_NAME... " >&6; }
44784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44785$as_echo "$MSVC_DLL" >&6; }
44786    else
44787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44788$as_echo "incorrect, ignoring" >&6; }
44789      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44790$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44791    fi
44792  fi
44793
44794  fi
44795
44796  if test "x$MSVC_DLL" = x; then
44797    # Probe: Look in the Windows system32 directory
44798    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
44799
44800  windows_path="$CYGWIN_SYSTEMROOT"
44801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44802    unix_path=`$CYGPATH -u "$windows_path"`
44803    CYGWIN_SYSTEMROOT="$unix_path"
44804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44806    CYGWIN_SYSTEMROOT="$unix_path"
44807  fi
44808
44809    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
44810
44811  DLL_NAME="$DLL_NAME"
44812  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44813  METHOD="well-known location in SYSTEMROOT"
44814  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44815    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44816$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44817
44818    # Need to check if the found msvcr is correct architecture
44819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44820$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44821    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44823      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44824      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44825      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44826        CORRECT_MSVCR_ARCH="PE32 executable"
44827      else
44828        CORRECT_MSVCR_ARCH="PE32+ executable"
44829      fi
44830    else
44831      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44832        CORRECT_MSVCR_ARCH=386
44833      else
44834        CORRECT_MSVCR_ARCH=x86-64
44835      fi
44836    fi
44837    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44839$as_echo "ok" >&6; }
44840      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44841
44842  # Only process if variable expands to non-empty
44843
44844  if test "x$MSVC_DLL" != x; then
44845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44846
44847  # Input might be given as Windows format, start by converting to
44848  # unix format.
44849  path="$MSVC_DLL"
44850  new_path=`$CYGPATH -u "$path"`
44851
44852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44855  # "foo.exe" is OK but "foo" is an error.
44856  #
44857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44858  # It is also a way to make sure we got the proper file name for the real test later on.
44859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44860  if test "x$test_shortpath" = x; then
44861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44862$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44863    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44864  fi
44865
44866  # Call helper function which possibly converts this using DOS-style short mode.
44867  # If so, the updated path is stored in $new_path.
44868
44869  input_path="$new_path"
44870  # Check if we need to convert this using DOS-style short mode. If the path
44871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44872  # take no chances and rewrite it.
44873  # Note: m4 eats our [], so we need to use [ and ] instead.
44874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44875  if test "x$has_forbidden_chars" != x; then
44876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44880      # Going to short mode and back again did indeed matter. Since short mode is
44881      # case insensitive, let's make it lowercase to improve readability.
44882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44883      # Now convert it back to Unix-style (cygpath)
44884      input_path=`$CYGPATH -u "$shortmode_path"`
44885      new_path="$input_path"
44886    fi
44887  fi
44888
44889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44890  if test "x$test_cygdrive_prefix" = x; then
44891    # As a simple fix, exclude /usr/bin since it's not a real path.
44892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44894      # a path prefixed by /cygdrive for fixpath to work.
44895      new_path="$CYGWIN_ROOT_PATH$input_path"
44896    fi
44897  fi
44898
44899
44900  if test "x$path" != "x$new_path"; then
44901    MSVC_DLL="$new_path"
44902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44903$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44904  fi
44905
44906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44907
44908  path="$MSVC_DLL"
44909  has_colon=`$ECHO $path | $GREP ^.:`
44910  new_path="$path"
44911  if test "x$has_colon" = x; then
44912    # Not in mixed or Windows style, start by that.
44913    new_path=`cmd //c echo $path`
44914  fi
44915
44916
44917  input_path="$new_path"
44918  # Check if we need to convert this using DOS-style short mode. If the path
44919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44920  # take no chances and rewrite it.
44921  # Note: m4 eats our [], so we need to use [ and ] instead.
44922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44923  if test "x$has_forbidden_chars" != x; then
44924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44926  fi
44927
44928
44929  windows_path="$new_path"
44930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44931    unix_path=`$CYGPATH -u "$windows_path"`
44932    new_path="$unix_path"
44933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44935    new_path="$unix_path"
44936  fi
44937
44938  if test "x$path" != "x$new_path"; then
44939    MSVC_DLL="$new_path"
44940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44941$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44942  fi
44943
44944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44946
44947    else
44948      # We're on a unix platform. Hooray! :)
44949      path="$MSVC_DLL"
44950      has_space=`$ECHO "$path" | $GREP " "`
44951      if test "x$has_space" != x; then
44952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44953$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44955      fi
44956
44957      # Use eval to expand a potential ~
44958      eval path="$path"
44959      if test ! -f "$path" && test ! -d "$path"; then
44960        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44961      fi
44962
44963      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44964    fi
44965  fi
44966
44967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44968$as_echo_n "checking for $DLL_NAME... " >&6; }
44969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44970$as_echo "$MSVC_DLL" >&6; }
44971    else
44972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44973$as_echo "incorrect, ignoring" >&6; }
44974      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44975$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44976    fi
44977  fi
44978
44979  fi
44980
44981  if test "x$MSVC_DLL" = x; then
44982    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
44983    if test "x$VS100COMNTOOLS" != x; then
44984      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
44985
44986  windows_path="$CYGWIN_VS_TOOLS_DIR"
44987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44988    unix_path=`$CYGPATH -u "$windows_path"`
44989    CYGWIN_VS_TOOLS_DIR="$unix_path"
44990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44992    CYGWIN_VS_TOOLS_DIR="$unix_path"
44993  fi
44994
44995      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44996        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
44997	    | $GREP -i /x64/ | $HEAD --lines 1`
44998      else
44999        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
45000	    | $GREP -i /x86/ | $HEAD --lines 1`
45001      fi
45002
45003  DLL_NAME="$DLL_NAME"
45004  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45005  METHOD="search of VS100COMNTOOLS"
45006  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45007    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45008$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45009
45010    # Need to check if the found msvcr is correct architecture
45011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45012$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45013    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45015      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45016      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45017      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45018        CORRECT_MSVCR_ARCH="PE32 executable"
45019      else
45020        CORRECT_MSVCR_ARCH="PE32+ executable"
45021      fi
45022    else
45023      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45024        CORRECT_MSVCR_ARCH=386
45025      else
45026        CORRECT_MSVCR_ARCH=x86-64
45027      fi
45028    fi
45029    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45031$as_echo "ok" >&6; }
45032      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45033
45034  # Only process if variable expands to non-empty
45035
45036  if test "x$MSVC_DLL" != x; then
45037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45038
45039  # Input might be given as Windows format, start by converting to
45040  # unix format.
45041  path="$MSVC_DLL"
45042  new_path=`$CYGPATH -u "$path"`
45043
45044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45047  # "foo.exe" is OK but "foo" is an error.
45048  #
45049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45050  # It is also a way to make sure we got the proper file name for the real test later on.
45051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45052  if test "x$test_shortpath" = x; then
45053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45054$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45055    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45056  fi
45057
45058  # Call helper function which possibly converts this using DOS-style short mode.
45059  # If so, the updated path is stored in $new_path.
45060
45061  input_path="$new_path"
45062  # Check if we need to convert this using DOS-style short mode. If the path
45063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45064  # take no chances and rewrite it.
45065  # Note: m4 eats our [], so we need to use [ and ] instead.
45066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45067  if test "x$has_forbidden_chars" != x; then
45068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45072      # Going to short mode and back again did indeed matter. Since short mode is
45073      # case insensitive, let's make it lowercase to improve readability.
45074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45075      # Now convert it back to Unix-style (cygpath)
45076      input_path=`$CYGPATH -u "$shortmode_path"`
45077      new_path="$input_path"
45078    fi
45079  fi
45080
45081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45082  if test "x$test_cygdrive_prefix" = x; then
45083    # As a simple fix, exclude /usr/bin since it's not a real path.
45084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45086      # a path prefixed by /cygdrive for fixpath to work.
45087      new_path="$CYGWIN_ROOT_PATH$input_path"
45088    fi
45089  fi
45090
45091
45092  if test "x$path" != "x$new_path"; then
45093    MSVC_DLL="$new_path"
45094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45095$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45096  fi
45097
45098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45099
45100  path="$MSVC_DLL"
45101  has_colon=`$ECHO $path | $GREP ^.:`
45102  new_path="$path"
45103  if test "x$has_colon" = x; then
45104    # Not in mixed or Windows style, start by that.
45105    new_path=`cmd //c echo $path`
45106  fi
45107
45108
45109  input_path="$new_path"
45110  # Check if we need to convert this using DOS-style short mode. If the path
45111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45112  # take no chances and rewrite it.
45113  # Note: m4 eats our [], so we need to use [ and ] instead.
45114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45115  if test "x$has_forbidden_chars" != x; then
45116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45118  fi
45119
45120
45121  windows_path="$new_path"
45122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45123    unix_path=`$CYGPATH -u "$windows_path"`
45124    new_path="$unix_path"
45125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45127    new_path="$unix_path"
45128  fi
45129
45130  if test "x$path" != "x$new_path"; then
45131    MSVC_DLL="$new_path"
45132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45133$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45134  fi
45135
45136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45138
45139    else
45140      # We're on a unix platform. Hooray! :)
45141      path="$MSVC_DLL"
45142      has_space=`$ECHO "$path" | $GREP " "`
45143      if test "x$has_space" != x; then
45144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45145$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45147      fi
45148
45149      # Use eval to expand a potential ~
45150      eval path="$path"
45151      if test ! -f "$path" && test ! -d "$path"; then
45152        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45153      fi
45154
45155      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45156    fi
45157  fi
45158
45159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45160$as_echo_n "checking for $DLL_NAME... " >&6; }
45161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45162$as_echo "$MSVC_DLL" >&6; }
45163    else
45164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45165$as_echo "incorrect, ignoring" >&6; }
45166      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45167$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45168    fi
45169  fi
45170
45171    fi
45172  fi
45173
45174  if test "x$MSVC_DLL" = x; then
45175    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
45176    # (This was the original behaviour; kept since it might turn something up)
45177    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
45178      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45179        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45180	    | $GREP x64 | $HEAD --lines 1`
45181      else
45182        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45183	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
45184        if test "x$POSSIBLE_MSVC_DLL" = x; then
45185          # We're grasping at straws now...
45186          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45187	      | $HEAD --lines 1`
45188        fi
45189      fi
45190
45191
45192  DLL_NAME="$DLL_NAME"
45193  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45194  METHOD="search of VCINSTALLDIR"
45195  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45196    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45197$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45198
45199    # Need to check if the found msvcr is correct architecture
45200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45201$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45202    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45204      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45205      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45206      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45207        CORRECT_MSVCR_ARCH="PE32 executable"
45208      else
45209        CORRECT_MSVCR_ARCH="PE32+ executable"
45210      fi
45211    else
45212      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45213        CORRECT_MSVCR_ARCH=386
45214      else
45215        CORRECT_MSVCR_ARCH=x86-64
45216      fi
45217    fi
45218    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45220$as_echo "ok" >&6; }
45221      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45222
45223  # Only process if variable expands to non-empty
45224
45225  if test "x$MSVC_DLL" != x; then
45226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45227
45228  # Input might be given as Windows format, start by converting to
45229  # unix format.
45230  path="$MSVC_DLL"
45231  new_path=`$CYGPATH -u "$path"`
45232
45233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45236  # "foo.exe" is OK but "foo" is an error.
45237  #
45238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45239  # It is also a way to make sure we got the proper file name for the real test later on.
45240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45241  if test "x$test_shortpath" = x; then
45242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45243$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45244    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45245  fi
45246
45247  # Call helper function which possibly converts this using DOS-style short mode.
45248  # If so, the updated path is stored in $new_path.
45249
45250  input_path="$new_path"
45251  # Check if we need to convert this using DOS-style short mode. If the path
45252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45253  # take no chances and rewrite it.
45254  # Note: m4 eats our [], so we need to use [ and ] instead.
45255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45256  if test "x$has_forbidden_chars" != x; then
45257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45261      # Going to short mode and back again did indeed matter. Since short mode is
45262      # case insensitive, let's make it lowercase to improve readability.
45263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45264      # Now convert it back to Unix-style (cygpath)
45265      input_path=`$CYGPATH -u "$shortmode_path"`
45266      new_path="$input_path"
45267    fi
45268  fi
45269
45270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45271  if test "x$test_cygdrive_prefix" = x; then
45272    # As a simple fix, exclude /usr/bin since it's not a real path.
45273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45275      # a path prefixed by /cygdrive for fixpath to work.
45276      new_path="$CYGWIN_ROOT_PATH$input_path"
45277    fi
45278  fi
45279
45280
45281  if test "x$path" != "x$new_path"; then
45282    MSVC_DLL="$new_path"
45283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45284$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45285  fi
45286
45287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45288
45289  path="$MSVC_DLL"
45290  has_colon=`$ECHO $path | $GREP ^.:`
45291  new_path="$path"
45292  if test "x$has_colon" = x; then
45293    # Not in mixed or Windows style, start by that.
45294    new_path=`cmd //c echo $path`
45295  fi
45296
45297
45298  input_path="$new_path"
45299  # Check if we need to convert this using DOS-style short mode. If the path
45300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45301  # take no chances and rewrite it.
45302  # Note: m4 eats our [], so we need to use [ and ] instead.
45303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45304  if test "x$has_forbidden_chars" != x; then
45305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45307  fi
45308
45309
45310  windows_path="$new_path"
45311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45312    unix_path=`$CYGPATH -u "$windows_path"`
45313    new_path="$unix_path"
45314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45316    new_path="$unix_path"
45317  fi
45318
45319  if test "x$path" != "x$new_path"; then
45320    MSVC_DLL="$new_path"
45321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45322$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45323  fi
45324
45325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45327
45328    else
45329      # We're on a unix platform. Hooray! :)
45330      path="$MSVC_DLL"
45331      has_space=`$ECHO "$path" | $GREP " "`
45332      if test "x$has_space" != x; then
45333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45334$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45336      fi
45337
45338      # Use eval to expand a potential ~
45339      eval path="$path"
45340      if test ! -f "$path" && test ! -d "$path"; then
45341        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45342      fi
45343
45344      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45345    fi
45346  fi
45347
45348      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45349$as_echo_n "checking for $DLL_NAME... " >&6; }
45350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45351$as_echo "$MSVC_DLL" >&6; }
45352    else
45353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45354$as_echo "incorrect, ignoring" >&6; }
45355      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45356$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45357    fi
45358  fi
45359
45360    fi
45361  fi
45362
45363  if test "x$MSVC_DLL" = x; then
45364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45365$as_echo_n "checking for $DLL_NAME... " >&6; }
45366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45367$as_echo "no" >&6; }
45368    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
45369  fi
45370
45371    MSVCR_DLL="$MSVC_DLL"
45372  fi
45373
45374
45375
45376# Check whether --with-msvcp-dll was given.
45377if test "${with_msvcp_dll+set}" = set; then :
45378  withval=$with_msvcp_dll;
45379fi
45380
45381
45382  if test "x$MSVCP_NAME" != "x"; then
45383    if test "x$with_msvcp_dll" != x; then
45384      # If given explicitely by user, do not probe. If not present, fail directly.
45385
45386  DLL_NAME="$MSVCP_NAME"
45387  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
45388  METHOD="--with-msvcp-dll"
45389  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45391$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45392
45393    # Need to check if the found msvcr is correct architecture
45394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45395$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45396    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45398      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45399      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45401        CORRECT_MSVCR_ARCH="PE32 executable"
45402      else
45403        CORRECT_MSVCR_ARCH="PE32+ executable"
45404      fi
45405    else
45406      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45407        CORRECT_MSVCR_ARCH=386
45408      else
45409        CORRECT_MSVCR_ARCH=x86-64
45410      fi
45411    fi
45412    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45414$as_echo "ok" >&6; }
45415      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45416
45417  # Only process if variable expands to non-empty
45418
45419  if test "x$MSVC_DLL" != x; then
45420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45421
45422  # Input might be given as Windows format, start by converting to
45423  # unix format.
45424  path="$MSVC_DLL"
45425  new_path=`$CYGPATH -u "$path"`
45426
45427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45430  # "foo.exe" is OK but "foo" is an error.
45431  #
45432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45433  # It is also a way to make sure we got the proper file name for the real test later on.
45434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45435  if test "x$test_shortpath" = x; then
45436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45437$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45438    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45439  fi
45440
45441  # Call helper function which possibly converts this using DOS-style short mode.
45442  # If so, the updated path is stored in $new_path.
45443
45444  input_path="$new_path"
45445  # Check if we need to convert this using DOS-style short mode. If the path
45446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45447  # take no chances and rewrite it.
45448  # Note: m4 eats our [], so we need to use [ and ] instead.
45449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45450  if test "x$has_forbidden_chars" != x; then
45451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45455      # Going to short mode and back again did indeed matter. Since short mode is
45456      # case insensitive, let's make it lowercase to improve readability.
45457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45458      # Now convert it back to Unix-style (cygpath)
45459      input_path=`$CYGPATH -u "$shortmode_path"`
45460      new_path="$input_path"
45461    fi
45462  fi
45463
45464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45465  if test "x$test_cygdrive_prefix" = x; then
45466    # As a simple fix, exclude /usr/bin since it's not a real path.
45467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45469      # a path prefixed by /cygdrive for fixpath to work.
45470      new_path="$CYGWIN_ROOT_PATH$input_path"
45471    fi
45472  fi
45473
45474
45475  if test "x$path" != "x$new_path"; then
45476    MSVC_DLL="$new_path"
45477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45478$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45479  fi
45480
45481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45482
45483  path="$MSVC_DLL"
45484  has_colon=`$ECHO $path | $GREP ^.:`
45485  new_path="$path"
45486  if test "x$has_colon" = x; then
45487    # Not in mixed or Windows style, start by that.
45488    new_path=`cmd //c echo $path`
45489  fi
45490
45491
45492  input_path="$new_path"
45493  # Check if we need to convert this using DOS-style short mode. If the path
45494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45495  # take no chances and rewrite it.
45496  # Note: m4 eats our [], so we need to use [ and ] instead.
45497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45498  if test "x$has_forbidden_chars" != x; then
45499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45501  fi
45502
45503
45504  windows_path="$new_path"
45505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45506    unix_path=`$CYGPATH -u "$windows_path"`
45507    new_path="$unix_path"
45508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45510    new_path="$unix_path"
45511  fi
45512
45513  if test "x$path" != "x$new_path"; then
45514    MSVC_DLL="$new_path"
45515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45516$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45517  fi
45518
45519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45521
45522    else
45523      # We're on a unix platform. Hooray! :)
45524      path="$MSVC_DLL"
45525      has_space=`$ECHO "$path" | $GREP " "`
45526      if test "x$has_space" != x; then
45527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45528$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45530      fi
45531
45532      # Use eval to expand a potential ~
45533      eval path="$path"
45534      if test ! -f "$path" && test ! -d "$path"; then
45535        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45536      fi
45537
45538      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45539    fi
45540  fi
45541
45542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45543$as_echo_n "checking for $DLL_NAME... " >&6; }
45544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45545$as_echo "$MSVC_DLL" >&6; }
45546    else
45547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45548$as_echo "incorrect, ignoring" >&6; }
45549      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45550$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45551    fi
45552  fi
45553
45554      if test "x$MSVC_DLL" = x; then
45555        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
45556      fi
45557      MSVCP_DLL="$MSVC_DLL"
45558    elif test "x$DEVKIT_MSVCP_DLL" != x; then
45559
45560  DLL_NAME="$MSVCP_NAME"
45561  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
45562  METHOD="devkit"
45563  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45564    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45565$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45566
45567    # Need to check if the found msvcr is correct architecture
45568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45569$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45570    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45572      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45573      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45574      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45575        CORRECT_MSVCR_ARCH="PE32 executable"
45576      else
45577        CORRECT_MSVCR_ARCH="PE32+ executable"
45578      fi
45579    else
45580      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45581        CORRECT_MSVCR_ARCH=386
45582      else
45583        CORRECT_MSVCR_ARCH=x86-64
45584      fi
45585    fi
45586    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45588$as_echo "ok" >&6; }
45589      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45590
45591  # Only process if variable expands to non-empty
45592
45593  if test "x$MSVC_DLL" != x; then
45594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45595
45596  # Input might be given as Windows format, start by converting to
45597  # unix format.
45598  path="$MSVC_DLL"
45599  new_path=`$CYGPATH -u "$path"`
45600
45601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45604  # "foo.exe" is OK but "foo" is an error.
45605  #
45606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45607  # It is also a way to make sure we got the proper file name for the real test later on.
45608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45609  if test "x$test_shortpath" = x; then
45610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45612    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45613  fi
45614
45615  # Call helper function which possibly converts this using DOS-style short mode.
45616  # If so, the updated path is stored in $new_path.
45617
45618  input_path="$new_path"
45619  # Check if we need to convert this using DOS-style short mode. If the path
45620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45621  # take no chances and rewrite it.
45622  # Note: m4 eats our [], so we need to use [ and ] instead.
45623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45624  if test "x$has_forbidden_chars" != x; then
45625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45629      # Going to short mode and back again did indeed matter. Since short mode is
45630      # case insensitive, let's make it lowercase to improve readability.
45631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45632      # Now convert it back to Unix-style (cygpath)
45633      input_path=`$CYGPATH -u "$shortmode_path"`
45634      new_path="$input_path"
45635    fi
45636  fi
45637
45638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45639  if test "x$test_cygdrive_prefix" = x; then
45640    # As a simple fix, exclude /usr/bin since it's not a real path.
45641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45643      # a path prefixed by /cygdrive for fixpath to work.
45644      new_path="$CYGWIN_ROOT_PATH$input_path"
45645    fi
45646  fi
45647
45648
45649  if test "x$path" != "x$new_path"; then
45650    MSVC_DLL="$new_path"
45651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45652$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45653  fi
45654
45655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45656
45657  path="$MSVC_DLL"
45658  has_colon=`$ECHO $path | $GREP ^.:`
45659  new_path="$path"
45660  if test "x$has_colon" = x; then
45661    # Not in mixed or Windows style, start by that.
45662    new_path=`cmd //c echo $path`
45663  fi
45664
45665
45666  input_path="$new_path"
45667  # Check if we need to convert this using DOS-style short mode. If the path
45668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45669  # take no chances and rewrite it.
45670  # Note: m4 eats our [], so we need to use [ and ] instead.
45671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45672  if test "x$has_forbidden_chars" != x; then
45673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45675  fi
45676
45677
45678  windows_path="$new_path"
45679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45680    unix_path=`$CYGPATH -u "$windows_path"`
45681    new_path="$unix_path"
45682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45684    new_path="$unix_path"
45685  fi
45686
45687  if test "x$path" != "x$new_path"; then
45688    MSVC_DLL="$new_path"
45689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45690$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45691  fi
45692
45693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45695
45696    else
45697      # We're on a unix platform. Hooray! :)
45698      path="$MSVC_DLL"
45699      has_space=`$ECHO "$path" | $GREP " "`
45700      if test "x$has_space" != x; then
45701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45702$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45704      fi
45705
45706      # Use eval to expand a potential ~
45707      eval path="$path"
45708      if test ! -f "$path" && test ! -d "$path"; then
45709        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45710      fi
45711
45712      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45713    fi
45714  fi
45715
45716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45717$as_echo_n "checking for $DLL_NAME... " >&6; }
45718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45719$as_echo "$MSVC_DLL" >&6; }
45720    else
45721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45722$as_echo "incorrect, ignoring" >&6; }
45723      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45724$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45725    fi
45726  fi
45727
45728      if test "x$MSVC_DLL" = x; then
45729        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
45730      fi
45731      MSVCP_DLL="$MSVC_DLL"
45732    else
45733
45734  DLL_NAME="${MSVCP_NAME}"
45735  MSVC_DLL=
45736
45737  if test "x$MSVC_DLL" = x; then
45738    # Probe: Using well-known location from Visual Studio 10.0
45739    if test "x$VCINSTALLDIR" != x; then
45740      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
45741
45742  windows_path="$CYGWIN_VC_INSTALL_DIR"
45743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45744    unix_path=`$CYGPATH -u "$windows_path"`
45745    CYGWIN_VC_INSTALL_DIR="$unix_path"
45746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45748    CYGWIN_VC_INSTALL_DIR="$unix_path"
45749  fi
45750
45751      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45752        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45753      else
45754        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45755      fi
45756      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
45757
45758  DLL_NAME="$DLL_NAME"
45759  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45760  METHOD="well-known location in VCINSTALLDIR"
45761  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45763$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45764
45765    # Need to check if the found msvcr is correct architecture
45766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45767$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45768    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45770      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45771      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45772      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45773        CORRECT_MSVCR_ARCH="PE32 executable"
45774      else
45775        CORRECT_MSVCR_ARCH="PE32+ executable"
45776      fi
45777    else
45778      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45779        CORRECT_MSVCR_ARCH=386
45780      else
45781        CORRECT_MSVCR_ARCH=x86-64
45782      fi
45783    fi
45784    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45786$as_echo "ok" >&6; }
45787      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45788
45789  # Only process if variable expands to non-empty
45790
45791  if test "x$MSVC_DLL" != x; then
45792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45793
45794  # Input might be given as Windows format, start by converting to
45795  # unix format.
45796  path="$MSVC_DLL"
45797  new_path=`$CYGPATH -u "$path"`
45798
45799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45802  # "foo.exe" is OK but "foo" is an error.
45803  #
45804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45805  # It is also a way to make sure we got the proper file name for the real test later on.
45806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45807  if test "x$test_shortpath" = x; then
45808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45809$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45810    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45811  fi
45812
45813  # Call helper function which possibly converts this using DOS-style short mode.
45814  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45827      # Going to short mode and back again did indeed matter. Since short mode is
45828      # case insensitive, let's make it lowercase to improve readability.
45829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45830      # Now convert it back to Unix-style (cygpath)
45831      input_path=`$CYGPATH -u "$shortmode_path"`
45832      new_path="$input_path"
45833    fi
45834  fi
45835
45836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45837  if test "x$test_cygdrive_prefix" = x; then
45838    # As a simple fix, exclude /usr/bin since it's not a real path.
45839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45841      # a path prefixed by /cygdrive for fixpath to work.
45842      new_path="$CYGWIN_ROOT_PATH$input_path"
45843    fi
45844  fi
45845
45846
45847  if test "x$path" != "x$new_path"; then
45848    MSVC_DLL="$new_path"
45849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45850$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45851  fi
45852
45853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854
45855  path="$MSVC_DLL"
45856  has_colon=`$ECHO $path | $GREP ^.:`
45857  new_path="$path"
45858  if test "x$has_colon" = x; then
45859    # Not in mixed or Windows style, start by that.
45860    new_path=`cmd //c echo $path`
45861  fi
45862
45863
45864  input_path="$new_path"
45865  # Check if we need to convert this using DOS-style short mode. If the path
45866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45867  # take no chances and rewrite it.
45868  # Note: m4 eats our [], so we need to use [ and ] instead.
45869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45870  if test "x$has_forbidden_chars" != x; then
45871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45873  fi
45874
45875
45876  windows_path="$new_path"
45877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45878    unix_path=`$CYGPATH -u "$windows_path"`
45879    new_path="$unix_path"
45880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45882    new_path="$unix_path"
45883  fi
45884
45885  if test "x$path" != "x$new_path"; then
45886    MSVC_DLL="$new_path"
45887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45888$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45889  fi
45890
45891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45893
45894    else
45895      # We're on a unix platform. Hooray! :)
45896      path="$MSVC_DLL"
45897      has_space=`$ECHO "$path" | $GREP " "`
45898      if test "x$has_space" != x; then
45899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45900$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45902      fi
45903
45904      # Use eval to expand a potential ~
45905      eval path="$path"
45906      if test ! -f "$path" && test ! -d "$path"; then
45907        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45908      fi
45909
45910      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45911    fi
45912  fi
45913
45914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45915$as_echo_n "checking for $DLL_NAME... " >&6; }
45916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45917$as_echo "$MSVC_DLL" >&6; }
45918    else
45919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45920$as_echo "incorrect, ignoring" >&6; }
45921      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45922$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45923    fi
45924  fi
45925
45926    fi
45927  fi
45928
45929  if test "x$MSVC_DLL" = x; then
45930    # Probe: Check in the Boot JDK directory.
45931    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
45932
45933  DLL_NAME="$DLL_NAME"
45934  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45935  METHOD="well-known location in Boot JDK"
45936  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45938$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45939
45940    # Need to check if the found msvcr is correct architecture
45941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45942$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45943    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45945      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45946      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45947      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45948        CORRECT_MSVCR_ARCH="PE32 executable"
45949      else
45950        CORRECT_MSVCR_ARCH="PE32+ executable"
45951      fi
45952    else
45953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45954        CORRECT_MSVCR_ARCH=386
45955      else
45956        CORRECT_MSVCR_ARCH=x86-64
45957      fi
45958    fi
45959    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45961$as_echo "ok" >&6; }
45962      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45963
45964  # Only process if variable expands to non-empty
45965
45966  if test "x$MSVC_DLL" != x; then
45967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45968
45969  # Input might be given as Windows format, start by converting to
45970  # unix format.
45971  path="$MSVC_DLL"
45972  new_path=`$CYGPATH -u "$path"`
45973
45974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45977  # "foo.exe" is OK but "foo" is an error.
45978  #
45979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45980  # It is also a way to make sure we got the proper file name for the real test later on.
45981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45982  if test "x$test_shortpath" = x; then
45983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45984$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45985    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45986  fi
45987
45988  # Call helper function which possibly converts this using DOS-style short mode.
45989  # If so, the updated path is stored in $new_path.
45990
45991  input_path="$new_path"
45992  # Check if we need to convert this using DOS-style short mode. If the path
45993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45994  # take no chances and rewrite it.
45995  # Note: m4 eats our [], so we need to use [ and ] instead.
45996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45997  if test "x$has_forbidden_chars" != x; then
45998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46002      # Going to short mode and back again did indeed matter. Since short mode is
46003      # case insensitive, let's make it lowercase to improve readability.
46004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46005      # Now convert it back to Unix-style (cygpath)
46006      input_path=`$CYGPATH -u "$shortmode_path"`
46007      new_path="$input_path"
46008    fi
46009  fi
46010
46011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46012  if test "x$test_cygdrive_prefix" = x; then
46013    # As a simple fix, exclude /usr/bin since it's not a real path.
46014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46016      # a path prefixed by /cygdrive for fixpath to work.
46017      new_path="$CYGWIN_ROOT_PATH$input_path"
46018    fi
46019  fi
46020
46021
46022  if test "x$path" != "x$new_path"; then
46023    MSVC_DLL="$new_path"
46024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46025$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46026  fi
46027
46028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46029
46030  path="$MSVC_DLL"
46031  has_colon=`$ECHO $path | $GREP ^.:`
46032  new_path="$path"
46033  if test "x$has_colon" = x; then
46034    # Not in mixed or Windows style, start by that.
46035    new_path=`cmd //c echo $path`
46036  fi
46037
46038
46039  input_path="$new_path"
46040  # Check if we need to convert this using DOS-style short mode. If the path
46041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46042  # take no chances and rewrite it.
46043  # Note: m4 eats our [], so we need to use [ and ] instead.
46044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46045  if test "x$has_forbidden_chars" != x; then
46046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46048  fi
46049
46050
46051  windows_path="$new_path"
46052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46053    unix_path=`$CYGPATH -u "$windows_path"`
46054    new_path="$unix_path"
46055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46057    new_path="$unix_path"
46058  fi
46059
46060  if test "x$path" != "x$new_path"; then
46061    MSVC_DLL="$new_path"
46062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46063$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46064  fi
46065
46066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46068
46069    else
46070      # We're on a unix platform. Hooray! :)
46071      path="$MSVC_DLL"
46072      has_space=`$ECHO "$path" | $GREP " "`
46073      if test "x$has_space" != x; then
46074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46075$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46077      fi
46078
46079      # Use eval to expand a potential ~
46080      eval path="$path"
46081      if test ! -f "$path" && test ! -d "$path"; then
46082        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46083      fi
46084
46085      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46086    fi
46087  fi
46088
46089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46090$as_echo_n "checking for $DLL_NAME... " >&6; }
46091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46092$as_echo "$MSVC_DLL" >&6; }
46093    else
46094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46095$as_echo "incorrect, ignoring" >&6; }
46096      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46097$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46098    fi
46099  fi
46100
46101  fi
46102
46103  if test "x$MSVC_DLL" = x; then
46104    # Probe: Look in the Windows system32 directory
46105    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46106
46107  windows_path="$CYGWIN_SYSTEMROOT"
46108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46109    unix_path=`$CYGPATH -u "$windows_path"`
46110    CYGWIN_SYSTEMROOT="$unix_path"
46111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46113    CYGWIN_SYSTEMROOT="$unix_path"
46114  fi
46115
46116    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46117
46118  DLL_NAME="$DLL_NAME"
46119  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46120  METHOD="well-known location in SYSTEMROOT"
46121  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46122    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46123$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46124
46125    # Need to check if the found msvcr is correct architecture
46126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46127$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46128    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46130      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46131      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46132      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46133        CORRECT_MSVCR_ARCH="PE32 executable"
46134      else
46135        CORRECT_MSVCR_ARCH="PE32+ executable"
46136      fi
46137    else
46138      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46139        CORRECT_MSVCR_ARCH=386
46140      else
46141        CORRECT_MSVCR_ARCH=x86-64
46142      fi
46143    fi
46144    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46146$as_echo "ok" >&6; }
46147      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46148
46149  # Only process if variable expands to non-empty
46150
46151  if test "x$MSVC_DLL" != x; then
46152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46153
46154  # Input might be given as Windows format, start by converting to
46155  # unix format.
46156  path="$MSVC_DLL"
46157  new_path=`$CYGPATH -u "$path"`
46158
46159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46162  # "foo.exe" is OK but "foo" is an error.
46163  #
46164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46165  # It is also a way to make sure we got the proper file name for the real test later on.
46166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46167  if test "x$test_shortpath" = x; then
46168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46169$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46170    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46171  fi
46172
46173  # Call helper function which possibly converts this using DOS-style short mode.
46174  # If so, the updated path is stored in $new_path.
46175
46176  input_path="$new_path"
46177  # Check if we need to convert this using DOS-style short mode. If the path
46178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46179  # take no chances and rewrite it.
46180  # Note: m4 eats our [], so we need to use [ and ] instead.
46181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46182  if test "x$has_forbidden_chars" != x; then
46183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46187      # Going to short mode and back again did indeed matter. Since short mode is
46188      # case insensitive, let's make it lowercase to improve readability.
46189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46190      # Now convert it back to Unix-style (cygpath)
46191      input_path=`$CYGPATH -u "$shortmode_path"`
46192      new_path="$input_path"
46193    fi
46194  fi
46195
46196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46197  if test "x$test_cygdrive_prefix" = x; then
46198    # As a simple fix, exclude /usr/bin since it's not a real path.
46199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46201      # a path prefixed by /cygdrive for fixpath to work.
46202      new_path="$CYGWIN_ROOT_PATH$input_path"
46203    fi
46204  fi
46205
46206
46207  if test "x$path" != "x$new_path"; then
46208    MSVC_DLL="$new_path"
46209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46210$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46211  fi
46212
46213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46214
46215  path="$MSVC_DLL"
46216  has_colon=`$ECHO $path | $GREP ^.:`
46217  new_path="$path"
46218  if test "x$has_colon" = x; then
46219    # Not in mixed or Windows style, start by that.
46220    new_path=`cmd //c echo $path`
46221  fi
46222
46223
46224  input_path="$new_path"
46225  # Check if we need to convert this using DOS-style short mode. If the path
46226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46227  # take no chances and rewrite it.
46228  # Note: m4 eats our [], so we need to use [ and ] instead.
46229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46230  if test "x$has_forbidden_chars" != x; then
46231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46233  fi
46234
46235
46236  windows_path="$new_path"
46237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46238    unix_path=`$CYGPATH -u "$windows_path"`
46239    new_path="$unix_path"
46240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46242    new_path="$unix_path"
46243  fi
46244
46245  if test "x$path" != "x$new_path"; then
46246    MSVC_DLL="$new_path"
46247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46248$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46249  fi
46250
46251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46253
46254    else
46255      # We're on a unix platform. Hooray! :)
46256      path="$MSVC_DLL"
46257      has_space=`$ECHO "$path" | $GREP " "`
46258      if test "x$has_space" != x; then
46259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46260$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46262      fi
46263
46264      # Use eval to expand a potential ~
46265      eval path="$path"
46266      if test ! -f "$path" && test ! -d "$path"; then
46267        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46268      fi
46269
46270      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46271    fi
46272  fi
46273
46274      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46275$as_echo_n "checking for $DLL_NAME... " >&6; }
46276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46277$as_echo "$MSVC_DLL" >&6; }
46278    else
46279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46280$as_echo "incorrect, ignoring" >&6; }
46281      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46282$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46283    fi
46284  fi
46285
46286  fi
46287
46288  if test "x$MSVC_DLL" = x; then
46289    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46290    if test "x$VS100COMNTOOLS" != x; then
46291      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46292
46293  windows_path="$CYGWIN_VS_TOOLS_DIR"
46294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46295    unix_path=`$CYGPATH -u "$windows_path"`
46296    CYGWIN_VS_TOOLS_DIR="$unix_path"
46297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46299    CYGWIN_VS_TOOLS_DIR="$unix_path"
46300  fi
46301
46302      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46303        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46304	    | $GREP -i /x64/ | $HEAD --lines 1`
46305      else
46306        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46307	    | $GREP -i /x86/ | $HEAD --lines 1`
46308      fi
46309
46310  DLL_NAME="$DLL_NAME"
46311  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46312  METHOD="search of VS100COMNTOOLS"
46313  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46315$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46316
46317    # Need to check if the found msvcr is correct architecture
46318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46319$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46320    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46322      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46323      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46324      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46325        CORRECT_MSVCR_ARCH="PE32 executable"
46326      else
46327        CORRECT_MSVCR_ARCH="PE32+ executable"
46328      fi
46329    else
46330      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46331        CORRECT_MSVCR_ARCH=386
46332      else
46333        CORRECT_MSVCR_ARCH=x86-64
46334      fi
46335    fi
46336    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46338$as_echo "ok" >&6; }
46339      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46340
46341  # Only process if variable expands to non-empty
46342
46343  if test "x$MSVC_DLL" != x; then
46344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46345
46346  # Input might be given as Windows format, start by converting to
46347  # unix format.
46348  path="$MSVC_DLL"
46349  new_path=`$CYGPATH -u "$path"`
46350
46351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46354  # "foo.exe" is OK but "foo" is an error.
46355  #
46356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46357  # It is also a way to make sure we got the proper file name for the real test later on.
46358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46359  if test "x$test_shortpath" = x; then
46360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46361$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46362    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46363  fi
46364
46365  # Call helper function which possibly converts this using DOS-style short mode.
46366  # If so, the updated path is stored in $new_path.
46367
46368  input_path="$new_path"
46369  # Check if we need to convert this using DOS-style short mode. If the path
46370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46371  # take no chances and rewrite it.
46372  # Note: m4 eats our [], so we need to use [ and ] instead.
46373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46374  if test "x$has_forbidden_chars" != x; then
46375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46379      # Going to short mode and back again did indeed matter. Since short mode is
46380      # case insensitive, let's make it lowercase to improve readability.
46381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46382      # Now convert it back to Unix-style (cygpath)
46383      input_path=`$CYGPATH -u "$shortmode_path"`
46384      new_path="$input_path"
46385    fi
46386  fi
46387
46388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46389  if test "x$test_cygdrive_prefix" = x; then
46390    # As a simple fix, exclude /usr/bin since it's not a real path.
46391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46393      # a path prefixed by /cygdrive for fixpath to work.
46394      new_path="$CYGWIN_ROOT_PATH$input_path"
46395    fi
46396  fi
46397
46398
46399  if test "x$path" != "x$new_path"; then
46400    MSVC_DLL="$new_path"
46401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46402$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46403  fi
46404
46405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46406
46407  path="$MSVC_DLL"
46408  has_colon=`$ECHO $path | $GREP ^.:`
46409  new_path="$path"
46410  if test "x$has_colon" = x; then
46411    # Not in mixed or Windows style, start by that.
46412    new_path=`cmd //c echo $path`
46413  fi
46414
46415
46416  input_path="$new_path"
46417  # Check if we need to convert this using DOS-style short mode. If the path
46418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46419  # take no chances and rewrite it.
46420  # Note: m4 eats our [], so we need to use [ and ] instead.
46421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46422  if test "x$has_forbidden_chars" != x; then
46423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46425  fi
46426
46427
46428  windows_path="$new_path"
46429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46430    unix_path=`$CYGPATH -u "$windows_path"`
46431    new_path="$unix_path"
46432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46434    new_path="$unix_path"
46435  fi
46436
46437  if test "x$path" != "x$new_path"; then
46438    MSVC_DLL="$new_path"
46439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46440$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46441  fi
46442
46443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46445
46446    else
46447      # We're on a unix platform. Hooray! :)
46448      path="$MSVC_DLL"
46449      has_space=`$ECHO "$path" | $GREP " "`
46450      if test "x$has_space" != x; then
46451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46452$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46454      fi
46455
46456      # Use eval to expand a potential ~
46457      eval path="$path"
46458      if test ! -f "$path" && test ! -d "$path"; then
46459        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46460      fi
46461
46462      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46463    fi
46464  fi
46465
46466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46467$as_echo_n "checking for $DLL_NAME... " >&6; }
46468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46469$as_echo "$MSVC_DLL" >&6; }
46470    else
46471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46472$as_echo "incorrect, ignoring" >&6; }
46473      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46474$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46475    fi
46476  fi
46477
46478    fi
46479  fi
46480
46481  if test "x$MSVC_DLL" = x; then
46482    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46483    # (This was the original behaviour; kept since it might turn something up)
46484    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46485      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46486        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46487	    | $GREP x64 | $HEAD --lines 1`
46488      else
46489        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46490	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46491        if test "x$POSSIBLE_MSVC_DLL" = x; then
46492          # We're grasping at straws now...
46493          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46494	      | $HEAD --lines 1`
46495        fi
46496      fi
46497
46498
46499  DLL_NAME="$DLL_NAME"
46500  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46501  METHOD="search of VCINSTALLDIR"
46502  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46503    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46504$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46505
46506    # Need to check if the found msvcr is correct architecture
46507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46508$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46509    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46511      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46512      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46513      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46514        CORRECT_MSVCR_ARCH="PE32 executable"
46515      else
46516        CORRECT_MSVCR_ARCH="PE32+ executable"
46517      fi
46518    else
46519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46520        CORRECT_MSVCR_ARCH=386
46521      else
46522        CORRECT_MSVCR_ARCH=x86-64
46523      fi
46524    fi
46525    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46527$as_echo "ok" >&6; }
46528      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46529
46530  # Only process if variable expands to non-empty
46531
46532  if test "x$MSVC_DLL" != x; then
46533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46534
46535  # Input might be given as Windows format, start by converting to
46536  # unix format.
46537  path="$MSVC_DLL"
46538  new_path=`$CYGPATH -u "$path"`
46539
46540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46543  # "foo.exe" is OK but "foo" is an error.
46544  #
46545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46546  # It is also a way to make sure we got the proper file name for the real test later on.
46547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46548  if test "x$test_shortpath" = x; then
46549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46550$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46551    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46552  fi
46553
46554  # Call helper function which possibly converts this using DOS-style short mode.
46555  # If so, the updated path is stored in $new_path.
46556
46557  input_path="$new_path"
46558  # Check if we need to convert this using DOS-style short mode. If the path
46559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46560  # take no chances and rewrite it.
46561  # Note: m4 eats our [], so we need to use [ and ] instead.
46562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46563  if test "x$has_forbidden_chars" != x; then
46564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46568      # Going to short mode and back again did indeed matter. Since short mode is
46569      # case insensitive, let's make it lowercase to improve readability.
46570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46571      # Now convert it back to Unix-style (cygpath)
46572      input_path=`$CYGPATH -u "$shortmode_path"`
46573      new_path="$input_path"
46574    fi
46575  fi
46576
46577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46578  if test "x$test_cygdrive_prefix" = x; then
46579    # As a simple fix, exclude /usr/bin since it's not a real path.
46580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46582      # a path prefixed by /cygdrive for fixpath to work.
46583      new_path="$CYGWIN_ROOT_PATH$input_path"
46584    fi
46585  fi
46586
46587
46588  if test "x$path" != "x$new_path"; then
46589    MSVC_DLL="$new_path"
46590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46591$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46592  fi
46593
46594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46595
46596  path="$MSVC_DLL"
46597  has_colon=`$ECHO $path | $GREP ^.:`
46598  new_path="$path"
46599  if test "x$has_colon" = x; then
46600    # Not in mixed or Windows style, start by that.
46601    new_path=`cmd //c echo $path`
46602  fi
46603
46604
46605  input_path="$new_path"
46606  # Check if we need to convert this using DOS-style short mode. If the path
46607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46608  # take no chances and rewrite it.
46609  # Note: m4 eats our [], so we need to use [ and ] instead.
46610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46611  if test "x$has_forbidden_chars" != x; then
46612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46614  fi
46615
46616
46617  windows_path="$new_path"
46618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46619    unix_path=`$CYGPATH -u "$windows_path"`
46620    new_path="$unix_path"
46621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46623    new_path="$unix_path"
46624  fi
46625
46626  if test "x$path" != "x$new_path"; then
46627    MSVC_DLL="$new_path"
46628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46629$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46630  fi
46631
46632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46634
46635    else
46636      # We're on a unix platform. Hooray! :)
46637      path="$MSVC_DLL"
46638      has_space=`$ECHO "$path" | $GREP " "`
46639      if test "x$has_space" != x; then
46640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46641$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46643      fi
46644
46645      # Use eval to expand a potential ~
46646      eval path="$path"
46647      if test ! -f "$path" && test ! -d "$path"; then
46648        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46649      fi
46650
46651      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46652    fi
46653  fi
46654
46655      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46656$as_echo_n "checking for $DLL_NAME... " >&6; }
46657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46658$as_echo "$MSVC_DLL" >&6; }
46659    else
46660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46661$as_echo "incorrect, ignoring" >&6; }
46662      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46663$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46664    fi
46665  fi
46666
46667    fi
46668  fi
46669
46670  if test "x$MSVC_DLL" = x; then
46671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46672$as_echo_n "checking for $DLL_NAME... " >&6; }
46673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46674$as_echo "no" >&6; }
46675    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46676  fi
46677
46678      MSVCP_DLL="$MSVC_DLL"
46679    fi
46680
46681  fi
46682
46683  fi
46684
46685
46686  if test "x$NEEDS_LIB_X11" = xfalse; then
46687    if test "x${with_x}" != x; then
46688      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
46689$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
46690    fi
46691    X_CFLAGS=
46692    X_LIBS=
46693  else
46694
46695    if test "x${with_x}" = xno; then
46696      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
46697    fi
46698
46699    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
46700      # The user has specified a X11 base directory. Use it for includes and
46701      # libraries, unless explicitely overridden.
46702      if test "x$x_includes" = xNONE; then
46703        x_includes="${with_x}/include"
46704      fi
46705      if test "x$x_libraries" = xNONE; then
46706        x_libraries="${with_x}/lib"
46707      fi
46708    else
46709      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
46710      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
46711      # --x-libraries for the sysroot, if that seems to be correct.
46712      if test "x$SYSROOT" != "x"; then
46713        if test "x$x_includes" = xNONE; then
46714          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
46715            x_includes="$SYSROOT/usr/X11R6/include"
46716          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
46717            x_includes="$SYSROOT/usr/include"
46718          fi
46719        fi
46720        if test "x$x_libraries" = xNONE; then
46721          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
46722            x_libraries="$SYSROOT/usr/X11R6/lib"
46723          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46724            x_libraries="$SYSROOT/usr/lib64"
46725          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
46726            x_libraries="$SYSROOT/usr/lib"
46727          fi
46728        fi
46729      fi
46730    fi
46731
46732    # Now let autoconf do it's magic
46733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
46734$as_echo_n "checking for X... " >&6; }
46735
46736
46737# Check whether --with-x was given.
46738if test "${with_x+set}" = set; then :
46739  withval=$with_x;
46740fi
46741
46742# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
46743if test "x$with_x" = xno; then
46744  # The user explicitly disabled X.
46745  have_x=disabled
46746else
46747  case $x_includes,$x_libraries in #(
46748    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
46749    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
46750  $as_echo_n "(cached) " >&6
46751else
46752  # One or both of the vars are not set, and there is no cached value.
46753ac_x_includes=no ac_x_libraries=no
46754rm -f -r conftest.dir
46755if mkdir conftest.dir; then
46756  cd conftest.dir
46757  cat >Imakefile <<'_ACEOF'
46758incroot:
46759	@echo incroot='${INCROOT}'
46760usrlibdir:
46761	@echo usrlibdir='${USRLIBDIR}'
46762libdir:
46763	@echo libdir='${LIBDIR}'
46764_ACEOF
46765  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
46766    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
46767    for ac_var in incroot usrlibdir libdir; do
46768      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
46769    done
46770    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
46771    for ac_extension in a so sl dylib la dll; do
46772      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
46773	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
46774	ac_im_usrlibdir=$ac_im_libdir; break
46775      fi
46776    done
46777    # Screen out bogus values from the imake configuration.  They are
46778    # bogus both because they are the default anyway, and because
46779    # using them would break gcc on systems where it needs fixed includes.
46780    case $ac_im_incroot in
46781	/usr/include) ac_x_includes= ;;
46782	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
46783    esac
46784    case $ac_im_usrlibdir in
46785	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
46786	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
46787    esac
46788  fi
46789  cd ..
46790  rm -f -r conftest.dir
46791fi
46792
46793# Standard set of common directories for X headers.
46794# Check X11 before X11Rn because it is often a symlink to the current release.
46795ac_x_header_dirs='
46796/usr/X11/include
46797/usr/X11R7/include
46798/usr/X11R6/include
46799/usr/X11R5/include
46800/usr/X11R4/include
46801
46802/usr/include/X11
46803/usr/include/X11R7
46804/usr/include/X11R6
46805/usr/include/X11R5
46806/usr/include/X11R4
46807
46808/usr/local/X11/include
46809/usr/local/X11R7/include
46810/usr/local/X11R6/include
46811/usr/local/X11R5/include
46812/usr/local/X11R4/include
46813
46814/usr/local/include/X11
46815/usr/local/include/X11R7
46816/usr/local/include/X11R6
46817/usr/local/include/X11R5
46818/usr/local/include/X11R4
46819
46820/usr/X386/include
46821/usr/x386/include
46822/usr/XFree86/include/X11
46823
46824/usr/include
46825/usr/local/include
46826/usr/unsupported/include
46827/usr/athena/include
46828/usr/local/x11r5/include
46829/usr/lpp/Xamples/include
46830
46831/usr/openwin/include
46832/usr/openwin/share/include'
46833
46834if test "$ac_x_includes" = no; then
46835  # Guess where to find include files, by looking for Xlib.h.
46836  # First, try using that file with no special directory specified.
46837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46838/* end confdefs.h.  */
46839#include <X11/Xlib.h>
46840_ACEOF
46841if ac_fn_cxx_try_cpp "$LINENO"; then :
46842  # We can compile using X headers with no special include directory.
46843ac_x_includes=
46844else
46845  for ac_dir in $ac_x_header_dirs; do
46846  if test -r "$ac_dir/X11/Xlib.h"; then
46847    ac_x_includes=$ac_dir
46848    break
46849  fi
46850done
46851fi
46852rm -f conftest.err conftest.i conftest.$ac_ext
46853fi # $ac_x_includes = no
46854
46855if test "$ac_x_libraries" = no; then
46856  # Check for the libraries.
46857  # See if we find them without any special options.
46858  # Don't add to $LIBS permanently.
46859  ac_save_LIBS=$LIBS
46860  LIBS="-lX11 $LIBS"
46861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46862/* end confdefs.h.  */
46863#include <X11/Xlib.h>
46864int
46865main ()
46866{
46867XrmInitialize ()
46868  ;
46869  return 0;
46870}
46871_ACEOF
46872if ac_fn_cxx_try_link "$LINENO"; then :
46873  LIBS=$ac_save_LIBS
46874# We can link X programs with no special library path.
46875ac_x_libraries=
46876else
46877  LIBS=$ac_save_LIBS
46878for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
46879do
46880  # Don't even attempt the hair of trying to link an X program!
46881  for ac_extension in a so sl dylib la dll; do
46882    if test -r "$ac_dir/libX11.$ac_extension"; then
46883      ac_x_libraries=$ac_dir
46884      break 2
46885    fi
46886  done
46887done
46888fi
46889rm -f core conftest.err conftest.$ac_objext \
46890    conftest$ac_exeext conftest.$ac_ext
46891fi # $ac_x_libraries = no
46892
46893case $ac_x_includes,$ac_x_libraries in #(
46894  no,* | *,no | *\'*)
46895    # Didn't find X, or a directory has "'" in its name.
46896    ac_cv_have_x="have_x=no";; #(
46897  *)
46898    # Record where we found X for the cache.
46899    ac_cv_have_x="have_x=yes\
46900	ac_x_includes='$ac_x_includes'\
46901	ac_x_libraries='$ac_x_libraries'"
46902esac
46903fi
46904;; #(
46905    *) have_x=yes;;
46906  esac
46907  eval "$ac_cv_have_x"
46908fi # $with_x != no
46909
46910if test "$have_x" != yes; then
46911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
46912$as_echo "$have_x" >&6; }
46913  no_x=yes
46914else
46915  # If each of the values was on the command line, it overrides each guess.
46916  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
46917  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
46918  # Update the cache value to reflect the command line values.
46919  ac_cv_have_x="have_x=yes\
46920	ac_x_includes='$x_includes'\
46921	ac_x_libraries='$x_libraries'"
46922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
46923$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
46924fi
46925
46926    if test "$no_x" = yes; then
46927  # Not all programs may use this symbol, but it does not hurt to define it.
46928
46929$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
46930
46931  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
46932else
46933  if test -n "$x_includes"; then
46934    X_CFLAGS="$X_CFLAGS -I$x_includes"
46935  fi
46936
46937  # It would also be nice to do this for all -L options, not just this one.
46938  if test -n "$x_libraries"; then
46939    X_LIBS="$X_LIBS -L$x_libraries"
46940    # For Solaris; some versions of Sun CC require a space after -R and
46941    # others require no space.  Words are not sufficient . . . .
46942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
46943$as_echo_n "checking whether -R must be followed by a space... " >&6; }
46944    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
46945    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
46946    ac_cxx_werror_flag=yes
46947    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46948/* end confdefs.h.  */
46949
46950int
46951main ()
46952{
46953
46954  ;
46955  return 0;
46956}
46957_ACEOF
46958if ac_fn_cxx_try_link "$LINENO"; then :
46959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46960$as_echo "no" >&6; }
46961       X_LIBS="$X_LIBS -R$x_libraries"
46962else
46963  LIBS="$ac_xsave_LIBS -R $x_libraries"
46964       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46965/* end confdefs.h.  */
46966
46967int
46968main ()
46969{
46970
46971  ;
46972  return 0;
46973}
46974_ACEOF
46975if ac_fn_cxx_try_link "$LINENO"; then :
46976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46977$as_echo "yes" >&6; }
46978	  X_LIBS="$X_LIBS -R $x_libraries"
46979else
46980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
46981$as_echo "neither works" >&6; }
46982fi
46983rm -f core conftest.err conftest.$ac_objext \
46984    conftest$ac_exeext conftest.$ac_ext
46985fi
46986rm -f core conftest.err conftest.$ac_objext \
46987    conftest$ac_exeext conftest.$ac_ext
46988    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
46989    LIBS=$ac_xsave_LIBS
46990  fi
46991
46992  # Check for system-dependent libraries X programs must link with.
46993  # Do this before checking for the system-independent R6 libraries
46994  # (-lICE), since we may need -lsocket or whatever for X linking.
46995
46996  if test "$ISC" = yes; then
46997    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
46998  else
46999    # Martyn Johnson says this is needed for Ultrix, if the X
47000    # libraries were built with DECnet support.  And Karl Berry says
47001    # the Alpha needs dnet_stub (dnet does not exist).
47002    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
47003    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47004/* end confdefs.h.  */
47005
47006/* Override any GCC internal prototype to avoid an error.
47007   Use char because int might match the return type of a GCC
47008   builtin and then its argument prototype would still apply.  */
47009#ifdef __cplusplus
47010extern "C"
47011#endif
47012char XOpenDisplay ();
47013int
47014main ()
47015{
47016return XOpenDisplay ();
47017  ;
47018  return 0;
47019}
47020_ACEOF
47021if ac_fn_cxx_try_link "$LINENO"; then :
47022
47023else
47024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
47025$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
47026if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
47027  $as_echo_n "(cached) " >&6
47028else
47029  ac_check_lib_save_LIBS=$LIBS
47030LIBS="-ldnet  $LIBS"
47031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47032/* end confdefs.h.  */
47033
47034/* Override any GCC internal prototype to avoid an error.
47035   Use char because int might match the return type of a GCC
47036   builtin and then its argument prototype would still apply.  */
47037#ifdef __cplusplus
47038extern "C"
47039#endif
47040char dnet_ntoa ();
47041int
47042main ()
47043{
47044return dnet_ntoa ();
47045  ;
47046  return 0;
47047}
47048_ACEOF
47049if ac_fn_cxx_try_link "$LINENO"; then :
47050  ac_cv_lib_dnet_dnet_ntoa=yes
47051else
47052  ac_cv_lib_dnet_dnet_ntoa=no
47053fi
47054rm -f core conftest.err conftest.$ac_objext \
47055    conftest$ac_exeext conftest.$ac_ext
47056LIBS=$ac_check_lib_save_LIBS
47057fi
47058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
47059$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
47060if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
47061  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
47062fi
47063
47064    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
47065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
47066$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
47067if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
47068  $as_echo_n "(cached) " >&6
47069else
47070  ac_check_lib_save_LIBS=$LIBS
47071LIBS="-ldnet_stub  $LIBS"
47072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47073/* end confdefs.h.  */
47074
47075/* Override any GCC internal prototype to avoid an error.
47076   Use char because int might match the return type of a GCC
47077   builtin and then its argument prototype would still apply.  */
47078#ifdef __cplusplus
47079extern "C"
47080#endif
47081char dnet_ntoa ();
47082int
47083main ()
47084{
47085return dnet_ntoa ();
47086  ;
47087  return 0;
47088}
47089_ACEOF
47090if ac_fn_cxx_try_link "$LINENO"; then :
47091  ac_cv_lib_dnet_stub_dnet_ntoa=yes
47092else
47093  ac_cv_lib_dnet_stub_dnet_ntoa=no
47094fi
47095rm -f core conftest.err conftest.$ac_objext \
47096    conftest$ac_exeext conftest.$ac_ext
47097LIBS=$ac_check_lib_save_LIBS
47098fi
47099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
47100$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
47101if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
47102  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
47103fi
47104
47105    fi
47106fi
47107rm -f core conftest.err conftest.$ac_objext \
47108    conftest$ac_exeext conftest.$ac_ext
47109    LIBS="$ac_xsave_LIBS"
47110
47111    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
47112    # to get the SysV transport functions.
47113    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
47114    # needs -lnsl.
47115    # The nsl library prevents programs from opening the X display
47116    # on Irix 5.2, according to T.E. Dickey.
47117    # The functions gethostbyname, getservbyname, and inet_addr are
47118    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
47119    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
47120if test "x$ac_cv_func_gethostbyname" = xyes; then :
47121
47122fi
47123
47124    if test $ac_cv_func_gethostbyname = no; then
47125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
47126$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
47127if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
47128  $as_echo_n "(cached) " >&6
47129else
47130  ac_check_lib_save_LIBS=$LIBS
47131LIBS="-lnsl  $LIBS"
47132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47133/* end confdefs.h.  */
47134
47135/* Override any GCC internal prototype to avoid an error.
47136   Use char because int might match the return type of a GCC
47137   builtin and then its argument prototype would still apply.  */
47138#ifdef __cplusplus
47139extern "C"
47140#endif
47141char gethostbyname ();
47142int
47143main ()
47144{
47145return gethostbyname ();
47146  ;
47147  return 0;
47148}
47149_ACEOF
47150if ac_fn_cxx_try_link "$LINENO"; then :
47151  ac_cv_lib_nsl_gethostbyname=yes
47152else
47153  ac_cv_lib_nsl_gethostbyname=no
47154fi
47155rm -f core conftest.err conftest.$ac_objext \
47156    conftest$ac_exeext conftest.$ac_ext
47157LIBS=$ac_check_lib_save_LIBS
47158fi
47159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
47160$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
47161if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
47162  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
47163fi
47164
47165      if test $ac_cv_lib_nsl_gethostbyname = no; then
47166	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
47167$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
47168if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
47169  $as_echo_n "(cached) " >&6
47170else
47171  ac_check_lib_save_LIBS=$LIBS
47172LIBS="-lbsd  $LIBS"
47173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47174/* end confdefs.h.  */
47175
47176/* Override any GCC internal prototype to avoid an error.
47177   Use char because int might match the return type of a GCC
47178   builtin and then its argument prototype would still apply.  */
47179#ifdef __cplusplus
47180extern "C"
47181#endif
47182char gethostbyname ();
47183int
47184main ()
47185{
47186return gethostbyname ();
47187  ;
47188  return 0;
47189}
47190_ACEOF
47191if ac_fn_cxx_try_link "$LINENO"; then :
47192  ac_cv_lib_bsd_gethostbyname=yes
47193else
47194  ac_cv_lib_bsd_gethostbyname=no
47195fi
47196rm -f core conftest.err conftest.$ac_objext \
47197    conftest$ac_exeext conftest.$ac_ext
47198LIBS=$ac_check_lib_save_LIBS
47199fi
47200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
47201$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
47202if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
47203  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
47204fi
47205
47206      fi
47207    fi
47208
47209    # lieder@skyler.mavd.honeywell.com says without -lsocket,
47210    # socket/setsockopt and other routines are undefined under SCO ODT
47211    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
47212    # on later versions), says Simon Leinen: it contains gethostby*
47213    # variants that don't use the name server (or something).  -lsocket
47214    # must be given before -lnsl if both are needed.  We assume that
47215    # if connect needs -lnsl, so does gethostbyname.
47216    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
47217if test "x$ac_cv_func_connect" = xyes; then :
47218
47219fi
47220
47221    if test $ac_cv_func_connect = no; then
47222      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
47223$as_echo_n "checking for connect in -lsocket... " >&6; }
47224if ${ac_cv_lib_socket_connect+:} false; then :
47225  $as_echo_n "(cached) " >&6
47226else
47227  ac_check_lib_save_LIBS=$LIBS
47228LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
47229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47230/* end confdefs.h.  */
47231
47232/* Override any GCC internal prototype to avoid an error.
47233   Use char because int might match the return type of a GCC
47234   builtin and then its argument prototype would still apply.  */
47235#ifdef __cplusplus
47236extern "C"
47237#endif
47238char connect ();
47239int
47240main ()
47241{
47242return connect ();
47243  ;
47244  return 0;
47245}
47246_ACEOF
47247if ac_fn_cxx_try_link "$LINENO"; then :
47248  ac_cv_lib_socket_connect=yes
47249else
47250  ac_cv_lib_socket_connect=no
47251fi
47252rm -f core conftest.err conftest.$ac_objext \
47253    conftest$ac_exeext conftest.$ac_ext
47254LIBS=$ac_check_lib_save_LIBS
47255fi
47256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
47257$as_echo "$ac_cv_lib_socket_connect" >&6; }
47258if test "x$ac_cv_lib_socket_connect" = xyes; then :
47259  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
47260fi
47261
47262    fi
47263
47264    # Guillermo Gomez says -lposix is necessary on A/UX.
47265    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
47266if test "x$ac_cv_func_remove" = xyes; then :
47267
47268fi
47269
47270    if test $ac_cv_func_remove = no; then
47271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
47272$as_echo_n "checking for remove in -lposix... " >&6; }
47273if ${ac_cv_lib_posix_remove+:} false; then :
47274  $as_echo_n "(cached) " >&6
47275else
47276  ac_check_lib_save_LIBS=$LIBS
47277LIBS="-lposix  $LIBS"
47278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47279/* end confdefs.h.  */
47280
47281/* Override any GCC internal prototype to avoid an error.
47282   Use char because int might match the return type of a GCC
47283   builtin and then its argument prototype would still apply.  */
47284#ifdef __cplusplus
47285extern "C"
47286#endif
47287char remove ();
47288int
47289main ()
47290{
47291return remove ();
47292  ;
47293  return 0;
47294}
47295_ACEOF
47296if ac_fn_cxx_try_link "$LINENO"; then :
47297  ac_cv_lib_posix_remove=yes
47298else
47299  ac_cv_lib_posix_remove=no
47300fi
47301rm -f core conftest.err conftest.$ac_objext \
47302    conftest$ac_exeext conftest.$ac_ext
47303LIBS=$ac_check_lib_save_LIBS
47304fi
47305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
47306$as_echo "$ac_cv_lib_posix_remove" >&6; }
47307if test "x$ac_cv_lib_posix_remove" = xyes; then :
47308  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
47309fi
47310
47311    fi
47312
47313    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
47314    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
47315if test "x$ac_cv_func_shmat" = xyes; then :
47316
47317fi
47318
47319    if test $ac_cv_func_shmat = no; then
47320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
47321$as_echo_n "checking for shmat in -lipc... " >&6; }
47322if ${ac_cv_lib_ipc_shmat+:} false; then :
47323  $as_echo_n "(cached) " >&6
47324else
47325  ac_check_lib_save_LIBS=$LIBS
47326LIBS="-lipc  $LIBS"
47327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47328/* end confdefs.h.  */
47329
47330/* Override any GCC internal prototype to avoid an error.
47331   Use char because int might match the return type of a GCC
47332   builtin and then its argument prototype would still apply.  */
47333#ifdef __cplusplus
47334extern "C"
47335#endif
47336char shmat ();
47337int
47338main ()
47339{
47340return shmat ();
47341  ;
47342  return 0;
47343}
47344_ACEOF
47345if ac_fn_cxx_try_link "$LINENO"; then :
47346  ac_cv_lib_ipc_shmat=yes
47347else
47348  ac_cv_lib_ipc_shmat=no
47349fi
47350rm -f core conftest.err conftest.$ac_objext \
47351    conftest$ac_exeext conftest.$ac_ext
47352LIBS=$ac_check_lib_save_LIBS
47353fi
47354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
47355$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
47356if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
47357  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
47358fi
47359
47360    fi
47361  fi
47362
47363  # Check for libraries that X11R6 Xt/Xaw programs need.
47364  ac_save_LDFLAGS=$LDFLAGS
47365  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
47366  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
47367  # check for ICE first), but we must link in the order -lSM -lICE or
47368  # we get undefined symbols.  So assume we have SM if we have ICE.
47369  # These have to be linked with before -lX11, unlike the other
47370  # libraries we check for below, so use a different variable.
47371  # John Interrante, Karl Berry
47372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
47373$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
47374if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
47375  $as_echo_n "(cached) " >&6
47376else
47377  ac_check_lib_save_LIBS=$LIBS
47378LIBS="-lICE $X_EXTRA_LIBS $LIBS"
47379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47380/* end confdefs.h.  */
47381
47382/* Override any GCC internal prototype to avoid an error.
47383   Use char because int might match the return type of a GCC
47384   builtin and then its argument prototype would still apply.  */
47385#ifdef __cplusplus
47386extern "C"
47387#endif
47388char IceConnectionNumber ();
47389int
47390main ()
47391{
47392return IceConnectionNumber ();
47393  ;
47394  return 0;
47395}
47396_ACEOF
47397if ac_fn_cxx_try_link "$LINENO"; then :
47398  ac_cv_lib_ICE_IceConnectionNumber=yes
47399else
47400  ac_cv_lib_ICE_IceConnectionNumber=no
47401fi
47402rm -f core conftest.err conftest.$ac_objext \
47403    conftest$ac_exeext conftest.$ac_ext
47404LIBS=$ac_check_lib_save_LIBS
47405fi
47406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
47407$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
47408if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
47409  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
47410fi
47411
47412  LDFLAGS=$ac_save_LDFLAGS
47413
47414fi
47415
47416
47417    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
47418    # this doesn't make sense so we remove it.
47419    if test "x$COMPILE_TYPE" = xcross; then
47420      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
47421    fi
47422
47423    if test "x$no_x" = xyes; then
47424
47425  # Print a helpful message on how to acquire the necessary build dependency.
47426  # x11 is the help tag: freetype, cups, alsa etc
47427  MISSING_DEPENDENCY=x11
47428
47429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47430    cygwin_help $MISSING_DEPENDENCY
47431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47432    msys_help $MISSING_DEPENDENCY
47433  else
47434    PKGHANDLER_COMMAND=
47435
47436    case $PKGHANDLER in
47437      apt-get)
47438        apt_help     $MISSING_DEPENDENCY ;;
47439      yum)
47440        yum_help     $MISSING_DEPENDENCY ;;
47441      port)
47442        port_help    $MISSING_DEPENDENCY ;;
47443      pkgutil)
47444        pkgutil_help $MISSING_DEPENDENCY ;;
47445      pkgadd)
47446        pkgadd_help  $MISSING_DEPENDENCY ;;
47447    esac
47448
47449    if test "x$PKGHANDLER_COMMAND" != x; then
47450      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47451    fi
47452  fi
47453
47454      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
47455    fi
47456
47457    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47458      OPENWIN_HOME="/usr/openwin"
47459      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
47460      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47461          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
47462          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47463          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
47464    fi
47465
47466    ac_ext=c
47467ac_cpp='$CPP $CPPFLAGS'
47468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47470ac_compiler_gnu=$ac_cv_c_compiler_gnu
47471
47472    OLD_CFLAGS="$CFLAGS"
47473    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
47474
47475    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
47476    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
47477do :
47478  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47479ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
47480          # include <X11/Xlib.h>
47481          # include <X11/Xutil.h>
47482
47483
47484"
47485if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47486  cat >>confdefs.h <<_ACEOF
47487#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47488_ACEOF
47489 X11_HEADERS_OK=yes
47490else
47491  X11_HEADERS_OK=no; break
47492fi
47493
47494done
47495
47496
47497    if test "x$X11_HEADERS_OK" = xno; then
47498
47499  # Print a helpful message on how to acquire the necessary build dependency.
47500  # x11 is the help tag: freetype, cups, alsa etc
47501  MISSING_DEPENDENCY=x11
47502
47503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47504    cygwin_help $MISSING_DEPENDENCY
47505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47506    msys_help $MISSING_DEPENDENCY
47507  else
47508    PKGHANDLER_COMMAND=
47509
47510    case $PKGHANDLER in
47511      apt-get)
47512        apt_help     $MISSING_DEPENDENCY ;;
47513      yum)
47514        yum_help     $MISSING_DEPENDENCY ;;
47515      port)
47516        port_help    $MISSING_DEPENDENCY ;;
47517      pkgutil)
47518        pkgutil_help $MISSING_DEPENDENCY ;;
47519      pkgadd)
47520        pkgadd_help  $MISSING_DEPENDENCY ;;
47521    esac
47522
47523    if test "x$PKGHANDLER_COMMAND" != x; then
47524      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47525    fi
47526  fi
47527
47528      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
47529    fi
47530
47531    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
47532    # defined in libawt_xawt.
47533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
47534$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
47535    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47536/* end confdefs.h.  */
47537#include <X11/extensions/Xrender.h>
47538int
47539main ()
47540{
47541XLinearGradient x;
47542  ;
47543  return 0;
47544}
47545_ACEOF
47546if ac_fn_c_try_compile "$LINENO"; then :
47547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47548$as_echo "yes" >&6; }
47549else
47550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47551$as_echo "no" >&6; }
47552         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
47553fi
47554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47555
47556    CFLAGS="$OLD_CFLAGS"
47557    ac_ext=cpp
47558ac_cpp='$CXXCPP $CPPFLAGS'
47559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47562
47563  fi # NEEDS_LIB_X11
47564
47565
47566
47567
47568
47569
47570# Check whether --with-cups was given.
47571if test "${with_cups+set}" = set; then :
47572  withval=$with_cups;
47573fi
47574
47575
47576# Check whether --with-cups-include was given.
47577if test "${with_cups_include+set}" = set; then :
47578  withval=$with_cups_include;
47579fi
47580
47581
47582  if test "x$NEEDS_LIB_CUPS" = xfalse; then
47583    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
47584      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
47585$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
47586    fi
47587    CUPS_CFLAGS=
47588  else
47589    CUPS_FOUND=no
47590
47591    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
47592      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
47593    fi
47594
47595    if test "x${with_cups}" != x; then
47596      CUPS_CFLAGS="-I${with_cups}/include"
47597      CUPS_FOUND=yes
47598    fi
47599    if test "x${with_cups_include}" != x; then
47600      CUPS_CFLAGS="-I${with_cups_include}"
47601      CUPS_FOUND=yes
47602    fi
47603    if test "x$CUPS_FOUND" = xno; then
47604      # Are the cups headers installed in the default /usr/include location?
47605      for ac_header in cups/cups.h cups/ppd.h
47606do :
47607  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47608ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
47609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47610  cat >>confdefs.h <<_ACEOF
47611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47612_ACEOF
47613
47614          CUPS_FOUND=yes
47615          CUPS_CFLAGS=
47616          DEFAULT_CUPS=yes
47617
47618fi
47619
47620done
47621
47622    fi
47623    if test "x$CUPS_FOUND" = xno; then
47624      # Getting nervous now? Lets poke around for standard Solaris third-party
47625      # package installation locations.
47626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
47627$as_echo_n "checking for cups headers... " >&6; }
47628      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
47629        # An SFW package seems to be installed!
47630        CUPS_FOUND=yes
47631        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
47632      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
47633        # A CSW package seems to be installed!
47634        CUPS_FOUND=yes
47635        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
47636      fi
47637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
47638$as_echo "$CUPS_FOUND" >&6; }
47639    fi
47640    if test "x$CUPS_FOUND" = xno; then
47641
47642  # Print a helpful message on how to acquire the necessary build dependency.
47643  # cups is the help tag: freetype, cups, alsa etc
47644  MISSING_DEPENDENCY=cups
47645
47646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47647    cygwin_help $MISSING_DEPENDENCY
47648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47649    msys_help $MISSING_DEPENDENCY
47650  else
47651    PKGHANDLER_COMMAND=
47652
47653    case $PKGHANDLER in
47654      apt-get)
47655        apt_help     $MISSING_DEPENDENCY ;;
47656      yum)
47657        yum_help     $MISSING_DEPENDENCY ;;
47658      port)
47659        port_help    $MISSING_DEPENDENCY ;;
47660      pkgutil)
47661        pkgutil_help $MISSING_DEPENDENCY ;;
47662      pkgadd)
47663        pkgadd_help  $MISSING_DEPENDENCY ;;
47664    esac
47665
47666    if test "x$PKGHANDLER_COMMAND" != x; then
47667      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47668    fi
47669  fi
47670
47671      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
47672    fi
47673  fi
47674
47675
47676
47677
47678
47679# Check whether --with-freetype was given.
47680if test "${with_freetype+set}" = set; then :
47681  withval=$with_freetype;
47682fi
47683
47684
47685# Check whether --with-freetype-include was given.
47686if test "${with_freetype_include+set}" = set; then :
47687  withval=$with_freetype_include;
47688fi
47689
47690
47691# Check whether --with-freetype-lib was given.
47692if test "${with_freetype_lib+set}" = set; then :
47693  withval=$with_freetype_lib;
47694fi
47695
47696
47697# Check whether --with-freetype-src was given.
47698if test "${with_freetype_src+set}" = set; then :
47699  withval=$with_freetype_src;
47700fi
47701
47702  # Check whether --enable-freetype-bundling was given.
47703if test "${enable_freetype_bundling+set}" = set; then :
47704  enableval=$enable_freetype_bundling;
47705fi
47706
47707
47708  # Need to specify explicitly since it needs to be overridden on some versions of macosx
47709  FREETYPE_BASE_NAME=freetype
47710  FREETYPE_CFLAGS=
47711  FREETYPE_LIBS=
47712  FREETYPE_BUNDLE_LIB_PATH=
47713
47714  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
47715    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
47716      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
47717$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
47718    fi
47719    if test "x$enable_freetype_bundling" != x; then
47720      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
47721$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
47722    fi
47723  else
47724    # freetype is needed to build; go get it!
47725
47726    BUNDLE_FREETYPE="$enable_freetype_bundling"
47727
47728    if  test "x$with_freetype_src" != x; then
47729      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47730        # Try to build freetype if --with-freetype-src was given on Windows
47731
47732  FREETYPE_SRC_PATH="$with_freetype_src"
47733  BUILD_FREETYPE=yes
47734
47735  # Check if the freetype sources are acessible..
47736  if ! test -d $FREETYPE_SRC_PATH; then
47737    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
47738$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
47739    BUILD_FREETYPE=no
47740  fi
47741  # ..and contain a vc2010 project file
47742  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
47743  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
47744    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
47745$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
47746    BUILD_FREETYPE=no
47747  fi
47748  # Now check if configure found a version of 'msbuild.exe'
47749  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
47750    { $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
47751$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;}
47752    BUILD_FREETYPE=no
47753  fi
47754
47755  # Ready to go..
47756  if test "x$BUILD_FREETYPE" = xyes; then
47757    # msbuild requires trailing slashes for output directories
47758    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
47759    freetype_lib_path_unix="$freetype_lib_path"
47760    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
47761
47762  unix_path="$vcxproj_path"
47763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47764    windows_path=`$CYGPATH -m "$unix_path"`
47765    vcxproj_path="$windows_path"
47766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47767    windows_path=`cmd //c echo $unix_path`
47768    vcxproj_path="$windows_path"
47769  fi
47770
47771
47772  unix_path="$freetype_lib_path"
47773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47774    windows_path=`$CYGPATH -m "$unix_path"`
47775    freetype_lib_path="$windows_path"
47776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47777    windows_path=`cmd //c echo $unix_path`
47778    freetype_lib_path="$windows_path"
47779  fi
47780
47781
47782  unix_path="$freetype_obj_path"
47783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47784    windows_path=`$CYGPATH -m "$unix_path"`
47785    freetype_obj_path="$windows_path"
47786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47787    windows_path=`cmd //c echo $unix_path`
47788    freetype_obj_path="$windows_path"
47789  fi
47790
47791    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47792      freetype_platform=x64
47793    else
47794      freetype_platform=win32
47795    fi
47796
47797    # The original freetype project file is for VS 2010 (i.e. 'v100'),
47798    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
47799    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
47800    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
47801    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
47802$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
47803
47804    # First we try to build the freetype.dll
47805    $ECHO -e "@echo off\n"\
47806        "$MSBUILD $vcxproj_path "\
47807        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
47808        "/p:Configuration=\"Release Multithreaded\" "\
47809        "/p:Platform=$freetype_platform "\
47810        "/p:ConfigurationType=DynamicLibrary "\
47811        "/p:TargetName=freetype "\
47812        "/p:OutDir=\"$freetype_lib_path\" "\
47813        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
47814    cmd /c freetype.bat
47815
47816    if test -s "$freetype_lib_path_unix/freetype.dll"; then
47817      # If that succeeds we also build freetype.lib
47818      $ECHO -e "@echo off\n"\
47819          "$MSBUILD $vcxproj_path "\
47820          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
47821          "/p:Configuration=\"Release Multithreaded\" "\
47822          "/p:Platform=$freetype_platform "\
47823          "/p:ConfigurationType=StaticLibrary "\
47824          "/p:TargetName=freetype "\
47825          "/p:OutDir=\"$freetype_lib_path\" "\
47826          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
47827      cmd /c freetype.bat
47828
47829      if test -s "$freetype_lib_path_unix/freetype.lib"; then
47830        # Once we build both, lib and dll, set freetype lib and include path appropriately
47831        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
47832        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
47833        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
47834$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
47835      else
47836        BUILD_FREETYPE=no
47837      fi
47838    else
47839      BUILD_FREETYPE=no
47840    fi
47841  fi
47842
47843        if test "x$BUILD_FREETYPE" = xyes; then
47844          # Okay, we built it. Check that it works.
47845
47846  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47847  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47848  METHOD="--with-freetype-src"
47849
47850  # Let's start with an optimistic view of the world :-)
47851  FOUND_FREETYPE=yes
47852
47853  # First look for the canonical freetype main include file ft2build.h.
47854  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47855    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47856    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47857    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47858      # Fail.
47859      FOUND_FREETYPE=no
47860    fi
47861  fi
47862
47863  if test "x$FOUND_FREETYPE" = xyes; then
47864    # Include file found, let's continue the sanity check.
47865    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47866$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47867
47868    # Reset to default value
47869    FREETYPE_BASE_NAME=freetype
47870    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47871    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47872      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47873          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47874        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47875        # for the .6 version explicitly.
47876        FREETYPE_BASE_NAME=freetype.6
47877        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47878        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47879$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47880      else
47881        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47882$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47883        FOUND_FREETYPE=no
47884      fi
47885    else
47886      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47887        # On Windows, we will need both .lib and .dll file.
47888        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47889          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47890$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47891          FOUND_FREETYPE=no
47892        fi
47893      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47894          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47895        # Found lib in isa dir, use that instead.
47896        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47897        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47898$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47899      fi
47900    fi
47901  fi
47902
47903  if test "x$FOUND_FREETYPE" = xyes; then
47904
47905  # Only process if variable expands to non-empty
47906
47907  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47909
47910  # Input might be given as Windows format, start by converting to
47911  # unix format.
47912  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47913  new_path=`$CYGPATH -u "$path"`
47914
47915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47918  # "foo.exe" is OK but "foo" is an error.
47919  #
47920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47921  # It is also a way to make sure we got the proper file name for the real test later on.
47922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47923  if test "x$test_shortpath" = x; then
47924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47926    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47927  fi
47928
47929  # Call helper function which possibly converts this using DOS-style short mode.
47930  # If so, the updated path is stored in $new_path.
47931
47932  input_path="$new_path"
47933  # Check if we need to convert this using DOS-style short mode. If the path
47934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47935  # take no chances and rewrite it.
47936  # Note: m4 eats our [], so we need to use [ and ] instead.
47937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47938  if test "x$has_forbidden_chars" != x; then
47939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47943      # Going to short mode and back again did indeed matter. Since short mode is
47944      # case insensitive, let's make it lowercase to improve readability.
47945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47946      # Now convert it back to Unix-style (cygpath)
47947      input_path=`$CYGPATH -u "$shortmode_path"`
47948      new_path="$input_path"
47949    fi
47950  fi
47951
47952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47953  if test "x$test_cygdrive_prefix" = x; then
47954    # As a simple fix, exclude /usr/bin since it's not a real path.
47955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47957      # a path prefixed by /cygdrive for fixpath to work.
47958      new_path="$CYGWIN_ROOT_PATH$input_path"
47959    fi
47960  fi
47961
47962
47963  if test "x$path" != "x$new_path"; then
47964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47967  fi
47968
47969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47970
47971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47972  has_colon=`$ECHO $path | $GREP ^.:`
47973  new_path="$path"
47974  if test "x$has_colon" = x; then
47975    # Not in mixed or Windows style, start by that.
47976    new_path=`cmd //c echo $path`
47977  fi
47978
47979
47980  input_path="$new_path"
47981  # Check if we need to convert this using DOS-style short mode. If the path
47982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47983  # take no chances and rewrite it.
47984  # Note: m4 eats our [], so we need to use [ and ] instead.
47985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47986  if test "x$has_forbidden_chars" != x; then
47987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47989  fi
47990
47991
47992  windows_path="$new_path"
47993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47994    unix_path=`$CYGPATH -u "$windows_path"`
47995    new_path="$unix_path"
47996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47998    new_path="$unix_path"
47999  fi
48000
48001  if test "x$path" != "x$new_path"; then
48002    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48005  fi
48006
48007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48009
48010    else
48011      # We're on a unix platform. Hooray! :)
48012      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48013      has_space=`$ECHO "$path" | $GREP " "`
48014      if test "x$has_space" != x; then
48015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48018      fi
48019
48020      # Use eval to expand a potential ~
48021      eval path="$path"
48022      if test ! -f "$path" && test ! -d "$path"; then
48023        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48024      fi
48025
48026      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48027    fi
48028  fi
48029
48030
48031  # Only process if variable expands to non-empty
48032
48033  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48035
48036  # Input might be given as Windows format, start by converting to
48037  # unix format.
48038  path="$POTENTIAL_FREETYPE_LIB_PATH"
48039  new_path=`$CYGPATH -u "$path"`
48040
48041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48044  # "foo.exe" is OK but "foo" is an error.
48045  #
48046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48047  # It is also a way to make sure we got the proper file name for the real test later on.
48048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48049  if test "x$test_shortpath" = x; then
48050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48052    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48053  fi
48054
48055  # Call helper function which possibly converts this using DOS-style short mode.
48056  # If so, the updated path is stored in $new_path.
48057
48058  input_path="$new_path"
48059  # Check if we need to convert this using DOS-style short mode. If the path
48060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48061  # take no chances and rewrite it.
48062  # Note: m4 eats our [], so we need to use [ and ] instead.
48063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48064  if test "x$has_forbidden_chars" != x; then
48065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48069      # Going to short mode and back again did indeed matter. Since short mode is
48070      # case insensitive, let's make it lowercase to improve readability.
48071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48072      # Now convert it back to Unix-style (cygpath)
48073      input_path=`$CYGPATH -u "$shortmode_path"`
48074      new_path="$input_path"
48075    fi
48076  fi
48077
48078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48079  if test "x$test_cygdrive_prefix" = x; then
48080    # As a simple fix, exclude /usr/bin since it's not a real path.
48081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48083      # a path prefixed by /cygdrive for fixpath to work.
48084      new_path="$CYGWIN_ROOT_PATH$input_path"
48085    fi
48086  fi
48087
48088
48089  if test "x$path" != "x$new_path"; then
48090    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48093  fi
48094
48095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48096
48097  path="$POTENTIAL_FREETYPE_LIB_PATH"
48098  has_colon=`$ECHO $path | $GREP ^.:`
48099  new_path="$path"
48100  if test "x$has_colon" = x; then
48101    # Not in mixed or Windows style, start by that.
48102    new_path=`cmd //c echo $path`
48103  fi
48104
48105
48106  input_path="$new_path"
48107  # Check if we need to convert this using DOS-style short mode. If the path
48108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48109  # take no chances and rewrite it.
48110  # Note: m4 eats our [], so we need to use [ and ] instead.
48111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48112  if test "x$has_forbidden_chars" != x; then
48113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48115  fi
48116
48117
48118  windows_path="$new_path"
48119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48120    unix_path=`$CYGPATH -u "$windows_path"`
48121    new_path="$unix_path"
48122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48124    new_path="$unix_path"
48125  fi
48126
48127  if test "x$path" != "x$new_path"; then
48128    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48130$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48131  fi
48132
48133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48135
48136    else
48137      # We're on a unix platform. Hooray! :)
48138      path="$POTENTIAL_FREETYPE_LIB_PATH"
48139      has_space=`$ECHO "$path" | $GREP " "`
48140      if test "x$has_space" != x; then
48141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48142$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48144      fi
48145
48146      # Use eval to expand a potential ~
48147      eval path="$path"
48148      if test ! -f "$path" && test ! -d "$path"; then
48149        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48150      fi
48151
48152      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48153    fi
48154  fi
48155
48156
48157    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48159$as_echo_n "checking for freetype includes... " >&6; }
48160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48161$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48162    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48164$as_echo_n "checking for freetype libraries... " >&6; }
48165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48166$as_echo "$FREETYPE_LIB_PATH" >&6; }
48167  fi
48168
48169          if test "x$FOUND_FREETYPE" != xyes; then
48170            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
48171          fi
48172        else
48173          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
48174$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
48175          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
48176        fi
48177      else
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
48179$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
48180      fi
48181    fi
48182
48183    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
48184      # User has specified settings
48185
48186      if test "x$BUNDLE_FREETYPE" = x; then
48187        # If not specified, default is to bundle freetype
48188        BUNDLE_FREETYPE=yes
48189      fi
48190
48191      if test "x$with_freetype" != x; then
48192        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
48193        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
48194      fi
48195
48196      # Allow --with-freetype-lib and --with-freetype-include to override
48197      if test "x$with_freetype_include" != x; then
48198        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
48199      fi
48200      if test "x$with_freetype_lib" != x; then
48201        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
48202      fi
48203
48204      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48205        # Okay, we got it. Check that it works.
48206
48207  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48208  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48209  METHOD="--with-freetype"
48210
48211  # Let's start with an optimistic view of the world :-)
48212  FOUND_FREETYPE=yes
48213
48214  # First look for the canonical freetype main include file ft2build.h.
48215  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48216    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48217    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48218    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48219      # Fail.
48220      FOUND_FREETYPE=no
48221    fi
48222  fi
48223
48224  if test "x$FOUND_FREETYPE" = xyes; then
48225    # Include file found, let's continue the sanity check.
48226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48227$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48228
48229    # Reset to default value
48230    FREETYPE_BASE_NAME=freetype
48231    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48232    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48233      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48234          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48235        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48236        # for the .6 version explicitly.
48237        FREETYPE_BASE_NAME=freetype.6
48238        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48239        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48240$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48241      else
48242        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48243$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48244        FOUND_FREETYPE=no
48245      fi
48246    else
48247      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48248        # On Windows, we will need both .lib and .dll file.
48249        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48250          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48251$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48252          FOUND_FREETYPE=no
48253        fi
48254      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48255          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48256        # Found lib in isa dir, use that instead.
48257        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48258        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48259$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48260      fi
48261    fi
48262  fi
48263
48264  if test "x$FOUND_FREETYPE" = xyes; then
48265
48266  # Only process if variable expands to non-empty
48267
48268  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48270
48271  # Input might be given as Windows format, start by converting to
48272  # unix format.
48273  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48274  new_path=`$CYGPATH -u "$path"`
48275
48276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48279  # "foo.exe" is OK but "foo" is an error.
48280  #
48281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48282  # It is also a way to make sure we got the proper file name for the real test later on.
48283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48284  if test "x$test_shortpath" = x; then
48285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48287    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48288  fi
48289
48290  # Call helper function which possibly converts this using DOS-style short mode.
48291  # If so, the updated path is stored in $new_path.
48292
48293  input_path="$new_path"
48294  # Check if we need to convert this using DOS-style short mode. If the path
48295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48296  # take no chances and rewrite it.
48297  # Note: m4 eats our [], so we need to use [ and ] instead.
48298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48299  if test "x$has_forbidden_chars" != x; then
48300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48304      # Going to short mode and back again did indeed matter. Since short mode is
48305      # case insensitive, let's make it lowercase to improve readability.
48306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48307      # Now convert it back to Unix-style (cygpath)
48308      input_path=`$CYGPATH -u "$shortmode_path"`
48309      new_path="$input_path"
48310    fi
48311  fi
48312
48313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48314  if test "x$test_cygdrive_prefix" = x; then
48315    # As a simple fix, exclude /usr/bin since it's not a real path.
48316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48318      # a path prefixed by /cygdrive for fixpath to work.
48319      new_path="$CYGWIN_ROOT_PATH$input_path"
48320    fi
48321  fi
48322
48323
48324  if test "x$path" != "x$new_path"; then
48325    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48327$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48328  fi
48329
48330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48331
48332  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48333  has_colon=`$ECHO $path | $GREP ^.:`
48334  new_path="$path"
48335  if test "x$has_colon" = x; then
48336    # Not in mixed or Windows style, start by that.
48337    new_path=`cmd //c echo $path`
48338  fi
48339
48340
48341  input_path="$new_path"
48342  # Check if we need to convert this using DOS-style short mode. If the path
48343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48344  # take no chances and rewrite it.
48345  # Note: m4 eats our [], so we need to use [ and ] instead.
48346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48347  if test "x$has_forbidden_chars" != x; then
48348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48350  fi
48351
48352
48353  windows_path="$new_path"
48354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48355    unix_path=`$CYGPATH -u "$windows_path"`
48356    new_path="$unix_path"
48357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48359    new_path="$unix_path"
48360  fi
48361
48362  if test "x$path" != "x$new_path"; then
48363    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48366  fi
48367
48368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48370
48371    else
48372      # We're on a unix platform. Hooray! :)
48373      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48374      has_space=`$ECHO "$path" | $GREP " "`
48375      if test "x$has_space" != x; then
48376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48377$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48379      fi
48380
48381      # Use eval to expand a potential ~
48382      eval path="$path"
48383      if test ! -f "$path" && test ! -d "$path"; then
48384        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48385      fi
48386
48387      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48388    fi
48389  fi
48390
48391
48392  # Only process if variable expands to non-empty
48393
48394  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48396
48397  # Input might be given as Windows format, start by converting to
48398  # unix format.
48399  path="$POTENTIAL_FREETYPE_LIB_PATH"
48400  new_path=`$CYGPATH -u "$path"`
48401
48402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48405  # "foo.exe" is OK but "foo" is an error.
48406  #
48407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48408  # It is also a way to make sure we got the proper file name for the real test later on.
48409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48410  if test "x$test_shortpath" = x; then
48411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48412$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48413    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48414  fi
48415
48416  # Call helper function which possibly converts this using DOS-style short mode.
48417  # If so, the updated path is stored in $new_path.
48418
48419  input_path="$new_path"
48420  # Check if we need to convert this using DOS-style short mode. If the path
48421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48422  # take no chances and rewrite it.
48423  # Note: m4 eats our [], so we need to use [ and ] instead.
48424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48425  if test "x$has_forbidden_chars" != x; then
48426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48430      # Going to short mode and back again did indeed matter. Since short mode is
48431      # case insensitive, let's make it lowercase to improve readability.
48432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48433      # Now convert it back to Unix-style (cygpath)
48434      input_path=`$CYGPATH -u "$shortmode_path"`
48435      new_path="$input_path"
48436    fi
48437  fi
48438
48439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48440  if test "x$test_cygdrive_prefix" = x; then
48441    # As a simple fix, exclude /usr/bin since it's not a real path.
48442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48444      # a path prefixed by /cygdrive for fixpath to work.
48445      new_path="$CYGWIN_ROOT_PATH$input_path"
48446    fi
48447  fi
48448
48449
48450  if test "x$path" != "x$new_path"; then
48451    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48454  fi
48455
48456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48457
48458  path="$POTENTIAL_FREETYPE_LIB_PATH"
48459  has_colon=`$ECHO $path | $GREP ^.:`
48460  new_path="$path"
48461  if test "x$has_colon" = x; then
48462    # Not in mixed or Windows style, start by that.
48463    new_path=`cmd //c echo $path`
48464  fi
48465
48466
48467  input_path="$new_path"
48468  # Check if we need to convert this using DOS-style short mode. If the path
48469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48470  # take no chances and rewrite it.
48471  # Note: m4 eats our [], so we need to use [ and ] instead.
48472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48473  if test "x$has_forbidden_chars" != x; then
48474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48476  fi
48477
48478
48479  windows_path="$new_path"
48480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48481    unix_path=`$CYGPATH -u "$windows_path"`
48482    new_path="$unix_path"
48483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48485    new_path="$unix_path"
48486  fi
48487
48488  if test "x$path" != "x$new_path"; then
48489    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48492  fi
48493
48494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48496
48497    else
48498      # We're on a unix platform. Hooray! :)
48499      path="$POTENTIAL_FREETYPE_LIB_PATH"
48500      has_space=`$ECHO "$path" | $GREP " "`
48501      if test "x$has_space" != x; then
48502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48505      fi
48506
48507      # Use eval to expand a potential ~
48508      eval path="$path"
48509      if test ! -f "$path" && test ! -d "$path"; then
48510        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48511      fi
48512
48513      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48514    fi
48515  fi
48516
48517
48518    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48520$as_echo_n "checking for freetype includes... " >&6; }
48521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48522$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48523    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48525$as_echo_n "checking for freetype libraries... " >&6; }
48526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48527$as_echo "$FREETYPE_LIB_PATH" >&6; }
48528  fi
48529
48530        if test "x$FOUND_FREETYPE" != xyes; then
48531          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
48532        fi
48533      else
48534        # User specified only one of lib or include. This is an error.
48535        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
48536          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
48537$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
48538          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48539        else
48540          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
48541$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
48542          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48543        fi
48544      fi
48545    else
48546      # User did not specify settings, but we need freetype. Try to locate it.
48547
48548      if test "x$BUNDLE_FREETYPE" = x; then
48549        # If not specified, default is to bundle freetype only on windows
48550        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48551          BUNDLE_FREETYPE=yes
48552        else
48553          BUNDLE_FREETYPE=no
48554        fi
48555      fi
48556
48557      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
48558      if test "x$SYSROOT" = x; then
48559        if test "x$FOUND_FREETYPE" != xyes; then
48560          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
48561          if test "x$PKG_CONFIG" != x; then
48562
48563pkg_failed=no
48564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
48565$as_echo_n "checking for FREETYPE... " >&6; }
48566
48567if test -n "$FREETYPE_CFLAGS"; then
48568    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
48569 elif test -n "$PKG_CONFIG"; then
48570    if test -n "$PKG_CONFIG" && \
48571    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48572  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48573  ac_status=$?
48574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48575  test $ac_status = 0; }; then
48576  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
48577else
48578  pkg_failed=yes
48579fi
48580 else
48581    pkg_failed=untried
48582fi
48583if test -n "$FREETYPE_LIBS"; then
48584    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
48585 elif test -n "$PKG_CONFIG"; then
48586    if test -n "$PKG_CONFIG" && \
48587    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48588  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48589  ac_status=$?
48590  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48591  test $ac_status = 0; }; then
48592  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
48593else
48594  pkg_failed=yes
48595fi
48596 else
48597    pkg_failed=untried
48598fi
48599
48600
48601
48602if test $pkg_failed = yes; then
48603
48604if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48605        _pkg_short_errors_supported=yes
48606else
48607        _pkg_short_errors_supported=no
48608fi
48609        if test $_pkg_short_errors_supported = yes; then
48610	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
48611        else
48612	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
48613        fi
48614	# Put the nasty error message in config.log where it belongs
48615	echo "$FREETYPE_PKG_ERRORS" >&5
48616
48617	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48618$as_echo "no" >&6; }
48619                FOUND_FREETYPE=no
48620elif test $pkg_failed = untried; then
48621	FOUND_FREETYPE=no
48622else
48623	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
48624	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
48625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48626$as_echo "yes" >&6; }
48627	FOUND_FREETYPE=yes
48628fi
48629            if test "x$FOUND_FREETYPE" = xyes; then
48630              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
48631              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
48632              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
48633              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48634                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
48635              fi
48636              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
48637              if test "x$BUNDLE_FREETYPE" = xyes; then
48638                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
48639$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
48640                FOUND_FREETYPE=no
48641              else
48642                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
48643$as_echo_n "checking for freetype... " >&6; }
48644                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
48645$as_echo "yes (using pkg-config)" >&6; }
48646              fi
48647            fi
48648          fi
48649        fi
48650      fi
48651
48652      if test "x$FOUND_FREETYPE" != xyes; then
48653        # Check in well-known locations
48654        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48655          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
48656
48657  windows_path="$FREETYPE_BASE_DIR"
48658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48659    unix_path=`$CYGPATH -u "$windows_path"`
48660    FREETYPE_BASE_DIR="$unix_path"
48661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48663    FREETYPE_BASE_DIR="$unix_path"
48664  fi
48665
48666
48667  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48668  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
48669  METHOD="well-known location"
48670
48671  # Let's start with an optimistic view of the world :-)
48672  FOUND_FREETYPE=yes
48673
48674  # First look for the canonical freetype main include file ft2build.h.
48675  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48676    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48677    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48678    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48679      # Fail.
48680      FOUND_FREETYPE=no
48681    fi
48682  fi
48683
48684  if test "x$FOUND_FREETYPE" = xyes; then
48685    # Include file found, let's continue the sanity check.
48686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48687$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48688
48689    # Reset to default value
48690    FREETYPE_BASE_NAME=freetype
48691    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48692    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48693      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48694          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48695        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48696        # for the .6 version explicitly.
48697        FREETYPE_BASE_NAME=freetype.6
48698        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48699        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48700$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48701      else
48702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48703$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48704        FOUND_FREETYPE=no
48705      fi
48706    else
48707      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48708        # On Windows, we will need both .lib and .dll file.
48709        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48710          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48711$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48712          FOUND_FREETYPE=no
48713        fi
48714      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48716        # Found lib in isa dir, use that instead.
48717        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48718        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48719$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48720      fi
48721    fi
48722  fi
48723
48724  if test "x$FOUND_FREETYPE" = xyes; then
48725
48726  # Only process if variable expands to non-empty
48727
48728  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48730
48731  # Input might be given as Windows format, start by converting to
48732  # unix format.
48733  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48734  new_path=`$CYGPATH -u "$path"`
48735
48736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48739  # "foo.exe" is OK but "foo" is an error.
48740  #
48741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48742  # It is also a way to make sure we got the proper file name for the real test later on.
48743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48744  if test "x$test_shortpath" = x; then
48745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48747    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48748  fi
48749
48750  # Call helper function which possibly converts this using DOS-style short mode.
48751  # If so, the updated path is stored in $new_path.
48752
48753  input_path="$new_path"
48754  # Check if we need to convert this using DOS-style short mode. If the path
48755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48756  # take no chances and rewrite it.
48757  # Note: m4 eats our [], so we need to use [ and ] instead.
48758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48759  if test "x$has_forbidden_chars" != x; then
48760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48764      # Going to short mode and back again did indeed matter. Since short mode is
48765      # case insensitive, let's make it lowercase to improve readability.
48766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48767      # Now convert it back to Unix-style (cygpath)
48768      input_path=`$CYGPATH -u "$shortmode_path"`
48769      new_path="$input_path"
48770    fi
48771  fi
48772
48773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48774  if test "x$test_cygdrive_prefix" = x; then
48775    # As a simple fix, exclude /usr/bin since it's not a real path.
48776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48778      # a path prefixed by /cygdrive for fixpath to work.
48779      new_path="$CYGWIN_ROOT_PATH$input_path"
48780    fi
48781  fi
48782
48783
48784  if test "x$path" != "x$new_path"; then
48785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48788  fi
48789
48790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48791
48792  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48793  has_colon=`$ECHO $path | $GREP ^.:`
48794  new_path="$path"
48795  if test "x$has_colon" = x; then
48796    # Not in mixed or Windows style, start by that.
48797    new_path=`cmd //c echo $path`
48798  fi
48799
48800
48801  input_path="$new_path"
48802  # Check if we need to convert this using DOS-style short mode. If the path
48803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48804  # take no chances and rewrite it.
48805  # Note: m4 eats our [], so we need to use [ and ] instead.
48806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48807  if test "x$has_forbidden_chars" != x; then
48808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48810  fi
48811
48812
48813  windows_path="$new_path"
48814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48815    unix_path=`$CYGPATH -u "$windows_path"`
48816    new_path="$unix_path"
48817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48819    new_path="$unix_path"
48820  fi
48821
48822  if test "x$path" != "x$new_path"; then
48823    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48826  fi
48827
48828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48830
48831    else
48832      # We're on a unix platform. Hooray! :)
48833      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48834      has_space=`$ECHO "$path" | $GREP " "`
48835      if test "x$has_space" != x; then
48836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48839      fi
48840
48841      # Use eval to expand a potential ~
48842      eval path="$path"
48843      if test ! -f "$path" && test ! -d "$path"; then
48844        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48845      fi
48846
48847      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48848    fi
48849  fi
48850
48851
48852  # Only process if variable expands to non-empty
48853
48854  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48856
48857  # Input might be given as Windows format, start by converting to
48858  # unix format.
48859  path="$POTENTIAL_FREETYPE_LIB_PATH"
48860  new_path=`$CYGPATH -u "$path"`
48861
48862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48865  # "foo.exe" is OK but "foo" is an error.
48866  #
48867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48868  # It is also a way to make sure we got the proper file name for the real test later on.
48869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48870  if test "x$test_shortpath" = x; then
48871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48873    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48874  fi
48875
48876  # Call helper function which possibly converts this using DOS-style short mode.
48877  # If so, the updated path is stored in $new_path.
48878
48879  input_path="$new_path"
48880  # Check if we need to convert this using DOS-style short mode. If the path
48881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48882  # take no chances and rewrite it.
48883  # Note: m4 eats our [], so we need to use [ and ] instead.
48884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48885  if test "x$has_forbidden_chars" != x; then
48886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48890      # Going to short mode and back again did indeed matter. Since short mode is
48891      # case insensitive, let's make it lowercase to improve readability.
48892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48893      # Now convert it back to Unix-style (cygpath)
48894      input_path=`$CYGPATH -u "$shortmode_path"`
48895      new_path="$input_path"
48896    fi
48897  fi
48898
48899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48900  if test "x$test_cygdrive_prefix" = x; then
48901    # As a simple fix, exclude /usr/bin since it's not a real path.
48902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48904      # a path prefixed by /cygdrive for fixpath to work.
48905      new_path="$CYGWIN_ROOT_PATH$input_path"
48906    fi
48907  fi
48908
48909
48910  if test "x$path" != "x$new_path"; then
48911    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48914  fi
48915
48916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48917
48918  path="$POTENTIAL_FREETYPE_LIB_PATH"
48919  has_colon=`$ECHO $path | $GREP ^.:`
48920  new_path="$path"
48921  if test "x$has_colon" = x; then
48922    # Not in mixed or Windows style, start by that.
48923    new_path=`cmd //c echo $path`
48924  fi
48925
48926
48927  input_path="$new_path"
48928  # Check if we need to convert this using DOS-style short mode. If the path
48929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48930  # take no chances and rewrite it.
48931  # Note: m4 eats our [], so we need to use [ and ] instead.
48932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48933  if test "x$has_forbidden_chars" != x; then
48934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48936  fi
48937
48938
48939  windows_path="$new_path"
48940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48941    unix_path=`$CYGPATH -u "$windows_path"`
48942    new_path="$unix_path"
48943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48945    new_path="$unix_path"
48946  fi
48947
48948  if test "x$path" != "x$new_path"; then
48949    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48952  fi
48953
48954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48956
48957    else
48958      # We're on a unix platform. Hooray! :)
48959      path="$POTENTIAL_FREETYPE_LIB_PATH"
48960      has_space=`$ECHO "$path" | $GREP " "`
48961      if test "x$has_space" != x; then
48962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48965      fi
48966
48967      # Use eval to expand a potential ~
48968      eval path="$path"
48969      if test ! -f "$path" && test ! -d "$path"; then
48970        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48971      fi
48972
48973      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48974    fi
48975  fi
48976
48977
48978    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48980$as_echo_n "checking for freetype includes... " >&6; }
48981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48982$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48983    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48985$as_echo_n "checking for freetype libraries... " >&6; }
48986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48987$as_echo "$FREETYPE_LIB_PATH" >&6; }
48988  fi
48989
48990          if test "x$FOUND_FREETYPE" != xyes; then
48991            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
48992
48993  windows_path="$FREETYPE_BASE_DIR"
48994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48995    unix_path=`$CYGPATH -u "$windows_path"`
48996    FREETYPE_BASE_DIR="$unix_path"
48997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48999    FREETYPE_BASE_DIR="$unix_path"
49000  fi
49001
49002
49003  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49004  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49005  METHOD="well-known location"
49006
49007  # Let's start with an optimistic view of the world :-)
49008  FOUND_FREETYPE=yes
49009
49010  # First look for the canonical freetype main include file ft2build.h.
49011  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49012    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49013    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49014    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49015      # Fail.
49016      FOUND_FREETYPE=no
49017    fi
49018  fi
49019
49020  if test "x$FOUND_FREETYPE" = xyes; then
49021    # Include file found, let's continue the sanity check.
49022    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49023$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49024
49025    # Reset to default value
49026    FREETYPE_BASE_NAME=freetype
49027    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49028    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49029      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49030          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49031        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49032        # for the .6 version explicitly.
49033        FREETYPE_BASE_NAME=freetype.6
49034        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49035        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49036$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49037      else
49038        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49039$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49040        FOUND_FREETYPE=no
49041      fi
49042    else
49043      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49044        # On Windows, we will need both .lib and .dll file.
49045        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49046          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49048          FOUND_FREETYPE=no
49049        fi
49050      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49051          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49052        # Found lib in isa dir, use that instead.
49053        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49054        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49055$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49056      fi
49057    fi
49058  fi
49059
49060  if test "x$FOUND_FREETYPE" = xyes; then
49061
49062  # Only process if variable expands to non-empty
49063
49064  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49066
49067  # Input might be given as Windows format, start by converting to
49068  # unix format.
49069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49070  new_path=`$CYGPATH -u "$path"`
49071
49072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49075  # "foo.exe" is OK but "foo" is an error.
49076  #
49077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49078  # It is also a way to make sure we got the proper file name for the real test later on.
49079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49080  if test "x$test_shortpath" = x; then
49081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49084  fi
49085
49086  # Call helper function which possibly converts this using DOS-style short mode.
49087  # If so, the updated path is stored in $new_path.
49088
49089  input_path="$new_path"
49090  # Check if we need to convert this using DOS-style short mode. If the path
49091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49092  # take no chances and rewrite it.
49093  # Note: m4 eats our [], so we need to use [ and ] instead.
49094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49095  if test "x$has_forbidden_chars" != x; then
49096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49100      # Going to short mode and back again did indeed matter. Since short mode is
49101      # case insensitive, let's make it lowercase to improve readability.
49102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49103      # Now convert it back to Unix-style (cygpath)
49104      input_path=`$CYGPATH -u "$shortmode_path"`
49105      new_path="$input_path"
49106    fi
49107  fi
49108
49109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49110  if test "x$test_cygdrive_prefix" = x; then
49111    # As a simple fix, exclude /usr/bin since it's not a real path.
49112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49114      # a path prefixed by /cygdrive for fixpath to work.
49115      new_path="$CYGWIN_ROOT_PATH$input_path"
49116    fi
49117  fi
49118
49119
49120  if test "x$path" != "x$new_path"; then
49121    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49124  fi
49125
49126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49127
49128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49129  has_colon=`$ECHO $path | $GREP ^.:`
49130  new_path="$path"
49131  if test "x$has_colon" = x; then
49132    # Not in mixed or Windows style, start by that.
49133    new_path=`cmd //c echo $path`
49134  fi
49135
49136
49137  input_path="$new_path"
49138  # Check if we need to convert this using DOS-style short mode. If the path
49139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49140  # take no chances and rewrite it.
49141  # Note: m4 eats our [], so we need to use [ and ] instead.
49142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49143  if test "x$has_forbidden_chars" != x; then
49144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49146  fi
49147
49148
49149  windows_path="$new_path"
49150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49151    unix_path=`$CYGPATH -u "$windows_path"`
49152    new_path="$unix_path"
49153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49155    new_path="$unix_path"
49156  fi
49157
49158  if test "x$path" != "x$new_path"; then
49159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49162  fi
49163
49164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49166
49167    else
49168      # We're on a unix platform. Hooray! :)
49169      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49170      has_space=`$ECHO "$path" | $GREP " "`
49171      if test "x$has_space" != x; then
49172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49175      fi
49176
49177      # Use eval to expand a potential ~
49178      eval path="$path"
49179      if test ! -f "$path" && test ! -d "$path"; then
49180        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49181      fi
49182
49183      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49184    fi
49185  fi
49186
49187
49188  # Only process if variable expands to non-empty
49189
49190  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49192
49193  # Input might be given as Windows format, start by converting to
49194  # unix format.
49195  path="$POTENTIAL_FREETYPE_LIB_PATH"
49196  new_path=`$CYGPATH -u "$path"`
49197
49198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49201  # "foo.exe" is OK but "foo" is an error.
49202  #
49203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49204  # It is also a way to make sure we got the proper file name for the real test later on.
49205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49206  if test "x$test_shortpath" = x; then
49207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49209    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49210  fi
49211
49212  # Call helper function which possibly converts this using DOS-style short mode.
49213  # If so, the updated path is stored in $new_path.
49214
49215  input_path="$new_path"
49216  # Check if we need to convert this using DOS-style short mode. If the path
49217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49218  # take no chances and rewrite it.
49219  # Note: m4 eats our [], so we need to use [ and ] instead.
49220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49221  if test "x$has_forbidden_chars" != x; then
49222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49226      # Going to short mode and back again did indeed matter. Since short mode is
49227      # case insensitive, let's make it lowercase to improve readability.
49228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49229      # Now convert it back to Unix-style (cygpath)
49230      input_path=`$CYGPATH -u "$shortmode_path"`
49231      new_path="$input_path"
49232    fi
49233  fi
49234
49235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49236  if test "x$test_cygdrive_prefix" = x; then
49237    # As a simple fix, exclude /usr/bin since it's not a real path.
49238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49240      # a path prefixed by /cygdrive for fixpath to work.
49241      new_path="$CYGWIN_ROOT_PATH$input_path"
49242    fi
49243  fi
49244
49245
49246  if test "x$path" != "x$new_path"; then
49247    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49250  fi
49251
49252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49253
49254  path="$POTENTIAL_FREETYPE_LIB_PATH"
49255  has_colon=`$ECHO $path | $GREP ^.:`
49256  new_path="$path"
49257  if test "x$has_colon" = x; then
49258    # Not in mixed or Windows style, start by that.
49259    new_path=`cmd //c echo $path`
49260  fi
49261
49262
49263  input_path="$new_path"
49264  # Check if we need to convert this using DOS-style short mode. If the path
49265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49266  # take no chances and rewrite it.
49267  # Note: m4 eats our [], so we need to use [ and ] instead.
49268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49269  if test "x$has_forbidden_chars" != x; then
49270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49272  fi
49273
49274
49275  windows_path="$new_path"
49276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49277    unix_path=`$CYGPATH -u "$windows_path"`
49278    new_path="$unix_path"
49279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49281    new_path="$unix_path"
49282  fi
49283
49284  if test "x$path" != "x$new_path"; then
49285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49288  fi
49289
49290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49292
49293    else
49294      # We're on a unix platform. Hooray! :)
49295      path="$POTENTIAL_FREETYPE_LIB_PATH"
49296      has_space=`$ECHO "$path" | $GREP " "`
49297      if test "x$has_space" != x; then
49298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49301      fi
49302
49303      # Use eval to expand a potential ~
49304      eval path="$path"
49305      if test ! -f "$path" && test ! -d "$path"; then
49306        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49307      fi
49308
49309      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49310    fi
49311  fi
49312
49313
49314    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49316$as_echo_n "checking for freetype includes... " >&6; }
49317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49318$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49319    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49321$as_echo_n "checking for freetype libraries... " >&6; }
49322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49323$as_echo "$FREETYPE_LIB_PATH" >&6; }
49324  fi
49325
49326          fi
49327        else
49328          FREETYPE_BASE_DIR="$SYSROOT/usr"
49329
49330  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49331  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49332  METHOD="well-known location"
49333
49334  # Let's start with an optimistic view of the world :-)
49335  FOUND_FREETYPE=yes
49336
49337  # First look for the canonical freetype main include file ft2build.h.
49338  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49339    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49340    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49341    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49342      # Fail.
49343      FOUND_FREETYPE=no
49344    fi
49345  fi
49346
49347  if test "x$FOUND_FREETYPE" = xyes; then
49348    # Include file found, let's continue the sanity check.
49349    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49350$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49351
49352    # Reset to default value
49353    FREETYPE_BASE_NAME=freetype
49354    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49355    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49356      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49357          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49358        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49359        # for the .6 version explicitly.
49360        FREETYPE_BASE_NAME=freetype.6
49361        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49362        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49363$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49364      else
49365        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49366$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49367        FOUND_FREETYPE=no
49368      fi
49369    else
49370      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49371        # On Windows, we will need both .lib and .dll file.
49372        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49373          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49374$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49375          FOUND_FREETYPE=no
49376        fi
49377      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49378          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49379        # Found lib in isa dir, use that instead.
49380        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49381        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49382$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49383      fi
49384    fi
49385  fi
49386
49387  if test "x$FOUND_FREETYPE" = xyes; then
49388
49389  # Only process if variable expands to non-empty
49390
49391  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49393
49394  # Input might be given as Windows format, start by converting to
49395  # unix format.
49396  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49397  new_path=`$CYGPATH -u "$path"`
49398
49399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49402  # "foo.exe" is OK but "foo" is an error.
49403  #
49404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49405  # It is also a way to make sure we got the proper file name for the real test later on.
49406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49407  if test "x$test_shortpath" = x; then
49408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49410    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49411  fi
49412
49413  # Call helper function which possibly converts this using DOS-style short mode.
49414  # If so, the updated path is stored in $new_path.
49415
49416  input_path="$new_path"
49417  # Check if we need to convert this using DOS-style short mode. If the path
49418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49419  # take no chances and rewrite it.
49420  # Note: m4 eats our [], so we need to use [ and ] instead.
49421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49422  if test "x$has_forbidden_chars" != x; then
49423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49427      # Going to short mode and back again did indeed matter. Since short mode is
49428      # case insensitive, let's make it lowercase to improve readability.
49429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49430      # Now convert it back to Unix-style (cygpath)
49431      input_path=`$CYGPATH -u "$shortmode_path"`
49432      new_path="$input_path"
49433    fi
49434  fi
49435
49436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49437  if test "x$test_cygdrive_prefix" = x; then
49438    # As a simple fix, exclude /usr/bin since it's not a real path.
49439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49441      # a path prefixed by /cygdrive for fixpath to work.
49442      new_path="$CYGWIN_ROOT_PATH$input_path"
49443    fi
49444  fi
49445
49446
49447  if test "x$path" != "x$new_path"; then
49448    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49450$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49451  fi
49452
49453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49454
49455  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49456  has_colon=`$ECHO $path | $GREP ^.:`
49457  new_path="$path"
49458  if test "x$has_colon" = x; then
49459    # Not in mixed or Windows style, start by that.
49460    new_path=`cmd //c echo $path`
49461  fi
49462
49463
49464  input_path="$new_path"
49465  # Check if we need to convert this using DOS-style short mode. If the path
49466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49467  # take no chances and rewrite it.
49468  # Note: m4 eats our [], so we need to use [ and ] instead.
49469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49470  if test "x$has_forbidden_chars" != x; then
49471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49473  fi
49474
49475
49476  windows_path="$new_path"
49477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49478    unix_path=`$CYGPATH -u "$windows_path"`
49479    new_path="$unix_path"
49480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49482    new_path="$unix_path"
49483  fi
49484
49485  if test "x$path" != "x$new_path"; then
49486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49489  fi
49490
49491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49493
49494    else
49495      # We're on a unix platform. Hooray! :)
49496      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49497      has_space=`$ECHO "$path" | $GREP " "`
49498      if test "x$has_space" != x; then
49499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49502      fi
49503
49504      # Use eval to expand a potential ~
49505      eval path="$path"
49506      if test ! -f "$path" && test ! -d "$path"; then
49507        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49508      fi
49509
49510      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49511    fi
49512  fi
49513
49514
49515  # Only process if variable expands to non-empty
49516
49517  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49519
49520  # Input might be given as Windows format, start by converting to
49521  # unix format.
49522  path="$POTENTIAL_FREETYPE_LIB_PATH"
49523  new_path=`$CYGPATH -u "$path"`
49524
49525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49528  # "foo.exe" is OK but "foo" is an error.
49529  #
49530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49531  # It is also a way to make sure we got the proper file name for the real test later on.
49532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49533  if test "x$test_shortpath" = x; then
49534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49537  fi
49538
49539  # Call helper function which possibly converts this using DOS-style short mode.
49540  # If so, the updated path is stored in $new_path.
49541
49542  input_path="$new_path"
49543  # Check if we need to convert this using DOS-style short mode. If the path
49544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49545  # take no chances and rewrite it.
49546  # Note: m4 eats our [], so we need to use [ and ] instead.
49547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49548  if test "x$has_forbidden_chars" != x; then
49549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49553      # Going to short mode and back again did indeed matter. Since short mode is
49554      # case insensitive, let's make it lowercase to improve readability.
49555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49556      # Now convert it back to Unix-style (cygpath)
49557      input_path=`$CYGPATH -u "$shortmode_path"`
49558      new_path="$input_path"
49559    fi
49560  fi
49561
49562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49563  if test "x$test_cygdrive_prefix" = x; then
49564    # As a simple fix, exclude /usr/bin since it's not a real path.
49565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49567      # a path prefixed by /cygdrive for fixpath to work.
49568      new_path="$CYGWIN_ROOT_PATH$input_path"
49569    fi
49570  fi
49571
49572
49573  if test "x$path" != "x$new_path"; then
49574    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49577  fi
49578
49579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49580
49581  path="$POTENTIAL_FREETYPE_LIB_PATH"
49582  has_colon=`$ECHO $path | $GREP ^.:`
49583  new_path="$path"
49584  if test "x$has_colon" = x; then
49585    # Not in mixed or Windows style, start by that.
49586    new_path=`cmd //c echo $path`
49587  fi
49588
49589
49590  input_path="$new_path"
49591  # Check if we need to convert this using DOS-style short mode. If the path
49592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49593  # take no chances and rewrite it.
49594  # Note: m4 eats our [], so we need to use [ and ] instead.
49595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49596  if test "x$has_forbidden_chars" != x; then
49597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49599  fi
49600
49601
49602  windows_path="$new_path"
49603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49604    unix_path=`$CYGPATH -u "$windows_path"`
49605    new_path="$unix_path"
49606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49608    new_path="$unix_path"
49609  fi
49610
49611  if test "x$path" != "x$new_path"; then
49612    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49615  fi
49616
49617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49619
49620    else
49621      # We're on a unix platform. Hooray! :)
49622      path="$POTENTIAL_FREETYPE_LIB_PATH"
49623      has_space=`$ECHO "$path" | $GREP " "`
49624      if test "x$has_space" != x; then
49625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49628      fi
49629
49630      # Use eval to expand a potential ~
49631      eval path="$path"
49632      if test ! -f "$path" && test ! -d "$path"; then
49633        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49634      fi
49635
49636      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49637    fi
49638  fi
49639
49640
49641    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49643$as_echo_n "checking for freetype includes... " >&6; }
49644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49645$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49646    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49648$as_echo_n "checking for freetype libraries... " >&6; }
49649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49650$as_echo "$FREETYPE_LIB_PATH" >&6; }
49651  fi
49652
49653
49654          if test "x$FOUND_FREETYPE" != xyes; then
49655            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
49656
49657  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49658  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49659  METHOD="well-known location"
49660
49661  # Let's start with an optimistic view of the world :-)
49662  FOUND_FREETYPE=yes
49663
49664  # First look for the canonical freetype main include file ft2build.h.
49665  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49666    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49667    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49668    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49669      # Fail.
49670      FOUND_FREETYPE=no
49671    fi
49672  fi
49673
49674  if test "x$FOUND_FREETYPE" = xyes; then
49675    # Include file found, let's continue the sanity check.
49676    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49677$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49678
49679    # Reset to default value
49680    FREETYPE_BASE_NAME=freetype
49681    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49682    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49683      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49684          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49685        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49686        # for the .6 version explicitly.
49687        FREETYPE_BASE_NAME=freetype.6
49688        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49689        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49690$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49691      else
49692        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49693$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49694        FOUND_FREETYPE=no
49695      fi
49696    else
49697      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49698        # On Windows, we will need both .lib and .dll file.
49699        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49700          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49701$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49702          FOUND_FREETYPE=no
49703        fi
49704      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49705          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49706        # Found lib in isa dir, use that instead.
49707        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49708        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49709$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49710      fi
49711    fi
49712  fi
49713
49714  if test "x$FOUND_FREETYPE" = xyes; then
49715
49716  # Only process if variable expands to non-empty
49717
49718  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49720
49721  # Input might be given as Windows format, start by converting to
49722  # unix format.
49723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49724  new_path=`$CYGPATH -u "$path"`
49725
49726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49729  # "foo.exe" is OK but "foo" is an error.
49730  #
49731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49732  # It is also a way to make sure we got the proper file name for the real test later on.
49733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49734  if test "x$test_shortpath" = x; then
49735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49737    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49738  fi
49739
49740  # Call helper function which possibly converts this using DOS-style short mode.
49741  # If so, the updated path is stored in $new_path.
49742
49743  input_path="$new_path"
49744  # Check if we need to convert this using DOS-style short mode. If the path
49745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49746  # take no chances and rewrite it.
49747  # Note: m4 eats our [], so we need to use [ and ] instead.
49748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49749  if test "x$has_forbidden_chars" != x; then
49750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49754      # Going to short mode and back again did indeed matter. Since short mode is
49755      # case insensitive, let's make it lowercase to improve readability.
49756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49757      # Now convert it back to Unix-style (cygpath)
49758      input_path=`$CYGPATH -u "$shortmode_path"`
49759      new_path="$input_path"
49760    fi
49761  fi
49762
49763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49764  if test "x$test_cygdrive_prefix" = x; then
49765    # As a simple fix, exclude /usr/bin since it's not a real path.
49766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49768      # a path prefixed by /cygdrive for fixpath to work.
49769      new_path="$CYGWIN_ROOT_PATH$input_path"
49770    fi
49771  fi
49772
49773
49774  if test "x$path" != "x$new_path"; then
49775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49778  fi
49779
49780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49781
49782  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49783  has_colon=`$ECHO $path | $GREP ^.:`
49784  new_path="$path"
49785  if test "x$has_colon" = x; then
49786    # Not in mixed or Windows style, start by that.
49787    new_path=`cmd //c echo $path`
49788  fi
49789
49790
49791  input_path="$new_path"
49792  # Check if we need to convert this using DOS-style short mode. If the path
49793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49794  # take no chances and rewrite it.
49795  # Note: m4 eats our [], so we need to use [ and ] instead.
49796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49797  if test "x$has_forbidden_chars" != x; then
49798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49800  fi
49801
49802
49803  windows_path="$new_path"
49804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49805    unix_path=`$CYGPATH -u "$windows_path"`
49806    new_path="$unix_path"
49807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49809    new_path="$unix_path"
49810  fi
49811
49812  if test "x$path" != "x$new_path"; then
49813    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49816  fi
49817
49818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49820
49821    else
49822      # We're on a unix platform. Hooray! :)
49823      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49824      has_space=`$ECHO "$path" | $GREP " "`
49825      if test "x$has_space" != x; then
49826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49827$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49829      fi
49830
49831      # Use eval to expand a potential ~
49832      eval path="$path"
49833      if test ! -f "$path" && test ! -d "$path"; then
49834        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49835      fi
49836
49837      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49838    fi
49839  fi
49840
49841
49842  # Only process if variable expands to non-empty
49843
49844  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49846
49847  # Input might be given as Windows format, start by converting to
49848  # unix format.
49849  path="$POTENTIAL_FREETYPE_LIB_PATH"
49850  new_path=`$CYGPATH -u "$path"`
49851
49852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49855  # "foo.exe" is OK but "foo" is an error.
49856  #
49857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49858  # It is also a way to make sure we got the proper file name for the real test later on.
49859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49860  if test "x$test_shortpath" = x; then
49861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49863    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49864  fi
49865
49866  # Call helper function which possibly converts this using DOS-style short mode.
49867  # If so, the updated path is stored in $new_path.
49868
49869  input_path="$new_path"
49870  # Check if we need to convert this using DOS-style short mode. If the path
49871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49872  # take no chances and rewrite it.
49873  # Note: m4 eats our [], so we need to use [ and ] instead.
49874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49875  if test "x$has_forbidden_chars" != x; then
49876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49880      # Going to short mode and back again did indeed matter. Since short mode is
49881      # case insensitive, let's make it lowercase to improve readability.
49882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49883      # Now convert it back to Unix-style (cygpath)
49884      input_path=`$CYGPATH -u "$shortmode_path"`
49885      new_path="$input_path"
49886    fi
49887  fi
49888
49889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49890  if test "x$test_cygdrive_prefix" = x; then
49891    # As a simple fix, exclude /usr/bin since it's not a real path.
49892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49894      # a path prefixed by /cygdrive for fixpath to work.
49895      new_path="$CYGWIN_ROOT_PATH$input_path"
49896    fi
49897  fi
49898
49899
49900  if test "x$path" != "x$new_path"; then
49901    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49904  fi
49905
49906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49907
49908  path="$POTENTIAL_FREETYPE_LIB_PATH"
49909  has_colon=`$ECHO $path | $GREP ^.:`
49910  new_path="$path"
49911  if test "x$has_colon" = x; then
49912    # Not in mixed or Windows style, start by that.
49913    new_path=`cmd //c echo $path`
49914  fi
49915
49916
49917  input_path="$new_path"
49918  # Check if we need to convert this using DOS-style short mode. If the path
49919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49920  # take no chances and rewrite it.
49921  # Note: m4 eats our [], so we need to use [ and ] instead.
49922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49923  if test "x$has_forbidden_chars" != x; then
49924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49926  fi
49927
49928
49929  windows_path="$new_path"
49930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49931    unix_path=`$CYGPATH -u "$windows_path"`
49932    new_path="$unix_path"
49933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49935    new_path="$unix_path"
49936  fi
49937
49938  if test "x$path" != "x$new_path"; then
49939    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49942  fi
49943
49944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49946
49947    else
49948      # We're on a unix platform. Hooray! :)
49949      path="$POTENTIAL_FREETYPE_LIB_PATH"
49950      has_space=`$ECHO "$path" | $GREP " "`
49951      if test "x$has_space" != x; then
49952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49955      fi
49956
49957      # Use eval to expand a potential ~
49958      eval path="$path"
49959      if test ! -f "$path" && test ! -d "$path"; then
49960        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49961      fi
49962
49963      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49964    fi
49965  fi
49966
49967
49968    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49970$as_echo_n "checking for freetype includes... " >&6; }
49971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49972$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49973    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49975$as_echo_n "checking for freetype libraries... " >&6; }
49976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49977$as_echo "$FREETYPE_LIB_PATH" >&6; }
49978  fi
49979
49980          fi
49981
49982          if test "x$FOUND_FREETYPE" != xyes; then
49983            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
49984
49985  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49986  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49987  METHOD="well-known location"
49988
49989  # Let's start with an optimistic view of the world :-)
49990  FOUND_FREETYPE=yes
49991
49992  # First look for the canonical freetype main include file ft2build.h.
49993  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49994    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49995    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49996    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49997      # Fail.
49998      FOUND_FREETYPE=no
49999    fi
50000  fi
50001
50002  if test "x$FOUND_FREETYPE" = xyes; then
50003    # Include file found, let's continue the sanity check.
50004    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50005$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50006
50007    # Reset to default value
50008    FREETYPE_BASE_NAME=freetype
50009    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50010    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50011      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50012          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50013        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50014        # for the .6 version explicitly.
50015        FREETYPE_BASE_NAME=freetype.6
50016        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50017        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50018$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50019      else
50020        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50021$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50022        FOUND_FREETYPE=no
50023      fi
50024    else
50025      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50026        # On Windows, we will need both .lib and .dll file.
50027        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50028          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50029$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50030          FOUND_FREETYPE=no
50031        fi
50032      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50033          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50034        # Found lib in isa dir, use that instead.
50035        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50036        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50037$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50038      fi
50039    fi
50040  fi
50041
50042  if test "x$FOUND_FREETYPE" = xyes; then
50043
50044  # Only process if variable expands to non-empty
50045
50046  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50048
50049  # Input might be given as Windows format, start by converting to
50050  # unix format.
50051  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50052  new_path=`$CYGPATH -u "$path"`
50053
50054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50057  # "foo.exe" is OK but "foo" is an error.
50058  #
50059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50060  # It is also a way to make sure we got the proper file name for the real test later on.
50061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50062  if test "x$test_shortpath" = x; then
50063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50065    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50066  fi
50067
50068  # Call helper function which possibly converts this using DOS-style short mode.
50069  # If so, the updated path is stored in $new_path.
50070
50071  input_path="$new_path"
50072  # Check if we need to convert this using DOS-style short mode. If the path
50073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50074  # take no chances and rewrite it.
50075  # Note: m4 eats our [], so we need to use [ and ] instead.
50076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50077  if test "x$has_forbidden_chars" != x; then
50078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50082      # Going to short mode and back again did indeed matter. Since short mode is
50083      # case insensitive, let's make it lowercase to improve readability.
50084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50085      # Now convert it back to Unix-style (cygpath)
50086      input_path=`$CYGPATH -u "$shortmode_path"`
50087      new_path="$input_path"
50088    fi
50089  fi
50090
50091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50092  if test "x$test_cygdrive_prefix" = x; then
50093    # As a simple fix, exclude /usr/bin since it's not a real path.
50094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50096      # a path prefixed by /cygdrive for fixpath to work.
50097      new_path="$CYGWIN_ROOT_PATH$input_path"
50098    fi
50099  fi
50100
50101
50102  if test "x$path" != "x$new_path"; then
50103    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50106  fi
50107
50108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50109
50110  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50111  has_colon=`$ECHO $path | $GREP ^.:`
50112  new_path="$path"
50113  if test "x$has_colon" = x; then
50114    # Not in mixed or Windows style, start by that.
50115    new_path=`cmd //c echo $path`
50116  fi
50117
50118
50119  input_path="$new_path"
50120  # Check if we need to convert this using DOS-style short mode. If the path
50121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50122  # take no chances and rewrite it.
50123  # Note: m4 eats our [], so we need to use [ and ] instead.
50124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50125  if test "x$has_forbidden_chars" != x; then
50126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50128  fi
50129
50130
50131  windows_path="$new_path"
50132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50133    unix_path=`$CYGPATH -u "$windows_path"`
50134    new_path="$unix_path"
50135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50137    new_path="$unix_path"
50138  fi
50139
50140  if test "x$path" != "x$new_path"; then
50141    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50144  fi
50145
50146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50148
50149    else
50150      # We're on a unix platform. Hooray! :)
50151      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50152      has_space=`$ECHO "$path" | $GREP " "`
50153      if test "x$has_space" != x; then
50154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50157      fi
50158
50159      # Use eval to expand a potential ~
50160      eval path="$path"
50161      if test ! -f "$path" && test ! -d "$path"; then
50162        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50163      fi
50164
50165      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50166    fi
50167  fi
50168
50169
50170  # Only process if variable expands to non-empty
50171
50172  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50174
50175  # Input might be given as Windows format, start by converting to
50176  # unix format.
50177  path="$POTENTIAL_FREETYPE_LIB_PATH"
50178  new_path=`$CYGPATH -u "$path"`
50179
50180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50183  # "foo.exe" is OK but "foo" is an error.
50184  #
50185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50186  # It is also a way to make sure we got the proper file name for the real test later on.
50187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50188  if test "x$test_shortpath" = x; then
50189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50192  fi
50193
50194  # Call helper function which possibly converts this using DOS-style short mode.
50195  # If so, the updated path is stored in $new_path.
50196
50197  input_path="$new_path"
50198  # Check if we need to convert this using DOS-style short mode. If the path
50199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50200  # take no chances and rewrite it.
50201  # Note: m4 eats our [], so we need to use [ and ] instead.
50202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50203  if test "x$has_forbidden_chars" != x; then
50204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50208      # Going to short mode and back again did indeed matter. Since short mode is
50209      # case insensitive, let's make it lowercase to improve readability.
50210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50211      # Now convert it back to Unix-style (cygpath)
50212      input_path=`$CYGPATH -u "$shortmode_path"`
50213      new_path="$input_path"
50214    fi
50215  fi
50216
50217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50218  if test "x$test_cygdrive_prefix" = x; then
50219    # As a simple fix, exclude /usr/bin since it's not a real path.
50220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50222      # a path prefixed by /cygdrive for fixpath to work.
50223      new_path="$CYGWIN_ROOT_PATH$input_path"
50224    fi
50225  fi
50226
50227
50228  if test "x$path" != "x$new_path"; then
50229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50232  fi
50233
50234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50235
50236  path="$POTENTIAL_FREETYPE_LIB_PATH"
50237  has_colon=`$ECHO $path | $GREP ^.:`
50238  new_path="$path"
50239  if test "x$has_colon" = x; then
50240    # Not in mixed or Windows style, start by that.
50241    new_path=`cmd //c echo $path`
50242  fi
50243
50244
50245  input_path="$new_path"
50246  # Check if we need to convert this using DOS-style short mode. If the path
50247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50248  # take no chances and rewrite it.
50249  # Note: m4 eats our [], so we need to use [ and ] instead.
50250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50251  if test "x$has_forbidden_chars" != x; then
50252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50254  fi
50255
50256
50257  windows_path="$new_path"
50258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50259    unix_path=`$CYGPATH -u "$windows_path"`
50260    new_path="$unix_path"
50261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50263    new_path="$unix_path"
50264  fi
50265
50266  if test "x$path" != "x$new_path"; then
50267    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50270  fi
50271
50272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50274
50275    else
50276      # We're on a unix platform. Hooray! :)
50277      path="$POTENTIAL_FREETYPE_LIB_PATH"
50278      has_space=`$ECHO "$path" | $GREP " "`
50279      if test "x$has_space" != x; then
50280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50283      fi
50284
50285      # Use eval to expand a potential ~
50286      eval path="$path"
50287      if test ! -f "$path" && test ! -d "$path"; then
50288        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50289      fi
50290
50291      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50292    fi
50293  fi
50294
50295
50296    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50298$as_echo_n "checking for freetype includes... " >&6; }
50299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50300$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50301    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50303$as_echo_n "checking for freetype libraries... " >&6; }
50304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50305$as_echo "$FREETYPE_LIB_PATH" >&6; }
50306  fi
50307
50308          fi
50309
50310          if test "x$FOUND_FREETYPE" != xyes; then
50311            FREETYPE_BASE_DIR="$SYSROOT/usr"
50312            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50313
50314  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50315  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
50316  METHOD="well-known location"
50317
50318  # Let's start with an optimistic view of the world :-)
50319  FOUND_FREETYPE=yes
50320
50321  # First look for the canonical freetype main include file ft2build.h.
50322  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50323    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50324    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50325    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50326      # Fail.
50327      FOUND_FREETYPE=no
50328    fi
50329  fi
50330
50331  if test "x$FOUND_FREETYPE" = xyes; then
50332    # Include file found, let's continue the sanity check.
50333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50334$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50335
50336    # Reset to default value
50337    FREETYPE_BASE_NAME=freetype
50338    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50339    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50340      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50341          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50342        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50343        # for the .6 version explicitly.
50344        FREETYPE_BASE_NAME=freetype.6
50345        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50346        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50347$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50348      else
50349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50350$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50351        FOUND_FREETYPE=no
50352      fi
50353    else
50354      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50355        # On Windows, we will need both .lib and .dll file.
50356        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50357          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50358$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50359          FOUND_FREETYPE=no
50360        fi
50361      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50362          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50363        # Found lib in isa dir, use that instead.
50364        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50365        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50366$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50367      fi
50368    fi
50369  fi
50370
50371  if test "x$FOUND_FREETYPE" = xyes; then
50372
50373  # Only process if variable expands to non-empty
50374
50375  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50377
50378  # Input might be given as Windows format, start by converting to
50379  # unix format.
50380  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50381  new_path=`$CYGPATH -u "$path"`
50382
50383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50386  # "foo.exe" is OK but "foo" is an error.
50387  #
50388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50389  # It is also a way to make sure we got the proper file name for the real test later on.
50390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50391  if test "x$test_shortpath" = x; then
50392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50394    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50395  fi
50396
50397  # Call helper function which possibly converts this using DOS-style short mode.
50398  # If so, the updated path is stored in $new_path.
50399
50400  input_path="$new_path"
50401  # Check if we need to convert this using DOS-style short mode. If the path
50402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50403  # take no chances and rewrite it.
50404  # Note: m4 eats our [], so we need to use [ and ] instead.
50405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50406  if test "x$has_forbidden_chars" != x; then
50407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50411      # Going to short mode and back again did indeed matter. Since short mode is
50412      # case insensitive, let's make it lowercase to improve readability.
50413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50414      # Now convert it back to Unix-style (cygpath)
50415      input_path=`$CYGPATH -u "$shortmode_path"`
50416      new_path="$input_path"
50417    fi
50418  fi
50419
50420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50421  if test "x$test_cygdrive_prefix" = x; then
50422    # As a simple fix, exclude /usr/bin since it's not a real path.
50423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50425      # a path prefixed by /cygdrive for fixpath to work.
50426      new_path="$CYGWIN_ROOT_PATH$input_path"
50427    fi
50428  fi
50429
50430
50431  if test "x$path" != "x$new_path"; then
50432    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50435  fi
50436
50437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50438
50439  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50440  has_colon=`$ECHO $path | $GREP ^.:`
50441  new_path="$path"
50442  if test "x$has_colon" = x; then
50443    # Not in mixed or Windows style, start by that.
50444    new_path=`cmd //c echo $path`
50445  fi
50446
50447
50448  input_path="$new_path"
50449  # Check if we need to convert this using DOS-style short mode. If the path
50450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50451  # take no chances and rewrite it.
50452  # Note: m4 eats our [], so we need to use [ and ] instead.
50453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50454  if test "x$has_forbidden_chars" != x; then
50455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50457  fi
50458
50459
50460  windows_path="$new_path"
50461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50462    unix_path=`$CYGPATH -u "$windows_path"`
50463    new_path="$unix_path"
50464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50466    new_path="$unix_path"
50467  fi
50468
50469  if test "x$path" != "x$new_path"; then
50470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50473  fi
50474
50475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50477
50478    else
50479      # We're on a unix platform. Hooray! :)
50480      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50481      has_space=`$ECHO "$path" | $GREP " "`
50482      if test "x$has_space" != x; then
50483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50485        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50486      fi
50487
50488      # Use eval to expand a potential ~
50489      eval path="$path"
50490      if test ! -f "$path" && test ! -d "$path"; then
50491        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50492      fi
50493
50494      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50495    fi
50496  fi
50497
50498
50499  # Only process if variable expands to non-empty
50500
50501  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50503
50504  # Input might be given as Windows format, start by converting to
50505  # unix format.
50506  path="$POTENTIAL_FREETYPE_LIB_PATH"
50507  new_path=`$CYGPATH -u "$path"`
50508
50509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50512  # "foo.exe" is OK but "foo" is an error.
50513  #
50514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50515  # It is also a way to make sure we got the proper file name for the real test later on.
50516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50517  if test "x$test_shortpath" = x; then
50518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50519$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50520    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50521  fi
50522
50523  # Call helper function which possibly converts this using DOS-style short mode.
50524  # If so, the updated path is stored in $new_path.
50525
50526  input_path="$new_path"
50527  # Check if we need to convert this using DOS-style short mode. If the path
50528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50529  # take no chances and rewrite it.
50530  # Note: m4 eats our [], so we need to use [ and ] instead.
50531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50532  if test "x$has_forbidden_chars" != x; then
50533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50537      # Going to short mode and back again did indeed matter. Since short mode is
50538      # case insensitive, let's make it lowercase to improve readability.
50539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50540      # Now convert it back to Unix-style (cygpath)
50541      input_path=`$CYGPATH -u "$shortmode_path"`
50542      new_path="$input_path"
50543    fi
50544  fi
50545
50546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50547  if test "x$test_cygdrive_prefix" = x; then
50548    # As a simple fix, exclude /usr/bin since it's not a real path.
50549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50551      # a path prefixed by /cygdrive for fixpath to work.
50552      new_path="$CYGWIN_ROOT_PATH$input_path"
50553    fi
50554  fi
50555
50556
50557  if test "x$path" != "x$new_path"; then
50558    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50561  fi
50562
50563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50564
50565  path="$POTENTIAL_FREETYPE_LIB_PATH"
50566  has_colon=`$ECHO $path | $GREP ^.:`
50567  new_path="$path"
50568  if test "x$has_colon" = x; then
50569    # Not in mixed or Windows style, start by that.
50570    new_path=`cmd //c echo $path`
50571  fi
50572
50573
50574  input_path="$new_path"
50575  # Check if we need to convert this using DOS-style short mode. If the path
50576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50577  # take no chances and rewrite it.
50578  # Note: m4 eats our [], so we need to use [ and ] instead.
50579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50580  if test "x$has_forbidden_chars" != x; then
50581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50583  fi
50584
50585
50586  windows_path="$new_path"
50587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50588    unix_path=`$CYGPATH -u "$windows_path"`
50589    new_path="$unix_path"
50590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50592    new_path="$unix_path"
50593  fi
50594
50595  if test "x$path" != "x$new_path"; then
50596    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50599  fi
50600
50601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50603
50604    else
50605      # We're on a unix platform. Hooray! :)
50606      path="$POTENTIAL_FREETYPE_LIB_PATH"
50607      has_space=`$ECHO "$path" | $GREP " "`
50608      if test "x$has_space" != x; then
50609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50610$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50612      fi
50613
50614      # Use eval to expand a potential ~
50615      eval path="$path"
50616      if test ! -f "$path" && test ! -d "$path"; then
50617        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50618      fi
50619
50620      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50621    fi
50622  fi
50623
50624
50625    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50627$as_echo_n "checking for freetype includes... " >&6; }
50628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50629$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50630    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50632$as_echo_n "checking for freetype libraries... " >&6; }
50633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50634$as_echo "$FREETYPE_LIB_PATH" >&6; }
50635  fi
50636
50637            else
50638
50639  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50640  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
50641  METHOD="well-known location"
50642
50643  # Let's start with an optimistic view of the world :-)
50644  FOUND_FREETYPE=yes
50645
50646  # First look for the canonical freetype main include file ft2build.h.
50647  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50648    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50649    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50650    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50651      # Fail.
50652      FOUND_FREETYPE=no
50653    fi
50654  fi
50655
50656  if test "x$FOUND_FREETYPE" = xyes; then
50657    # Include file found, let's continue the sanity check.
50658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50659$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50660
50661    # Reset to default value
50662    FREETYPE_BASE_NAME=freetype
50663    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50664    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50665      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50666          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50667        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50668        # for the .6 version explicitly.
50669        FREETYPE_BASE_NAME=freetype.6
50670        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50671        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50672$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50673      else
50674        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50675$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50676        FOUND_FREETYPE=no
50677      fi
50678    else
50679      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50680        # On Windows, we will need both .lib and .dll file.
50681        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50682          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50683$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50684          FOUND_FREETYPE=no
50685        fi
50686      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50687          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50688        # Found lib in isa dir, use that instead.
50689        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50690        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50691$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50692      fi
50693    fi
50694  fi
50695
50696  if test "x$FOUND_FREETYPE" = xyes; then
50697
50698  # Only process if variable expands to non-empty
50699
50700  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50702
50703  # Input might be given as Windows format, start by converting to
50704  # unix format.
50705  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50706  new_path=`$CYGPATH -u "$path"`
50707
50708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50711  # "foo.exe" is OK but "foo" is an error.
50712  #
50713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50714  # It is also a way to make sure we got the proper file name for the real test later on.
50715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50716  if test "x$test_shortpath" = x; then
50717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50719    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50720  fi
50721
50722  # Call helper function which possibly converts this using DOS-style short mode.
50723  # If so, the updated path is stored in $new_path.
50724
50725  input_path="$new_path"
50726  # Check if we need to convert this using DOS-style short mode. If the path
50727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50728  # take no chances and rewrite it.
50729  # Note: m4 eats our [], so we need to use [ and ] instead.
50730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50731  if test "x$has_forbidden_chars" != x; then
50732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50736      # Going to short mode and back again did indeed matter. Since short mode is
50737      # case insensitive, let's make it lowercase to improve readability.
50738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50739      # Now convert it back to Unix-style (cygpath)
50740      input_path=`$CYGPATH -u "$shortmode_path"`
50741      new_path="$input_path"
50742    fi
50743  fi
50744
50745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50746  if test "x$test_cygdrive_prefix" = x; then
50747    # As a simple fix, exclude /usr/bin since it's not a real path.
50748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50750      # a path prefixed by /cygdrive for fixpath to work.
50751      new_path="$CYGWIN_ROOT_PATH$input_path"
50752    fi
50753  fi
50754
50755
50756  if test "x$path" != "x$new_path"; then
50757    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50760  fi
50761
50762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50763
50764  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50765  has_colon=`$ECHO $path | $GREP ^.:`
50766  new_path="$path"
50767  if test "x$has_colon" = x; then
50768    # Not in mixed or Windows style, start by that.
50769    new_path=`cmd //c echo $path`
50770  fi
50771
50772
50773  input_path="$new_path"
50774  # Check if we need to convert this using DOS-style short mode. If the path
50775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50776  # take no chances and rewrite it.
50777  # Note: m4 eats our [], so we need to use [ and ] instead.
50778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50779  if test "x$has_forbidden_chars" != x; then
50780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50782  fi
50783
50784
50785  windows_path="$new_path"
50786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50787    unix_path=`$CYGPATH -u "$windows_path"`
50788    new_path="$unix_path"
50789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50791    new_path="$unix_path"
50792  fi
50793
50794  if test "x$path" != "x$new_path"; then
50795    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50797$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50798  fi
50799
50800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50802
50803    else
50804      # We're on a unix platform. Hooray! :)
50805      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50806      has_space=`$ECHO "$path" | $GREP " "`
50807      if test "x$has_space" != x; then
50808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50811      fi
50812
50813      # Use eval to expand a potential ~
50814      eval path="$path"
50815      if test ! -f "$path" && test ! -d "$path"; then
50816        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50817      fi
50818
50819      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50820    fi
50821  fi
50822
50823
50824  # Only process if variable expands to non-empty
50825
50826  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50828
50829  # Input might be given as Windows format, start by converting to
50830  # unix format.
50831  path="$POTENTIAL_FREETYPE_LIB_PATH"
50832  new_path=`$CYGPATH -u "$path"`
50833
50834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50837  # "foo.exe" is OK but "foo" is an error.
50838  #
50839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50840  # It is also a way to make sure we got the proper file name for the real test later on.
50841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50842  if test "x$test_shortpath" = x; then
50843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50845    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50846  fi
50847
50848  # Call helper function which possibly converts this using DOS-style short mode.
50849  # If so, the updated path is stored in $new_path.
50850
50851  input_path="$new_path"
50852  # Check if we need to convert this using DOS-style short mode. If the path
50853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50854  # take no chances and rewrite it.
50855  # Note: m4 eats our [], so we need to use [ and ] instead.
50856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50857  if test "x$has_forbidden_chars" != x; then
50858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50862      # Going to short mode and back again did indeed matter. Since short mode is
50863      # case insensitive, let's make it lowercase to improve readability.
50864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50865      # Now convert it back to Unix-style (cygpath)
50866      input_path=`$CYGPATH -u "$shortmode_path"`
50867      new_path="$input_path"
50868    fi
50869  fi
50870
50871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50872  if test "x$test_cygdrive_prefix" = x; then
50873    # As a simple fix, exclude /usr/bin since it's not a real path.
50874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50876      # a path prefixed by /cygdrive for fixpath to work.
50877      new_path="$CYGWIN_ROOT_PATH$input_path"
50878    fi
50879  fi
50880
50881
50882  if test "x$path" != "x$new_path"; then
50883    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50886  fi
50887
50888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50889
50890  path="$POTENTIAL_FREETYPE_LIB_PATH"
50891  has_colon=`$ECHO $path | $GREP ^.:`
50892  new_path="$path"
50893  if test "x$has_colon" = x; then
50894    # Not in mixed or Windows style, start by that.
50895    new_path=`cmd //c echo $path`
50896  fi
50897
50898
50899  input_path="$new_path"
50900  # Check if we need to convert this using DOS-style short mode. If the path
50901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50902  # take no chances and rewrite it.
50903  # Note: m4 eats our [], so we need to use [ and ] instead.
50904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50905  if test "x$has_forbidden_chars" != x; then
50906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50908  fi
50909
50910
50911  windows_path="$new_path"
50912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50913    unix_path=`$CYGPATH -u "$windows_path"`
50914    new_path="$unix_path"
50915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50917    new_path="$unix_path"
50918  fi
50919
50920  if test "x$path" != "x$new_path"; then
50921    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50924  fi
50925
50926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50928
50929    else
50930      # We're on a unix platform. Hooray! :)
50931      path="$POTENTIAL_FREETYPE_LIB_PATH"
50932      has_space=`$ECHO "$path" | $GREP " "`
50933      if test "x$has_space" != x; then
50934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50937      fi
50938
50939      # Use eval to expand a potential ~
50940      eval path="$path"
50941      if test ! -f "$path" && test ! -d "$path"; then
50942        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50943      fi
50944
50945      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50946    fi
50947  fi
50948
50949
50950    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50952$as_echo_n "checking for freetype includes... " >&6; }
50953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50954$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50955    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50957$as_echo_n "checking for freetype libraries... " >&6; }
50958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50959$as_echo "$FREETYPE_LIB_PATH" >&6; }
50960  fi
50961
50962              if test "x$FOUND_FREETYPE" != xyes; then
50963
50964  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50965  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
50966  METHOD="well-known location"
50967
50968  # Let's start with an optimistic view of the world :-)
50969  FOUND_FREETYPE=yes
50970
50971  # First look for the canonical freetype main include file ft2build.h.
50972  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50973    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50974    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50975    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50976      # Fail.
50977      FOUND_FREETYPE=no
50978    fi
50979  fi
50980
50981  if test "x$FOUND_FREETYPE" = xyes; then
50982    # Include file found, let's continue the sanity check.
50983    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50984$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50985
50986    # Reset to default value
50987    FREETYPE_BASE_NAME=freetype
50988    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50989    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50990      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50991          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50992        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50993        # for the .6 version explicitly.
50994        FREETYPE_BASE_NAME=freetype.6
50995        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50996        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50997$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50998      else
50999        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51000$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51001        FOUND_FREETYPE=no
51002      fi
51003    else
51004      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51005        # On Windows, we will need both .lib and .dll file.
51006        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51007          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51008$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51009          FOUND_FREETYPE=no
51010        fi
51011      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51012          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51013        # Found lib in isa dir, use that instead.
51014        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51015        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51016$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51017      fi
51018    fi
51019  fi
51020
51021  if test "x$FOUND_FREETYPE" = xyes; then
51022
51023  # Only process if variable expands to non-empty
51024
51025  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51027
51028  # Input might be given as Windows format, start by converting to
51029  # unix format.
51030  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51031  new_path=`$CYGPATH -u "$path"`
51032
51033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51036  # "foo.exe" is OK but "foo" is an error.
51037  #
51038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51039  # It is also a way to make sure we got the proper file name for the real test later on.
51040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51041  if test "x$test_shortpath" = x; then
51042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51043$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51044    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51045  fi
51046
51047  # Call helper function which possibly converts this using DOS-style short mode.
51048  # If so, the updated path is stored in $new_path.
51049
51050  input_path="$new_path"
51051  # Check if we need to convert this using DOS-style short mode. If the path
51052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51053  # take no chances and rewrite it.
51054  # Note: m4 eats our [], so we need to use [ and ] instead.
51055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51056  if test "x$has_forbidden_chars" != x; then
51057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51061      # Going to short mode and back again did indeed matter. Since short mode is
51062      # case insensitive, let's make it lowercase to improve readability.
51063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51064      # Now convert it back to Unix-style (cygpath)
51065      input_path=`$CYGPATH -u "$shortmode_path"`
51066      new_path="$input_path"
51067    fi
51068  fi
51069
51070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51071  if test "x$test_cygdrive_prefix" = x; then
51072    # As a simple fix, exclude /usr/bin since it's not a real path.
51073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51075      # a path prefixed by /cygdrive for fixpath to work.
51076      new_path="$CYGWIN_ROOT_PATH$input_path"
51077    fi
51078  fi
51079
51080
51081  if test "x$path" != "x$new_path"; then
51082    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51085  fi
51086
51087    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51088
51089  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51090  has_colon=`$ECHO $path | $GREP ^.:`
51091  new_path="$path"
51092  if test "x$has_colon" = x; then
51093    # Not in mixed or Windows style, start by that.
51094    new_path=`cmd //c echo $path`
51095  fi
51096
51097
51098  input_path="$new_path"
51099  # Check if we need to convert this using DOS-style short mode. If the path
51100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51101  # take no chances and rewrite it.
51102  # Note: m4 eats our [], so we need to use [ and ] instead.
51103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51104  if test "x$has_forbidden_chars" != x; then
51105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51107  fi
51108
51109
51110  windows_path="$new_path"
51111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51112    unix_path=`$CYGPATH -u "$windows_path"`
51113    new_path="$unix_path"
51114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51116    new_path="$unix_path"
51117  fi
51118
51119  if test "x$path" != "x$new_path"; then
51120    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51123  fi
51124
51125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51127
51128    else
51129      # We're on a unix platform. Hooray! :)
51130      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51131      has_space=`$ECHO "$path" | $GREP " "`
51132      if test "x$has_space" != x; then
51133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51135        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51136      fi
51137
51138      # Use eval to expand a potential ~
51139      eval path="$path"
51140      if test ! -f "$path" && test ! -d "$path"; then
51141        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51142      fi
51143
51144      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51145    fi
51146  fi
51147
51148
51149  # Only process if variable expands to non-empty
51150
51151  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51153
51154  # Input might be given as Windows format, start by converting to
51155  # unix format.
51156  path="$POTENTIAL_FREETYPE_LIB_PATH"
51157  new_path=`$CYGPATH -u "$path"`
51158
51159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51162  # "foo.exe" is OK but "foo" is an error.
51163  #
51164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51165  # It is also a way to make sure we got the proper file name for the real test later on.
51166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51167  if test "x$test_shortpath" = x; then
51168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51169$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51170    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51171  fi
51172
51173  # Call helper function which possibly converts this using DOS-style short mode.
51174  # If so, the updated path is stored in $new_path.
51175
51176  input_path="$new_path"
51177  # Check if we need to convert this using DOS-style short mode. If the path
51178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51179  # take no chances and rewrite it.
51180  # Note: m4 eats our [], so we need to use [ and ] instead.
51181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51182  if test "x$has_forbidden_chars" != x; then
51183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51187      # Going to short mode and back again did indeed matter. Since short mode is
51188      # case insensitive, let's make it lowercase to improve readability.
51189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51190      # Now convert it back to Unix-style (cygpath)
51191      input_path=`$CYGPATH -u "$shortmode_path"`
51192      new_path="$input_path"
51193    fi
51194  fi
51195
51196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51197  if test "x$test_cygdrive_prefix" = x; then
51198    # As a simple fix, exclude /usr/bin since it's not a real path.
51199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51201      # a path prefixed by /cygdrive for fixpath to work.
51202      new_path="$CYGWIN_ROOT_PATH$input_path"
51203    fi
51204  fi
51205
51206
51207  if test "x$path" != "x$new_path"; then
51208    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51211  fi
51212
51213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51214
51215  path="$POTENTIAL_FREETYPE_LIB_PATH"
51216  has_colon=`$ECHO $path | $GREP ^.:`
51217  new_path="$path"
51218  if test "x$has_colon" = x; then
51219    # Not in mixed or Windows style, start by that.
51220    new_path=`cmd //c echo $path`
51221  fi
51222
51223
51224  input_path="$new_path"
51225  # Check if we need to convert this using DOS-style short mode. If the path
51226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51227  # take no chances and rewrite it.
51228  # Note: m4 eats our [], so we need to use [ and ] instead.
51229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51230  if test "x$has_forbidden_chars" != x; then
51231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51233  fi
51234
51235
51236  windows_path="$new_path"
51237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51238    unix_path=`$CYGPATH -u "$windows_path"`
51239    new_path="$unix_path"
51240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51242    new_path="$unix_path"
51243  fi
51244
51245  if test "x$path" != "x$new_path"; then
51246    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51248$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51249  fi
51250
51251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51253
51254    else
51255      # We're on a unix platform. Hooray! :)
51256      path="$POTENTIAL_FREETYPE_LIB_PATH"
51257      has_space=`$ECHO "$path" | $GREP " "`
51258      if test "x$has_space" != x; then
51259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51260$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51262      fi
51263
51264      # Use eval to expand a potential ~
51265      eval path="$path"
51266      if test ! -f "$path" && test ! -d "$path"; then
51267        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51268      fi
51269
51270      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51271    fi
51272  fi
51273
51274
51275    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51277$as_echo_n "checking for freetype includes... " >&6; }
51278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51279$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51280    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51282$as_echo_n "checking for freetype libraries... " >&6; }
51283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51284$as_echo "$FREETYPE_LIB_PATH" >&6; }
51285  fi
51286
51287              fi
51288            fi
51289          fi
51290        fi
51291      fi # end check in well-known locations
51292
51293      if test "x$FOUND_FREETYPE" != xyes; then
51294
51295  # Print a helpful message on how to acquire the necessary build dependency.
51296  # freetype is the help tag: freetype, cups, alsa etc
51297  MISSING_DEPENDENCY=freetype
51298
51299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51300    cygwin_help $MISSING_DEPENDENCY
51301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51302    msys_help $MISSING_DEPENDENCY
51303  else
51304    PKGHANDLER_COMMAND=
51305
51306    case $PKGHANDLER in
51307      apt-get)
51308        apt_help     $MISSING_DEPENDENCY ;;
51309      yum)
51310        yum_help     $MISSING_DEPENDENCY ;;
51311      port)
51312        port_help    $MISSING_DEPENDENCY ;;
51313      pkgutil)
51314        pkgutil_help $MISSING_DEPENDENCY ;;
51315      pkgadd)
51316        pkgadd_help  $MISSING_DEPENDENCY ;;
51317    esac
51318
51319    if test "x$PKGHANDLER_COMMAND" != x; then
51320      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51321    fi
51322  fi
51323
51324        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
51325      fi
51326    fi # end user specified settings
51327
51328    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
51329    if test "x$FREETYPE_CFLAGS" = x; then
51330
51331  # Only process if variable expands to non-empty
51332
51333  if test "x$FREETYPE_INCLUDE_PATH" != x; then
51334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51335
51336  # Input might be given as Windows format, start by converting to
51337  # unix format.
51338  path="$FREETYPE_INCLUDE_PATH"
51339  new_path=`$CYGPATH -u "$path"`
51340
51341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51344  # "foo.exe" is OK but "foo" is an error.
51345  #
51346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51347  # It is also a way to make sure we got the proper file name for the real test later on.
51348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51349  if test "x$test_shortpath" = x; then
51350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51351$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51352    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
51353  fi
51354
51355  # Call helper function which possibly converts this using DOS-style short mode.
51356  # If so, the updated path is stored in $new_path.
51357
51358  input_path="$new_path"
51359  # Check if we need to convert this using DOS-style short mode. If the path
51360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51361  # take no chances and rewrite it.
51362  # Note: m4 eats our [], so we need to use [ and ] instead.
51363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51364  if test "x$has_forbidden_chars" != x; then
51365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51369      # Going to short mode and back again did indeed matter. Since short mode is
51370      # case insensitive, let's make it lowercase to improve readability.
51371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51372      # Now convert it back to Unix-style (cygpath)
51373      input_path=`$CYGPATH -u "$shortmode_path"`
51374      new_path="$input_path"
51375    fi
51376  fi
51377
51378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51379  if test "x$test_cygdrive_prefix" = x; then
51380    # As a simple fix, exclude /usr/bin since it's not a real path.
51381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51383      # a path prefixed by /cygdrive for fixpath to work.
51384      new_path="$CYGWIN_ROOT_PATH$input_path"
51385    fi
51386  fi
51387
51388
51389  if test "x$path" != "x$new_path"; then
51390    FREETYPE_INCLUDE_PATH="$new_path"
51391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51392$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51393  fi
51394
51395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51396
51397  path="$FREETYPE_INCLUDE_PATH"
51398  has_colon=`$ECHO $path | $GREP ^.:`
51399  new_path="$path"
51400  if test "x$has_colon" = x; then
51401    # Not in mixed or Windows style, start by that.
51402    new_path=`cmd //c echo $path`
51403  fi
51404
51405
51406  input_path="$new_path"
51407  # Check if we need to convert this using DOS-style short mode. If the path
51408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51409  # take no chances and rewrite it.
51410  # Note: m4 eats our [], so we need to use [ and ] instead.
51411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51412  if test "x$has_forbidden_chars" != x; then
51413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51415  fi
51416
51417
51418  windows_path="$new_path"
51419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51420    unix_path=`$CYGPATH -u "$windows_path"`
51421    new_path="$unix_path"
51422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51424    new_path="$unix_path"
51425  fi
51426
51427  if test "x$path" != "x$new_path"; then
51428    FREETYPE_INCLUDE_PATH="$new_path"
51429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51430$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51431  fi
51432
51433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51435
51436    else
51437      # We're on a unix platform. Hooray! :)
51438      path="$FREETYPE_INCLUDE_PATH"
51439      has_space=`$ECHO "$path" | $GREP " "`
51440      if test "x$has_space" != x; then
51441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51442$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51444      fi
51445
51446      # Use eval to expand a potential ~
51447      eval path="$path"
51448      if test ! -f "$path" && test ! -d "$path"; then
51449        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51450      fi
51451
51452      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51453    fi
51454  fi
51455
51456      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
51457        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
51458      else
51459        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
51460      fi
51461    fi
51462
51463    if test "x$FREETYPE_LIBS" = x; then
51464
51465  # Only process if variable expands to non-empty
51466
51467  if test "x$FREETYPE_LIB_PATH" != x; then
51468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51469
51470  # Input might be given as Windows format, start by converting to
51471  # unix format.
51472  path="$FREETYPE_LIB_PATH"
51473  new_path=`$CYGPATH -u "$path"`
51474
51475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51478  # "foo.exe" is OK but "foo" is an error.
51479  #
51480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51481  # It is also a way to make sure we got the proper file name for the real test later on.
51482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51483  if test "x$test_shortpath" = x; then
51484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51485$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51486    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
51487  fi
51488
51489  # Call helper function which possibly converts this using DOS-style short mode.
51490  # If so, the updated path is stored in $new_path.
51491
51492  input_path="$new_path"
51493  # Check if we need to convert this using DOS-style short mode. If the path
51494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51495  # take no chances and rewrite it.
51496  # Note: m4 eats our [], so we need to use [ and ] instead.
51497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51498  if test "x$has_forbidden_chars" != x; then
51499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51503      # Going to short mode and back again did indeed matter. Since short mode is
51504      # case insensitive, let's make it lowercase to improve readability.
51505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51506      # Now convert it back to Unix-style (cygpath)
51507      input_path=`$CYGPATH -u "$shortmode_path"`
51508      new_path="$input_path"
51509    fi
51510  fi
51511
51512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51513  if test "x$test_cygdrive_prefix" = x; then
51514    # As a simple fix, exclude /usr/bin since it's not a real path.
51515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51517      # a path prefixed by /cygdrive for fixpath to work.
51518      new_path="$CYGWIN_ROOT_PATH$input_path"
51519    fi
51520  fi
51521
51522
51523  if test "x$path" != "x$new_path"; then
51524    FREETYPE_LIB_PATH="$new_path"
51525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51526$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51527  fi
51528
51529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51530
51531  path="$FREETYPE_LIB_PATH"
51532  has_colon=`$ECHO $path | $GREP ^.:`
51533  new_path="$path"
51534  if test "x$has_colon" = x; then
51535    # Not in mixed or Windows style, start by that.
51536    new_path=`cmd //c echo $path`
51537  fi
51538
51539
51540  input_path="$new_path"
51541  # Check if we need to convert this using DOS-style short mode. If the path
51542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51543  # take no chances and rewrite it.
51544  # Note: m4 eats our [], so we need to use [ and ] instead.
51545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51546  if test "x$has_forbidden_chars" != x; then
51547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51549  fi
51550
51551
51552  windows_path="$new_path"
51553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51554    unix_path=`$CYGPATH -u "$windows_path"`
51555    new_path="$unix_path"
51556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51558    new_path="$unix_path"
51559  fi
51560
51561  if test "x$path" != "x$new_path"; then
51562    FREETYPE_LIB_PATH="$new_path"
51563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51564$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51565  fi
51566
51567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51569
51570    else
51571      # We're on a unix platform. Hooray! :)
51572      path="$FREETYPE_LIB_PATH"
51573      has_space=`$ECHO "$path" | $GREP " "`
51574      if test "x$has_space" != x; then
51575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51576$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51577        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51578      fi
51579
51580      # Use eval to expand a potential ~
51581      eval path="$path"
51582      if test ! -f "$path" && test ! -d "$path"; then
51583        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51584      fi
51585
51586      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51587    fi
51588  fi
51589
51590      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51591        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
51592      else
51593        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
51594      fi
51595    fi
51596
51597    # Try to compile it
51598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
51599$as_echo_n "checking if we can compile and link with freetype... " >&6; }
51600    ac_ext=cpp
51601ac_cpp='$CXXCPP $CPPFLAGS'
51602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51605
51606    PREV_CXXCFLAGS="$CXXFLAGS"
51607    PREV_LIBS="$LIBS"
51608    PREV_CXX="$CXX"
51609    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
51610    LIBS="$LIBS $FREETYPE_LIBS"
51611    CXX="$FIXPATH $CXX"
51612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51613/* end confdefs.h.  */
51614
51615          #include<ft2build.h>
51616          #include FT_FREETYPE_H
51617          int main () {
51618            FT_Init_FreeType(NULL);
51619            return 0;
51620          }
51621
51622_ACEOF
51623if ac_fn_cxx_try_link "$LINENO"; then :
51624
51625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51626$as_echo "yes" >&6; }
51627
51628else
51629
51630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51631$as_echo "no" >&6; }
51632          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
51633$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
51634          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
51635$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
51636
51637
51638  # Print a helpful message on how to acquire the necessary build dependency.
51639  # freetype is the help tag: freetype, cups, alsa etc
51640  MISSING_DEPENDENCY=freetype
51641
51642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51643    cygwin_help $MISSING_DEPENDENCY
51644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51645    msys_help $MISSING_DEPENDENCY
51646  else
51647    PKGHANDLER_COMMAND=
51648
51649    case $PKGHANDLER in
51650      apt-get)
51651        apt_help     $MISSING_DEPENDENCY ;;
51652      yum)
51653        yum_help     $MISSING_DEPENDENCY ;;
51654      port)
51655        port_help    $MISSING_DEPENDENCY ;;
51656      pkgutil)
51657        pkgutil_help $MISSING_DEPENDENCY ;;
51658      pkgadd)
51659        pkgadd_help  $MISSING_DEPENDENCY ;;
51660    esac
51661
51662    if test "x$PKGHANDLER_COMMAND" != x; then
51663      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51664    fi
51665  fi
51666
51667
51668          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
51669
51670
51671fi
51672rm -f core conftest.err conftest.$ac_objext \
51673    conftest$ac_exeext conftest.$ac_ext
51674    CXXCFLAGS="$PREV_CXXFLAGS"
51675    LIBS="$PREV_LIBS"
51676    CXX="$PREV_CXX"
51677    ac_ext=cpp
51678ac_cpp='$CXXCPP $CPPFLAGS'
51679ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51680ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51681ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51682
51683
51684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
51685$as_echo_n "checking if we should bundle freetype... " >&6; }
51686    if test "x$BUNDLE_FREETYPE" = xyes; then
51687      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
51688    fi
51689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
51690$as_echo "$BUNDLE_FREETYPE" >&6; }
51691
51692  fi # end freetype needed
51693
51694
51695
51696
51697
51698
51699
51700# Check whether --with-alsa was given.
51701if test "${with_alsa+set}" = set; then :
51702  withval=$with_alsa;
51703fi
51704
51705
51706# Check whether --with-alsa-include was given.
51707if test "${with_alsa_include+set}" = set; then :
51708  withval=$with_alsa_include;
51709fi
51710
51711
51712# Check whether --with-alsa-lib was given.
51713if test "${with_alsa_lib+set}" = set; then :
51714  withval=$with_alsa_lib;
51715fi
51716
51717
51718  if test "x$NEEDS_LIB_ALSA" = xfalse; then
51719    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
51720      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
51721$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
51722    fi
51723    ALSA_CFLAGS=
51724    ALSA_LIBS=
51725  else
51726    ALSA_FOUND=no
51727
51728    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
51729      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
51730    fi
51731
51732    if test "x${with_alsa}" != x; then
51733      ALSA_LIBS="-L${with_alsa}/lib -lasound"
51734      ALSA_CFLAGS="-I${with_alsa}/include"
51735      ALSA_FOUND=yes
51736    fi
51737    if test "x${with_alsa_include}" != x; then
51738      ALSA_CFLAGS="-I${with_alsa_include}"
51739      ALSA_FOUND=yes
51740    fi
51741    if test "x${with_alsa_lib}" != x; then
51742      ALSA_LIBS="-L${with_alsa_lib} -lasound"
51743      ALSA_FOUND=yes
51744    fi
51745    # Do not try pkg-config if we have a sysroot set.
51746    if test "x$SYSROOT" = x; then
51747      if test "x$ALSA_FOUND" = xno; then
51748
51749pkg_failed=no
51750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
51751$as_echo_n "checking for ALSA... " >&6; }
51752
51753if test -n "$ALSA_CFLAGS"; then
51754    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
51755 elif test -n "$PKG_CONFIG"; then
51756    if test -n "$PKG_CONFIG" && \
51757    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51758  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51759  ac_status=$?
51760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51761  test $ac_status = 0; }; then
51762  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
51763else
51764  pkg_failed=yes
51765fi
51766 else
51767    pkg_failed=untried
51768fi
51769if test -n "$ALSA_LIBS"; then
51770    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
51771 elif test -n "$PKG_CONFIG"; then
51772    if test -n "$PKG_CONFIG" && \
51773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51774  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51775  ac_status=$?
51776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51777  test $ac_status = 0; }; then
51778  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
51779else
51780  pkg_failed=yes
51781fi
51782 else
51783    pkg_failed=untried
51784fi
51785
51786
51787
51788if test $pkg_failed = yes; then
51789
51790if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51791        _pkg_short_errors_supported=yes
51792else
51793        _pkg_short_errors_supported=no
51794fi
51795        if test $_pkg_short_errors_supported = yes; then
51796	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
51797        else
51798	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
51799        fi
51800	# Put the nasty error message in config.log where it belongs
51801	echo "$ALSA_PKG_ERRORS" >&5
51802
51803	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51804$as_echo "no" >&6; }
51805                ALSA_FOUND=no
51806elif test $pkg_failed = untried; then
51807	ALSA_FOUND=no
51808else
51809	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
51810	ALSA_LIBS=$pkg_cv_ALSA_LIBS
51811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51812$as_echo "yes" >&6; }
51813	ALSA_FOUND=yes
51814fi
51815      fi
51816    fi
51817    if test "x$ALSA_FOUND" = xno; then
51818      for ac_header in alsa/asoundlib.h
51819do :
51820  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
51821if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
51822  cat >>confdefs.h <<_ACEOF
51823#define HAVE_ALSA_ASOUNDLIB_H 1
51824_ACEOF
51825
51826            ALSA_FOUND=yes
51827            ALSA_CFLAGS=-Iignoreme
51828            ALSA_LIBS=-lasound
51829            DEFAULT_ALSA=yes
51830
51831else
51832  ALSA_FOUND=no
51833
51834fi
51835
51836done
51837
51838    fi
51839    if test "x$ALSA_FOUND" = xno; then
51840
51841  # Print a helpful message on how to acquire the necessary build dependency.
51842  # alsa is the help tag: freetype, cups, alsa etc
51843  MISSING_DEPENDENCY=alsa
51844
51845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51846    cygwin_help $MISSING_DEPENDENCY
51847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51848    msys_help $MISSING_DEPENDENCY
51849  else
51850    PKGHANDLER_COMMAND=
51851
51852    case $PKGHANDLER in
51853      apt-get)
51854        apt_help     $MISSING_DEPENDENCY ;;
51855      yum)
51856        yum_help     $MISSING_DEPENDENCY ;;
51857      port)
51858        port_help    $MISSING_DEPENDENCY ;;
51859      pkgutil)
51860        pkgutil_help $MISSING_DEPENDENCY ;;
51861      pkgadd)
51862        pkgadd_help  $MISSING_DEPENDENCY ;;
51863    esac
51864
51865    if test "x$PKGHANDLER_COMMAND" != x; then
51866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51867    fi
51868  fi
51869
51870      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
51871    fi
51872  fi
51873
51874
51875
51876
51877
51878
51879# Check whether --with-libffi was given.
51880if test "${with_libffi+set}" = set; then :
51881  withval=$with_libffi;
51882fi
51883
51884
51885# Check whether --with-libffi-include was given.
51886if test "${with_libffi_include+set}" = set; then :
51887  withval=$with_libffi_include;
51888fi
51889
51890
51891# Check whether --with-libffi-lib was given.
51892if test "${with_libffi_lib+set}" = set; then :
51893  withval=$with_libffi_lib;
51894fi
51895
51896
51897  if test "x$NEEDS_LIB_FFI" = xfalse; then
51898    if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
51899      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
51900$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
51901    fi
51902    LIBFFI_CFLAGS=
51903    LIBFFI_LIBS=
51904  else
51905    LIBFFI_FOUND=no
51906
51907    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
51908      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
51909    fi
51910
51911    if test "x${with_libffi}" != x; then
51912      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
51913      LIBFFI_CFLAGS="-I${with_libffi}/include"
51914      LIBFFI_FOUND=yes
51915    fi
51916    if test "x${with_libffi_include}" != x; then
51917      LIBFFI_CFLAGS="-I${with_libffi_include}"
51918      LIBFFI_FOUND=yes
51919    fi
51920    if test "x${with_libffi_lib}" != x; then
51921      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
51922      LIBFFI_FOUND=yes
51923    fi
51924    # Do not try pkg-config if we have a sysroot set.
51925    if test "x$SYSROOT" = x; then
51926      if test "x$LIBFFI_FOUND" = xno; then
51927        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
51928
51929pkg_failed=no
51930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
51931$as_echo_n "checking for LIBFFI... " >&6; }
51932
51933if test -n "$LIBFFI_CFLAGS"; then
51934    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
51935 elif test -n "$PKG_CONFIG"; then
51936    if test -n "$PKG_CONFIG" && \
51937    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
51938  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
51939  ac_status=$?
51940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51941  test $ac_status = 0; }; then
51942  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
51943else
51944  pkg_failed=yes
51945fi
51946 else
51947    pkg_failed=untried
51948fi
51949if test -n "$LIBFFI_LIBS"; then
51950    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
51951 elif test -n "$PKG_CONFIG"; then
51952    if test -n "$PKG_CONFIG" && \
51953    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
51954  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
51955  ac_status=$?
51956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51957  test $ac_status = 0; }; then
51958  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
51959else
51960  pkg_failed=yes
51961fi
51962 else
51963    pkg_failed=untried
51964fi
51965
51966
51967
51968if test $pkg_failed = yes; then
51969
51970if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51971        _pkg_short_errors_supported=yes
51972else
51973        _pkg_short_errors_supported=no
51974fi
51975        if test $_pkg_short_errors_supported = yes; then
51976	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
51977        else
51978	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
51979        fi
51980	# Put the nasty error message in config.log where it belongs
51981	echo "$LIBFFI_PKG_ERRORS" >&5
51982
51983	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51984$as_echo "no" >&6; }
51985                LIBFFI_FOUND=no
51986elif test $pkg_failed = untried; then
51987	LIBFFI_FOUND=no
51988else
51989	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
51990	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
51991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51992$as_echo "yes" >&6; }
51993	LIBFFI_FOUND=yes
51994fi
51995      fi
51996    fi
51997    if test "x$LIBFFI_FOUND" = xno; then
51998      for ac_header in ffi.h
51999do :
52000  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
52001if test "x$ac_cv_header_ffi_h" = xyes; then :
52002  cat >>confdefs.h <<_ACEOF
52003#define HAVE_FFI_H 1
52004_ACEOF
52005
52006            LIBFFI_FOUND=yes
52007            LIBFFI_CFLAGS=
52008            LIBFFI_LIBS=-lffi
52009
52010else
52011  LIBFFI_FOUND=no
52012
52013fi
52014
52015done
52016
52017    fi
52018    if test "x$LIBFFI_FOUND" = xno; then
52019
52020  # Print a helpful message on how to acquire the necessary build dependency.
52021  # ffi is the help tag: freetype, cups, alsa etc
52022  MISSING_DEPENDENCY=ffi
52023
52024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52025    cygwin_help $MISSING_DEPENDENCY
52026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52027    msys_help $MISSING_DEPENDENCY
52028  else
52029    PKGHANDLER_COMMAND=
52030
52031    case $PKGHANDLER in
52032      apt-get)
52033        apt_help     $MISSING_DEPENDENCY ;;
52034      yum)
52035        yum_help     $MISSING_DEPENDENCY ;;
52036      port)
52037        port_help    $MISSING_DEPENDENCY ;;
52038      pkgutil)
52039        pkgutil_help $MISSING_DEPENDENCY ;;
52040      pkgadd)
52041        pkgadd_help  $MISSING_DEPENDENCY ;;
52042    esac
52043
52044    if test "x$PKGHANDLER_COMMAND" != x; then
52045      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52046    fi
52047  fi
52048
52049      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
52050    fi
52051
52052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
52053$as_echo_n "checking if libffi works... " >&6; }
52054    ac_ext=c
52055ac_cpp='$CPP $CPPFLAGS'
52056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52058ac_compiler_gnu=$ac_cv_c_compiler_gnu
52059
52060    OLD_CFLAGS="$CFLAGS"
52061    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
52062    OLD_LIBS="$LIBS"
52063    LIBS="$LIBS $LIBFFI_LIBS"
52064    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52065/* end confdefs.h.  */
52066#include <ffi.h>
52067int
52068main ()
52069{
52070
52071          ffi_call(NULL, NULL, NULL, NULL);
52072          return 0;
52073
52074  ;
52075  return 0;
52076}
52077_ACEOF
52078if ac_fn_c_try_link "$LINENO"; then :
52079  LIBFFI_WORKS=yes
52080else
52081  LIBFFI_WORKS=no
52082
52083fi
52084rm -f core conftest.err conftest.$ac_objext \
52085    conftest$ac_exeext conftest.$ac_ext
52086    CFLAGS="$OLD_CFLAGS"
52087    LIBS="$OLD_LIBS"
52088    ac_ext=cpp
52089ac_cpp='$CXXCPP $CPPFLAGS'
52090ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52091ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52092ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52093
52094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
52095$as_echo "$LIBFFI_WORKS" >&6; }
52096
52097    if test "x$LIBFFI_WORKS" = xno; then
52098
52099  # Print a helpful message on how to acquire the necessary build dependency.
52100  # ffi is the help tag: freetype, cups, alsa etc
52101  MISSING_DEPENDENCY=ffi
52102
52103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52104    cygwin_help $MISSING_DEPENDENCY
52105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52106    msys_help $MISSING_DEPENDENCY
52107  else
52108    PKGHANDLER_COMMAND=
52109
52110    case $PKGHANDLER in
52111      apt-get)
52112        apt_help     $MISSING_DEPENDENCY ;;
52113      yum)
52114        yum_help     $MISSING_DEPENDENCY ;;
52115      port)
52116        port_help    $MISSING_DEPENDENCY ;;
52117      pkgutil)
52118        pkgutil_help $MISSING_DEPENDENCY ;;
52119      pkgadd)
52120        pkgadd_help  $MISSING_DEPENDENCY ;;
52121    esac
52122
52123    if test "x$PKGHANDLER_COMMAND" != x; then
52124      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52125    fi
52126  fi
52127
52128      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
52129    fi
52130  fi
52131
52132
52133
52134
52135
52136  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
52137    # Extract the first word of "llvm-config", so it can be a program name with args.
52138set dummy llvm-config; ac_word=$2
52139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52140$as_echo_n "checking for $ac_word... " >&6; }
52141if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
52142  $as_echo_n "(cached) " >&6
52143else
52144  if test -n "$LLVM_CONFIG"; then
52145  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
52146else
52147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52148for as_dir in $PATH
52149do
52150  IFS=$as_save_IFS
52151  test -z "$as_dir" && as_dir=.
52152    for ac_exec_ext in '' $ac_executable_extensions; do
52153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52154    ac_cv_prog_LLVM_CONFIG="llvm-config"
52155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52156    break 2
52157  fi
52158done
52159  done
52160IFS=$as_save_IFS
52161
52162fi
52163fi
52164LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
52165if test -n "$LLVM_CONFIG"; then
52166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
52167$as_echo "$LLVM_CONFIG" >&6; }
52168else
52169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52170$as_echo "no" >&6; }
52171fi
52172
52173
52174
52175    if test "x$LLVM_CONFIG" != xllvm-config; then
52176      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
52177    fi
52178
52179    llvm_components="jit mcjit engine nativecodegen native"
52180    unset LLVM_CFLAGS
52181    for flag in $("$LLVM_CONFIG" --cxxflags); do
52182      if echo "${flag}" | grep -q '^-[ID]'; then
52183        if test "${flag}" != "-D_DEBUG" ; then
52184          if test "${LLVM_CFLAGS}" != "" ; then
52185            LLVM_CFLAGS="${LLVM_CFLAGS} "
52186          fi
52187          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
52188        fi
52189      fi
52190    done
52191    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
52192    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
52193
52194    unset LLVM_LDFLAGS
52195    for flag in $("${LLVM_CONFIG}" --ldflags); do
52196      if echo "${flag}" | grep -q '^-L'; then
52197        if test "${LLVM_LDFLAGS}" != ""; then
52198          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
52199        fi
52200        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
52201      fi
52202    done
52203
52204    unset LLVM_LIBS
52205    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
52206      if echo "${flag}" | grep -q '^-l'; then
52207        if test "${LLVM_LIBS}" != ""; then
52208          LLVM_LIBS="${LLVM_LIBS} "
52209        fi
52210        LLVM_LIBS="${LLVM_LIBS}${flag}"
52211      fi
52212    done
52213
52214
52215
52216
52217  fi
52218
52219
52220
52221# Check whether --with-libjpeg was given.
52222if test "${with_libjpeg+set}" = set; then :
52223  withval=$with_libjpeg;
52224fi
52225
52226
52227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
52228$as_echo_n "checking for which libjpeg to use... " >&6; }
52229  # default is bundled
52230  DEFAULT_LIBJPEG=bundled
52231  # if user didn't specify, use DEFAULT_LIBJPEG
52232  if test "x${with_libjpeg}" = "x"; then
52233    with_libjpeg=${DEFAULT_LIBJPEG}
52234  fi
52235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
52236$as_echo "${with_libjpeg}" >&6; }
52237
52238  if test "x${with_libjpeg}" = "xbundled"; then
52239    USE_EXTERNAL_LIBJPEG=false
52240  elif test "x${with_libjpeg}" = "xsystem"; then
52241    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
52242if test "x$ac_cv_header_jpeglib_h" = xyes; then :
52243
52244else
52245   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
52246fi
52247
52248
52249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
52250$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
52251if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
52252  $as_echo_n "(cached) " >&6
52253else
52254  ac_check_lib_save_LIBS=$LIBS
52255LIBS="-ljpeg  $LIBS"
52256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52257/* end confdefs.h.  */
52258
52259/* Override any GCC internal prototype to avoid an error.
52260   Use char because int might match the return type of a GCC
52261   builtin and then its argument prototype would still apply.  */
52262#ifdef __cplusplus
52263extern "C"
52264#endif
52265char jpeg_CreateDecompress ();
52266int
52267main ()
52268{
52269return jpeg_CreateDecompress ();
52270  ;
52271  return 0;
52272}
52273_ACEOF
52274if ac_fn_cxx_try_link "$LINENO"; then :
52275  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
52276else
52277  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
52278fi
52279rm -f core conftest.err conftest.$ac_objext \
52280    conftest$ac_exeext conftest.$ac_ext
52281LIBS=$ac_check_lib_save_LIBS
52282fi
52283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
52284$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
52285if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
52286  cat >>confdefs.h <<_ACEOF
52287#define HAVE_LIBJPEG 1
52288_ACEOF
52289
52290  LIBS="-ljpeg $LIBS"
52291
52292else
52293   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
52294fi
52295
52296
52297    USE_EXTERNAL_LIBJPEG=true
52298  else
52299    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
52300  fi
52301
52302
52303
52304
52305
52306# Check whether --with-giflib was given.
52307if test "${with_giflib+set}" = set; then :
52308  withval=$with_giflib;
52309fi
52310
52311
52312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
52313$as_echo_n "checking for which giflib to use... " >&6; }
52314  # default is bundled
52315  DEFAULT_GIFLIB=bundled
52316  # if user didn't specify, use DEFAULT_GIFLIB
52317  if test "x${with_giflib}" = "x"; then
52318    with_giflib=${DEFAULT_GIFLIB}
52319  fi
52320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
52321$as_echo "${with_giflib}" >&6; }
52322
52323  if test "x${with_giflib}" = "xbundled"; then
52324    USE_EXTERNAL_LIBGIF=false
52325  elif test "x${with_giflib}" = "xsystem"; then
52326    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
52327if test "x$ac_cv_header_gif_lib_h" = xyes; then :
52328
52329else
52330   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
52331fi
52332
52333
52334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
52335$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
52336if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
52337  $as_echo_n "(cached) " >&6
52338else
52339  ac_check_lib_save_LIBS=$LIBS
52340LIBS="-lgif  $LIBS"
52341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52342/* end confdefs.h.  */
52343
52344/* Override any GCC internal prototype to avoid an error.
52345   Use char because int might match the return type of a GCC
52346   builtin and then its argument prototype would still apply.  */
52347#ifdef __cplusplus
52348extern "C"
52349#endif
52350char DGifGetCode ();
52351int
52352main ()
52353{
52354return DGifGetCode ();
52355  ;
52356  return 0;
52357}
52358_ACEOF
52359if ac_fn_cxx_try_link "$LINENO"; then :
52360  ac_cv_lib_gif_DGifGetCode=yes
52361else
52362  ac_cv_lib_gif_DGifGetCode=no
52363fi
52364rm -f core conftest.err conftest.$ac_objext \
52365    conftest$ac_exeext conftest.$ac_ext
52366LIBS=$ac_check_lib_save_LIBS
52367fi
52368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
52369$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
52370if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
52371  cat >>confdefs.h <<_ACEOF
52372#define HAVE_LIBGIF 1
52373_ACEOF
52374
52375  LIBS="-lgif $LIBS"
52376
52377else
52378   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
52379fi
52380
52381
52382    USE_EXTERNAL_LIBGIF=true
52383  else
52384    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
52385  fi
52386
52387
52388
52389
52390
52391# Check whether --with-libpng was given.
52392if test "${with_libpng+set}" = set; then :
52393  withval=$with_libpng;
52394fi
52395
52396
52397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
52398$as_echo_n "checking for which libpng to use... " >&6; }
52399
52400  # default is bundled
52401  DEFAULT_LIBPNG=bundled
52402  # if user didn't specify, use DEFAULT_LIBPNG
52403  if test "x${with_libpng}" = "x"; then
52404      with_libpng=${DEFAULT_LIBPNG}
52405  fi
52406
52407  if test "x${with_libpng}" = "xbundled"; then
52408      USE_EXTERNAL_LIBPNG=false
52409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52410$as_echo "bundled" >&6; }
52411  elif test "x${with_libpng}" = "xsystem"; then
52412
52413pkg_failed=no
52414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
52415$as_echo_n "checking for PNG... " >&6; }
52416
52417if test -n "$PNG_CFLAGS"; then
52418    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
52419 elif test -n "$PKG_CONFIG"; then
52420    if test -n "$PKG_CONFIG" && \
52421    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52422  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52423  ac_status=$?
52424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52425  test $ac_status = 0; }; then
52426  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
52427else
52428  pkg_failed=yes
52429fi
52430 else
52431    pkg_failed=untried
52432fi
52433if test -n "$PNG_LIBS"; then
52434    pkg_cv_PNG_LIBS="$PNG_LIBS"
52435 elif test -n "$PKG_CONFIG"; then
52436    if test -n "$PKG_CONFIG" && \
52437    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52438  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52439  ac_status=$?
52440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52441  test $ac_status = 0; }; then
52442  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
52443else
52444  pkg_failed=yes
52445fi
52446 else
52447    pkg_failed=untried
52448fi
52449
52450
52451
52452if test $pkg_failed = yes; then
52453
52454if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52455        _pkg_short_errors_supported=yes
52456else
52457        _pkg_short_errors_supported=no
52458fi
52459        if test $_pkg_short_errors_supported = yes; then
52460	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
52461        else
52462	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
52463        fi
52464	# Put the nasty error message in config.log where it belongs
52465	echo "$PNG_PKG_ERRORS" >&5
52466
52467	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52468$as_echo "no" >&6; }
52469                 LIBPNG_FOUND=no
52470elif test $pkg_failed = untried; then
52471	 LIBPNG_FOUND=no
52472else
52473	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
52474	PNG_LIBS=$pkg_cv_PNG_LIBS
52475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52476$as_echo "yes" >&6; }
52477	 LIBPNG_FOUND=yes
52478fi
52479      if test "x${LIBPNG_FOUND}" = "xyes"; then
52480          USE_EXTERNAL_LIBPNG=true
52481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52482$as_echo "system" >&6; }
52483      else
52484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52485$as_echo "system not found" >&6; }
52486          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
52487      fi
52488  else
52489      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
52490  fi
52491
52492
52493
52494
52495
52496# Check whether --with-zlib was given.
52497if test "${with_zlib+set}" = set; then :
52498  withval=$with_zlib;
52499fi
52500
52501
52502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
52503$as_echo_n "checking for compress in -lz... " >&6; }
52504if ${ac_cv_lib_z_compress+:} false; then :
52505  $as_echo_n "(cached) " >&6
52506else
52507  ac_check_lib_save_LIBS=$LIBS
52508LIBS="-lz  $LIBS"
52509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52510/* end confdefs.h.  */
52511
52512/* Override any GCC internal prototype to avoid an error.
52513   Use char because int might match the return type of a GCC
52514   builtin and then its argument prototype would still apply.  */
52515#ifdef __cplusplus
52516extern "C"
52517#endif
52518char compress ();
52519int
52520main ()
52521{
52522return compress ();
52523  ;
52524  return 0;
52525}
52526_ACEOF
52527if ac_fn_cxx_try_link "$LINENO"; then :
52528  ac_cv_lib_z_compress=yes
52529else
52530  ac_cv_lib_z_compress=no
52531fi
52532rm -f core conftest.err conftest.$ac_objext \
52533    conftest$ac_exeext conftest.$ac_ext
52534LIBS=$ac_check_lib_save_LIBS
52535fi
52536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
52537$as_echo "$ac_cv_lib_z_compress" >&6; }
52538if test "x$ac_cv_lib_z_compress" = xyes; then :
52539   ZLIB_FOUND=yes
52540else
52541   ZLIB_FOUND=no
52542fi
52543
52544
52545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
52546$as_echo_n "checking for which zlib to use... " >&6; }
52547
52548  DEFAULT_ZLIB=bundled
52549  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52550    # On macosx default is system...on others default is bundled
52551    DEFAULT_ZLIB=system
52552  fi
52553
52554  if test "x${ZLIB_FOUND}" != "xyes"; then
52555    # If we don't find any system...set default to bundled
52556    DEFAULT_ZLIB=bundled
52557  fi
52558
52559  # If user didn't specify, use DEFAULT_ZLIB
52560  if test "x${with_zlib}" = "x"; then
52561    with_zlib=${DEFAULT_ZLIB}
52562  fi
52563
52564  if test "x${with_zlib}" = "xbundled"; then
52565    USE_EXTERNAL_LIBZ=false
52566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52567$as_echo "bundled" >&6; }
52568  elif test "x${with_zlib}" = "xsystem"; then
52569    if test "x${ZLIB_FOUND}" = "xyes"; then
52570      USE_EXTERNAL_LIBZ=true
52571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52572$as_echo "system" >&6; }
52573    else
52574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52575$as_echo "system not found" >&6; }
52576      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
52577    fi
52578  else
52579    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
52580  fi
52581
52582
52583
52584
52585
52586# Check whether --with-lcms was given.
52587if test "${with_lcms+set}" = set; then :
52588  withval=$with_lcms;
52589fi
52590
52591
52592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
52593$as_echo_n "checking for which lcms to use... " >&6; }
52594
52595  DEFAULT_LCMS=bundled
52596  # If user didn't specify, use DEFAULT_LCMS
52597  if test "x${with_lcms}" = "x"; then
52598      with_lcms=${DEFAULT_LCMS}
52599  fi
52600
52601  if test "x${with_lcms}" = "xbundled"; then
52602    USE_EXTERNAL_LCMS=false
52603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52604$as_echo "bundled" >&6; }
52605  elif test "x${with_lcms}" = "xsystem"; then
52606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52607$as_echo "system" >&6; }
52608
52609pkg_failed=no
52610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
52611$as_echo_n "checking for LCMS... " >&6; }
52612
52613if test -n "$LCMS_CFLAGS"; then
52614    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
52615 elif test -n "$PKG_CONFIG"; then
52616    if test -n "$PKG_CONFIG" && \
52617    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52618  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52619  ac_status=$?
52620  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52621  test $ac_status = 0; }; then
52622  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
52623else
52624  pkg_failed=yes
52625fi
52626 else
52627    pkg_failed=untried
52628fi
52629if test -n "$LCMS_LIBS"; then
52630    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
52631 elif test -n "$PKG_CONFIG"; then
52632    if test -n "$PKG_CONFIG" && \
52633    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52634  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52635  ac_status=$?
52636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52637  test $ac_status = 0; }; then
52638  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
52639else
52640  pkg_failed=yes
52641fi
52642 else
52643    pkg_failed=untried
52644fi
52645
52646
52647
52648if test $pkg_failed = yes; then
52649
52650if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52651        _pkg_short_errors_supported=yes
52652else
52653        _pkg_short_errors_supported=no
52654fi
52655        if test $_pkg_short_errors_supported = yes; then
52656	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
52657        else
52658	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
52659        fi
52660	# Put the nasty error message in config.log where it belongs
52661	echo "$LCMS_PKG_ERRORS" >&5
52662
52663	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52664$as_echo "no" >&6; }
52665                LCMS_FOUND=no
52666elif test $pkg_failed = untried; then
52667	LCMS_FOUND=no
52668else
52669	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
52670	LCMS_LIBS=$pkg_cv_LCMS_LIBS
52671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52672$as_echo "yes" >&6; }
52673	LCMS_FOUND=yes
52674fi
52675    if test "x${LCMS_FOUND}" = "xyes"; then
52676      USE_EXTERNAL_LCMS=true
52677    else
52678      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
52679    fi
52680  else
52681    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
52682  fi
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694  # Setup libm (the maths library)
52695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
52696$as_echo_n "checking for cos in -lm... " >&6; }
52697if ${ac_cv_lib_m_cos+:} false; then :
52698  $as_echo_n "(cached) " >&6
52699else
52700  ac_check_lib_save_LIBS=$LIBS
52701LIBS="-lm  $LIBS"
52702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52703/* end confdefs.h.  */
52704
52705/* Override any GCC internal prototype to avoid an error.
52706   Use char because int might match the return type of a GCC
52707   builtin and then its argument prototype would still apply.  */
52708#ifdef __cplusplus
52709extern "C"
52710#endif
52711char cos ();
52712int
52713main ()
52714{
52715return cos ();
52716  ;
52717  return 0;
52718}
52719_ACEOF
52720if ac_fn_cxx_try_link "$LINENO"; then :
52721  ac_cv_lib_m_cos=yes
52722else
52723  ac_cv_lib_m_cos=no
52724fi
52725rm -f core conftest.err conftest.$ac_objext \
52726    conftest$ac_exeext conftest.$ac_ext
52727LIBS=$ac_check_lib_save_LIBS
52728fi
52729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
52730$as_echo "$ac_cv_lib_m_cos" >&6; }
52731if test "x$ac_cv_lib_m_cos" = xyes; then :
52732  cat >>confdefs.h <<_ACEOF
52733#define HAVE_LIBM 1
52734_ACEOF
52735
52736  LIBS="-lm $LIBS"
52737
52738else
52739
52740      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
52741$as_echo "$as_me: Maths library was not found" >&6;}
52742
52743fi
52744
52745  LIBM=-lm
52746
52747
52748  # Setup libdl (for dynamic library loading)
52749  save_LIBS="$LIBS"
52750  LIBS=""
52751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
52752$as_echo_n "checking for dlopen in -ldl... " >&6; }
52753if ${ac_cv_lib_dl_dlopen+:} false; then :
52754  $as_echo_n "(cached) " >&6
52755else
52756  ac_check_lib_save_LIBS=$LIBS
52757LIBS="-ldl  $LIBS"
52758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52759/* end confdefs.h.  */
52760
52761/* Override any GCC internal prototype to avoid an error.
52762   Use char because int might match the return type of a GCC
52763   builtin and then its argument prototype would still apply.  */
52764#ifdef __cplusplus
52765extern "C"
52766#endif
52767char dlopen ();
52768int
52769main ()
52770{
52771return dlopen ();
52772  ;
52773  return 0;
52774}
52775_ACEOF
52776if ac_fn_cxx_try_link "$LINENO"; then :
52777  ac_cv_lib_dl_dlopen=yes
52778else
52779  ac_cv_lib_dl_dlopen=no
52780fi
52781rm -f core conftest.err conftest.$ac_objext \
52782    conftest$ac_exeext conftest.$ac_ext
52783LIBS=$ac_check_lib_save_LIBS
52784fi
52785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
52786$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
52787if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
52788  cat >>confdefs.h <<_ACEOF
52789#define HAVE_LIBDL 1
52790_ACEOF
52791
52792  LIBS="-ldl $LIBS"
52793
52794fi
52795
52796  LIBDL="$LIBS"
52797
52798  LIBS="$save_LIBS"
52799
52800  # Deprecated libraries, keep the flags for backwards compatibility
52801  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52802
52803
52804# Check whether --with-dxsdk was given.
52805if test "${with_dxsdk+set}" = set; then :
52806  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52807$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52808fi
52809
52810
52811
52812
52813# Check whether --with-dxsdk-lib was given.
52814if test "${with_dxsdk_lib+set}" = set; then :
52815  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52816$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52817fi
52818
52819
52820
52821
52822# Check whether --with-dxsdk-include was given.
52823if test "${with_dxsdk_include+set}" = set; then :
52824  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52825$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52826fi
52827
52828
52829  fi
52830
52831  # Control if libzip can use mmap. Available for purposes of overriding.
52832  LIBZIP_CAN_USE_MMAP=true
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847###############################################################################
52848#
52849# We need to do some final tweaking, when everything else is done.
52850#
52851###############################################################################
52852
52853
52854  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52855
52856
52857  # The name of the Service Agent jar.
52858  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52859  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52860    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52861  fi
52862
52863
52864
52865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52866$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52867
52868    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52869      ENABLE_INTREE_EC=yes
52870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52871$as_echo "yes" >&6; }
52872    else
52873      ENABLE_INTREE_EC=no
52874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52875$as_echo "no" >&6; }
52876    fi
52877
52878
52879
52880
52881###############################################################################
52882#
52883# Configure parts of the build that only affect the build performance,
52884# not the result.
52885#
52886###############################################################################
52887
52888
52889  # How many cores do we have on this build system?
52890
52891# Check whether --with-num-cores was given.
52892if test "${with_num_cores+set}" = set; then :
52893  withval=$with_num_cores;
52894fi
52895
52896  if test "x$with_num_cores" = x; then
52897    # The number of cores were not specified, try to probe them.
52898
52899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52900$as_echo_n "checking for number of cores... " >&6; }
52901  NUM_CORES=1
52902  FOUND_CORES=no
52903
52904  if test -f /proc/cpuinfo; then
52905    # Looks like a Linux (or cygwin) system
52906    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52907    FOUND_CORES=yes
52908  elif test -x /usr/sbin/psrinfo; then
52909    # Looks like a Solaris system
52910    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52911    FOUND_CORES=yes
52912  elif test -x /usr/sbin/system_profiler; then
52913    # Looks like a MacOSX system
52914    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52915    FOUND_CORES=yes
52916  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52917    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52918    FOUND_CORES=yes
52919  elif test -n "$NUMBER_OF_PROCESSORS"; then
52920    # On windows, look in the env
52921    NUM_CORES=$NUMBER_OF_PROCESSORS
52922    FOUND_CORES=yes
52923  fi
52924
52925  if test "x$FOUND_CORES" = xyes; then
52926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52927$as_echo "$NUM_CORES" >&6; }
52928  else
52929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52930$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52931    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52932$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52933  fi
52934
52935  else
52936    NUM_CORES=$with_num_cores
52937  fi
52938
52939
52940
52941  # How much memory do we have on this build system?
52942
52943# Check whether --with-memory-size was given.
52944if test "${with_memory_size+set}" = set; then :
52945  withval=$with_memory_size;
52946fi
52947
52948  if test "x$with_memory_size" = x; then
52949    # The memory size was not specified, try to probe it.
52950
52951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52952$as_echo_n "checking for memory size... " >&6; }
52953  # Default to 1024 MB
52954  MEMORY_SIZE=1024
52955  FOUND_MEM=no
52956
52957  if test -f /proc/meminfo; then
52958    # Looks like a Linux (or cygwin) system
52959    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52960    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52961    FOUND_MEM=yes
52962  elif test -x /usr/sbin/prtconf; then
52963    # Looks like a Solaris or AIX system
52964    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52965    FOUND_MEM=yes
52966  elif test -x /usr/sbin/system_profiler; then
52967    # Looks like a MacOSX system
52968    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52969    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52970    FOUND_MEM=yes
52971  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52972    # Windows, but without cygwin
52973    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52974    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52975    FOUND_MEM=yes
52976  fi
52977
52978  if test "x$FOUND_MEM" = xyes; then
52979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52980$as_echo "$MEMORY_SIZE MB" >&6; }
52981  else
52982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52983$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52984    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52985$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52986  fi
52987
52988  else
52989    MEMORY_SIZE=$with_memory_size
52990  fi
52991
52992
52993
52994  # Provide a decent default number of parallel jobs for make depending on
52995  # number of cores, amount of memory and machine architecture.
52996
52997# Check whether --with-jobs was given.
52998if test "${with_jobs+set}" = set; then :
52999  withval=$with_jobs;
53000fi
53001
53002  if test "x$with_jobs" = x; then
53003    # Number of jobs was not specified, calculate.
53004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
53005$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
53006    # Approximate memory in GB.
53007    memory_gb=`expr $MEMORY_SIZE / 1024`
53008    # Pick the lowest of memory in gb and number of cores.
53009    if test "$memory_gb" -lt "$NUM_CORES"; then
53010      JOBS="$memory_gb"
53011    else
53012      JOBS="$NUM_CORES"
53013      # On bigger machines, leave some room for other processes to run
53014      if test "$JOBS" -gt "4"; then
53015        JOBS=`expr $JOBS '*' 90 / 100`
53016      fi
53017    fi
53018    # Cap number of jobs to 16
53019    if test "$JOBS" -gt "16"; then
53020      JOBS=16
53021    fi
53022    if test "$JOBS" -eq "0"; then
53023      JOBS=1
53024    fi
53025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53026$as_echo "$JOBS" >&6; }
53027  else
53028    JOBS=$with_jobs
53029  fi
53030
53031
53032
53033# Setup arguments for the boot jdk (after cores and memory have been setup)
53034
53035  ##############################################################################
53036  #
53037  # Specify jvm options for anything that is run with the Boot JDK.
53038  # Not all JVM:s accept the same arguments on the command line.
53039  #
53040
53041# Check whether --with-boot-jdk-jvmargs was given.
53042if test "${with_boot_jdk_jvmargs+set}" = set; then :
53043  withval=$with_boot_jdk_jvmargs;
53044fi
53045
53046
53047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
53048$as_echo_n "checking flags for boot jdk java command ... " >&6; }
53049
53050  # Disable special log output when a debug build is used as Boot JDK...
53051
53052  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
53053  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
53054  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
53055  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53056  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53057  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53058    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
53059    JVM_ARG_OK=true
53060  else
53061    $ECHO "Arg failed:" >&5
53062    $ECHO "$OUTPUT" >&5
53063    JVM_ARG_OK=false
53064  fi
53065
53066
53067  # Apply user provided options.
53068
53069  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
53070  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
53071  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
53072  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53073  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53074  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53075    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
53076    JVM_ARG_OK=true
53077  else
53078    $ECHO "Arg failed:" >&5
53079    $ECHO "$OUTPUT" >&5
53080    JVM_ARG_OK=false
53081  fi
53082
53083
53084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
53085$as_echo "$boot_jdk_jvmargs" >&6; }
53086
53087  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
53088  JAVA_FLAGS=$boot_jdk_jvmargs
53089
53090
53091
53092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
53093$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
53094
53095  # Starting amount of heap memory.
53096
53097  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
53098  $ECHO "Command: $JAVA -Xms64M -version" >&5
53099  OUTPUT=`$JAVA -Xms64M -version 2>&1`
53100  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53101  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53103    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
53104    JVM_ARG_OK=true
53105  else
53106    $ECHO "Arg failed:" >&5
53107    $ECHO "$OUTPUT" >&5
53108    JVM_ARG_OK=false
53109  fi
53110
53111
53112  # Maximum amount of heap memory.
53113  # Maximum stack size.
53114  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
53115  if test "x$BOOT_JDK_BITS" = "x32"; then
53116    if test "$JVM_MAX_HEAP" -gt "1100"; then
53117      JVM_MAX_HEAP=1100
53118    elif test "$JVM_MAX_HEAP" -lt "512"; then
53119      JVM_MAX_HEAP=512
53120    fi
53121    STACK_SIZE=768
53122  else
53123    # Running a 64 bit JVM allows for and requires a bigger heap
53124    if test "$JVM_MAX_HEAP" -gt "1600"; then
53125      JVM_MAX_HEAP=1600
53126    elif test "$JVM_MAX_HEAP" -lt "512"; then
53127      JVM_MAX_HEAP=512
53128    fi
53129    STACK_SIZE=1536
53130  fi
53131
53132  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
53133  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
53134  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
53135  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53136  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53138    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
53139    JVM_ARG_OK=true
53140  else
53141    $ECHO "Arg failed:" >&5
53142    $ECHO "$OUTPUT" >&5
53143    JVM_ARG_OK=false
53144  fi
53145
53146
53147  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53148  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53149  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53150  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53151  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53152  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53153    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53154    JVM_ARG_OK=true
53155  else
53156    $ECHO "Arg failed:" >&5
53157    $ECHO "$OUTPUT" >&5
53158    JVM_ARG_OK=false
53159  fi
53160
53161
53162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53163$as_echo "$boot_jdk_jvmargs_big" >&6; }
53164
53165  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53166
53167
53168
53169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53170$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53171
53172  # Use serial gc for small short lived tools if possible
53173
53174  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53175  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53176  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53177  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53178  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53179  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53180    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53181    JVM_ARG_OK=true
53182  else
53183    $ECHO "Arg failed:" >&5
53184    $ECHO "$OUTPUT" >&5
53185    JVM_ARG_OK=false
53186  fi
53187
53188
53189  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53190  $ECHO "Command: $JAVA -Xms32M -version" >&5
53191  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53192  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53193  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53194  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53195    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53196    JVM_ARG_OK=true
53197  else
53198    $ECHO "Arg failed:" >&5
53199    $ECHO "$OUTPUT" >&5
53200    JVM_ARG_OK=false
53201  fi
53202
53203
53204  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53205  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53206  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53207  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53208  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53209  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53210    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53211    JVM_ARG_OK=true
53212  else
53213    $ECHO "Arg failed:" >&5
53214    $ECHO "$OUTPUT" >&5
53215    JVM_ARG_OK=false
53216  fi
53217
53218
53219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53220$as_echo "$boot_jdk_jvmargs_small" >&6; }
53221
53222  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53223
53224
53225  JAVA_TOOL_FLAGS_SMALL=""
53226  for f in $JAVA_FLAGS_SMALL; do
53227    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53228  done
53229
53230
53231
53232# Setup smart javac (after cores and memory have been setup)
53233
53234
53235# Check whether --with-sjavac-server-java was given.
53236if test "${with_sjavac_server_java+set}" = set; then :
53237  withval=$with_sjavac_server_java;
53238fi
53239
53240
53241  if test "x$with_sjavac_server_java" != x; then
53242    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53243    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53244    if test "x$FOUND_VERSION" = x; then
53245      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53246    fi
53247  else
53248    SJAVAC_SERVER_JAVA="$JAVA"
53249  fi
53250
53251
53252  if test "$MEMORY_SIZE" -gt "3000"; then
53253
53254  $ECHO "Check if jvm arg is ok: -d64" >&5
53255  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53256  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53257  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53258  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53259  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53260    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53261    JVM_ARG_OK=true
53262  else
53263    $ECHO "Arg failed:" >&5
53264    $ECHO "$OUTPUT" >&5
53265    JVM_ARG_OK=false
53266  fi
53267
53268    if test "$JVM_ARG_OK" = true; then
53269      JVM_64BIT=true
53270      JVM_ARG_OK=false
53271    fi
53272  fi
53273
53274  MX_VALUE=`expr $MEMORY_SIZE / 2`
53275  if test "$JVM_64BIT" = true; then
53276    # Set ms lower than mx since more than one instance of the server might
53277    # get launched at the same time before they figure out which instance won.
53278    MS_VALUE=512
53279    if test "$MX_VALUE" -gt "2048"; then
53280      MX_VALUE=2048
53281    fi
53282  else
53283    MS_VALUE=256
53284    if test "$MX_VALUE" -gt "1500"; then
53285      MX_VALUE=1500
53286    fi
53287  fi
53288  if test "$MX_VALUE" -lt "512"; then
53289    MX_VALUE=512
53290  fi
53291
53292  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53293  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53294  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53295  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53296  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53297  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53298    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53299    JVM_ARG_OK=true
53300  else
53301    $ECHO "Arg failed:" >&5
53302    $ECHO "$OUTPUT" >&5
53303    JVM_ARG_OK=false
53304  fi
53305
53306
53307
53308  # Check whether --enable-sjavac was given.
53309if test "${enable_sjavac+set}" = set; then :
53310  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53311else
53312  ENABLE_SJAVAC='no'
53313fi
53314
53315  if test "x$JVM_ARG_OK" = "xfalse"; then
53316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53317$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53318    ENABLE_SJAVAC=no;
53319  fi
53320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53321$as_echo_n "checking whether to use sjavac... " >&6; }
53322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53323$as_echo "$ENABLE_SJAVAC" >&6; }
53324
53325
53326
53327# Can the C/C++ compiler use precompiled headers?
53328
53329
53330  ###############################################################################
53331  #
53332  # Can the C/C++ compiler use precompiled headers?
53333  #
53334  # Check whether --enable-precompiled-headers was given.
53335if test "${enable_precompiled_headers+set}" = set; then :
53336  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53337else
53338  ENABLE_PRECOMPH=yes
53339fi
53340
53341
53342  USE_PRECOMPILED_HEADER=1
53343  if test "x$ENABLE_PRECOMPH" = xno; then
53344    USE_PRECOMPILED_HEADER=0
53345  fi
53346
53347  if test "x$ENABLE_PRECOMPH" = xyes; then
53348    # Check that the compiler actually supports precomp headers.
53349    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53351$as_echo_n "checking that precompiled headers work... " >&6; }
53352      echo "int alfa();" > conftest.h
53353      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53354      if test ! -f conftest.hpp.gch; then
53355        USE_PRECOMPILED_HEADER=0
53356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53357$as_echo "no" >&6; }
53358      else
53359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53360$as_echo "yes" >&6; }
53361      fi
53362      rm -f conftest.h conftest.hpp.gch
53363    fi
53364  fi
53365
53366
53367
53368
53369# Setup use of ccache, if available
53370
53371  # Check whether --enable-ccache was given.
53372if test "${enable_ccache+set}" = set; then :
53373  enableval=$enable_ccache;
53374fi
53375
53376
53377  CCACHE=
53378  CCACHE_STATUS=
53379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53380$as_echo_n "checking is ccache enabled... " >&6; }
53381  if test "x$enable_ccache" = xyes; then
53382    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53384$as_echo "yes" >&6; }
53385      OLD_PATH="$PATH"
53386      if test "x$TOOLCHAIN_PATH" != x; then
53387        PATH=$TOOLCHAIN_PATH:$PATH
53388      fi
53389
53390
53391
53392  # Publish this variable in the help.
53393
53394
53395  if [ -z "${CCACHE+x}" ]; then
53396    # The variable is not set by user, try to locate tool using the code snippet
53397    for ac_prog in ccache
53398do
53399  # Extract the first word of "$ac_prog", so it can be a program name with args.
53400set dummy $ac_prog; ac_word=$2
53401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53402$as_echo_n "checking for $ac_word... " >&6; }
53403if ${ac_cv_path_CCACHE+:} false; then :
53404  $as_echo_n "(cached) " >&6
53405else
53406  case $CCACHE in
53407  [\\/]* | ?:[\\/]*)
53408  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53409  ;;
53410  *)
53411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53412for as_dir in $PATH
53413do
53414  IFS=$as_save_IFS
53415  test -z "$as_dir" && as_dir=.
53416    for ac_exec_ext in '' $ac_executable_extensions; do
53417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53418    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53420    break 2
53421  fi
53422done
53423  done
53424IFS=$as_save_IFS
53425
53426  ;;
53427esac
53428fi
53429CCACHE=$ac_cv_path_CCACHE
53430if test -n "$CCACHE"; then
53431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53432$as_echo "$CCACHE" >&6; }
53433else
53434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53435$as_echo "no" >&6; }
53436fi
53437
53438
53439  test -n "$CCACHE" && break
53440done
53441
53442  else
53443    # The variable is set, but is it from the command line or the environment?
53444
53445    # Try to remove the string !CCACHE! from our list.
53446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53448      # If it failed, the variable was not from the command line. Ignore it,
53449      # but warn the user (except for BASH, which is always set by the calling BASH).
53450      if test "xCCACHE" != xBASH; then
53451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53452$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53453      fi
53454      # Try to locate tool using the code snippet
53455      for ac_prog in ccache
53456do
53457  # Extract the first word of "$ac_prog", so it can be a program name with args.
53458set dummy $ac_prog; ac_word=$2
53459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53460$as_echo_n "checking for $ac_word... " >&6; }
53461if ${ac_cv_path_CCACHE+:} false; then :
53462  $as_echo_n "(cached) " >&6
53463else
53464  case $CCACHE in
53465  [\\/]* | ?:[\\/]*)
53466  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53467  ;;
53468  *)
53469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53470for as_dir in $PATH
53471do
53472  IFS=$as_save_IFS
53473  test -z "$as_dir" && as_dir=.
53474    for ac_exec_ext in '' $ac_executable_extensions; do
53475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53476    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53478    break 2
53479  fi
53480done
53481  done
53482IFS=$as_save_IFS
53483
53484  ;;
53485esac
53486fi
53487CCACHE=$ac_cv_path_CCACHE
53488if test -n "$CCACHE"; then
53489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53490$as_echo "$CCACHE" >&6; }
53491else
53492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53493$as_echo "no" >&6; }
53494fi
53495
53496
53497  test -n "$CCACHE" && break
53498done
53499
53500    else
53501      # If it succeeded, then it was overridden by the user. We will use it
53502      # for the tool.
53503
53504      # First remove it from the list of overridden variables, so we can test
53505      # for unknown variables in the end.
53506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53507
53508      # Check if we try to supply an empty value
53509      if test "x$CCACHE" = x; then
53510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
53511$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
53512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53513$as_echo_n "checking for CCACHE... " >&6; }
53514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
53515$as_echo "disabled" >&6; }
53516      else
53517        # Check if the provided tool contains a complete path.
53518        tool_specified="$CCACHE"
53519        tool_basename="${tool_specified##*/}"
53520        if test "x$tool_basename" = "x$tool_specified"; then
53521          # A command without a complete path is provided, search $PATH.
53522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53523$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53524          # Extract the first word of "$tool_basename", so it can be a program name with args.
53525set dummy $tool_basename; ac_word=$2
53526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53527$as_echo_n "checking for $ac_word... " >&6; }
53528if ${ac_cv_path_CCACHE+:} false; then :
53529  $as_echo_n "(cached) " >&6
53530else
53531  case $CCACHE in
53532  [\\/]* | ?:[\\/]*)
53533  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53534  ;;
53535  *)
53536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53537for as_dir in $PATH
53538do
53539  IFS=$as_save_IFS
53540  test -z "$as_dir" && as_dir=.
53541    for ac_exec_ext in '' $ac_executable_extensions; do
53542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53543    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53545    break 2
53546  fi
53547done
53548  done
53549IFS=$as_save_IFS
53550
53551  ;;
53552esac
53553fi
53554CCACHE=$ac_cv_path_CCACHE
53555if test -n "$CCACHE"; then
53556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53557$as_echo "$CCACHE" >&6; }
53558else
53559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53560$as_echo "no" >&6; }
53561fi
53562
53563
53564          if test "x$CCACHE" = x; then
53565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53566          fi
53567        else
53568          # Otherwise we believe it is a complete path. Use it as it is.
53569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53570$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53572$as_echo_n "checking for CCACHE... " >&6; }
53573          if test ! -x "$tool_specified"; then
53574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53575$as_echo "not found" >&6; }
53576            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53577          fi
53578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53579$as_echo "$tool_specified" >&6; }
53580        fi
53581      fi
53582    fi
53583  fi
53584
53585
53586
53587  if test "x$CCACHE" = x; then
53588    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53589  fi
53590
53591
53592      PATH="$OLD_PATH"
53593      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53594      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53595    else
53596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53597$as_echo "no" >&6; }
53598      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53599$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53600    fi
53601  elif test "x$enable_ccache" = xno; then
53602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53603$as_echo "no, explicitly disabled" >&6; }
53604    CCACHE_STATUS="Disabled"
53605  elif test "x$enable_ccache" = x; then
53606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53607$as_echo "no" >&6; }
53608  else
53609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53610$as_echo "unknown" >&6; }
53611    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53612  fi
53613
53614
53615
53616# Check whether --with-ccache-dir was given.
53617if test "${with_ccache_dir+set}" = set; then :
53618  withval=$with_ccache_dir;
53619fi
53620
53621
53622  if test "x$with_ccache_dir" != x; then
53623    # When using a non home ccache directory, assume the use is to share ccache files
53624    # with other users. Thus change the umask.
53625    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53626    if test "x$CCACHE" = x; then
53627      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53628$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53629    fi
53630  fi
53631
53632  if test "x$CCACHE" != x; then
53633
53634  if test "x$CCACHE" != x; then
53635    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53636      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53637          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53638      if test "x$HAS_BAD_CCACHE" != "x"; then
53639        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53640      fi
53641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53642$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53643      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53644      PUSHED_FLAGS="$CXXFLAGS"
53645      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53646      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53647/* end confdefs.h.  */
53648
53649int
53650main ()
53651{
53652
53653  ;
53654  return 0;
53655}
53656_ACEOF
53657if ac_fn_cxx_try_compile "$LINENO"; then :
53658  CC_KNOWS_CCACHE_TRICK=yes
53659else
53660  CC_KNOWS_CCACHE_TRICK=no
53661fi
53662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53663      CXXFLAGS="$PUSHED_FLAGS"
53664      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53666$as_echo "yes" >&6; }
53667        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53668
53669        CCACHE_SLOPPINESS=pch_defines,time_macros
53670      else
53671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53672$as_echo "no" >&6; }
53673        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53674      fi
53675    fi
53676
53677    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53678        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53679
53680    if test "x$SET_CCACHE_DIR" != x; then
53681      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53682      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53683    fi
53684  fi
53685
53686  fi
53687
53688
53689###############################################################################
53690#
53691# And now the finish...
53692#
53693###############################################################################
53694
53695# Check for some common pitfalls
53696
53697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53698    file_to_test="$SRC_ROOT/LICENSE"
53699    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53700      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
53701    fi
53702  fi
53703
53704
53705  # Did user specify any unknown variables?
53706
53707  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53708    # Replace the separating ! with spaces before presenting for end user.
53709    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53710    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53711$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53712  fi
53713
53714
53715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53716$as_echo_n "checking if build directory is on local disk... " >&6; }
53717
53718  # df -l lists only local disks; if the given directory is not found then
53719  # a non-zero exit code is given
53720  if test "x$DF" = x; then
53721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53722      # msys does not have df; use Windows "net use" instead.
53723      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53724      if test "x$IS_NETWORK_DISK" = x; then
53725        OUTPUT_DIR_IS_LOCAL="yes"
53726      else
53727        OUTPUT_DIR_IS_LOCAL="no"
53728      fi
53729    else
53730      # No df here, say it's local
53731      OUTPUT_DIR_IS_LOCAL="yes"
53732    fi
53733  else
53734    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53735      OUTPUT_DIR_IS_LOCAL="yes"
53736    else
53737      OUTPUT_DIR_IS_LOCAL="no"
53738    fi
53739  fi
53740
53741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53742$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53743
53744
53745
53746  # Check if the user has any old-style ALT_ variables set.
53747  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53748
53749  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53750  # Since we can't properly handle the dependencies for this, warn the user about the situation
53751  if test -e $OUTPUT_ROOT/spec.gmk; then
53752    IS_RECONFIGURE=yes
53753  else
53754    IS_RECONFIGURE=no
53755  fi
53756
53757
53758# At the end, call the custom hook. (Dummy macro if no custom sources available)
53759
53760
53761# We're messing a bit with internal autoconf variables to put the config.status
53762# in the output directory instead of the current directory.
53763CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53764
53765# Create the actual output files. Now the main work of configure is done.
53766cat >confcache <<\_ACEOF
53767# This file is a shell script that caches the results of configure
53768# tests run on this system so they can be shared between configure
53769# scripts and configure runs, see configure's option --config-cache.
53770# It is not useful on other systems.  If it contains results you don't
53771# want to keep, you may remove or edit it.
53772#
53773# config.status only pays attention to the cache file if you give it
53774# the --recheck option to rerun configure.
53775#
53776# `ac_cv_env_foo' variables (set or unset) will be overridden when
53777# loading this file, other *unset* `ac_cv_foo' will be assigned the
53778# following values.
53779
53780_ACEOF
53781
53782# The following way of writing the cache mishandles newlines in values,
53783# but we know of no workaround that is simple, portable, and efficient.
53784# So, we kill variables containing newlines.
53785# Ultrix sh set writes to stderr and can't be redirected directly,
53786# and sets the high bit in the cache file unless we assign to the vars.
53787(
53788  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53789    eval ac_val=\$$ac_var
53790    case $ac_val in #(
53791    *${as_nl}*)
53792      case $ac_var in #(
53793      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53794$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53795      esac
53796      case $ac_var in #(
53797      _ | IFS | as_nl) ;; #(
53798      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53799      *) { eval $ac_var=; unset $ac_var;} ;;
53800      esac ;;
53801    esac
53802  done
53803
53804  (set) 2>&1 |
53805    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53806    *${as_nl}ac_space=\ *)
53807      # `set' does not quote correctly, so add quotes: double-quote
53808      # substitution turns \\\\ into \\, and sed turns \\ into \.
53809      sed -n \
53810	"s/'/'\\\\''/g;
53811	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53812      ;; #(
53813    *)
53814      # `set' quotes correctly as required by POSIX, so do not add quotes.
53815      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53816      ;;
53817    esac |
53818    sort
53819) |
53820  sed '
53821     /^ac_cv_env_/b end
53822     t clear
53823     :clear
53824     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53825     t end
53826     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53827     :end' >>confcache
53828if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53829  if test -w "$cache_file"; then
53830    if test "x$cache_file" != "x/dev/null"; then
53831      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53832$as_echo "$as_me: updating cache $cache_file" >&6;}
53833      if test ! -f "$cache_file" || test -h "$cache_file"; then
53834	cat confcache >"$cache_file"
53835      else
53836        case $cache_file in #(
53837        */* | ?:*)
53838	  mv -f confcache "$cache_file"$$ &&
53839	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53840        *)
53841	  mv -f confcache "$cache_file" ;;
53842	esac
53843      fi
53844    fi
53845  else
53846    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53847$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53848  fi
53849fi
53850rm -f confcache
53851
53852test "x$prefix" = xNONE && prefix=$ac_default_prefix
53853# Let make expand exec_prefix.
53854test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53855
53856# Transform confdefs.h into DEFS.
53857# Protect against shell expansion while executing Makefile rules.
53858# Protect against Makefile macro expansion.
53859#
53860# If the first sed substitution is executed (which looks for macros that
53861# take arguments), then branch to the quote section.  Otherwise,
53862# look for a macro that doesn't take arguments.
53863ac_script='
53864:mline
53865/\\$/{
53866 N
53867 s,\\\n,,
53868 b mline
53869}
53870t clear
53871:clear
53872s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53873t quote
53874s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53875t quote
53876b any
53877:quote
53878s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53879s/\[/\\&/g
53880s/\]/\\&/g
53881s/\$/$$/g
53882H
53883:any
53884${
53885	g
53886	s/^\n//
53887	s/\n/ /g
53888	p
53889}
53890'
53891DEFS=`sed -n "$ac_script" confdefs.h`
53892
53893
53894ac_libobjs=
53895ac_ltlibobjs=
53896U=
53897for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53898  # 1. Remove the extension, and $U if already installed.
53899  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53900  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53901  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53902  #    will be set to the directory where LIBOBJS objects are built.
53903  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53904  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53905done
53906LIBOBJS=$ac_libobjs
53907
53908LTLIBOBJS=$ac_ltlibobjs
53909
53910
53911
53912: "${CONFIG_STATUS=./config.status}"
53913ac_write_fail=0
53914ac_clean_files_save=$ac_clean_files
53915ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53916{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53917$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53918as_write_fail=0
53919cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53920#! $SHELL
53921# Generated by $as_me.
53922# Run this file to recreate the current configuration.
53923# Compiler output produced by configure, useful for debugging
53924# configure, is in config.log if it exists.
53925
53926debug=false
53927ac_cs_recheck=false
53928ac_cs_silent=false
53929
53930SHELL=\${CONFIG_SHELL-$SHELL}
53931export SHELL
53932_ASEOF
53933cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53934## -------------------- ##
53935## M4sh Initialization. ##
53936## -------------------- ##
53937
53938# Be more Bourne compatible
53939DUALCASE=1; export DUALCASE # for MKS sh
53940if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53941  emulate sh
53942  NULLCMD=:
53943  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53944  # is contrary to our usage.  Disable this feature.
53945  alias -g '${1+"$@"}'='"$@"'
53946  setopt NO_GLOB_SUBST
53947else
53948  case `(set -o) 2>/dev/null` in #(
53949  *posix*) :
53950    set -o posix ;; #(
53951  *) :
53952     ;;
53953esac
53954fi
53955
53956
53957as_nl='
53958'
53959export as_nl
53960# Printing a long string crashes Solaris 7 /usr/bin/printf.
53961as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53962as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53963as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53964# Prefer a ksh shell builtin over an external printf program on Solaris,
53965# but without wasting forks for bash or zsh.
53966if test -z "$BASH_VERSION$ZSH_VERSION" \
53967    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53968  as_echo='print -r --'
53969  as_echo_n='print -rn --'
53970elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53971  as_echo='printf %s\n'
53972  as_echo_n='printf %s'
53973else
53974  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53975    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53976    as_echo_n='/usr/ucb/echo -n'
53977  else
53978    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53979    as_echo_n_body='eval
53980      arg=$1;
53981      case $arg in #(
53982      *"$as_nl"*)
53983	expr "X$arg" : "X\\(.*\\)$as_nl";
53984	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53985      esac;
53986      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53987    '
53988    export as_echo_n_body
53989    as_echo_n='sh -c $as_echo_n_body as_echo'
53990  fi
53991  export as_echo_body
53992  as_echo='sh -c $as_echo_body as_echo'
53993fi
53994
53995# The user is always right.
53996if test "${PATH_SEPARATOR+set}" != set; then
53997  PATH_SEPARATOR=:
53998  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53999    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
54000      PATH_SEPARATOR=';'
54001  }
54002fi
54003
54004
54005# IFS
54006# We need space, tab and new line, in precisely that order.  Quoting is
54007# there to prevent editors from complaining about space-tab.
54008# (If _AS_PATH_WALK were called with IFS unset, it would disable word
54009# splitting by setting IFS to empty value.)
54010IFS=" ""	$as_nl"
54011
54012# Find who we are.  Look in the path if we contain no directory separator.
54013as_myself=
54014case $0 in #((
54015  *[\\/]* ) as_myself=$0 ;;
54016  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54017for as_dir in $PATH
54018do
54019  IFS=$as_save_IFS
54020  test -z "$as_dir" && as_dir=.
54021    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54022  done
54023IFS=$as_save_IFS
54024
54025     ;;
54026esac
54027# We did not find ourselves, most probably we were run as `sh COMMAND'
54028# in which case we are not to be found in the path.
54029if test "x$as_myself" = x; then
54030  as_myself=$0
54031fi
54032if test ! -f "$as_myself"; then
54033  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54034  exit 1
54035fi
54036
54037# Unset variables that we do not need and which cause bugs (e.g. in
54038# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
54039# suppresses any "Segmentation fault" message there.  '((' could
54040# trigger a bug in pdksh 5.2.14.
54041for as_var in BASH_ENV ENV MAIL MAILPATH
54042do eval test x\${$as_var+set} = xset \
54043  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54044done
54045PS1='$ '
54046PS2='> '
54047PS4='+ '
54048
54049# NLS nuisances.
54050LC_ALL=C
54051export LC_ALL
54052LANGUAGE=C
54053export LANGUAGE
54054
54055# CDPATH.
54056(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54057
54058
54059# as_fn_error STATUS ERROR [LINENO LOG_FD]
54060# ----------------------------------------
54061# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54062# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54063# script with STATUS, using 1 if that was 0.
54064as_fn_error ()
54065{
54066  as_status=$1; test $as_status -eq 0 && as_status=1
54067  if test "$4"; then
54068    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54069    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54070  fi
54071  $as_echo "$as_me: error: $2" >&2
54072  as_fn_exit $as_status
54073} # as_fn_error
54074
54075
54076# as_fn_set_status STATUS
54077# -----------------------
54078# Set $? to STATUS, without forking.
54079as_fn_set_status ()
54080{
54081  return $1
54082} # as_fn_set_status
54083
54084# as_fn_exit STATUS
54085# -----------------
54086# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54087as_fn_exit ()
54088{
54089  set +e
54090  as_fn_set_status $1
54091  exit $1
54092} # as_fn_exit
54093
54094# as_fn_unset VAR
54095# ---------------
54096# Portably unset VAR.
54097as_fn_unset ()
54098{
54099  { eval $1=; unset $1;}
54100}
54101as_unset=as_fn_unset
54102# as_fn_append VAR VALUE
54103# ----------------------
54104# Append the text in VALUE to the end of the definition contained in VAR. Take
54105# advantage of any shell optimizations that allow amortized linear growth over
54106# repeated appends, instead of the typical quadratic growth present in naive
54107# implementations.
54108if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54109  eval 'as_fn_append ()
54110  {
54111    eval $1+=\$2
54112  }'
54113else
54114  as_fn_append ()
54115  {
54116    eval $1=\$$1\$2
54117  }
54118fi # as_fn_append
54119
54120# as_fn_arith ARG...
54121# ------------------
54122# Perform arithmetic evaluation on the ARGs, and store the result in the
54123# global $as_val. Take advantage of shells that can avoid forks. The arguments
54124# must be portable across $(()) and expr.
54125if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54126  eval 'as_fn_arith ()
54127  {
54128    as_val=$(( $* ))
54129  }'
54130else
54131  as_fn_arith ()
54132  {
54133    as_val=`expr "$@" || test $? -eq 1`
54134  }
54135fi # as_fn_arith
54136
54137
54138if expr a : '\(a\)' >/dev/null 2>&1 &&
54139   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54140  as_expr=expr
54141else
54142  as_expr=false
54143fi
54144
54145if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54146  as_basename=basename
54147else
54148  as_basename=false
54149fi
54150
54151if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54152  as_dirname=dirname
54153else
54154  as_dirname=false
54155fi
54156
54157as_me=`$as_basename -- "$0" ||
54158$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54159	 X"$0" : 'X\(//\)$' \| \
54160	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54161$as_echo X/"$0" |
54162    sed '/^.*\/\([^/][^/]*\)\/*$/{
54163	    s//\1/
54164	    q
54165	  }
54166	  /^X\/\(\/\/\)$/{
54167	    s//\1/
54168	    q
54169	  }
54170	  /^X\/\(\/\).*/{
54171	    s//\1/
54172	    q
54173	  }
54174	  s/.*/./; q'`
54175
54176# Avoid depending upon Character Ranges.
54177as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54178as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54179as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54180as_cr_digits='0123456789'
54181as_cr_alnum=$as_cr_Letters$as_cr_digits
54182
54183ECHO_C= ECHO_N= ECHO_T=
54184case `echo -n x` in #(((((
54185-n*)
54186  case `echo 'xy\c'` in
54187  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54188  xy)  ECHO_C='\c';;
54189  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54190       ECHO_T='	';;
54191  esac;;
54192*)
54193  ECHO_N='-n';;
54194esac
54195
54196rm -f conf$$ conf$$.exe conf$$.file
54197if test -d conf$$.dir; then
54198  rm -f conf$$.dir/conf$$.file
54199else
54200  rm -f conf$$.dir
54201  mkdir conf$$.dir 2>/dev/null
54202fi
54203if (echo >conf$$.file) 2>/dev/null; then
54204  if ln -s conf$$.file conf$$ 2>/dev/null; then
54205    as_ln_s='ln -s'
54206    # ... but there are two gotchas:
54207    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54208    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54209    # In both cases, we have to default to `cp -pR'.
54210    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54211      as_ln_s='cp -pR'
54212  elif ln conf$$.file conf$$ 2>/dev/null; then
54213    as_ln_s=ln
54214  else
54215    as_ln_s='cp -pR'
54216  fi
54217else
54218  as_ln_s='cp -pR'
54219fi
54220rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54221rmdir conf$$.dir 2>/dev/null
54222
54223
54224# as_fn_mkdir_p
54225# -------------
54226# Create "$as_dir" as a directory, including parents if necessary.
54227as_fn_mkdir_p ()
54228{
54229
54230  case $as_dir in #(
54231  -*) as_dir=./$as_dir;;
54232  esac
54233  test -d "$as_dir" || eval $as_mkdir_p || {
54234    as_dirs=
54235    while :; do
54236      case $as_dir in #(
54237      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54238      *) as_qdir=$as_dir;;
54239      esac
54240      as_dirs="'$as_qdir' $as_dirs"
54241      as_dir=`$as_dirname -- "$as_dir" ||
54242$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54243	 X"$as_dir" : 'X\(//\)[^/]' \| \
54244	 X"$as_dir" : 'X\(//\)$' \| \
54245	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54246$as_echo X"$as_dir" |
54247    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54248	    s//\1/
54249	    q
54250	  }
54251	  /^X\(\/\/\)[^/].*/{
54252	    s//\1/
54253	    q
54254	  }
54255	  /^X\(\/\/\)$/{
54256	    s//\1/
54257	    q
54258	  }
54259	  /^X\(\/\).*/{
54260	    s//\1/
54261	    q
54262	  }
54263	  s/.*/./; q'`
54264      test -d "$as_dir" && break
54265    done
54266    test -z "$as_dirs" || eval "mkdir $as_dirs"
54267  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54268
54269
54270} # as_fn_mkdir_p
54271if mkdir -p . 2>/dev/null; then
54272  as_mkdir_p='mkdir -p "$as_dir"'
54273else
54274  test -d ./-p && rmdir ./-p
54275  as_mkdir_p=false
54276fi
54277
54278
54279# as_fn_executable_p FILE
54280# -----------------------
54281# Test if FILE is an executable regular file.
54282as_fn_executable_p ()
54283{
54284  test -f "$1" && test -x "$1"
54285} # as_fn_executable_p
54286as_test_x='test -x'
54287as_executable_p=as_fn_executable_p
54288
54289# Sed expression to map a string onto a valid CPP name.
54290as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54291
54292# Sed expression to map a string onto a valid variable name.
54293as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54294
54295
54296exec 6>&1
54297## ----------------------------------- ##
54298## Main body of $CONFIG_STATUS script. ##
54299## ----------------------------------- ##
54300_ASEOF
54301test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54302
54303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54304# Save the log message, to keep $0 and so on meaningful, and to
54305# report actual input values of CONFIG_FILES etc. instead of their
54306# values after options handling.
54307ac_log="
54308This file was extended by OpenJDK $as_me jdk9, which was
54309generated by GNU Autoconf 2.69.  Invocation command line was
54310
54311  CONFIG_FILES    = $CONFIG_FILES
54312  CONFIG_HEADERS  = $CONFIG_HEADERS
54313  CONFIG_LINKS    = $CONFIG_LINKS
54314  CONFIG_COMMANDS = $CONFIG_COMMANDS
54315  $ $0 $@
54316
54317on `(hostname || uname -n) 2>/dev/null | sed 1q`
54318"
54319
54320_ACEOF
54321
54322case $ac_config_files in *"
54323"*) set x $ac_config_files; shift; ac_config_files=$*;;
54324esac
54325
54326
54327
54328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54329# Files that config.status was made for.
54330config_files="$ac_config_files"
54331
54332_ACEOF
54333
54334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54335ac_cs_usage="\
54336\`$as_me' instantiates files and other configuration actions
54337from templates according to the current configuration.  Unless the files
54338and actions are specified as TAGs, all are instantiated by default.
54339
54340Usage: $0 [OPTION]... [TAG]...
54341
54342  -h, --help       print this help, then exit
54343  -V, --version    print version number and configuration settings, then exit
54344      --config     print configuration, then exit
54345  -q, --quiet, --silent
54346                   do not print progress messages
54347  -d, --debug      don't remove temporary files
54348      --recheck    update $as_me by reconfiguring in the same conditions
54349      --file=FILE[:TEMPLATE]
54350                   instantiate the configuration file FILE
54351
54352Configuration files:
54353$config_files
54354
54355Report bugs to <build-dev@openjdk.java.net>.
54356OpenJDK home page: <http://openjdk.java.net>."
54357
54358_ACEOF
54359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54360ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54361ac_cs_version="\\
54362OpenJDK config.status jdk9
54363configured by $0, generated by GNU Autoconf 2.69,
54364  with options \\"\$ac_cs_config\\"
54365
54366Copyright (C) 2012 Free Software Foundation, Inc.
54367This config.status script is free software; the Free Software Foundation
54368gives unlimited permission to copy, distribute and modify it."
54369
54370ac_pwd='$ac_pwd'
54371srcdir='$srcdir'
54372AWK='$AWK'
54373test -n "\$AWK" || AWK=awk
54374_ACEOF
54375
54376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54377# The default lists apply if the user does not specify any file.
54378ac_need_defaults=:
54379while test $# != 0
54380do
54381  case $1 in
54382  --*=?*)
54383    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54384    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54385    ac_shift=:
54386    ;;
54387  --*=)
54388    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54389    ac_optarg=
54390    ac_shift=:
54391    ;;
54392  *)
54393    ac_option=$1
54394    ac_optarg=$2
54395    ac_shift=shift
54396    ;;
54397  esac
54398
54399  case $ac_option in
54400  # Handling of the options.
54401  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54402    ac_cs_recheck=: ;;
54403  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54404    $as_echo "$ac_cs_version"; exit ;;
54405  --config | --confi | --conf | --con | --co | --c )
54406    $as_echo "$ac_cs_config"; exit ;;
54407  --debug | --debu | --deb | --de | --d | -d )
54408    debug=: ;;
54409  --file | --fil | --fi | --f )
54410    $ac_shift
54411    case $ac_optarg in
54412    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54413    '') as_fn_error $? "missing file argument" ;;
54414    esac
54415    as_fn_append CONFIG_FILES " '$ac_optarg'"
54416    ac_need_defaults=false;;
54417  --he | --h |  --help | --hel | -h )
54418    $as_echo "$ac_cs_usage"; exit ;;
54419  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54420  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54421    ac_cs_silent=: ;;
54422
54423  # This is an error.
54424  -*) as_fn_error $? "unrecognized option: \`$1'
54425Try \`$0 --help' for more information." ;;
54426
54427  *) as_fn_append ac_config_targets " $1"
54428     ac_need_defaults=false ;;
54429
54430  esac
54431  shift
54432done
54433
54434ac_configure_extra_args=
54435
54436if $ac_cs_silent; then
54437  exec 6>/dev/null
54438  ac_configure_extra_args="$ac_configure_extra_args --silent"
54439fi
54440
54441_ACEOF
54442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54443if \$ac_cs_recheck; then
54444  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54445  shift
54446  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54447  CONFIG_SHELL='$SHELL'
54448  export CONFIG_SHELL
54449  exec "\$@"
54450fi
54451
54452_ACEOF
54453cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54454exec 5>>config.log
54455{
54456  echo
54457  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54458## Running $as_me. ##
54459_ASBOX
54460  $as_echo "$ac_log"
54461} >&5
54462
54463_ACEOF
54464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54465_ACEOF
54466
54467cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54468
54469# Handling of arguments.
54470for ac_config_target in $ac_config_targets
54471do
54472  case $ac_config_target in
54473    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54474    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54475    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54476    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54477    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54478
54479  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54480  esac
54481done
54482
54483
54484# If the user did not use the arguments to specify the items to instantiate,
54485# then the envvar interface is used.  Set only those that are not.
54486# We use the long form for the default assignment because of an extremely
54487# bizarre bug on SunOS 4.1.3.
54488if $ac_need_defaults; then
54489  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54490fi
54491
54492# Have a temporary directory for convenience.  Make it in the build tree
54493# simply because there is no reason against having it here, and in addition,
54494# creating and moving files from /tmp can sometimes cause problems.
54495# Hook for its removal unless debugging.
54496# Note that there is a small window in which the directory will not be cleaned:
54497# after its creation but before its name has been assigned to `$tmp'.
54498$debug ||
54499{
54500  tmp= ac_tmp=
54501  trap 'exit_status=$?
54502  : "${ac_tmp:=$tmp}"
54503  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54504' 0
54505  trap 'as_fn_exit 1' 1 2 13 15
54506}
54507# Create a (secure) tmp directory for tmp files.
54508
54509{
54510  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54511  test -d "$tmp"
54512}  ||
54513{
54514  tmp=./conf$$-$RANDOM
54515  (umask 077 && mkdir "$tmp")
54516} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54517ac_tmp=$tmp
54518
54519# Set up the scripts for CONFIG_FILES section.
54520# No need to generate them if there are no CONFIG_FILES.
54521# This happens for instance with `./config.status config.h'.
54522if test -n "$CONFIG_FILES"; then
54523
54524
54525ac_cr=`echo X | tr X '\015'`
54526# On cygwin, bash can eat \r inside `` if the user requested igncr.
54527# But we know of no other shell where ac_cr would be empty at this
54528# point, so we can use a bashism as a fallback.
54529if test "x$ac_cr" = x; then
54530  eval ac_cr=\$\'\\r\'
54531fi
54532ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54533if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54534  ac_cs_awk_cr='\\r'
54535else
54536  ac_cs_awk_cr=$ac_cr
54537fi
54538
54539echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54540_ACEOF
54541
54542
54543{
54544  echo "cat >conf$$subs.awk <<_ACEOF" &&
54545  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54546  echo "_ACEOF"
54547} >conf$$subs.sh ||
54548  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54549ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54550ac_delim='%!_!# '
54551for ac_last_try in false false false false false :; do
54552  . ./conf$$subs.sh ||
54553    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54554
54555  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54556  if test $ac_delim_n = $ac_delim_num; then
54557    break
54558  elif $ac_last_try; then
54559    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54560  else
54561    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54562  fi
54563done
54564rm -f conf$$subs.sh
54565
54566cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54567cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54568_ACEOF
54569sed -n '
54570h
54571s/^/S["/; s/!.*/"]=/
54572p
54573g
54574s/^[^!]*!//
54575:repl
54576t repl
54577s/'"$ac_delim"'$//
54578t delim
54579:nl
54580h
54581s/\(.\{148\}\)..*/\1/
54582t more1
54583s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54584p
54585n
54586b repl
54587:more1
54588s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54589p
54590g
54591s/.\{148\}//
54592t nl
54593:delim
54594h
54595s/\(.\{148\}\)..*/\1/
54596t more2
54597s/["\\]/\\&/g; s/^/"/; s/$/"/
54598p
54599b
54600:more2
54601s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54602p
54603g
54604s/.\{148\}//
54605t delim
54606' <conf$$subs.awk | sed '
54607/^[^""]/{
54608  N
54609  s/\n//
54610}
54611' >>$CONFIG_STATUS || ac_write_fail=1
54612rm -f conf$$subs.awk
54613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54614_ACAWK
54615cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54616  for (key in S) S_is_set[key] = 1
54617  FS = ""
54618
54619}
54620{
54621  line = $ 0
54622  nfields = split(line, field, "@")
54623  substed = 0
54624  len = length(field[1])
54625  for (i = 2; i < nfields; i++) {
54626    key = field[i]
54627    keylen = length(key)
54628    if (S_is_set[key]) {
54629      value = S[key]
54630      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54631      len += length(value) + length(field[++i])
54632      substed = 1
54633    } else
54634      len += 1 + keylen
54635  }
54636
54637  print line
54638}
54639
54640_ACAWK
54641_ACEOF
54642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54643if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54644  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54645else
54646  cat
54647fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54648  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54649_ACEOF
54650
54651# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54652# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54653# trailing colons and then remove the whole line if VPATH becomes empty
54654# (actually we leave an empty line to preserve line numbers).
54655if test "x$srcdir" = x.; then
54656  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54657h
54658s///
54659s/^/:/
54660s/[	 ]*$/:/
54661s/:\$(srcdir):/:/g
54662s/:\${srcdir}:/:/g
54663s/:@srcdir@:/:/g
54664s/^:*//
54665s/:*$//
54666x
54667s/\(=[	 ]*\).*/\1/
54668G
54669s/\n//
54670s/^[^=]*=[	 ]*$//
54671}'
54672fi
54673
54674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54675fi # test -n "$CONFIG_FILES"
54676
54677
54678eval set X "  :F $CONFIG_FILES      "
54679shift
54680for ac_tag
54681do
54682  case $ac_tag in
54683  :[FHLC]) ac_mode=$ac_tag; continue;;
54684  esac
54685  case $ac_mode$ac_tag in
54686  :[FHL]*:*);;
54687  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54688  :[FH]-) ac_tag=-:-;;
54689  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54690  esac
54691  ac_save_IFS=$IFS
54692  IFS=:
54693  set x $ac_tag
54694  IFS=$ac_save_IFS
54695  shift
54696  ac_file=$1
54697  shift
54698
54699  case $ac_mode in
54700  :L) ac_source=$1;;
54701  :[FH])
54702    ac_file_inputs=
54703    for ac_f
54704    do
54705      case $ac_f in
54706      -) ac_f="$ac_tmp/stdin";;
54707      *) # Look for the file first in the build tree, then in the source tree
54708	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54709	 # because $ac_f cannot contain `:'.
54710	 test -f "$ac_f" ||
54711	   case $ac_f in
54712	   [\\/$]*) false;;
54713	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54714	   esac ||
54715	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54716      esac
54717      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54718      as_fn_append ac_file_inputs " '$ac_f'"
54719    done
54720
54721    # Let's still pretend it is `configure' which instantiates (i.e., don't
54722    # use $as_me), people would be surprised to read:
54723    #    /* config.h.  Generated by config.status.  */
54724    configure_input='Generated from '`
54725	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54726	`' by configure.'
54727    if test x"$ac_file" != x-; then
54728      configure_input="$ac_file.  $configure_input"
54729      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54730$as_echo "$as_me: creating $ac_file" >&6;}
54731    fi
54732    # Neutralize special characters interpreted by sed in replacement strings.
54733    case $configure_input in #(
54734    *\&* | *\|* | *\\* )
54735       ac_sed_conf_input=`$as_echo "$configure_input" |
54736       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54737    *) ac_sed_conf_input=$configure_input;;
54738    esac
54739
54740    case $ac_tag in
54741    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54742      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54743    esac
54744    ;;
54745  esac
54746
54747  ac_dir=`$as_dirname -- "$ac_file" ||
54748$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54749	 X"$ac_file" : 'X\(//\)[^/]' \| \
54750	 X"$ac_file" : 'X\(//\)$' \| \
54751	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54752$as_echo X"$ac_file" |
54753    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54754	    s//\1/
54755	    q
54756	  }
54757	  /^X\(\/\/\)[^/].*/{
54758	    s//\1/
54759	    q
54760	  }
54761	  /^X\(\/\/\)$/{
54762	    s//\1/
54763	    q
54764	  }
54765	  /^X\(\/\).*/{
54766	    s//\1/
54767	    q
54768	  }
54769	  s/.*/./; q'`
54770  as_dir="$ac_dir"; as_fn_mkdir_p
54771  ac_builddir=.
54772
54773case "$ac_dir" in
54774.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54775*)
54776  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54777  # A ".." for each directory in $ac_dir_suffix.
54778  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54779  case $ac_top_builddir_sub in
54780  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54781  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54782  esac ;;
54783esac
54784ac_abs_top_builddir=$ac_pwd
54785ac_abs_builddir=$ac_pwd$ac_dir_suffix
54786# for backward compatibility:
54787ac_top_builddir=$ac_top_build_prefix
54788
54789case $srcdir in
54790  .)  # We are building in place.
54791    ac_srcdir=.
54792    ac_top_srcdir=$ac_top_builddir_sub
54793    ac_abs_top_srcdir=$ac_pwd ;;
54794  [\\/]* | ?:[\\/]* )  # Absolute name.
54795    ac_srcdir=$srcdir$ac_dir_suffix;
54796    ac_top_srcdir=$srcdir
54797    ac_abs_top_srcdir=$srcdir ;;
54798  *) # Relative name.
54799    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54800    ac_top_srcdir=$ac_top_build_prefix$srcdir
54801    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54802esac
54803ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54804
54805
54806  case $ac_mode in
54807  :F)
54808  #
54809  # CONFIG_FILE
54810  #
54811
54812_ACEOF
54813
54814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54815# If the template does not know about datarootdir, expand it.
54816# FIXME: This hack should be removed a few years after 2.60.
54817ac_datarootdir_hack=; ac_datarootdir_seen=
54818ac_sed_dataroot='
54819/datarootdir/ {
54820  p
54821  q
54822}
54823/@datadir@/p
54824/@docdir@/p
54825/@infodir@/p
54826/@localedir@/p
54827/@mandir@/p'
54828case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54829*datarootdir*) ac_datarootdir_seen=yes;;
54830*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54831  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54832$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54833_ACEOF
54834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54835  ac_datarootdir_hack='
54836  s&@datadir@&$datadir&g
54837  s&@docdir@&$docdir&g
54838  s&@infodir@&$infodir&g
54839  s&@localedir@&$localedir&g
54840  s&@mandir@&$mandir&g
54841  s&\\\${datarootdir}&$datarootdir&g' ;;
54842esac
54843_ACEOF
54844
54845# Neutralize VPATH when `$srcdir' = `.'.
54846# Shell code in configure.ac might set extrasub.
54847# FIXME: do we really want to maintain this feature?
54848cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54849ac_sed_extra="$ac_vpsub
54850$extrasub
54851_ACEOF
54852cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54853:t
54854/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54855s|@configure_input@|$ac_sed_conf_input|;t t
54856s&@top_builddir@&$ac_top_builddir_sub&;t t
54857s&@top_build_prefix@&$ac_top_build_prefix&;t t
54858s&@srcdir@&$ac_srcdir&;t t
54859s&@abs_srcdir@&$ac_abs_srcdir&;t t
54860s&@top_srcdir@&$ac_top_srcdir&;t t
54861s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54862s&@builddir@&$ac_builddir&;t t
54863s&@abs_builddir@&$ac_abs_builddir&;t t
54864s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54865$ac_datarootdir_hack
54866"
54867eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54868  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54869
54870test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54871  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54872  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54873      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54874  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54875which seems to be undefined.  Please make sure it is defined" >&5
54876$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54877which seems to be undefined.  Please make sure it is defined" >&2;}
54878
54879  rm -f "$ac_tmp/stdin"
54880  case $ac_file in
54881  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54882  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54883  esac \
54884  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54885 ;;
54886
54887
54888
54889  esac
54890
54891done # for ac_tag
54892
54893
54894as_fn_exit 0
54895_ACEOF
54896ac_clean_files=$ac_clean_files_save
54897
54898test $ac_write_fail = 0 ||
54899  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54900
54901
54902# configure is writing to config.log, and then calls config.status.
54903# config.status does its own redirection, appending to config.log.
54904# Unfortunately, on DOS this fails, as config.log is still kept open
54905# by configure, so config.status won't be able to write to it; its
54906# output is simply discarded.  So we exec the FD to /dev/null,
54907# effectively closing config.log, so it can be properly (re)opened and
54908# appended to by config.status.  When coming back to configure, we
54909# need to make the FD available again.
54910if test "$no_create" != yes; then
54911  ac_cs_success=:
54912  ac_config_status_args=
54913  test "$silent" = yes &&
54914    ac_config_status_args="$ac_config_status_args --quiet"
54915  exec 5>/dev/null
54916  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54917  exec 5>>config.log
54918  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54919  # would make configure fail if this is the last instruction.
54920  $ac_cs_success || as_fn_exit 1
54921fi
54922if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54923  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54924$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54925fi
54926
54927
54928# After AC_OUTPUT, we need to do final work
54929
54930
54931  # Try to move config.log (generated by autoconf) to the configure-support directory.
54932  if test -e ./config.log; then
54933    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54934  fi
54935
54936  # Rotate our log file (configure.log)
54937  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54938    $RM -f "$OUTPUT_ROOT/configure.log.old"
54939  fi
54940  if test -e "$OUTPUT_ROOT/configure.log"; then
54941    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54942  fi
54943
54944  # Move configure.log from current directory to the build output root
54945  if test -e ./configure.log; then
54946    echo found it
54947    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54948  fi
54949
54950  # Make the compare script executable
54951  $CHMOD +x $OUTPUT_ROOT/compare.sh
54952
54953
54954# Finally output some useful information to the user
54955
54956  # Finally output some useful information to the user
54957
54958  printf "\n"
54959  printf "====================================================\n"
54960  if test "x$no_create" != "xyes"; then
54961    if test "x$IS_RECONFIGURE" != "xyes"; then
54962      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54963    else
54964      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54965    fi
54966  else
54967    if test "x$IS_RECONFIGURE" != "xyes"; then
54968      printf "A configuration has been successfully checked but not created\n"
54969    else
54970      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54971    fi
54972  fi
54973  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54974    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54975  else
54976    printf "using default settings.\n"
54977  fi
54978
54979  printf "\n"
54980  printf "Configuration summary:\n"
54981  printf "* Debug level:    $DEBUG_LEVEL\n"
54982  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54983  printf "* JDK variant:    $JDK_VARIANT\n"
54984  printf "* JVM variants:   $with_jvm_variants\n"
54985  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54986
54987  printf "\n"
54988  printf "Tools summary:\n"
54989  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54990    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54991  fi
54992  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54993  if test "x$TOOLCHAIN_VERSION" != "x"; then
54994    print_version=" $TOOLCHAIN_VERSION"
54995  fi
54996  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54997  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54998  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54999
55000  printf "\n"
55001  printf "Build performance summary:\n"
55002  printf "* Cores to use:   $JOBS\n"
55003  printf "* Memory limit:   $MEMORY_SIZE MB\n"
55004  if test "x$CCACHE_STATUS" != "x"; then
55005    printf "* ccache status:  $CCACHE_STATUS\n"
55006  fi
55007  printf "\n"
55008
55009  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
55010    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
55011    printf "will result in longer build times.\n"
55012    printf "\n"
55013  fi
55014
55015  if test "x$FOUND_ALT_VARIABLES" != "x"; then
55016    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55017    printf "These are not respected, and will be ignored. It is recommended\n"
55018    printf "that you clean your environment. The following variables are set:\n"
55019    printf "$FOUND_ALT_VARIABLES\n"
55020    printf "\n"
55021  fi
55022
55023  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55024    printf "WARNING: Your build output directory is not on a local disk.\n"
55025    printf "This will severely degrade build performance!\n"
55026    printf "It is recommended that you create an output directory on a local disk,\n"
55027    printf "and run the configure script again from that directory.\n"
55028    printf "\n"
55029  fi
55030
55031  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
55032    printf "WARNING: The result of this configuration has overridden an older\n"
55033    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55034    printf "proper build. Failure to do so might result in strange build problems.\n"
55035    printf "\n"
55036  fi
55037
55038  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
55039    printf "WARNING: The result of this configuration was not saved.\n"
55040    printf "You should run without '--no-create | -n' to create the configuration.\n"
55041    printf "\n"
55042  fi
55043
55044
55045
55046  # Locate config.log.
55047  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
55048    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
55049  elif test -e "./config.log"; then
55050    CONFIG_LOG_PATH="."
55051  fi
55052
55053  if test -e "$CONFIG_LOG_PATH/config.log"; then
55054    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55055    if test $? -eq 0; then
55056      printf "The following warnings were produced. Repeated here for convenience:\n"
55057      # We must quote sed expression (using []) to stop m4 from eating the [].
55058      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55059      printf "\n"
55060    fi
55061  fi
55062
55063