generated-configure.sh revision 1924:623fc617c3ef
129088Smarkm#!/bin/bash
229088Smarkm#
329088Smarkm# ##########################################################
429088Smarkm# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
529088Smarkm# ##########################################################
629088Smarkm#
729088Smarkm#! /bin/sh
829088Smarkm# Guess values for system-dependent variables and create Makefiles.
929088Smarkm# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
1029088Smarkm#
1129088Smarkm# Report bugs to <build-dev@openjdk.java.net>.
1229088Smarkm#
1329088Smarkm#
1429088Smarkm# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
1529088Smarkm#
1629088Smarkm#
1729088Smarkm# This configure script is free software; the Free Software Foundation
1829088Smarkm# gives unlimited permission to copy, distribute and modify it.
1929088Smarkm## -------------------- ##
2029088Smarkm## M4sh Initialization. ##
2129088Smarkm## -------------------- ##
2229088Smarkm
2329088Smarkm# Be more Bourne compatible
2429088SmarkmDUALCASE=1; export DUALCASE # for MKS sh
2529088Smarkmif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
2629088Smarkm  emulate sh
2729088Smarkm  NULLCMD=:
2829088Smarkm  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2929088Smarkm  # is contrary to our usage.  Disable this feature.
3029088Smarkm  alias -g '${1+"$@"}'='"$@"'
3129088Smarkm  setopt NO_GLOB_SUBST
3229088Smarkmelse
3329088Smarkm  case `(set -o) 2>/dev/null` in #(
3484305Smarkm  *posix*) :
3587139Smarkm    set -o posix ;; #(
3684305Smarkm  *) :
3784305Smarkm     ;;
3829088Smarkmesac
3962868Skrisfi
4029088Smarkm
4162868Skris
4229088Smarkmas_nl='
4329088Smarkm'
4429088Smarkmexport as_nl
4529088Smarkm# Printing a long string crashes Solaris 7 /usr/bin/printf.
4629088Smarkmas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4729088Smarkmas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4829088Smarkmas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4929088Smarkm# Prefer a ksh shell builtin over an external printf program on Solaris,
5029088Smarkm# but without wasting forks for bash or zsh.
5129088Smarkmif test -z "$BASH_VERSION$ZSH_VERSION" \
5229088Smarkm    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
5329088Smarkm  as_echo='print -r --'
5429088Smarkm  as_echo_n='print -rn --'
5529088Smarkmelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
5629088Smarkm  as_echo='printf %s\n'
5729088Smarkm  as_echo_n='printf %s'
5829088Smarkmelse
5929088Smarkm  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6029088Smarkm    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6129088Smarkm    as_echo_n='/usr/ucb/echo -n'
6229088Smarkm  else
6329088Smarkm    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6429088Smarkm    as_echo_n_body='eval
6529088Smarkm      arg=$1;
6629088Smarkm      case $arg in #(
6729088Smarkm      *"$as_nl"*)
6829088Smarkm	expr "X$arg" : "X\\(.*\\)$as_nl";
6929088Smarkm	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7029088Smarkm      esac;
7129088Smarkm      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7229088Smarkm    '
7329088Smarkm    export as_echo_n_body
7429088Smarkm    as_echo_n='sh -c $as_echo_n_body as_echo'
7529088Smarkm  fi
7629088Smarkm  export as_echo_body
7729088Smarkm  as_echo='sh -c $as_echo_body as_echo'
7829088Smarkmfi
7929088Smarkm
8029088Smarkm# The user is always right.
8129088Smarkmif test "${PATH_SEPARATOR+set}" != set; then
8229088Smarkm  PATH_SEPARATOR=:
8329088Smarkm  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8429088Smarkm    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8529088Smarkm      PATH_SEPARATOR=';'
8629088Smarkm  }
8729088Smarkmfi
8829088Smarkm
8929088Smarkm
9029088Smarkm# IFS
9129088Smarkm# We need space, tab and new line, in precisely that order.  Quoting is
9229088Smarkm# there to prevent editors from complaining about space-tab.
9329088Smarkm# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9429088Smarkm# splitting by setting IFS to empty value.)
9529088SmarkmIFS=" ""	$as_nl"
9629088Smarkm
9729088Smarkm# Find who we are.  Look in the path if we contain no directory separator.
9829088Smarkmas_myself=
9929088Smarkmcase $0 in #((
10029088Smarkm  *[\\/]* ) as_myself=$0 ;;
10129088Smarkm  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10229088Smarkmfor as_dir in $PATH
10329088Smarkmdo
10429088Smarkm  IFS=$as_save_IFS
10529088Smarkm  test -z "$as_dir" && as_dir=.
10629088Smarkm    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10729088Smarkm  done
10829088SmarkmIFS=$as_save_IFS
10929088Smarkm
11062868Skris     ;;
11129088Smarkmesac
11229088Smarkm# We did not find ourselves, most probably we were run as `sh COMMAND'
11329088Smarkm# in which case we are not to be found in the path.
11429088Smarkmif test "x$as_myself" = x; then
11529088Smarkm  as_myself=$0
11629088Smarkmfi
11729088Smarkmif test ! -f "$as_myself"; then
11829088Smarkm  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11929088Smarkm  exit 1
12029088Smarkmfi
12129088Smarkm
12229088Smarkm# Unset variables that we do not need and which cause bugs (e.g. in
12329088Smarkm# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12429088Smarkm# suppresses any "Segmentation fault" message there.  '((' could
12529088Smarkm# trigger a bug in pdksh 5.2.14.
12629088Smarkmfor as_var in BASH_ENV ENV MAIL MAILPATH
12729088Smarkmdo eval test x\${$as_var+set} = xset \
12829088Smarkm  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12929088Smarkmdone
13029088SmarkmPS1='$ '
13129088SmarkmPS2='> '
13229088SmarkmPS4='+ '
13329088Smarkm
13429088Smarkm# NLS nuisances.
13529088SmarkmLC_ALL=C
13629088Smarkmexport LC_ALL
13729088SmarkmLANGUAGE=C
13829088Smarkmexport LANGUAGE
13929088Smarkm
14029088Smarkm# CDPATH.
14129088Smarkm(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14229088Smarkm
14329088Smarkm# Use a proper internal environment variable to ensure we don't fall
14429088Smarkm  # into an infinite loop, continuously re-executing ourselves.
14529088Smarkm  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
14629088Smarkm    _as_can_reexec=no; export _as_can_reexec;
14729088Smarkm    # We cannot yet assume a decent shell, so we have to provide a
14829088Smarkm# neutralization value for shells without unset; and this also
14929088Smarkm# works around shells that cannot unset nonexistent variables.
15029088Smarkm# Preserve -v and -x to the replacement shell.
15129088SmarkmBASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691STRIP_POLICY
692DEBUG_BINARIES
693ZIP_EXTERNAL_DEBUG_SYMBOLS
694COPY_DEBUG_SYMBOLS
695COMPILE_WITH_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787ac_ct_CXX
788CXXFLAGS
789CXX
790TOOLCHAIN_PATH_CXX
791POTENTIAL_CXX
792OBJEXT
793EXEEXT
794ac_ct_CC
795CPPFLAGS
796LDFLAGS
797CFLAGS
798CC
799TOOLCHAIN_PATH_CC
800POTENTIAL_CC
801TOOLCHAIN_VERSION
802VS_LIB
803VS_INCLUDE
804VS_PATH
805CYGWIN_LINK
806SYSROOT_LDFLAGS
807SYSROOT_CFLAGS
808LEGACY_EXTRA_LDFLAGS
809LEGACY_EXTRA_CXXFLAGS
810LEGACY_EXTRA_CFLAGS
811EXE_SUFFIX
812OBJ_SUFFIX
813STATIC_LIBRARY
814SHARED_LIBRARY
815STATIC_LIBRARY_SUFFIX
816SHARED_LIBRARY_SUFFIX
817LIBRARY_PREFIX
818TOOLCHAIN_TYPE
819STATIC_BUILD
820BUILD_HOTSPOT
821HOTSPOT_DIST
822BUILD_OUTPUT
823JDK_TOPDIR
824NASHORN_TOPDIR
825HOTSPOT_TOPDIR
826JAXWS_TOPDIR
827JAXP_TOPDIR
828CORBA_TOPDIR
829LANGTOOLS_TOPDIR
830BOOT_JDK_BITS
831JAVAC_FLAGS
832BOOT_JDK_SOURCETARGET
833JARSIGNER
834JAR
835JAVAH
836JAVAC
837JAVA
838BOOT_JDK
839JAVA_CHECK
840JAVAC_CHECK
841VERSION_IS_GA
842VERSION_SHORT
843VERSION_STRING
844VERSION_NUMBER_FOUR_POSITIONS
845VERSION_NUMBER
846VERSION_OPT
847VERSION_BUILD
848VERSION_PRE
849VERSION_PATCH
850VERSION_SECURITY
851VERSION_MINOR
852VERSION_MAJOR
853MACOSX_BUNDLE_ID_BASE
854MACOSX_BUNDLE_NAME_BASE
855COMPANY_NAME
856JDK_RC_PLATFORM_NAME
857PRODUCT_SUFFIX
858PRODUCT_NAME
859LAUNCHER_NAME
860TEST_IN_BUILD
861COPYRIGHT_YEAR
862COMPRESS_JARS
863UNLIMITED_CRYPTO
864CACERTS_FILE
865BUILD_HEADLESS
866SUPPORT_HEADFUL
867SUPPORT_HEADLESS
868DEFAULT_MAKE_TARGET
869OS_VERSION_MICRO
870OS_VERSION_MINOR
871OS_VERSION_MAJOR
872PKG_CONFIG
873BASH_ARGS
874SETFILE
875CODESIGN
876XATTR
877DSYMUTIL
878IS_GNU_TIME
879PATCH
880TIME
881STAT
882HG
883READELF
884OTOOL
885LDD
886ZIP
887UNZIP
888FIND_DELETE
889OUTPUT_SYNC
890OUTPUT_SYNC_SUPPORTED
891CHECK_TOOLSDIR_MAKE
892CHECK_TOOLSDIR_GMAKE
893CHECK_MAKE
894CHECK_GMAKE
895MAKE
896PKGHANDLER
897CONFIGURESUPPORT_OUTPUTDIR
898OUTPUT_ROOT
899CONF_NAME
900SPEC
901SDKROOT
902XCODEBUILD
903BUILD_VARIANT_RELEASE
904DEBUG_CLASSFILES
905FASTDEBUG
906VARIANT
907DEBUG_LEVEL
908MACOSX_UNIVERSAL
909INCLUDE_SA
910JVM_VARIANT_CORE
911JVM_VARIANT_ZEROSHARK
912JVM_VARIANT_ZERO
913JVM_VARIANT_MINIMAL1
914JVM_VARIANT_CLIENT
915JVM_VARIANT_SERVER
916JVM_VARIANTS
917JVM_INTERPRETER
918JDK_VARIANT
919SET_OPENJDK
920USERNAME
921CANONICAL_TOPDIR
922ORIGINAL_TOPDIR
923TOPDIR
924PATH_SEP
925ZERO_ARCHDEF
926DEFINE_CROSS_COMPILE_ARCH
927LP64
928OPENJDK_TARGET_OS_EXPORT_DIR
929OPENJDK_TARGET_CPU_JLI_CFLAGS
930OPENJDK_TARGET_CPU_OSARCH
931OPENJDK_TARGET_CPU_ISADIR
932OPENJDK_TARGET_CPU_LIBDIR
933OPENJDK_TARGET_CPU_LEGACY_LIB
934OPENJDK_TARGET_CPU_LEGACY
935REQUIRED_OS_VERSION
936REQUIRED_OS_NAME
937COMPILE_TYPE
938OPENJDK_TARGET_CPU_ENDIAN
939OPENJDK_TARGET_CPU_BITS
940OPENJDK_TARGET_CPU_ARCH
941OPENJDK_TARGET_CPU
942OPENJDK_TARGET_OS_ENV
943OPENJDK_TARGET_OS_TYPE
944OPENJDK_TARGET_OS
945OPENJDK_BUILD_CPU_ENDIAN
946OPENJDK_BUILD_CPU_BITS
947OPENJDK_BUILD_CPU_ARCH
948OPENJDK_BUILD_CPU
949OPENJDK_BUILD_OS_ENV
950OPENJDK_BUILD_OS_TYPE
951OPENJDK_BUILD_OS
952OPENJDK_BUILD_AUTOCONF_NAME
953OPENJDK_TARGET_AUTOCONF_NAME
954target_os
955target_vendor
956target_cpu
957target
958host_os
959host_vendor
960host_cpu
961host
962build_os
963build_vendor
964build_cpu
965build
966NICE
967CPIO
968DF
969READLINK
970CYGPATH
971SED
972FGREP
973EGREP
974GREP
975AWK
976XARGS
977WHICH
978WC
979UNIQ
980UNAME
981TR
982TOUCH
983TEE
984TAR
985TAIL
986SORT
987SH
988RMDIR
989RM
990PRINTF
991NAWK
992MV
993MKTEMP
994MKDIR
995LS
996LN
997HEAD
998FIND
999FILE
1000EXPR
1001ECHO
1002DIRNAME
1003DIFF
1004DATE
1005CUT
1006CP
1007COMM
1008CMP
1009CHMOD
1010CAT
1011BASH
1012BASENAME
1013DATE_WHEN_CONFIGURED
1014ORIGINAL_PATH
1015CONFIGURE_COMMAND_LINE
1016target_alias
1017host_alias
1018build_alias
1019LIBS
1020ECHO_T
1021ECHO_N
1022ECHO_C
1023DEFS
1024mandir
1025localedir
1026libdir
1027psdir
1028pdfdir
1029dvidir
1030htmldir
1031infodir
1032docdir
1033oldincludedir
1034includedir
1035localstatedir
1036sharedstatedir
1037sysconfdir
1038datadir
1039datarootdir
1040libexecdir
1041sbindir
1042bindir
1043program_transform_name
1044prefix
1045exec_prefix
1046PACKAGE_URL
1047PACKAGE_BUGREPORT
1048PACKAGE_STRING
1049PACKAGE_VERSION
1050PACKAGE_TARNAME
1051PACKAGE_NAME
1052PATH_SEPARATOR
1053SHELL'
1054ac_subst_files=''
1055ac_user_opts='
1056enable_option_checking
1057with_target_bits
1058enable_openjdk_only
1059with_custom_make_dir
1060with_jdk_variant
1061with_jvm_interpreter
1062with_jvm_variants
1063enable_debug
1064with_debug_level
1065with_devkit
1066with_sys_root
1067with_sysroot
1068with_tools_dir
1069with_toolchain_path
1070with_extra_path
1071with_sdk_name
1072with_conf_name
1073with_output_sync
1074with_default_make_target
1075enable_headful
1076with_cacerts_file
1077enable_unlimited_crypto
1078with_copyright_year
1079enable_hotspot_test_in_build
1080with_milestone
1081with_update_version
1082with_user_release_suffix
1083with_build_number
1084with_version_string
1085with_version_pre
1086with_version_opt
1087with_version_build
1088with_version_major
1089with_version_minor
1090with_version_security
1091with_version_patch
1092with_boot_jdk
1093with_add_source_root
1094with_override_source_root
1095with_adds_and_overrides
1096with_override_langtools
1097with_override_corba
1098with_override_jaxp
1099with_override_jaxws
1100with_override_hotspot
1101with_override_nashorn
1102with_override_jdk
1103with_import_hotspot
1104enable_static_build
1105with_toolchain_type
1106with_extra_cflags
1107with_extra_cxxflags
1108with_extra_ldflags
1109with_toolchain_version
1110with_build_devkit
1111with_jtreg
1112enable_warnings_as_errors
1113with_native_debug_symbols
1114enable_debug_symbols
1115enable_zip_debug_info
1116enable_native_coverage
1117with_stdc__lib
1118with_msvcr_dll
1119with_msvcp_dll
1120with_x
1121with_cups
1122with_cups_include
1123with_freetype
1124with_freetype_include
1125with_freetype_lib
1126with_freetype_src
1127enable_freetype_bundling
1128with_alsa
1129with_alsa_include
1130with_alsa_lib
1131with_libffi
1132with_libffi_include
1133with_libffi_lib
1134with_libjpeg
1135with_giflib
1136with_libpng
1137with_zlib
1138with_lcms
1139with_dxsdk
1140with_dxsdk_lib
1141with_dxsdk_include
1142with_num_cores
1143with_memory_size
1144with_jobs
1145with_test_jobs
1146with_boot_jdk_jvmargs
1147with_sjavac_server_java
1148enable_sjavac
1149enable_javac_server
1150enable_icecc
1151enable_precompiled_headers
1152enable_ccache
1153with_ccache_dir
1154'
1155      ac_precious_vars='build_alias
1156host_alias
1157target_alias
1158BASENAME
1159BASH
1160CAT
1161CHMOD
1162CMP
1163COMM
1164CP
1165CUT
1166DATE
1167DIFF
1168DIRNAME
1169ECHO
1170EXPR
1171FILE
1172FIND
1173HEAD
1174LN
1175LS
1176MKDIR
1177MKTEMP
1178MV
1179NAWK
1180PRINTF
1181RM
1182RMDIR
1183SH
1184SORT
1185TAIL
1186TAR
1187TEE
1188TOUCH
1189TR
1190UNAME
1191UNIQ
1192WC
1193WHICH
1194XARGS
1195AWK
1196GREP
1197EGREP
1198FGREP
1199SED
1200CYGPATH
1201READLINK
1202DF
1203CPIO
1204NICE
1205MAKE
1206UNZIP
1207ZIP
1208LDD
1209OTOOL
1210READELF
1211HG
1212STAT
1213TIME
1214PATCH
1215DSYMUTIL
1216XATTR
1217CODESIGN
1218SETFILE
1219PKG_CONFIG
1220JAVA
1221JAVAC
1222JAVAH
1223JAR
1224JARSIGNER
1225CC
1226CFLAGS
1227LDFLAGS
1228LIBS
1229CPPFLAGS
1230CXX
1231CXXFLAGS
1232CCC
1233CPP
1234CXXCPP
1235AS
1236AR
1237LIPO
1238STRIP
1239NM
1240GNM
1241OBJCOPY
1242OBJDUMP
1243BUILD_CC
1244BUILD_CXX
1245BUILD_NM
1246BUILD_AR
1247JTREGEXE
1248XMKMF
1249FREETYPE_CFLAGS
1250FREETYPE_LIBS
1251ALSA_CFLAGS
1252ALSA_LIBS
1253LIBFFI_CFLAGS
1254LIBFFI_LIBS
1255PNG_CFLAGS
1256PNG_LIBS
1257LCMS_CFLAGS
1258LCMS_LIBS
1259ICECC_CMD
1260ICECC_CREATE_ENV
1261ICECC_WRAPPER
1262CCACHE'
1263
1264
1265# Initialize some variables set by options.
1266ac_init_help=
1267ac_init_version=false
1268ac_unrecognized_opts=
1269ac_unrecognized_sep=
1270# The variables have the same names as the options, with
1271# dashes changed to underlines.
1272cache_file=/dev/null
1273exec_prefix=NONE
1274no_create=
1275no_recursion=
1276prefix=NONE
1277program_prefix=NONE
1278program_suffix=NONE
1279program_transform_name=s,x,x,
1280silent=
1281site=
1282srcdir=
1283verbose=
1284x_includes=NONE
1285x_libraries=NONE
1286
1287# Installation directory options.
1288# These are left unexpanded so users can "make install exec_prefix=/foo"
1289# and all the variables that are supposed to be based on exec_prefix
1290# by default will actually change.
1291# Use braces instead of parens because sh, perl, etc. also accept them.
1292# (The list follows the same order as the GNU Coding Standards.)
1293bindir='${exec_prefix}/bin'
1294sbindir='${exec_prefix}/sbin'
1295libexecdir='${exec_prefix}/libexec'
1296datarootdir='${prefix}/share'
1297datadir='${datarootdir}'
1298sysconfdir='${prefix}/etc'
1299sharedstatedir='${prefix}/com'
1300localstatedir='${prefix}/var'
1301includedir='${prefix}/include'
1302oldincludedir='/usr/include'
1303docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1304infodir='${datarootdir}/info'
1305htmldir='${docdir}'
1306dvidir='${docdir}'
1307pdfdir='${docdir}'
1308psdir='${docdir}'
1309libdir='${exec_prefix}/lib'
1310localedir='${datarootdir}/locale'
1311mandir='${datarootdir}/man'
1312
1313ac_prev=
1314ac_dashdash=
1315for ac_option
1316do
1317  # If the previous option needs an argument, assign it.
1318  if test -n "$ac_prev"; then
1319    eval $ac_prev=\$ac_option
1320    ac_prev=
1321    continue
1322  fi
1323
1324  case $ac_option in
1325  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1326  *=)   ac_optarg= ;;
1327  *)    ac_optarg=yes ;;
1328  esac
1329
1330  # Accept the important Cygnus configure options, so we can diagnose typos.
1331
1332  case $ac_dashdash$ac_option in
1333  --)
1334    ac_dashdash=yes ;;
1335
1336  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1337    ac_prev=bindir ;;
1338  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1339    bindir=$ac_optarg ;;
1340
1341  -build | --build | --buil | --bui | --bu)
1342    ac_prev=build_alias ;;
1343  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1344    build_alias=$ac_optarg ;;
1345
1346  -cache-file | --cache-file | --cache-fil | --cache-fi \
1347  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1348    ac_prev=cache_file ;;
1349  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1350  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1351    cache_file=$ac_optarg ;;
1352
1353  --config-cache | -C)
1354    cache_file=config.cache ;;
1355
1356  -datadir | --datadir | --datadi | --datad)
1357    ac_prev=datadir ;;
1358  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1359    datadir=$ac_optarg ;;
1360
1361  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1362  | --dataroo | --dataro | --datar)
1363    ac_prev=datarootdir ;;
1364  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1365  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1366    datarootdir=$ac_optarg ;;
1367
1368  -disable-* | --disable-*)
1369    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1370    # Reject names that are not valid shell variable names.
1371    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1372      as_fn_error $? "invalid feature name: $ac_useropt"
1373    ac_useropt_orig=$ac_useropt
1374    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1375    case $ac_user_opts in
1376      *"
1377"enable_$ac_useropt"
1378"*) ;;
1379      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1380	 ac_unrecognized_sep=', ';;
1381    esac
1382    eval enable_$ac_useropt=no ;;
1383
1384  -docdir | --docdir | --docdi | --doc | --do)
1385    ac_prev=docdir ;;
1386  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1387    docdir=$ac_optarg ;;
1388
1389  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1390    ac_prev=dvidir ;;
1391  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1392    dvidir=$ac_optarg ;;
1393
1394  -enable-* | --enable-*)
1395    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1396    # Reject names that are not valid shell variable names.
1397    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398      as_fn_error $? "invalid feature name: $ac_useropt"
1399    ac_useropt_orig=$ac_useropt
1400    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401    case $ac_user_opts in
1402      *"
1403"enable_$ac_useropt"
1404"*) ;;
1405      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1406	 ac_unrecognized_sep=', ';;
1407    esac
1408    eval enable_$ac_useropt=\$ac_optarg ;;
1409
1410  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1411  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1412  | --exec | --exe | --ex)
1413    ac_prev=exec_prefix ;;
1414  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1415  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1416  | --exec=* | --exe=* | --ex=*)
1417    exec_prefix=$ac_optarg ;;
1418
1419  -gas | --gas | --ga | --g)
1420    # Obsolete; use --with-gas.
1421    with_gas=yes ;;
1422
1423  -help | --help | --hel | --he | -h)
1424    ac_init_help=long ;;
1425  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1426    ac_init_help=recursive ;;
1427  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1428    ac_init_help=short ;;
1429
1430  -host | --host | --hos | --ho)
1431    ac_prev=host_alias ;;
1432  -host=* | --host=* | --hos=* | --ho=*)
1433    host_alias=$ac_optarg ;;
1434
1435  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1436    ac_prev=htmldir ;;
1437  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1438  | --ht=*)
1439    htmldir=$ac_optarg ;;
1440
1441  -includedir | --includedir | --includedi | --included | --include \
1442  | --includ | --inclu | --incl | --inc)
1443    ac_prev=includedir ;;
1444  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1445  | --includ=* | --inclu=* | --incl=* | --inc=*)
1446    includedir=$ac_optarg ;;
1447
1448  -infodir | --infodir | --infodi | --infod | --info | --inf)
1449    ac_prev=infodir ;;
1450  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1451    infodir=$ac_optarg ;;
1452
1453  -libdir | --libdir | --libdi | --libd)
1454    ac_prev=libdir ;;
1455  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1456    libdir=$ac_optarg ;;
1457
1458  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1459  | --libexe | --libex | --libe)
1460    ac_prev=libexecdir ;;
1461  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1462  | --libexe=* | --libex=* | --libe=*)
1463    libexecdir=$ac_optarg ;;
1464
1465  -localedir | --localedir | --localedi | --localed | --locale)
1466    ac_prev=localedir ;;
1467  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1468    localedir=$ac_optarg ;;
1469
1470  -localstatedir | --localstatedir | --localstatedi | --localstated \
1471  | --localstate | --localstat | --localsta | --localst | --locals)
1472    ac_prev=localstatedir ;;
1473  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1474  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1475    localstatedir=$ac_optarg ;;
1476
1477  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1478    ac_prev=mandir ;;
1479  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1480    mandir=$ac_optarg ;;
1481
1482  -nfp | --nfp | --nf)
1483    # Obsolete; use --without-fp.
1484    with_fp=no ;;
1485
1486  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1487  | --no-cr | --no-c | -n)
1488    no_create=yes ;;
1489
1490  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1491  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1492    no_recursion=yes ;;
1493
1494  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1495  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1496  | --oldin | --oldi | --old | --ol | --o)
1497    ac_prev=oldincludedir ;;
1498  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1499  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1500  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1501    oldincludedir=$ac_optarg ;;
1502
1503  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1504    ac_prev=prefix ;;
1505  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1506    prefix=$ac_optarg ;;
1507
1508  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1509  | --program-pre | --program-pr | --program-p)
1510    ac_prev=program_prefix ;;
1511  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1512  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1513    program_prefix=$ac_optarg ;;
1514
1515  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1516  | --program-suf | --program-su | --program-s)
1517    ac_prev=program_suffix ;;
1518  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1519  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1520    program_suffix=$ac_optarg ;;
1521
1522  -program-transform-name | --program-transform-name \
1523  | --program-transform-nam | --program-transform-na \
1524  | --program-transform-n | --program-transform- \
1525  | --program-transform | --program-transfor \
1526  | --program-transfo | --program-transf \
1527  | --program-trans | --program-tran \
1528  | --progr-tra | --program-tr | --program-t)
1529    ac_prev=program_transform_name ;;
1530  -program-transform-name=* | --program-transform-name=* \
1531  | --program-transform-nam=* | --program-transform-na=* \
1532  | --program-transform-n=* | --program-transform-=* \
1533  | --program-transform=* | --program-transfor=* \
1534  | --program-transfo=* | --program-transf=* \
1535  | --program-trans=* | --program-tran=* \
1536  | --progr-tra=* | --program-tr=* | --program-t=*)
1537    program_transform_name=$ac_optarg ;;
1538
1539  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1540    ac_prev=pdfdir ;;
1541  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1542    pdfdir=$ac_optarg ;;
1543
1544  -psdir | --psdir | --psdi | --psd | --ps)
1545    ac_prev=psdir ;;
1546  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1547    psdir=$ac_optarg ;;
1548
1549  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1550  | -silent | --silent | --silen | --sile | --sil)
1551    silent=yes ;;
1552
1553  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1554    ac_prev=sbindir ;;
1555  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1556  | --sbi=* | --sb=*)
1557    sbindir=$ac_optarg ;;
1558
1559  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1560  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1561  | --sharedst | --shareds | --shared | --share | --shar \
1562  | --sha | --sh)
1563    ac_prev=sharedstatedir ;;
1564  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1565  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1566  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1567  | --sha=* | --sh=*)
1568    sharedstatedir=$ac_optarg ;;
1569
1570  -site | --site | --sit)
1571    ac_prev=site ;;
1572  -site=* | --site=* | --sit=*)
1573    site=$ac_optarg ;;
1574
1575  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1576    ac_prev=srcdir ;;
1577  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1578    srcdir=$ac_optarg ;;
1579
1580  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1581  | --syscon | --sysco | --sysc | --sys | --sy)
1582    ac_prev=sysconfdir ;;
1583  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1584  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1585    sysconfdir=$ac_optarg ;;
1586
1587  -target | --target | --targe | --targ | --tar | --ta | --t)
1588    ac_prev=target_alias ;;
1589  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1590    target_alias=$ac_optarg ;;
1591
1592  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1593    verbose=yes ;;
1594
1595  -version | --version | --versio | --versi | --vers | -V)
1596    ac_init_version=: ;;
1597
1598  -with-* | --with-*)
1599    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1600    # Reject names that are not valid shell variable names.
1601    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1602      as_fn_error $? "invalid package name: $ac_useropt"
1603    ac_useropt_orig=$ac_useropt
1604    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1605    case $ac_user_opts in
1606      *"
1607"with_$ac_useropt"
1608"*) ;;
1609      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1610	 ac_unrecognized_sep=', ';;
1611    esac
1612    eval with_$ac_useropt=\$ac_optarg ;;
1613
1614  -without-* | --without-*)
1615    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1616    # Reject names that are not valid shell variable names.
1617    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1618      as_fn_error $? "invalid package name: $ac_useropt"
1619    ac_useropt_orig=$ac_useropt
1620    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1621    case $ac_user_opts in
1622      *"
1623"with_$ac_useropt"
1624"*) ;;
1625      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1626	 ac_unrecognized_sep=', ';;
1627    esac
1628    eval with_$ac_useropt=no ;;
1629
1630  --x)
1631    # Obsolete; use --with-x.
1632    with_x=yes ;;
1633
1634  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1635  | --x-incl | --x-inc | --x-in | --x-i)
1636    ac_prev=x_includes ;;
1637  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1638  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1639    x_includes=$ac_optarg ;;
1640
1641  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1642  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1643    ac_prev=x_libraries ;;
1644  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1645  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1646    x_libraries=$ac_optarg ;;
1647
1648  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1649Try \`$0 --help' for more information"
1650    ;;
1651
1652  *=*)
1653    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1654    # Reject names that are not valid shell variable names.
1655    case $ac_envvar in #(
1656      '' | [0-9]* | *[!_$as_cr_alnum]* )
1657      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1658    esac
1659    eval $ac_envvar=\$ac_optarg
1660    export $ac_envvar ;;
1661
1662  *)
1663    # FIXME: should be removed in autoconf 3.0.
1664    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1665    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1666      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1667    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1668    ;;
1669
1670  esac
1671done
1672
1673if test -n "$ac_prev"; then
1674  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1675  as_fn_error $? "missing argument to $ac_option"
1676fi
1677
1678if test -n "$ac_unrecognized_opts"; then
1679  case $enable_option_checking in
1680    no) ;;
1681    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1682    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1683  esac
1684fi
1685
1686# Check all directory arguments for consistency.
1687for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1688		datadir sysconfdir sharedstatedir localstatedir includedir \
1689		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1690		libdir localedir mandir
1691do
1692  eval ac_val=\$$ac_var
1693  # Remove trailing slashes.
1694  case $ac_val in
1695    */ )
1696      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1697      eval $ac_var=\$ac_val;;
1698  esac
1699  # Be sure to have absolute directory names.
1700  case $ac_val in
1701    [\\/$]* | ?:[\\/]* )  continue;;
1702    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1703  esac
1704  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1705done
1706
1707# There might be people who depend on the old broken behavior: `$host'
1708# used to hold the argument of --host etc.
1709# FIXME: To remove some day.
1710build=$build_alias
1711host=$host_alias
1712target=$target_alias
1713
1714# FIXME: To remove some day.
1715if test "x$host_alias" != x; then
1716  if test "x$build_alias" = x; then
1717    cross_compiling=maybe
1718  elif test "x$build_alias" != "x$host_alias"; then
1719    cross_compiling=yes
1720  fi
1721fi
1722
1723ac_tool_prefix=
1724test -n "$host_alias" && ac_tool_prefix=$host_alias-
1725
1726test "$silent" = yes && exec 6>/dev/null
1727
1728
1729ac_pwd=`pwd` && test -n "$ac_pwd" &&
1730ac_ls_di=`ls -di .` &&
1731ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1732  as_fn_error $? "working directory cannot be determined"
1733test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1734  as_fn_error $? "pwd does not report name of working directory"
1735
1736
1737# Find the source files, if location was not specified.
1738if test -z "$srcdir"; then
1739  ac_srcdir_defaulted=yes
1740  # Try the directory containing this script, then the parent directory.
1741  ac_confdir=`$as_dirname -- "$as_myself" ||
1742$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1743	 X"$as_myself" : 'X\(//\)[^/]' \| \
1744	 X"$as_myself" : 'X\(//\)$' \| \
1745	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1746$as_echo X"$as_myself" |
1747    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1748	    s//\1/
1749	    q
1750	  }
1751	  /^X\(\/\/\)[^/].*/{
1752	    s//\1/
1753	    q
1754	  }
1755	  /^X\(\/\/\)$/{
1756	    s//\1/
1757	    q
1758	  }
1759	  /^X\(\/\).*/{
1760	    s//\1/
1761	    q
1762	  }
1763	  s/.*/./; q'`
1764  srcdir=$ac_confdir
1765  if test ! -r "$srcdir/$ac_unique_file"; then
1766    srcdir=..
1767  fi
1768else
1769  ac_srcdir_defaulted=no
1770fi
1771if test ! -r "$srcdir/$ac_unique_file"; then
1772  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1773  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1774fi
1775ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1776ac_abs_confdir=`(
1777	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1778	pwd)`
1779# When building in place, set srcdir=.
1780if test "$ac_abs_confdir" = "$ac_pwd"; then
1781  srcdir=.
1782fi
1783# Remove unnecessary trailing slashes from srcdir.
1784# Double slashes in file names in object file debugging info
1785# mess up M-x gdb in Emacs.
1786case $srcdir in
1787*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1788esac
1789for ac_var in $ac_precious_vars; do
1790  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1791  eval ac_env_${ac_var}_value=\$${ac_var}
1792  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1793  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1794done
1795
1796#
1797# Report the --help message.
1798#
1799if test "$ac_init_help" = "long"; then
1800  # Omit some internal or obsolete options to make the list less imposing.
1801  # This message is too long to be a string in the A/UX 3.1 sh.
1802  cat <<_ACEOF
1803\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1804
1805Usage: $0 [OPTION]... [VAR=VALUE]...
1806
1807To assign environment variables (e.g., CC, CFLAGS...), specify them as
1808VAR=VALUE.  See below for descriptions of some of the useful variables.
1809
1810Defaults for the options are specified in brackets.
1811
1812Configuration:
1813  -h, --help              display this help and exit
1814      --help=short        display options specific to this package
1815      --help=recursive    display the short help of all the included packages
1816  -V, --version           display version information and exit
1817  -q, --quiet, --silent   do not print \`checking ...' messages
1818      --cache-file=FILE   cache test results in FILE [disabled]
1819  -C, --config-cache      alias for \`--cache-file=config.cache'
1820  -n, --no-create         do not create output files
1821      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1822
1823Installation directories:
1824  --prefix=PREFIX         install architecture-independent files in PREFIX
1825                          [$ac_default_prefix]
1826  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1827                          [PREFIX]
1828
1829By default, \`make install' will install all the files in
1830\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1831an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1832for instance \`--prefix=\$HOME'.
1833
1834For better control, use the options below.
1835
1836Fine tuning of the installation directories:
1837  --bindir=DIR            user executables [EPREFIX/bin]
1838  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1839  --libexecdir=DIR        program executables [EPREFIX/libexec]
1840  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1841  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1842  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1843  --libdir=DIR            object code libraries [EPREFIX/lib]
1844  --includedir=DIR        C header files [PREFIX/include]
1845  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1846  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1847  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1848  --infodir=DIR           info documentation [DATAROOTDIR/info]
1849  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1850  --mandir=DIR            man documentation [DATAROOTDIR/man]
1851  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1852  --htmldir=DIR           html documentation [DOCDIR]
1853  --dvidir=DIR            dvi documentation [DOCDIR]
1854  --pdfdir=DIR            pdf documentation [DOCDIR]
1855  --psdir=DIR             ps documentation [DOCDIR]
1856_ACEOF
1857
1858  cat <<\_ACEOF
1859
1860X features:
1861  --x-includes=DIR    X include files are in DIR
1862  --x-libraries=DIR   X library files are in DIR
1863
1864System types:
1865  --build=BUILD     configure for building on BUILD [guessed]
1866  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1867  --target=TARGET   configure for building compilers for TARGET [HOST]
1868_ACEOF
1869fi
1870
1871if test -n "$ac_init_help"; then
1872  case $ac_init_help in
1873     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1874   esac
1875  cat <<\_ACEOF
1876
1877Optional Features:
1878  --disable-option-checking  ignore unrecognized --enable/--with options
1879  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1880  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1881  --enable-openjdk-only   suppress building custom source even if present
1882                          [disabled]
1883  --enable-debug          set the debug level to fastdebug (shorthand for
1884                          --with-debug-level=fastdebug) [disabled]
1885  --disable-headful       disable building headful support (graphical UI
1886                          support) [enabled]
1887  --enable-unlimited-crypto
1888                          Enable unlimited crypto policy [disabled]
1889  --enable-hotspot-test-in-build
1890                          run the Queens test after Hotspot build [disabled]
1891  --enable-static-build   enable static library build [disabled]
1892  --disable-warnings-as-errors
1893                          do not consider native warnings to be an error
1894                          [enabled]
1895  --enable-debug-symbols  Deprecated. Option is kept for backwards
1896                          compatibility and is ignored
1897  --enable-zip-debug-info Deprecated. Option is kept for backwards
1898                          compatibility and is ignored
1899  --enable-native-coverage
1900                          enable native compilation with code coverage
1901                          data[disabled]
1902  --disable-freetype-bundling
1903                          disable bundling of the freetype library with the
1904                          build result [enabled on Windows or when using
1905                          --with-freetype, disabled otherwise]
1906  --enable-sjavac         use sjavac to do fast incremental compiles
1907                          [disabled]
1908  --disable-javac-server  disable javac server [enabled]
1909  --enable-icecc          enable distribted compilation of native code using
1910                          icecc/icecream [disabled]
1911  --disable-precompiled-headers
1912                          disable using precompiled headers when compiling C++
1913                          [enabled]
1914  --enable-ccache         enable using ccache to speed up recompilations
1915                          [disabled]
1916
1917Optional Packages:
1918  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1919  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1920  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1921                          support it), e.g. --with-target-bits=32 [guessed]
1922  --with-custom-make-dir  Deprecated. Option is kept for backwards
1923                          compatibility and is ignored
1924  --with-jdk-variant      JDK variant to build (normal) [normal]
1925  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1926  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1927                          client, minimal1, zero, zeroshark, core) [server]
1928  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1929                          optimized (HotSpot build only)) [release]
1930  --with-devkit           use this devkit for compilers, tools and resources
1931  --with-sys-root         alias for --with-sysroot for backwards compatability
1932  --with-sysroot          use this directory as sysroot
1933  --with-tools-dir        alias for --with-toolchain-path for backwards
1934                          compatibility
1935  --with-toolchain-path   prepend these directories when searching for
1936                          toolchain binaries (compilers etc)
1937  --with-extra-path       prepend these directories to the default path
1938  --with-sdk-name         use the platform SDK of the given name. [macosx]
1939  --with-conf-name        use this as the name of the configuration [generated
1940                          from important configuration options]
1941  --with-output-sync      set make output sync type if supported by make.
1942                          [recurse]
1943  --with-default-make-target
1944                          set the default make target [exploded-image]
1945  --with-cacerts-file     specify alternative cacerts file
1946  --with-copyright-year   Set copyright year value for build [current year]
1947  --with-milestone        Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-update-version   Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-user-release-suffix
1952                          Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-build-number     Deprecated. Option is kept for backwards
1955                          compatibility and is ignored
1956  --with-version-string   Set version string [calculated]
1957  --with-version-pre      Set the base part of the version 'PRE' field
1958                          (pre-release identifier) ['internal']
1959  --with-version-opt      Set version 'OPT' field (build metadata)
1960                          [<timestamp>.<user>.<dirname>]
1961  --with-version-build    Set version 'BUILD' field (build number) [not
1962                          specified]
1963  --with-version-major    Set version 'MAJOR' field (first number) [current
1964                          source value]
1965  --with-version-minor    Set version 'MINOR' field (second number) [current
1966                          source value]
1967  --with-version-security Set version 'SECURITY' field (third number) [current
1968                          source value]
1969  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1970                          specified]
1971  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1972  --with-add-source-root  Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-override-source-root
1975                          Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-adds-and-overrides
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-override-langtools
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-corba   Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-override-jaxp    Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-override-jaxws   Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-override-hotspot Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-override-nashorn Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-override-jdk     Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-import-hotspot   import hotspot binaries from this jdk image or
1996                          hotspot build dist dir instead of building from
1997                          source
1998  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1999                          to show possible values [platform dependent]
2000  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2001  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2002  --with-extra-ldflags    extra flags to be used when linking jdk
2003  --with-toolchain-version
2004                          the version of the toolchain to look for, use
2005                          '--help' to show possible values [platform
2006                          dependent]
2007  --with-build-devkit     Devkit to use for the build platform toolchain
2008  --with-jtreg            Regression Test Harness [probed]
2009  --with-native-debug-symbols
2010                          set the native debug symbol configuration (none,
2011                          internal, external, zipped) [zipped]
2012  --with-stdc++lib=<static>,<dynamic>,<default>
2013                          force linking of the C++ runtime on Linux to either
2014                          static or dynamic, default is static with dynamic as
2015                          fallback
2016  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2017                          (Windows only) [probed]
2018  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2019                          (Windows only) [probed]
2020  --with-x                use the X Window System
2021  --with-cups             specify prefix directory for the cups package
2022                          (expecting the headers under PATH/include)
2023  --with-cups-include     specify directory for the cups include files
2024  --with-freetype         specify prefix directory for the freetype package
2025                          (expecting the libraries under PATH/lib and the
2026                          headers under PATH/include)
2027  --with-freetype-include specify directory for the freetype include files
2028  --with-freetype-lib     specify directory for the freetype library
2029  --with-freetype-src     specify directory with freetype sources to
2030                          automatically build the library (experimental,
2031                          Windows-only)
2032  --with-alsa             specify prefix directory for the alsa package
2033                          (expecting the libraries under PATH/lib and the
2034                          headers under PATH/include)
2035  --with-alsa-include     specify directory for the alsa include files
2036  --with-alsa-lib         specify directory for the alsa library
2037  --with-libffi           specify prefix directory for the libffi package
2038                          (expecting the libraries under PATH/lib and the
2039                          headers under PATH/include)
2040  --with-libffi-include   specify directory for the libffi include files
2041  --with-libffi-lib       specify directory for the libffi library
2042  --with-libjpeg          use libjpeg from build system or OpenJDK source
2043                          (system, bundled) [bundled]
2044  --with-giflib           use giflib from build system or OpenJDK source
2045                          (system, bundled) [bundled]
2046  --with-libpng           use libpng from build system or OpenJDK source
2047                          (system, bundled) [bundled]
2048  --with-zlib             use zlib from build system or OpenJDK source
2049                          (system, bundled) [bundled]
2050  --with-lcms             use lcms2 from build system or OpenJDK source
2051                          (system, bundled) [bundled]
2052  --with-dxsdk            Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-dxsdk-include    Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-num-cores        number of cores in the build system, e.g.
2059                          --with-num-cores=8 [probed]
2060  --with-memory-size      memory (in MB) available in the build system, e.g.
2061                          --with-memory-size=1024 [probed]
2062  --with-jobs             number of parallel jobs to let make run [calculated
2063                          based on cores and memory]
2064  --with-test-jobs        number of parallel tests jobs to run [based on build
2065                          jobs]
2066  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2067                          invocations of boot JDK, overriding the default
2068                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2069                          -enableassertions"
2070  --with-sjavac-server-java
2071                          use this java binary for running the sjavac
2072                          background server [Boot JDK java]
2073  --with-ccache-dir       where to store ccache files [~/.ccache]
2074
2075Some influential environment variables:
2076  BASENAME    Override default value for BASENAME
2077  BASH        Override default value for BASH
2078  CAT         Override default value for CAT
2079  CHMOD       Override default value for CHMOD
2080  CMP         Override default value for CMP
2081  COMM        Override default value for COMM
2082  CP          Override default value for CP
2083  CUT         Override default value for CUT
2084  DATE        Override default value for DATE
2085  DIFF        Override default value for DIFF
2086  DIRNAME     Override default value for DIRNAME
2087  ECHO        Override default value for ECHO
2088  EXPR        Override default value for EXPR
2089  FILE        Override default value for FILE
2090  FIND        Override default value for FIND
2091  HEAD        Override default value for HEAD
2092  LN          Override default value for LN
2093  LS          Override default value for LS
2094  MKDIR       Override default value for MKDIR
2095  MKTEMP      Override default value for MKTEMP
2096  MV          Override default value for MV
2097  NAWK        Override default value for NAWK
2098  PRINTF      Override default value for PRINTF
2099  RM          Override default value for RM
2100  RMDIR       Override default value for RMDIR
2101  SH          Override default value for SH
2102  SORT        Override default value for SORT
2103  TAIL        Override default value for TAIL
2104  TAR         Override default value for TAR
2105  TEE         Override default value for TEE
2106  TOUCH       Override default value for TOUCH
2107  TR          Override default value for TR
2108  UNAME       Override default value for UNAME
2109  UNIQ        Override default value for UNIQ
2110  WC          Override default value for WC
2111  WHICH       Override default value for WHICH
2112  XARGS       Override default value for XARGS
2113  AWK         Override default value for AWK
2114  GREP        Override default value for GREP
2115  EGREP       Override default value for EGREP
2116  FGREP       Override default value for FGREP
2117  SED         Override default value for SED
2118  CYGPATH     Override default value for CYGPATH
2119  READLINK    Override default value for READLINK
2120  DF          Override default value for DF
2121  CPIO        Override default value for CPIO
2122  NICE        Override default value for NICE
2123  MAKE        Override default value for MAKE
2124  UNZIP       Override default value for UNZIP
2125  ZIP         Override default value for ZIP
2126  LDD         Override default value for LDD
2127  OTOOL       Override default value for OTOOL
2128  READELF     Override default value for READELF
2129  HG          Override default value for HG
2130  STAT        Override default value for STAT
2131  TIME        Override default value for TIME
2132  PATCH       Override default value for PATCH
2133  DSYMUTIL    Override default value for DSYMUTIL
2134  XATTR       Override default value for XATTR
2135  CODESIGN    Override default value for CODESIGN
2136  SETFILE     Override default value for SETFILE
2137  PKG_CONFIG  path to pkg-config utility
2138  JAVA        Override default value for JAVA
2139  JAVAC       Override default value for JAVAC
2140  JAVAH       Override default value for JAVAH
2141  JAR         Override default value for JAR
2142  JARSIGNER   Override default value for JARSIGNER
2143  CC          C compiler command
2144  CFLAGS      C compiler flags
2145  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2146              nonstandard directory <lib dir>
2147  LIBS        libraries to pass to the linker, e.g. -l<library>
2148  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2149              you have headers in a nonstandard directory <include dir>
2150  CXX         C++ compiler command
2151  CXXFLAGS    C++ compiler flags
2152  CPP         C preprocessor
2153  CXXCPP      C++ preprocessor
2154  AS          Override default value for AS
2155  AR          Override default value for AR
2156  LIPO        Override default value for LIPO
2157  STRIP       Override default value for STRIP
2158  NM          Override default value for NM
2159  GNM         Override default value for GNM
2160  OBJCOPY     Override default value for OBJCOPY
2161  OBJDUMP     Override default value for OBJDUMP
2162  BUILD_CC    Override default value for BUILD_CC
2163  BUILD_CXX   Override default value for BUILD_CXX
2164  BUILD_NM    Override default value for BUILD_NM
2165  BUILD_AR    Override default value for BUILD_AR
2166  JTREGEXE    Override default value for JTREGEXE
2167  XMKMF       Path to xmkmf, Makefile generator for X Window System
2168  FREETYPE_CFLAGS
2169              C compiler flags for FREETYPE, overriding pkg-config
2170  FREETYPE_LIBS
2171              linker flags for FREETYPE, overriding pkg-config
2172  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2173  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2174  LIBFFI_CFLAGS
2175              C compiler flags for LIBFFI, overriding pkg-config
2176  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2177  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2178  PNG_LIBS    linker flags for PNG, overriding pkg-config
2179  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2180  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2181  ICECC_CMD   Override default value for ICECC_CMD
2182  ICECC_CREATE_ENV
2183              Override default value for ICECC_CREATE_ENV
2184  ICECC_WRAPPER
2185              Override default value for ICECC_WRAPPER
2186  CCACHE      Override default value for CCACHE
2187
2188Use these variables to override the choices made by `configure' or to help
2189it to find libraries and programs with nonstandard names/locations.
2190
2191Report bugs to <build-dev@openjdk.java.net>.
2192OpenJDK home page: <http://openjdk.java.net>.
2193_ACEOF
2194ac_status=$?
2195fi
2196
2197if test "$ac_init_help" = "recursive"; then
2198  # If there are subdirs, report their specific --help.
2199  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2200    test -d "$ac_dir" ||
2201      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2202      continue
2203    ac_builddir=.
2204
2205case "$ac_dir" in
2206.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2207*)
2208  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2209  # A ".." for each directory in $ac_dir_suffix.
2210  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2211  case $ac_top_builddir_sub in
2212  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2213  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2214  esac ;;
2215esac
2216ac_abs_top_builddir=$ac_pwd
2217ac_abs_builddir=$ac_pwd$ac_dir_suffix
2218# for backward compatibility:
2219ac_top_builddir=$ac_top_build_prefix
2220
2221case $srcdir in
2222  .)  # We are building in place.
2223    ac_srcdir=.
2224    ac_top_srcdir=$ac_top_builddir_sub
2225    ac_abs_top_srcdir=$ac_pwd ;;
2226  [\\/]* | ?:[\\/]* )  # Absolute name.
2227    ac_srcdir=$srcdir$ac_dir_suffix;
2228    ac_top_srcdir=$srcdir
2229    ac_abs_top_srcdir=$srcdir ;;
2230  *) # Relative name.
2231    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2232    ac_top_srcdir=$ac_top_build_prefix$srcdir
2233    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2234esac
2235ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2236
2237    cd "$ac_dir" || { ac_status=$?; continue; }
2238    # Check for guested configure.
2239    if test -f "$ac_srcdir/configure.gnu"; then
2240      echo &&
2241      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2242    elif test -f "$ac_srcdir/configure"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure" --help=recursive
2245    else
2246      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2247    fi || ac_status=$?
2248    cd "$ac_pwd" || { ac_status=$?; break; }
2249  done
2250fi
2251
2252test -n "$ac_init_help" && exit $ac_status
2253if $ac_init_version; then
2254  cat <<\_ACEOF
2255OpenJDK configure jdk9
2256generated by GNU Autoconf 2.69
2257
2258Copyright (C) 2012 Free Software Foundation, Inc.
2259This configure script is free software; the Free Software Foundation
2260gives unlimited permission to copy, distribute and modify it.
2261_ACEOF
2262  exit
2263fi
2264
2265## ------------------------ ##
2266## Autoconf initialization. ##
2267## ------------------------ ##
2268
2269# ac_fn_c_try_compile LINENO
2270# --------------------------
2271# Try to compile conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_c_try_compile ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  rm -f conftest.$ac_objext
2276  if { { ac_try="$ac_compile"
2277case "(($ac_try" in
2278  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2279  *) ac_try_echo=$ac_try;;
2280esac
2281eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2282$as_echo "$ac_try_echo"; } >&5
2283  (eval "$ac_compile") 2>conftest.err
2284  ac_status=$?
2285  if test -s conftest.err; then
2286    grep -v '^ *+' conftest.err >conftest.er1
2287    cat conftest.er1 >&5
2288    mv -f conftest.er1 conftest.err
2289  fi
2290  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2291  test $ac_status = 0; } && {
2292	 test -z "$ac_c_werror_flag" ||
2293	 test ! -s conftest.err
2294       } && test -s conftest.$ac_objext; then :
2295  ac_retval=0
2296else
2297  $as_echo "$as_me: failed program was:" >&5
2298sed 's/^/| /' conftest.$ac_ext >&5
2299
2300	ac_retval=1
2301fi
2302  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2303  as_fn_set_status $ac_retval
2304
2305} # ac_fn_c_try_compile
2306
2307# ac_fn_cxx_try_compile LINENO
2308# ----------------------------
2309# Try to compile conftest.$ac_ext, and return whether this succeeded.
2310ac_fn_cxx_try_compile ()
2311{
2312  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2313  rm -f conftest.$ac_objext
2314  if { { ac_try="$ac_compile"
2315case "(($ac_try" in
2316  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2317  *) ac_try_echo=$ac_try;;
2318esac
2319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2320$as_echo "$ac_try_echo"; } >&5
2321  (eval "$ac_compile") 2>conftest.err
2322  ac_status=$?
2323  if test -s conftest.err; then
2324    grep -v '^ *+' conftest.err >conftest.er1
2325    cat conftest.er1 >&5
2326    mv -f conftest.er1 conftest.err
2327  fi
2328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2329  test $ac_status = 0; } && {
2330	 test -z "$ac_cxx_werror_flag" ||
2331	 test ! -s conftest.err
2332       } && test -s conftest.$ac_objext; then :
2333  ac_retval=0
2334else
2335  $as_echo "$as_me: failed program was:" >&5
2336sed 's/^/| /' conftest.$ac_ext >&5
2337
2338	ac_retval=1
2339fi
2340  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341  as_fn_set_status $ac_retval
2342
2343} # ac_fn_cxx_try_compile
2344
2345# ac_fn_c_try_cpp LINENO
2346# ----------------------
2347# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2348ac_fn_c_try_cpp ()
2349{
2350  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351  if { { ac_try="$ac_cpp conftest.$ac_ext"
2352case "(($ac_try" in
2353  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2354  *) ac_try_echo=$ac_try;;
2355esac
2356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2357$as_echo "$ac_try_echo"; } >&5
2358  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2359  ac_status=$?
2360  if test -s conftest.err; then
2361    grep -v '^ *+' conftest.err >conftest.er1
2362    cat conftest.er1 >&5
2363    mv -f conftest.er1 conftest.err
2364  fi
2365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2366  test $ac_status = 0; } > conftest.i && {
2367	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2368	 test ! -s conftest.err
2369       }; then :
2370  ac_retval=0
2371else
2372  $as_echo "$as_me: failed program was:" >&5
2373sed 's/^/| /' conftest.$ac_ext >&5
2374
2375    ac_retval=1
2376fi
2377  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378  as_fn_set_status $ac_retval
2379
2380} # ac_fn_c_try_cpp
2381
2382# ac_fn_cxx_try_cpp LINENO
2383# ------------------------
2384# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2385ac_fn_cxx_try_cpp ()
2386{
2387  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388  if { { ac_try="$ac_cpp conftest.$ac_ext"
2389case "(($ac_try" in
2390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391  *) ac_try_echo=$ac_try;;
2392esac
2393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394$as_echo "$ac_try_echo"; } >&5
2395  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2396  ac_status=$?
2397  if test -s conftest.err; then
2398    grep -v '^ *+' conftest.err >conftest.er1
2399    cat conftest.er1 >&5
2400    mv -f conftest.er1 conftest.err
2401  fi
2402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2403  test $ac_status = 0; } > conftest.i && {
2404	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2405	 test ! -s conftest.err
2406       }; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: failed program was:" >&5
2410sed 's/^/| /' conftest.$ac_ext >&5
2411
2412    ac_retval=1
2413fi
2414  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415  as_fn_set_status $ac_retval
2416
2417} # ac_fn_cxx_try_cpp
2418
2419# ac_fn_c_try_link LINENO
2420# -----------------------
2421# Try to link conftest.$ac_ext, and return whether this succeeded.
2422ac_fn_c_try_link ()
2423{
2424  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2425  rm -f conftest.$ac_objext conftest$ac_exeext
2426  if { { ac_try="$ac_link"
2427case "(($ac_try" in
2428  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2429  *) ac_try_echo=$ac_try;;
2430esac
2431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2432$as_echo "$ac_try_echo"; } >&5
2433  (eval "$ac_link") 2>conftest.err
2434  ac_status=$?
2435  if test -s conftest.err; then
2436    grep -v '^ *+' conftest.err >conftest.er1
2437    cat conftest.er1 >&5
2438    mv -f conftest.er1 conftest.err
2439  fi
2440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2441  test $ac_status = 0; } && {
2442	 test -z "$ac_c_werror_flag" ||
2443	 test ! -s conftest.err
2444       } && test -s conftest$ac_exeext && {
2445	 test "$cross_compiling" = yes ||
2446	 test -x conftest$ac_exeext
2447       }; then :
2448  ac_retval=0
2449else
2450  $as_echo "$as_me: failed program was:" >&5
2451sed 's/^/| /' conftest.$ac_ext >&5
2452
2453	ac_retval=1
2454fi
2455  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2456  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2457  # interfere with the next link command; also delete a directory that is
2458  # left behind by Apple's compiler.  We do this before executing the actions.
2459  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2460  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461  as_fn_set_status $ac_retval
2462
2463} # ac_fn_c_try_link
2464
2465# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2466# ---------------------------------------------------------
2467# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2468# the include files in INCLUDES and setting the cache variable VAR
2469# accordingly.
2470ac_fn_cxx_check_header_mongrel ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if eval \${$3+:} false; then :
2474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2475$as_echo_n "checking for $2... " >&6; }
2476if eval \${$3+:} false; then :
2477  $as_echo_n "(cached) " >&6
2478fi
2479eval ac_res=\$$3
2480	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481$as_echo "$ac_res" >&6; }
2482else
2483  # Is the header compilable?
2484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2485$as_echo_n "checking $2 usability... " >&6; }
2486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2487/* end confdefs.h.  */
2488$4
2489#include <$2>
2490_ACEOF
2491if ac_fn_cxx_try_compile "$LINENO"; then :
2492  ac_header_compiler=yes
2493else
2494  ac_header_compiler=no
2495fi
2496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2498$as_echo "$ac_header_compiler" >&6; }
2499
2500# Is the header present?
2501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2502$as_echo_n "checking $2 presence... " >&6; }
2503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2504/* end confdefs.h.  */
2505#include <$2>
2506_ACEOF
2507if ac_fn_cxx_try_cpp "$LINENO"; then :
2508  ac_header_preproc=yes
2509else
2510  ac_header_preproc=no
2511fi
2512rm -f conftest.err conftest.i conftest.$ac_ext
2513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2514$as_echo "$ac_header_preproc" >&6; }
2515
2516# So?  What about this header?
2517case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2518  yes:no: )
2519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2520$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2522$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2523    ;;
2524  no:yes:* )
2525    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2526$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2527    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2528$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2530$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2532$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2533    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2534$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2535( $as_echo "## ----------------------------------------- ##
2536## Report this to build-dev@openjdk.java.net ##
2537## ----------------------------------------- ##"
2538     ) | sed "s/^/$as_me: WARNING:     /" >&2
2539    ;;
2540esac
2541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2542$as_echo_n "checking for $2... " >&6; }
2543if eval \${$3+:} false; then :
2544  $as_echo_n "(cached) " >&6
2545else
2546  eval "$3=\$ac_header_compiler"
2547fi
2548eval ac_res=\$$3
2549	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550$as_echo "$ac_res" >&6; }
2551fi
2552  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2553
2554} # ac_fn_cxx_check_header_mongrel
2555
2556# ac_fn_cxx_try_run LINENO
2557# ------------------------
2558# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2559# that executables *can* be run.
2560ac_fn_cxx_try_run ()
2561{
2562  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2563  if { { ac_try="$ac_link"
2564case "(($ac_try" in
2565  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2566  *) ac_try_echo=$ac_try;;
2567esac
2568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2569$as_echo "$ac_try_echo"; } >&5
2570  (eval "$ac_link") 2>&5
2571  ac_status=$?
2572  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2573  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2574  { { case "(($ac_try" in
2575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2576  *) ac_try_echo=$ac_try;;
2577esac
2578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2579$as_echo "$ac_try_echo"; } >&5
2580  (eval "$ac_try") 2>&5
2581  ac_status=$?
2582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2583  test $ac_status = 0; }; }; then :
2584  ac_retval=0
2585else
2586  $as_echo "$as_me: program exited with status $ac_status" >&5
2587       $as_echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
2589
2590       ac_retval=$ac_status
2591fi
2592  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2593  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594  as_fn_set_status $ac_retval
2595
2596} # ac_fn_cxx_try_run
2597
2598# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2599# ---------------------------------------------------------
2600# Tests whether HEADER exists and can be compiled using the include files in
2601# INCLUDES, setting the cache variable VAR accordingly.
2602ac_fn_cxx_check_header_compile ()
2603{
2604  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2606$as_echo_n "checking for $2... " >&6; }
2607if eval \${$3+:} false; then :
2608  $as_echo_n "(cached) " >&6
2609else
2610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  eval "$3=yes"
2617else
2618  eval "$3=no"
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2626
2627} # ac_fn_cxx_check_header_compile
2628
2629# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2630# ----------------------------------------------
2631# Tries to find the compile-time value of EXPR in a program that includes
2632# INCLUDES, setting VAR accordingly. Returns whether the value could be
2633# computed
2634ac_fn_cxx_compute_int ()
2635{
2636  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2637  if test "$cross_compiling" = yes; then
2638    # Depending upon the size, compute the lo and hi bounds.
2639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641$4
2642int
2643main ()
2644{
2645static int test_array [1 - 2 * !(($2) >= 0)];
2646test_array [0] = 0;
2647return test_array [0];
2648
2649  ;
2650  return 0;
2651}
2652_ACEOF
2653if ac_fn_cxx_try_compile "$LINENO"; then :
2654  ac_lo=0 ac_mid=0
2655  while :; do
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; break
2672else
2673  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2674			if test $ac_lo -le $ac_mid; then
2675			  ac_lo= ac_hi=
2676			  break
2677			fi
2678			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681  done
2682else
2683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h.  */
2685$4
2686int
2687main ()
2688{
2689static int test_array [1 - 2 * !(($2) < 0)];
2690test_array [0] = 0;
2691return test_array [0];
2692
2693  ;
2694  return 0;
2695}
2696_ACEOF
2697if ac_fn_cxx_try_compile "$LINENO"; then :
2698  ac_hi=-1 ac_mid=-1
2699  while :; do
2700    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701/* end confdefs.h.  */
2702$4
2703int
2704main ()
2705{
2706static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2707test_array [0] = 0;
2708return test_array [0];
2709
2710  ;
2711  return 0;
2712}
2713_ACEOF
2714if ac_fn_cxx_try_compile "$LINENO"; then :
2715  ac_lo=$ac_mid; break
2716else
2717  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2718			if test $ac_mid -le $ac_hi; then
2719			  ac_lo= ac_hi=
2720			  break
2721			fi
2722			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2723fi
2724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2725  done
2726else
2727  ac_lo= ac_hi=
2728fi
2729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2730fi
2731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732# Binary search between lo and hi bounds.
2733while test "x$ac_lo" != "x$ac_hi"; do
2734  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736/* end confdefs.h.  */
2737$4
2738int
2739main ()
2740{
2741static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2742test_array [0] = 0;
2743return test_array [0];
2744
2745  ;
2746  return 0;
2747}
2748_ACEOF
2749if ac_fn_cxx_try_compile "$LINENO"; then :
2750  ac_hi=$ac_mid
2751else
2752  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2753fi
2754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2755done
2756case $ac_lo in #((
2757?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2758'') ac_retval=1 ;;
2759esac
2760  else
2761    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764static long int longval () { return $2; }
2765static unsigned long int ulongval () { return $2; }
2766#include <stdio.h>
2767#include <stdlib.h>
2768int
2769main ()
2770{
2771
2772  FILE *f = fopen ("conftest.val", "w");
2773  if (! f)
2774    return 1;
2775  if (($2) < 0)
2776    {
2777      long int i = longval ();
2778      if (i != ($2))
2779	return 1;
2780      fprintf (f, "%ld", i);
2781    }
2782  else
2783    {
2784      unsigned long int i = ulongval ();
2785      if (i != ($2))
2786	return 1;
2787      fprintf (f, "%lu", i);
2788    }
2789  /* Do not output a trailing newline, as this causes \r\n confusion
2790     on some platforms.  */
2791  return ferror (f) || fclose (f) != 0;
2792
2793  ;
2794  return 0;
2795}
2796_ACEOF
2797if ac_fn_cxx_try_run "$LINENO"; then :
2798  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2799else
2800  ac_retval=1
2801fi
2802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2803  conftest.$ac_objext conftest.beam conftest.$ac_ext
2804rm -f conftest.val
2805
2806  fi
2807  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2808  as_fn_set_status $ac_retval
2809
2810} # ac_fn_cxx_compute_int
2811
2812# ac_fn_cxx_try_link LINENO
2813# -------------------------
2814# Try to link conftest.$ac_ext, and return whether this succeeded.
2815ac_fn_cxx_try_link ()
2816{
2817  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2818  rm -f conftest.$ac_objext conftest$ac_exeext
2819  if { { ac_try="$ac_link"
2820case "(($ac_try" in
2821  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2822  *) ac_try_echo=$ac_try;;
2823esac
2824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2825$as_echo "$ac_try_echo"; } >&5
2826  (eval "$ac_link") 2>conftest.err
2827  ac_status=$?
2828  if test -s conftest.err; then
2829    grep -v '^ *+' conftest.err >conftest.er1
2830    cat conftest.er1 >&5
2831    mv -f conftest.er1 conftest.err
2832  fi
2833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2834  test $ac_status = 0; } && {
2835	 test -z "$ac_cxx_werror_flag" ||
2836	 test ! -s conftest.err
2837       } && test -s conftest$ac_exeext && {
2838	 test "$cross_compiling" = yes ||
2839	 test -x conftest$ac_exeext
2840       }; then :
2841  ac_retval=0
2842else
2843  $as_echo "$as_me: failed program was:" >&5
2844sed 's/^/| /' conftest.$ac_ext >&5
2845
2846	ac_retval=1
2847fi
2848  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2849  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2850  # interfere with the next link command; also delete a directory that is
2851  # left behind by Apple's compiler.  We do this before executing the actions.
2852  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2853  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2854  as_fn_set_status $ac_retval
2855
2856} # ac_fn_cxx_try_link
2857
2858# ac_fn_cxx_check_func LINENO FUNC VAR
2859# ------------------------------------
2860# Tests whether FUNC exists, setting the cache variable VAR accordingly
2861ac_fn_cxx_check_func ()
2862{
2863  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2865$as_echo_n "checking for $2... " >&6; }
2866if eval \${$3+:} false; then :
2867  $as_echo_n "(cached) " >&6
2868else
2869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2870/* end confdefs.h.  */
2871/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2872   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2873#define $2 innocuous_$2
2874
2875/* System header to define __stub macros and hopefully few prototypes,
2876    which can conflict with char $2 (); below.
2877    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2878    <limits.h> exists even on freestanding compilers.  */
2879
2880#ifdef __STDC__
2881# include <limits.h>
2882#else
2883# include <assert.h>
2884#endif
2885
2886#undef $2
2887
2888/* Override any GCC internal prototype to avoid an error.
2889   Use char because int might match the return type of a GCC
2890   builtin and then its argument prototype would still apply.  */
2891#ifdef __cplusplus
2892extern "C"
2893#endif
2894char $2 ();
2895/* The GNU C library defines this for functions which it implements
2896    to always fail with ENOSYS.  Some functions are actually named
2897    something starting with __ and the normal name is an alias.  */
2898#if defined __stub_$2 || defined __stub___$2
2899choke me
2900#endif
2901
2902int
2903main ()
2904{
2905return $2 ();
2906  ;
2907  return 0;
2908}
2909_ACEOF
2910if ac_fn_cxx_try_link "$LINENO"; then :
2911  eval "$3=yes"
2912else
2913  eval "$3=no"
2914fi
2915rm -f core conftest.err conftest.$ac_objext \
2916    conftest$ac_exeext conftest.$ac_ext
2917fi
2918eval ac_res=\$$3
2919	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2920$as_echo "$ac_res" >&6; }
2921  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2922
2923} # ac_fn_cxx_check_func
2924
2925# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2926# -------------------------------------------------------
2927# Tests whether HEADER exists and can be compiled using the include files in
2928# INCLUDES, setting the cache variable VAR accordingly.
2929ac_fn_c_check_header_compile ()
2930{
2931  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2933$as_echo_n "checking for $2... " >&6; }
2934if eval \${$3+:} false; then :
2935  $as_echo_n "(cached) " >&6
2936else
2937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2938/* end confdefs.h.  */
2939$4
2940#include <$2>
2941_ACEOF
2942if ac_fn_c_try_compile "$LINENO"; then :
2943  eval "$3=yes"
2944else
2945  eval "$3=no"
2946fi
2947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2948fi
2949eval ac_res=\$$3
2950	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2951$as_echo "$ac_res" >&6; }
2952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2953
2954} # ac_fn_c_check_header_compile
2955cat >config.log <<_ACEOF
2956This file contains any messages produced by compilers while
2957running configure, to aid debugging if configure makes a mistake.
2958
2959It was created by OpenJDK $as_me jdk9, which was
2960generated by GNU Autoconf 2.69.  Invocation command line was
2961
2962  $ $0 $@
2963
2964_ACEOF
2965exec 5>>config.log
2966{
2967cat <<_ASUNAME
2968## --------- ##
2969## Platform. ##
2970## --------- ##
2971
2972hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2973uname -m = `(uname -m) 2>/dev/null || echo unknown`
2974uname -r = `(uname -r) 2>/dev/null || echo unknown`
2975uname -s = `(uname -s) 2>/dev/null || echo unknown`
2976uname -v = `(uname -v) 2>/dev/null || echo unknown`
2977
2978/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2979/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2980
2981/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2982/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2983/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2984/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2985/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2986/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2987/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2988
2989_ASUNAME
2990
2991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2992for as_dir in $PATH
2993do
2994  IFS=$as_save_IFS
2995  test -z "$as_dir" && as_dir=.
2996    $as_echo "PATH: $as_dir"
2997  done
2998IFS=$as_save_IFS
2999
3000} >&5
3001
3002cat >&5 <<_ACEOF
3003
3004
3005## ----------- ##
3006## Core tests. ##
3007## ----------- ##
3008
3009_ACEOF
3010
3011
3012# Keep a trace of the command line.
3013# Strip out --no-create and --no-recursion so they do not pile up.
3014# Strip out --silent because we don't want to record it for future runs.
3015# Also quote any args containing shell meta-characters.
3016# Make two passes to allow for proper duplicate-argument suppression.
3017ac_configure_args=
3018ac_configure_args0=
3019ac_configure_args1=
3020ac_must_keep_next=false
3021for ac_pass in 1 2
3022do
3023  for ac_arg
3024  do
3025    case $ac_arg in
3026    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3027    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3028    | -silent | --silent | --silen | --sile | --sil)
3029      continue ;;
3030    *\'*)
3031      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3032    esac
3033    case $ac_pass in
3034    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3035    2)
3036      as_fn_append ac_configure_args1 " '$ac_arg'"
3037      if test $ac_must_keep_next = true; then
3038	ac_must_keep_next=false # Got value, back to normal.
3039      else
3040	case $ac_arg in
3041	  *=* | --config-cache | -C | -disable-* | --disable-* \
3042	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3043	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3044	  | -with-* | --with-* | -without-* | --without-* | --x)
3045	    case "$ac_configure_args0 " in
3046	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3047	    esac
3048	    ;;
3049	  -* ) ac_must_keep_next=true ;;
3050	esac
3051      fi
3052      as_fn_append ac_configure_args " '$ac_arg'"
3053      ;;
3054    esac
3055  done
3056done
3057{ ac_configure_args0=; unset ac_configure_args0;}
3058{ ac_configure_args1=; unset ac_configure_args1;}
3059
3060# When interrupted or exit'd, cleanup temporary files, and complete
3061# config.log.  We remove comments because anyway the quotes in there
3062# would cause problems or look ugly.
3063# WARNING: Use '\'' to represent an apostrophe within the trap.
3064# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3065trap 'exit_status=$?
3066  # Save into config.log some information that might help in debugging.
3067  {
3068    echo
3069
3070    $as_echo "## ---------------- ##
3071## Cache variables. ##
3072## ---------------- ##"
3073    echo
3074    # The following way of writing the cache mishandles newlines in values,
3075(
3076  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3077    eval ac_val=\$$ac_var
3078    case $ac_val in #(
3079    *${as_nl}*)
3080      case $ac_var in #(
3081      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3082$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3083      esac
3084      case $ac_var in #(
3085      _ | IFS | as_nl) ;; #(
3086      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3087      *) { eval $ac_var=; unset $ac_var;} ;;
3088      esac ;;
3089    esac
3090  done
3091  (set) 2>&1 |
3092    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3093    *${as_nl}ac_space=\ *)
3094      sed -n \
3095	"s/'\''/'\''\\\\'\'''\''/g;
3096	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3097      ;; #(
3098    *)
3099      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3100      ;;
3101    esac |
3102    sort
3103)
3104    echo
3105
3106    $as_echo "## ----------------- ##
3107## Output variables. ##
3108## ----------------- ##"
3109    echo
3110    for ac_var in $ac_subst_vars
3111    do
3112      eval ac_val=\$$ac_var
3113      case $ac_val in
3114      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3115      esac
3116      $as_echo "$ac_var='\''$ac_val'\''"
3117    done | sort
3118    echo
3119
3120    if test -n "$ac_subst_files"; then
3121      $as_echo "## ------------------- ##
3122## File substitutions. ##
3123## ------------------- ##"
3124      echo
3125      for ac_var in $ac_subst_files
3126      do
3127	eval ac_val=\$$ac_var
3128	case $ac_val in
3129	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3130	esac
3131	$as_echo "$ac_var='\''$ac_val'\''"
3132      done | sort
3133      echo
3134    fi
3135
3136    if test -s confdefs.h; then
3137      $as_echo "## ----------- ##
3138## confdefs.h. ##
3139## ----------- ##"
3140      echo
3141      cat confdefs.h
3142      echo
3143    fi
3144    test "$ac_signal" != 0 &&
3145      $as_echo "$as_me: caught signal $ac_signal"
3146    $as_echo "$as_me: exit $exit_status"
3147  } >&5
3148  rm -f core *.core core.conftest.* &&
3149    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3150    exit $exit_status
3151' 0
3152for ac_signal in 1 2 13 15; do
3153  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3154done
3155ac_signal=0
3156
3157# confdefs.h avoids OS command line length limits that DEFS can exceed.
3158rm -f -r conftest* confdefs.h
3159
3160$as_echo "/* confdefs.h */" > confdefs.h
3161
3162# Predefined preprocessor variables.
3163
3164cat >>confdefs.h <<_ACEOF
3165#define PACKAGE_NAME "$PACKAGE_NAME"
3166_ACEOF
3167
3168cat >>confdefs.h <<_ACEOF
3169#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3170_ACEOF
3171
3172cat >>confdefs.h <<_ACEOF
3173#define PACKAGE_VERSION "$PACKAGE_VERSION"
3174_ACEOF
3175
3176cat >>confdefs.h <<_ACEOF
3177#define PACKAGE_STRING "$PACKAGE_STRING"
3178_ACEOF
3179
3180cat >>confdefs.h <<_ACEOF
3181#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3182_ACEOF
3183
3184cat >>confdefs.h <<_ACEOF
3185#define PACKAGE_URL "$PACKAGE_URL"
3186_ACEOF
3187
3188
3189# Let the site file select an alternate cache file if it wants to.
3190# Prefer an explicitly selected file to automatically selected ones.
3191ac_site_file1=NONE
3192ac_site_file2=NONE
3193if test -n "$CONFIG_SITE"; then
3194  # We do not want a PATH search for config.site.
3195  case $CONFIG_SITE in #((
3196    -*)  ac_site_file1=./$CONFIG_SITE;;
3197    */*) ac_site_file1=$CONFIG_SITE;;
3198    *)   ac_site_file1=./$CONFIG_SITE;;
3199  esac
3200elif test "x$prefix" != xNONE; then
3201  ac_site_file1=$prefix/share/config.site
3202  ac_site_file2=$prefix/etc/config.site
3203else
3204  ac_site_file1=$ac_default_prefix/share/config.site
3205  ac_site_file2=$ac_default_prefix/etc/config.site
3206fi
3207for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3208do
3209  test "x$ac_site_file" = xNONE && continue
3210  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3211    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3212$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3213    sed 's/^/| /' "$ac_site_file" >&5
3214    . "$ac_site_file" \
3215      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3217as_fn_error $? "failed to load site script $ac_site_file
3218See \`config.log' for more details" "$LINENO" 5; }
3219  fi
3220done
3221
3222if test -r "$cache_file"; then
3223  # Some versions of bash will fail to source /dev/null (special files
3224  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3225  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3226    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3227$as_echo "$as_me: loading cache $cache_file" >&6;}
3228    case $cache_file in
3229      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3230      *)                      . "./$cache_file";;
3231    esac
3232  fi
3233else
3234  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3235$as_echo "$as_me: creating cache $cache_file" >&6;}
3236  >$cache_file
3237fi
3238
3239# Check that the precious variables saved in the cache have kept the same
3240# value.
3241ac_cache_corrupted=false
3242for ac_var in $ac_precious_vars; do
3243  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3244  eval ac_new_set=\$ac_env_${ac_var}_set
3245  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3246  eval ac_new_val=\$ac_env_${ac_var}_value
3247  case $ac_old_set,$ac_new_set in
3248    set,)
3249      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3250$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3251      ac_cache_corrupted=: ;;
3252    ,set)
3253      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3254$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3255      ac_cache_corrupted=: ;;
3256    ,);;
3257    *)
3258      if test "x$ac_old_val" != "x$ac_new_val"; then
3259	# differences in whitespace do not lead to failure.
3260	ac_old_val_w=`echo x $ac_old_val`
3261	ac_new_val_w=`echo x $ac_new_val`
3262	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3263	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3264$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3265	  ac_cache_corrupted=:
3266	else
3267	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3268$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3269	  eval $ac_var=\$ac_old_val
3270	fi
3271	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3272$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3273	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3274$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3275      fi;;
3276  esac
3277  # Pass precious variables to config.status.
3278  if test "$ac_new_set" = set; then
3279    case $ac_new_val in
3280    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3281    *) ac_arg=$ac_var=$ac_new_val ;;
3282    esac
3283    case " $ac_configure_args " in
3284      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3285      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3286    esac
3287  fi
3288done
3289if $ac_cache_corrupted; then
3290  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3292  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3293$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3294  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3295fi
3296## -------------------- ##
3297## Main body of script. ##
3298## -------------------- ##
3299
3300ac_ext=c
3301ac_cpp='$CPP $CPPFLAGS'
3302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3304ac_compiler_gnu=$ac_cv_c_compiler_gnu
3305
3306
3307
3308ac_aux_dir=
3309for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3310  if test -f "$ac_dir/install-sh"; then
3311    ac_aux_dir=$ac_dir
3312    ac_install_sh="$ac_aux_dir/install-sh -c"
3313    break
3314  elif test -f "$ac_dir/install.sh"; then
3315    ac_aux_dir=$ac_dir
3316    ac_install_sh="$ac_aux_dir/install.sh -c"
3317    break
3318  elif test -f "$ac_dir/shtool"; then
3319    ac_aux_dir=$ac_dir
3320    ac_install_sh="$ac_aux_dir/shtool install -c"
3321    break
3322  fi
3323done
3324if test -z "$ac_aux_dir"; then
3325  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
3326fi
3327
3328# These three variables are undocumented and unsupported,
3329# and are intended to be withdrawn in a future Autoconf release.
3330# They can cause serious problems if a builder's source tree is in a directory
3331# whose full name contains unusual characters.
3332ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3333ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3334ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3335
3336
3337# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3338
3339#
3340# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3341# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3342#
3343# This code is free software; you can redistribute it and/or modify it
3344# under the terms of the GNU General Public License version 2 only, as
3345# published by the Free Software Foundation.  Oracle designates this
3346# particular file as subject to the "Classpath" exception as provided
3347# by Oracle in the LICENSE file that accompanied this code.
3348#
3349# This code is distributed in the hope that it will be useful, but WITHOUT
3350# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3351# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3352# version 2 for more details (a copy is included in the LICENSE file that
3353# accompanied this code).
3354#
3355# You should have received a copy of the GNU General Public License version
3356# 2 along with this work; if not, write to the Free Software Foundation,
3357# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3358#
3359# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3360# or visit www.oracle.com if you need additional information or have any
3361# questions.
3362#
3363
3364#
3365# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3366#
3367# This program is free software; you can redistribute it and/or modify
3368# it under the terms of the GNU General Public License as published by
3369# the Free Software Foundation; either version 2 of the License, or
3370# (at your option) any later version.
3371#
3372# This program is distributed in the hope that it will be useful, but
3373# WITHOUT ANY WARRANTY; without even the implied warranty of
3374# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3375# General Public License for more details.
3376#
3377# You should have received a copy of the GNU General Public License
3378# along with this program; if not, write to the Free Software
3379# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3380#
3381# As a special exception to the GNU General Public License, if you
3382# distribute this file as part of a program that contains a
3383# configuration script generated by Autoconf, you may include it under
3384# the same distribution terms that you use for the rest of that program.
3385
3386# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3387# ----------------------------------
3388# PKG_PROG_PKG_CONFIG
3389
3390# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3391#
3392# Check to see whether a particular set of modules exists.  Similar
3393# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3394#
3395#
3396# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3397# this or PKG_CHECK_MODULES is called, or make sure to call
3398# PKG_CHECK_EXISTS manually
3399# --------------------------------------------------------------
3400
3401
3402
3403# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3404# ---------------------------------------------
3405# _PKG_CONFIG
3406
3407# _PKG_SHORT_ERRORS_SUPPORTED
3408# -----------------------------
3409# _PKG_SHORT_ERRORS_SUPPORTED
3410
3411
3412# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3413# [ACTION-IF-NOT-FOUND])
3414#
3415#
3416# Note that if there is a possibility the first call to
3417# PKG_CHECK_MODULES might not happen, you should be sure to include an
3418# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3419#
3420#
3421# --------------------------------------------------------------
3422# PKG_CHECK_MODULES
3423
3424
3425# Include these first...
3426#
3427# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3428# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3429#
3430# This code is free software; you can redistribute it and/or modify it
3431# under the terms of the GNU General Public License version 2 only, as
3432# published by the Free Software Foundation.  Oracle designates this
3433# particular file as subject to the "Classpath" exception as provided
3434# by Oracle in the LICENSE file that accompanied this code.
3435#
3436# This code is distributed in the hope that it will be useful, but WITHOUT
3437# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3438# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3439# version 2 for more details (a copy is included in the LICENSE file that
3440# accompanied this code).
3441#
3442# You should have received a copy of the GNU General Public License version
3443# 2 along with this work; if not, write to the Free Software Foundation,
3444# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3445#
3446# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3447# or visit www.oracle.com if you need additional information or have any
3448# questions.
3449#
3450
3451# Create a function/macro that takes a series of named arguments. The call is
3452# similar to AC_DEFUN, but the setup of the function looks like this:
3453# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3454# ... do something
3455#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3456# ])
3457# A star (*) in front of a named argument means that it is required and it's
3458# presence will be verified. To pass e.g. the first value as a normal indexed
3459# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3460# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3461# "ARG_FOO".
3462#
3463# The generated function can be called like this:
3464# MYFUNC(FOO: [foo-val], BAR:
3465#     [
3466#         $ECHO hello world
3467#     ])
3468#
3469#
3470# Argument 1: Name of the function to define
3471# Argument 2: List of legal named arguments, with a * prefix for required arguments
3472# Argument 3: Argument array to treat as named, typically $@
3473# Argument 4: The main function body
3474
3475
3476# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3477# If so, then append $1 to $2 \
3478# Also set JVM_ARG_OK to true/false depending on outcome.
3479
3480
3481# Appends a string to a path variable, only adding the : when needed.
3482
3483
3484# Prepends a string to a path variable, only adding the : when needed.
3485
3486
3487# This will make sure the given variable points to a full and proper
3488# path. This means:
3489# 1) There will be no spaces in the path. On unix platforms,
3490#    spaces in the path will result in an error. On Windows,
3491#    the path will be rewritten using short-style to be space-free.
3492# 2) The path will be absolute, and it will be in unix-style (on
3493#     cygwin).
3494# $1: The name of the variable to fix
3495
3496
3497# This will make sure the given variable points to a executable
3498# with a full and proper path. This means:
3499# 1) There will be no spaces in the path. On unix platforms,
3500#    spaces in the path will result in an error. On Windows,
3501#    the path will be rewritten using short-style to be space-free.
3502# 2) The path will be absolute, and it will be in unix-style (on
3503#     cygwin).
3504# Any arguments given to the executable is preserved.
3505# If the input variable does not have a directory specification, then
3506# it need to be in the PATH.
3507# $1: The name of the variable to fix
3508
3509
3510
3511
3512# Register a --with argument but mark it as deprecated
3513# $1: The name of the with argument to deprecate, not including --with-
3514
3515
3516# Register a --enable argument but mark it as deprecated
3517# $1: The name of the with argument to deprecate, not including --enable-
3518# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3519# $3: Messages to user.
3520
3521
3522
3523
3524# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3525# $1: variable to check
3526
3527
3528# Check that there are no unprocessed overridden variables left.
3529# If so, they are an incorrect argument and we will exit with an error.
3530
3531
3532# Setup a tool for the given variable. If correctly specified by the user,
3533# use that value, otherwise search for the tool using the supplied code snippet.
3534# $1: variable to set
3535# $2: code snippet to call to look for the tool
3536# $3: code snippet to call if variable was used to find tool
3537
3538
3539# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3540# $1: variable to set
3541# $2: executable name (or list of names) to look for
3542
3543
3544# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3545# $1: variable to set
3546# $2: executable name (or list of names) to look for
3547
3548
3549# Like BASIC_PATH_PROGS but fails if no tool was found.
3550# $1: variable to set
3551# $2: executable name (or list of names) to look for
3552
3553
3554# Like BASIC_SETUP_TOOL but fails if no tool was found.
3555# $1: variable to set
3556# $2: autoconf macro to call to look for the special tool
3557
3558
3559# Setup the most fundamental tools that relies on not much else to set up,
3560# but is used by much of the early bootstrap code.
3561
3562
3563# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3564
3565
3566# Evaluates platform specific overrides for devkit variables.
3567# $1: Name of variable
3568
3569
3570
3571
3572
3573
3574#%%% Simple tools %%%
3575
3576# Check if we have found a usable version of make
3577# $1: the path to a potential make binary (or empty)
3578# $2: the description on how we found this
3579
3580
3581
3582
3583# Goes looking for a usable version of GNU make.
3584
3585
3586
3587
3588
3589
3590# Check if build directory is on local disk. If not possible to determine,
3591# we prefer to claim it's local.
3592# Argument 1: directory to test
3593# Argument 2: what to do if it is on local disk
3594# Argument 3: what to do otherwise (remote disk or failure)
3595
3596
3597# Check that source files have basic read permissions set. This might
3598# not be the case in cygwin in certain conditions.
3599
3600
3601
3602
3603# Check for support for specific options in bash
3604
3605
3606################################################################################
3607#
3608# Default make target
3609#
3610
3611
3612# Code to run after AC_OUTPUT
3613
3614
3615#
3616# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3618#
3619# This code is free software; you can redistribute it and/or modify it
3620# under the terms of the GNU General Public License version 2 only, as
3621# published by the Free Software Foundation.  Oracle designates this
3622# particular file as subject to the "Classpath" exception as provided
3623# by Oracle in the LICENSE file that accompanied this code.
3624#
3625# This code is distributed in the hope that it will be useful, but WITHOUT
3626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3628# version 2 for more details (a copy is included in the LICENSE file that
3629# accompanied this code).
3630#
3631# You should have received a copy of the GNU General Public License version
3632# 2 along with this work; if not, write to the Free Software Foundation,
3633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3634#
3635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3636# or visit www.oracle.com if you need additional information or have any
3637# questions.
3638#
3639
3640
3641
3642
3643
3644# Helper function which possibly converts a path using DOS-style short mode.
3645# If so, the updated path is stored in $new_path.
3646# $1: The path to check
3647
3648
3649# Helper function which possibly converts a path using DOS-style short mode.
3650# If so, the updated path is stored in $new_path.
3651# $1: The path to check
3652
3653
3654# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3655# and could probably be heavily simplified. However, all changes in this
3656# area tend to need lot of testing in different scenarios, and in lack of
3657# proper unit testing, cleaning this up has not been deemed worth the effort
3658# at the moment.
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3669
3670
3671
3672
3673# ... then the rest
3674#
3675# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3676# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3677#
3678# This code is free software; you can redistribute it and/or modify it
3679# under the terms of the GNU General Public License version 2 only, as
3680# published by the Free Software Foundation.  Oracle designates this
3681# particular file as subject to the "Classpath" exception as provided
3682# by Oracle in the LICENSE file that accompanied this code.
3683#
3684# This code is distributed in the hope that it will be useful, but WITHOUT
3685# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3686# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3687# version 2 for more details (a copy is included in the LICENSE file that
3688# accompanied this code).
3689#
3690# You should have received a copy of the GNU General Public License version
3691# 2 along with this work; if not, write to the Free Software Foundation,
3692# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3693#
3694# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3695# or visit www.oracle.com if you need additional information or have any
3696# questions.
3697#
3698
3699########################################################################
3700# This file handles detection of the Boot JDK. The Boot JDK detection
3701# process has been developed as a response to solve a complex real-world
3702# problem. Initially, it was simple, but it has grown as platform after
3703# platform, idiosyncracy after idiosyncracy has been supported.
3704#
3705# The basic idea is this:
3706# 1) You need an acceptable *) JDK to use as a Boot JDK
3707# 2) There are several ways to locate a JDK, that are mostly platform
3708#    dependent **)
3709# 3) You can have multiple JDKs installed
3710# 4) If possible, configure should try to dig out an acceptable JDK
3711#    automatically, without having to resort to command-line options
3712#
3713# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3714#     javac) and not a JRE, etc.
3715#
3716# **) On Windows we typically use a well-known path.
3717#     On MacOSX we typically use the tool java_home.
3718#     On Linux we typically find javac in the $PATH, and then follow a
3719#     chain of symlinks that often ends up in a real JDK.
3720#
3721# This leads to the code where we check in different ways to locate a
3722# JDK, and if one is found, check if it is acceptable. If not, we print
3723# our reasons for rejecting it (useful when debugging non-working
3724# configure situations) and continue checking the next one.
3725########################################################################
3726
3727# Execute the check given as argument, and verify the result
3728# If the Boot JDK was previously found, do nothing
3729# $1 A command line (typically autoconf macro) to execute
3730
3731
3732# Test: Is bootjdk explicitely set by command line arguments?
3733
3734
3735# Test: Is $JAVA_HOME set?
3736
3737
3738# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3739
3740
3741# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3742# $1: Argument to the java_home binary (optional)
3743
3744
3745# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3746
3747
3748# Look for a jdk in the given path. If there are multiple, try to select the newest.
3749# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3750# $1 = Path to directory containing jdk installations.
3751# $2 = String to append to the found JDK directory to get the proper JDK home
3752
3753
3754# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3755# environmental variable as base for where to look.
3756# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3757
3758
3759# Test: Is there a JDK installed in default, well-known locations?
3760
3761
3762# Check that a command-line tool in the Boot JDK is correct
3763# $1 = name of variable to assign
3764# $2 = name of binary
3765
3766
3767###############################################################################
3768#
3769# We need a Boot JDK to bootstrap the build.
3770#
3771
3772
3773
3774
3775
3776#
3777# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3778# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3779#
3780# This code is free software; you can redistribute it and/or modify it
3781# under the terms of the GNU General Public License version 2 only, as
3782# published by the Free Software Foundation.  Oracle designates this
3783# particular file as subject to the "Classpath" exception as provided
3784# by Oracle in the LICENSE file that accompanied this code.
3785#
3786# This code is distributed in the hope that it will be useful, but WITHOUT
3787# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3788# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3789# version 2 for more details (a copy is included in the LICENSE file that
3790# accompanied this code).
3791#
3792# You should have received a copy of the GNU General Public License version
3793# 2 along with this work; if not, write to the Free Software Foundation,
3794# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3795#
3796# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3797# or visit www.oracle.com if you need additional information or have any
3798# questions.
3799#
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817################################################################################
3818#
3819# Runs icecc-create-env once and prints the error if it fails
3820#
3821# $1: arguments to icecc-create-env
3822# $2: log file
3823#
3824
3825
3826################################################################################
3827#
3828# Optionally enable distributed compilation of native code using icecc/icecream
3829#
3830
3831
3832
3833
3834
3835
3836
3837#
3838# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3839# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3840#
3841# This code is free software; you can redistribute it and/or modify it
3842# under the terms of the GNU General Public License version 2 only, as
3843# published by the Free Software Foundation.  Oracle designates this
3844# particular file as subject to the "Classpath" exception as provided
3845# by Oracle in the LICENSE file that accompanied this code.
3846#
3847# This code is distributed in the hope that it will be useful, but WITHOUT
3848# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3849# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3850# version 2 for more details (a copy is included in the LICENSE file that
3851# accompanied this code).
3852#
3853# You should have received a copy of the GNU General Public License version
3854# 2 along with this work; if not, write to the Free Software Foundation,
3855# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3856#
3857# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3858# or visit www.oracle.com if you need additional information or have any
3859# questions.
3860#
3861
3862# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3863# corresponding configure arguments instead
3864
3865
3866# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3867# that configure can use them while detecting compilers.
3868# TOOLCHAIN_TYPE is available here.
3869# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3870
3871
3872
3873
3874
3875
3876# Documentation on common flags used for solstudio in HIGHEST.
3877#
3878# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3879#          done with care, there are some assumptions below that need to
3880#          be understood about the use of pointers, and IEEE behavior.
3881#
3882# -fns: Use non-standard floating point mode (not IEEE 754)
3883# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3884# -fsingle: Use single precision floating point with 'float'
3885# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3886#   (Source with excessing pointer casting and data access with mixed
3887#    pointer types are not recommended)
3888# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3889#   (If you expect perfect errno behavior, do not use this)
3890# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3891# -xrestrict: Pointer parameters to functions do not overlap
3892#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3893#    If you pass in multiple pointers to the same data, do not use this)
3894# -xlibmil: Inline some library routines
3895#   (If you expect perfect errno behavior, do not use this)
3896# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3897#   (If you expect perfect errno behavior, do not use this)
3898#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3899
3900    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3901    # Bug?
3902    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3903    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3904    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3905    #fi
3906
3907
3908
3909
3910
3911# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3912#                                   IF_FALSE: [RUN-IF-FALSE])
3913# ------------------------------------------------------------
3914# Check that the c and c++ compilers support an argument
3915
3916
3917
3918
3919# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3920#                                   IF_FALSE: [RUN-IF-FALSE])
3921# ------------------------------------------------------------
3922# Check that the linker support an argument
3923
3924
3925
3926
3927
3928
3929#
3930# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3931# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932#
3933# This code is free software; you can redistribute it and/or modify it
3934# under the terms of the GNU General Public License version 2 only, as
3935# published by the Free Software Foundation.  Oracle designates this
3936# particular file as subject to the "Classpath" exception as provided
3937# by Oracle in the LICENSE file that accompanied this code.
3938#
3939# This code is distributed in the hope that it will be useful, but WITHOUT
3940# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942# version 2 for more details (a copy is included in the LICENSE file that
3943# accompanied this code).
3944#
3945# You should have received a copy of the GNU General Public License version
3946# 2 along with this work; if not, write to the Free Software Foundation,
3947# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948#
3949# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950# or visit www.oracle.com if you need additional information or have any
3951# questions.
3952#
3953
3954
3955
3956
3957
3958cygwin_help() {
3959  case $1 in
3960    unzip)
3961      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3962      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3963      ;;
3964    zip)
3965      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3966      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3967      ;;
3968    make)
3969      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3970      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3971      ;;
3972    freetype)
3973      HELP_MSG="
3974The freetype library can now be build during the configure process.
3975Download the freetype sources and unpack them into an arbitrary directory:
3976
3977wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3978tar -xzf freetype-2.5.3.tar.gz
3979
3980Then run configure with '--with-freetype-src=<freetype_src>'. This will
3981automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3982builds or into '<freetype_src>/lib32' for 32-bit builds.
3983Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3984and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3985
3986Alternatively you can unpack the sources like this to use the default directory:
3987
3988tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3989      ;;
3990  esac
3991}
3992
3993msys_help() {
3994  PKGHANDLER_COMMAND=""
3995}
3996
3997apt_help() {
3998  case $1 in
3999    reduced)
4000      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4001    devkit)
4002      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4003    openjdk)
4004      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4005    alsa)
4006      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4007    cups)
4008      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4009    freetype)
4010      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4011    ffi)
4012      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4013    x11)
4014      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4015    ccache)
4016      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4017  esac
4018}
4019
4020yum_help() {
4021  case $1 in
4022    devkit)
4023      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4024    openjdk)
4025      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4026    alsa)
4027      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4028    cups)
4029      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4030    freetype)
4031      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4032    x11)
4033      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4034    ccache)
4035      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4036  esac
4037}
4038
4039port_help() {
4040  PKGHANDLER_COMMAND=""
4041}
4042
4043pkgutil_help() {
4044  PKGHANDLER_COMMAND=""
4045}
4046
4047pkgadd_help() {
4048  PKGHANDLER_COMMAND=""
4049}
4050
4051# This function will check if we're called from the "configure" wrapper while
4052# printing --help. If so, we will print out additional information that can
4053# only be extracted within the autoconf script, and then exit. This must be
4054# called at the very beginning in configure.ac.
4055
4056
4057
4058
4059
4060
4061#
4062# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4063# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4064#
4065# This code is free software; you can redistribute it and/or modify it
4066# under the terms of the GNU General Public License version 2 only, as
4067# published by the Free Software Foundation.  Oracle designates this
4068# particular file as subject to the "Classpath" exception as provided
4069# by Oracle in the LICENSE file that accompanied this code.
4070#
4071# This code is distributed in the hope that it will be useful, but WITHOUT
4072# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4073# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4074# version 2 for more details (a copy is included in the LICENSE file that
4075# accompanied this code).
4076#
4077# You should have received a copy of the GNU General Public License version
4078# 2 along with this work; if not, write to the Free Software Foundation,
4079# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4080#
4081# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4082# or visit www.oracle.com if you need additional information or have any
4083# questions.
4084#
4085
4086###############################################################################
4087# Check which interpreter of the JVM we want to build.
4088# Currently we have:
4089#    template: Template interpreter (the default)
4090#    cpp     : C++ interpreter
4091
4092
4093###############################################################################
4094# Check which variants of the JVM that we want to build.
4095# Currently we have:
4096#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4097#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4098#    minimal1: reduced form of client with optional VM services and features stripped out
4099#    zero: no machine code interpreter, no compiler
4100#    zeroshark: zero interpreter and shark/llvm compiler backend
4101#    core: interpreter only, no compiler (only works on some platforms)
4102
4103
4104
4105###############################################################################
4106# Setup legacy vars/targets and new vars to deal with different debug levels.
4107#
4108#    release: no debug information, all optimizations, no asserts.
4109#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4110#    fastdebug: debug information (-g), all optimizations, all asserts
4111#    slowdebug: debug information (-g), no optimizations, all asserts
4112#
4113
4114
4115
4116
4117
4118
4119#
4120# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4121# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122#
4123# This code is free software; you can redistribute it and/or modify it
4124# under the terms of the GNU General Public License version 2 only, as
4125# published by the Free Software Foundation.  Oracle designates this
4126# particular file as subject to the "Classpath" exception as provided
4127# by Oracle in the LICENSE file that accompanied this code.
4128#
4129# This code is distributed in the hope that it will be useful, but WITHOUT
4130# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132# version 2 for more details (a copy is included in the LICENSE file that
4133# accompanied this code).
4134#
4135# You should have received a copy of the GNU General Public License version
4136# 2 along with this work; if not, write to the Free Software Foundation,
4137# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138#
4139# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140# or visit www.oracle.com if you need additional information or have any
4141# questions.
4142#
4143
4144###############################################################################
4145# Check which variant of the JDK that we want to build.
4146# Currently we have:
4147#    normal:   standard edition
4148# but the custom make system may add other variants
4149#
4150# Effectively the JDK variant gives a name to a specific set of
4151# modules to compile into the JDK.
4152
4153
4154###############################################################################
4155# Set the debug level
4156#    release: no debug information, all optimizations, no asserts.
4157#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4158#    fastdebug: debug information (-g), all optimizations, all asserts
4159#    slowdebug: debug information (-g), no optimizations, all asserts
4160
4161
4162###############################################################################
4163#
4164# Should we build only OpenJDK even if closed sources are present?
4165#
4166
4167
4168
4169
4170###############################################################################
4171#
4172# Enable or disable the elliptic curve crypto implementation
4173#
4174
4175
4176
4177
4178################################################################################
4179#
4180# Gcov coverage data for hotspot
4181#
4182
4183
4184################################################################################
4185#
4186# Static build support.  When enabled will generate static
4187# libraries instead of shared libraries for all JDK libs.
4188#
4189
4190
4191#
4192# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4193# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4194#
4195# This code is free software; you can redistribute it and/or modify it
4196# under the terms of the GNU General Public License version 2 only, as
4197# published by the Free Software Foundation.  Oracle designates this
4198# particular file as subject to the "Classpath" exception as provided
4199# by Oracle in the LICENSE file that accompanied this code.
4200#
4201# This code is distributed in the hope that it will be useful, but WITHOUT
4202# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4203# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4204# version 2 for more details (a copy is included in the LICENSE file that
4205# accompanied this code).
4206#
4207# You should have received a copy of the GNU General Public License version
4208# 2 along with this work; if not, write to the Free Software Foundation,
4209# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4210#
4211# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4212# or visit www.oracle.com if you need additional information or have any
4213# questions.
4214#
4215
4216###############################################################################
4217#
4218# Setup version numbers
4219#
4220
4221# Verify that a given string represents a valid version number, and assign it
4222# to a variable.
4223
4224# Argument 1: the variable to assign to
4225# Argument 2: the value given by the user
4226
4227
4228
4229
4230#
4231# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233#
4234# This code is free software; you can redistribute it and/or modify it
4235# under the terms of the GNU General Public License version 2 only, as
4236# published by the Free Software Foundation.  Oracle designates this
4237# particular file as subject to the "Classpath" exception as provided
4238# by Oracle in the LICENSE file that accompanied this code.
4239#
4240# This code is distributed in the hope that it will be useful, but WITHOUT
4241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243# version 2 for more details (a copy is included in the LICENSE file that
4244# accompanied this code).
4245#
4246# You should have received a copy of the GNU General Public License version
4247# 2 along with this work; if not, write to the Free Software Foundation,
4248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249#
4250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251# or visit www.oracle.com if you need additional information or have any
4252# questions.
4253#
4254
4255# Major library component reside in separate files.
4256#
4257# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4258# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4259#
4260# This code is free software; you can redistribute it and/or modify it
4261# under the terms of the GNU General Public License version 2 only, as
4262# published by the Free Software Foundation.  Oracle designates this
4263# particular file as subject to the "Classpath" exception as provided
4264# by Oracle in the LICENSE file that accompanied this code.
4265#
4266# This code is distributed in the hope that it will be useful, but WITHOUT
4267# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4268# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4269# version 2 for more details (a copy is included in the LICENSE file that
4270# accompanied this code).
4271#
4272# You should have received a copy of the GNU General Public License version
4273# 2 along with this work; if not, write to the Free Software Foundation,
4274# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4275#
4276# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4277# or visit www.oracle.com if you need additional information or have any
4278# questions.
4279#
4280
4281################################################################################
4282# Setup alsa (Advanced Linux Sound Architecture)
4283################################################################################
4284
4285
4286#
4287# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4288# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4289#
4290# This code is free software; you can redistribute it and/or modify it
4291# under the terms of the GNU General Public License version 2 only, as
4292# published by the Free Software Foundation.  Oracle designates this
4293# particular file as subject to the "Classpath" exception as provided
4294# by Oracle in the LICENSE file that accompanied this code.
4295#
4296# This code is distributed in the hope that it will be useful, but WITHOUT
4297# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4298# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4299# version 2 for more details (a copy is included in the LICENSE file that
4300# accompanied this code).
4301#
4302# You should have received a copy of the GNU General Public License version
4303# 2 along with this work; if not, write to the Free Software Foundation,
4304# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4305#
4306# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4307# or visit www.oracle.com if you need additional information or have any
4308# questions.
4309#
4310
4311################################################################################
4312# Setup bundled libraries.
4313#
4314# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4315# OpenJDK repository. Default is to use these libraries as bundled, but they
4316# might be replaced by en external version by the user.
4317################################################################################
4318
4319
4320################################################################################
4321# Setup libjpeg
4322################################################################################
4323
4324
4325################################################################################
4326# Setup giflib
4327################################################################################
4328
4329
4330################################################################################
4331# Setup libpng
4332################################################################################
4333
4334
4335################################################################################
4336# Setup zlib
4337################################################################################
4338
4339
4340################################################################################
4341# Setup lcms (Little CMS)
4342################################################################################
4343
4344
4345#
4346# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4347# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4348#
4349# This code is free software; you can redistribute it and/or modify it
4350# under the terms of the GNU General Public License version 2 only, as
4351# published by the Free Software Foundation.  Oracle designates this
4352# particular file as subject to the "Classpath" exception as provided
4353# by Oracle in the LICENSE file that accompanied this code.
4354#
4355# This code is distributed in the hope that it will be useful, but WITHOUT
4356# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4357# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4358# version 2 for more details (a copy is included in the LICENSE file that
4359# accompanied this code).
4360#
4361# You should have received a copy of the GNU General Public License version
4362# 2 along with this work; if not, write to the Free Software Foundation,
4363# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4364#
4365# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4366# or visit www.oracle.com if you need additional information or have any
4367# questions.
4368#
4369
4370################################################################################
4371# Setup cups (Common Unix Printing System)
4372################################################################################
4373
4374
4375#
4376# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4377# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4378#
4379# This code is free software; you can redistribute it and/or modify it
4380# under the terms of the GNU General Public License version 2 only, as
4381# published by the Free Software Foundation.  Oracle designates this
4382# particular file as subject to the "Classpath" exception as provided
4383# by Oracle in the LICENSE file that accompanied this code.
4384#
4385# This code is distributed in the hope that it will be useful, but WITHOUT
4386# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4387# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4388# version 2 for more details (a copy is included in the LICENSE file that
4389# accompanied this code).
4390#
4391# You should have received a copy of the GNU General Public License version
4392# 2 along with this work; if not, write to the Free Software Foundation,
4393# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4394#
4395# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4396# or visit www.oracle.com if you need additional information or have any
4397# questions.
4398#
4399
4400################################################################################
4401# Setup libffi (Foreign Function Interface)
4402################################################################################
4403
4404
4405#
4406# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4407# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4408#
4409# This code is free software; you can redistribute it and/or modify it
4410# under the terms of the GNU General Public License version 2 only, as
4411# published by the Free Software Foundation.  Oracle designates this
4412# particular file as subject to the "Classpath" exception as provided
4413# by Oracle in the LICENSE file that accompanied this code.
4414#
4415# This code is distributed in the hope that it will be useful, but WITHOUT
4416# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4417# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4418# version 2 for more details (a copy is included in the LICENSE file that
4419# accompanied this code).
4420#
4421# You should have received a copy of the GNU General Public License version
4422# 2 along with this work; if not, write to the Free Software Foundation,
4423# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4424#
4425# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4426# or visit www.oracle.com if you need additional information or have any
4427# questions.
4428#
4429
4430################################################################################
4431# Build the freetype lib from source
4432################################################################################
4433
4434
4435################################################################################
4436# Check if a potential freeype library match is correct and usable
4437################################################################################
4438
4439
4440################################################################################
4441# Setup freetype (The FreeType2 font rendering library)
4442################################################################################
4443
4444
4445#
4446# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4447# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448#
4449# This code is free software; you can redistribute it and/or modify it
4450# under the terms of the GNU General Public License version 2 only, as
4451# published by the Free Software Foundation.  Oracle designates this
4452# particular file as subject to the "Classpath" exception as provided
4453# by Oracle in the LICENSE file that accompanied this code.
4454#
4455# This code is distributed in the hope that it will be useful, but WITHOUT
4456# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458# version 2 for more details (a copy is included in the LICENSE file that
4459# accompanied this code).
4460#
4461# You should have received a copy of the GNU General Public License version
4462# 2 along with this work; if not, write to the Free Software Foundation,
4463# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464#
4465# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466# or visit www.oracle.com if you need additional information or have any
4467# questions.
4468#
4469
4470################################################################################
4471# Setup the standard C/C++ runtime libraries.
4472#
4473# Most importantly, determine if stdc++ should be linked statically or
4474# dynamically.
4475################################################################################
4476
4477
4478#
4479# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4480# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4481#
4482# This code is free software; you can redistribute it and/or modify it
4483# under the terms of the GNU General Public License version 2 only, as
4484# published by the Free Software Foundation.  Oracle designates this
4485# particular file as subject to the "Classpath" exception as provided
4486# by Oracle in the LICENSE file that accompanied this code.
4487#
4488# This code is distributed in the hope that it will be useful, but WITHOUT
4489# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4490# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4491# version 2 for more details (a copy is included in the LICENSE file that
4492# accompanied this code).
4493#
4494# You should have received a copy of the GNU General Public License version
4495# 2 along with this work; if not, write to the Free Software Foundation,
4496# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4497#
4498# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4499# or visit www.oracle.com if you need additional information or have any
4500# questions.
4501#
4502
4503################################################################################
4504# Setup X11 Windows system
4505################################################################################
4506
4507
4508
4509################################################################################
4510# Determine which libraries are needed for this configuration
4511################################################################################
4512
4513
4514################################################################################
4515# Parse library options, and setup needed libraries
4516################################################################################
4517
4518
4519################################################################################
4520# Setup llvm (Low-Level VM)
4521################################################################################
4522
4523
4524################################################################################
4525# Setup various libraries, typically small system libraries
4526################################################################################
4527
4528
4529#
4530# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4532#
4533# This code is free software; you can redistribute it and/or modify it
4534# under the terms of the GNU General Public License version 2 only, as
4535# published by the Free Software Foundation.  Oracle designates this
4536# particular file as subject to the "Classpath" exception as provided
4537# by Oracle in the LICENSE file that accompanied this code.
4538#
4539# This code is distributed in the hope that it will be useful, but WITHOUT
4540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4542# version 2 for more details (a copy is included in the LICENSE file that
4543# accompanied this code).
4544#
4545# You should have received a copy of the GNU General Public License version
4546# 2 along with this work; if not, write to the Free Software Foundation,
4547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4548#
4549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4550# or visit www.oracle.com if you need additional information or have any
4551# questions.
4552#
4553
4554# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4555# Converts autoconf style CPU name to OpenJDK style, into
4556# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4557
4558
4559# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4560# Converts autoconf style OS name to OpenJDK style, into
4561# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4562
4563
4564# Expects $host_os $host_cpu $build_os and $build_cpu
4565# and $with_target_bits to have been setup!
4566#
4567# Translate the standard triplet(quadruplet) definition
4568# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4569# OPENJDK_BUILD_OS, etc.
4570
4571
4572# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4573# accordingly. Must be done after setting up build and target system, but before
4574# doing anything else with these values.
4575
4576
4577# Setup the legacy variables, for controlling the old makefiles.
4578#
4579
4580
4581
4582
4583#%%% Build and target systems %%%
4584
4585
4586
4587
4588# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4589# Add -mX to various FLAGS variables.
4590
4591
4592
4593
4594
4595
4596#
4597# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4599#
4600# This code is free software; you can redistribute it and/or modify it
4601# under the terms of the GNU General Public License version 2 only, as
4602# published by the Free Software Foundation.  Oracle designates this
4603# particular file as subject to the "Classpath" exception as provided
4604# by Oracle in the LICENSE file that accompanied this code.
4605#
4606# This code is distributed in the hope that it will be useful, but WITHOUT
4607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4609# version 2 for more details (a copy is included in the LICENSE file that
4610# accompanied this code).
4611#
4612# You should have received a copy of the GNU General Public License version
4613# 2 along with this work; if not, write to the Free Software Foundation,
4614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4615#
4616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4617# or visit www.oracle.com if you need additional information or have any
4618# questions.
4619#
4620
4621
4622
4623
4624
4625
4626
4627#
4628# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4629# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4630#
4631# This code is free software; you can redistribute it and/or modify it
4632# under the terms of the GNU General Public License version 2 only, as
4633# published by the Free Software Foundation.  Oracle designates this
4634# particular file as subject to the "Classpath" exception as provided
4635# by Oracle in the LICENSE file that accompanied this code.
4636#
4637# This code is distributed in the hope that it will be useful, but WITHOUT
4638# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4639# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4640# version 2 for more details (a copy is included in the LICENSE file that
4641# accompanied this code).
4642#
4643# You should have received a copy of the GNU General Public License version
4644# 2 along with this work; if not, write to the Free Software Foundation,
4645# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4646#
4647# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4648# or visit www.oracle.com if you need additional information or have any
4649# questions.
4650#
4651
4652########################################################################
4653# This file is responsible for detecting, verifying and setting up the
4654# toolchain, i.e. the compiler, linker and related utilities. It will setup
4655# proper paths to the binaries, but it will not setup any flags.
4656#
4657# The binaries used is determined by the toolchain type, which is the family of
4658# compilers and related tools that are used.
4659########################################################################
4660
4661
4662# All valid toolchains, regardless of platform (used by help.m4)
4663VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4664
4665# These toolchains are valid on different platforms
4666VALID_TOOLCHAINS_linux="gcc clang"
4667VALID_TOOLCHAINS_solaris="solstudio"
4668VALID_TOOLCHAINS_macosx="gcc clang"
4669VALID_TOOLCHAINS_aix="xlc"
4670VALID_TOOLCHAINS_windows="microsoft"
4671
4672# Toolchain descriptions
4673TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4674TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4675TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4676TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4677TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4678
4679# Setup a number of variables describing how native output files are
4680# named on this platform/toolchain.
4681
4682
4683# Determine which toolchain type to use, and make sure it is valid for this
4684# platform. Setup various information about the selected toolchain.
4685
4686
4687# Before we start detecting the toolchain executables, we might need some
4688# special setup, e.g. additional paths etc.
4689
4690
4691# Restore path, etc
4692
4693
4694# Check if a compiler is of the toolchain type we expect, and save the version
4695# information from it. If the compiler does not match the expected type,
4696# this function will abort using AC_MSG_ERROR. If it matches, the version will
4697# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4698# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4699#
4700# $1 = compiler to test (CC or CXX)
4701# $2 = human readable name of compiler (C or C++)
4702
4703
4704# Try to locate the given C or C++ compiler in the path, or otherwise.
4705#
4706# $1 = compiler to test (CC or CXX)
4707# $2 = human readable name of compiler (C or C++)
4708# $3 = list of compiler names to search for
4709
4710
4711# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4712# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4713# archiver (AR). Verify that the compilers are correct according to the
4714# toolchain type.
4715
4716
4717# Setup additional tools that is considered a part of the toolchain, but not the
4718# core part. Many of these are highly platform-specific and do not exist,
4719# and/or are not needed on all platforms.
4720
4721
4722# Setup the build tools (i.e, the compiler and linker used to build programs
4723# that should be run on the build platform, not the target platform, as a build
4724# helper). Since the non-cross-compile case uses the normal, target compilers
4725# for this, we can only do this after these have been setup.
4726
4727
4728# Setup legacy variables that are still needed as alternative ways to refer to
4729# parts of the toolchain.
4730
4731
4732# Do some additional checks on the detected tools.
4733
4734
4735# Setup the JTReg Regression Test Harness.
4736
4737
4738#
4739# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4740# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4741#
4742# This code is free software; you can redistribute it and/or modify it
4743# under the terms of the GNU General Public License version 2 only, as
4744# published by the Free Software Foundation.  Oracle designates this
4745# particular file as subject to the "Classpath" exception as provided
4746# by Oracle in the LICENSE file that accompanied this code.
4747#
4748# This code is distributed in the hope that it will be useful, but WITHOUT
4749# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4750# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4751# version 2 for more details (a copy is included in the LICENSE file that
4752# accompanied this code).
4753#
4754# You should have received a copy of the GNU General Public License version
4755# 2 along with this work; if not, write to the Free Software Foundation,
4756# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4757#
4758# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4759# or visit www.oracle.com if you need additional information or have any
4760# questions.
4761#
4762
4763################################################################################
4764# The order of these defines the priority by which we try to find them.
4765VALID_VS_VERSIONS="2013 2012 2010"
4766
4767VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4768VS_VERSION_INTERNAL_2010=100
4769VS_MSVCR_2010=msvcr100.dll
4770# We don't use msvcp on Visual Studio 2010
4771#VS_MSVCP_2010=msvcp100.dll
4772VS_ENVVAR_2010="VS100COMNTOOLS"
4773VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4774VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4775VS_VS_PLATFORM_NAME_2010="v100"
4776VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4777
4778VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4779VS_VERSION_INTERNAL_2012=110
4780VS_MSVCR_2012=msvcr110.dll
4781VS_MSVCP_2012=msvcp110.dll
4782VS_ENVVAR_2012="VS110COMNTOOLS"
4783VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4784VS_SDK_INSTALLDIR_2012=
4785VS_VS_PLATFORM_NAME_2012="v110"
4786VS_SDK_PLATFORM_NAME_2012=
4787
4788VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4789VS_VERSION_INTERNAL_2013=120
4790VS_MSVCR_2013=msvcr120.dll
4791VS_MSVCP_2013=msvcp120.dll
4792VS_ENVVAR_2013="VS120COMNTOOLS"
4793VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4794VS_SDK_INSTALLDIR_2013=
4795VS_VS_PLATFORM_NAME_2013="v120"
4796VS_SDK_PLATFORM_NAME_2013=
4797
4798################################################################################
4799
4800
4801
4802################################################################################
4803
4804
4805
4806################################################################################
4807# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4808# build environment and assigns it to VS_ENV_CMD
4809
4810
4811################################################################################
4812
4813
4814
4815################################################################################
4816# Check if the VS env variables were setup prior to running configure.
4817# If not, then find vcvarsall.bat and run it automatically, and integrate
4818# the set env variables into the spec file.
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833# This line needs to be here, verbatim, after all includes and the dummy hook
4834# definitions. It is replaced with custom functionality when building
4835# custom sources.
4836#CUSTOM_AUTOCONF_INCLUDE
4837
4838# Do not change or remove the following line, it is needed for consistency checks:
4839DATE_WHEN_GENERATED=1454994410
4840
4841###############################################################################
4842#
4843# Initialization / Boot-strapping
4844#
4845# The bootstrapping process needs to solve the "chicken or the egg" problem,
4846# thus it jumps back and forth, each time gaining something needed later on.
4847#
4848###############################################################################
4849
4850# If we are requested to print additional help, do that and then exit.
4851# This must be the very first call.
4852
4853  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4854    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4855    $PRINTF "Which are valid to use depends on the build platform.\n"
4856    for toolchain in $VALID_TOOLCHAINS_all; do
4857      # Use indirect variable referencing
4858      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4859      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4860      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4861    done
4862
4863    # And now exit directly
4864    exit 0
4865  fi
4866
4867
4868# Basic initialization that must happen first of all in the normal process.
4869
4870  # Save the original command line. This is passed to us by the wrapper configure script.
4871
4872  # Save the path variable before it gets changed
4873  ORIGINAL_PATH="$PATH"
4874
4875  DATE_WHEN_CONFIGURED=`LANG=C date`
4876
4877  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4878$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4879  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4880$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4881
4882
4883  # Start with tools that do not need have cross compilation support
4884  # and can be expected to be found in the default PATH. These tools are
4885  # used by configure.
4886
4887  # First are all the simple required tools.
4888
4889
4890
4891  # Publish this variable in the help.
4892
4893
4894  if [ -z "${BASENAME+x}" ]; then
4895    # The variable is not set by user, try to locate tool using the code snippet
4896    for ac_prog in basename
4897do
4898  # Extract the first word of "$ac_prog", so it can be a program name with args.
4899set dummy $ac_prog; ac_word=$2
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4901$as_echo_n "checking for $ac_word... " >&6; }
4902if ${ac_cv_path_BASENAME+:} false; then :
4903  $as_echo_n "(cached) " >&6
4904else
4905  case $BASENAME in
4906  [\\/]* | ?:[\\/]*)
4907  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4908  ;;
4909  *)
4910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4911for as_dir in $PATH
4912do
4913  IFS=$as_save_IFS
4914  test -z "$as_dir" && as_dir=.
4915    for ac_exec_ext in '' $ac_executable_extensions; do
4916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4917    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4919    break 2
4920  fi
4921done
4922  done
4923IFS=$as_save_IFS
4924
4925  ;;
4926esac
4927fi
4928BASENAME=$ac_cv_path_BASENAME
4929if test -n "$BASENAME"; then
4930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4931$as_echo "$BASENAME" >&6; }
4932else
4933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4934$as_echo "no" >&6; }
4935fi
4936
4937
4938  test -n "$BASENAME" && break
4939done
4940
4941  else
4942    # The variable is set, but is it from the command line or the environment?
4943
4944    # Try to remove the string !BASENAME! from our list.
4945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4947      # If it failed, the variable was not from the command line. Ignore it,
4948      # but warn the user (except for BASH, which is always set by the calling BASH).
4949      if test "xBASENAME" != xBASH; then
4950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4951$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4952      fi
4953      # Try to locate tool using the code snippet
4954      for ac_prog in basename
4955do
4956  # Extract the first word of "$ac_prog", so it can be a program name with args.
4957set dummy $ac_prog; ac_word=$2
4958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959$as_echo_n "checking for $ac_word... " >&6; }
4960if ${ac_cv_path_BASENAME+:} false; then :
4961  $as_echo_n "(cached) " >&6
4962else
4963  case $BASENAME in
4964  [\\/]* | ?:[\\/]*)
4965  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4966  ;;
4967  *)
4968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4969for as_dir in $PATH
4970do
4971  IFS=$as_save_IFS
4972  test -z "$as_dir" && as_dir=.
4973    for ac_exec_ext in '' $ac_executable_extensions; do
4974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4977    break 2
4978  fi
4979done
4980  done
4981IFS=$as_save_IFS
4982
4983  ;;
4984esac
4985fi
4986BASENAME=$ac_cv_path_BASENAME
4987if test -n "$BASENAME"; then
4988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4989$as_echo "$BASENAME" >&6; }
4990else
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
4993fi
4994
4995
4996  test -n "$BASENAME" && break
4997done
4998
4999    else
5000      # If it succeeded, then it was overridden by the user. We will use it
5001      # for the tool.
5002
5003      # First remove it from the list of overridden variables, so we can test
5004      # for unknown variables in the end.
5005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5006
5007      # Check if we try to supply an empty value
5008      if test "x$BASENAME" = x; then
5009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5010$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5012$as_echo_n "checking for BASENAME... " >&6; }
5013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5014$as_echo "disabled" >&6; }
5015      else
5016        # Check if the provided tool contains a complete path.
5017        tool_specified="$BASENAME"
5018        tool_basename="${tool_specified##*/}"
5019        if test "x$tool_basename" = "x$tool_specified"; then
5020          # A command without a complete path is provided, search $PATH.
5021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5022$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5023          # Extract the first word of "$tool_basename", so it can be a program name with args.
5024set dummy $tool_basename; ac_word=$2
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
5027if ${ac_cv_path_BASENAME+:} false; then :
5028  $as_echo_n "(cached) " >&6
5029else
5030  case $BASENAME in
5031  [\\/]* | ?:[\\/]*)
5032  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5033  ;;
5034  *)
5035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038  IFS=$as_save_IFS
5039  test -z "$as_dir" && as_dir=.
5040    for ac_exec_ext in '' $ac_executable_extensions; do
5041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044    break 2
5045  fi
5046done
5047  done
5048IFS=$as_save_IFS
5049
5050  ;;
5051esac
5052fi
5053BASENAME=$ac_cv_path_BASENAME
5054if test -n "$BASENAME"; then
5055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5056$as_echo "$BASENAME" >&6; }
5057else
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
5060fi
5061
5062
5063          if test "x$BASENAME" = x; then
5064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5065          fi
5066        else
5067          # Otherwise we believe it is a complete path. Use it as it is.
5068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5069$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5071$as_echo_n "checking for BASENAME... " >&6; }
5072          if test ! -x "$tool_specified"; then
5073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5074$as_echo "not found" >&6; }
5075            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5076          fi
5077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5078$as_echo "$tool_specified" >&6; }
5079        fi
5080      fi
5081    fi
5082
5083  fi
5084
5085
5086
5087  if test "x$BASENAME" = x; then
5088    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5089  fi
5090
5091
5092
5093
5094
5095  # Publish this variable in the help.
5096
5097
5098  if [ -z "${BASH+x}" ]; then
5099    # The variable is not set by user, try to locate tool using the code snippet
5100    for ac_prog in bash
5101do
5102  # Extract the first word of "$ac_prog", so it can be a program name with args.
5103set dummy $ac_prog; ac_word=$2
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5105$as_echo_n "checking for $ac_word... " >&6; }
5106if ${ac_cv_path_BASH+:} false; then :
5107  $as_echo_n "(cached) " >&6
5108else
5109  case $BASH in
5110  [\\/]* | ?:[\\/]*)
5111  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5112  ;;
5113  *)
5114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5115for as_dir in $PATH
5116do
5117  IFS=$as_save_IFS
5118  test -z "$as_dir" && as_dir=.
5119    for ac_exec_ext in '' $ac_executable_extensions; do
5120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5121    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5123    break 2
5124  fi
5125done
5126  done
5127IFS=$as_save_IFS
5128
5129  ;;
5130esac
5131fi
5132BASH=$ac_cv_path_BASH
5133if test -n "$BASH"; then
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5135$as_echo "$BASH" >&6; }
5136else
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138$as_echo "no" >&6; }
5139fi
5140
5141
5142  test -n "$BASH" && break
5143done
5144
5145  else
5146    # The variable is set, but is it from the command line or the environment?
5147
5148    # Try to remove the string !BASH! from our list.
5149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5151      # If it failed, the variable was not from the command line. Ignore it,
5152      # but warn the user (except for BASH, which is always set by the calling BASH).
5153      if test "xBASH" != xBASH; then
5154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5155$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5156      fi
5157      # Try to locate tool using the code snippet
5158      for ac_prog in bash
5159do
5160  # Extract the first word of "$ac_prog", so it can be a program name with args.
5161set dummy $ac_prog; ac_word=$2
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163$as_echo_n "checking for $ac_word... " >&6; }
5164if ${ac_cv_path_BASH+:} false; then :
5165  $as_echo_n "(cached) " >&6
5166else
5167  case $BASH in
5168  [\\/]* | ?:[\\/]*)
5169  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5170  ;;
5171  *)
5172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175  IFS=$as_save_IFS
5176  test -z "$as_dir" && as_dir=.
5177    for ac_exec_ext in '' $ac_executable_extensions; do
5178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5179    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5181    break 2
5182  fi
5183done
5184  done
5185IFS=$as_save_IFS
5186
5187  ;;
5188esac
5189fi
5190BASH=$ac_cv_path_BASH
5191if test -n "$BASH"; then
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5193$as_echo "$BASH" >&6; }
5194else
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
5197fi
5198
5199
5200  test -n "$BASH" && break
5201done
5202
5203    else
5204      # If it succeeded, then it was overridden by the user. We will use it
5205      # for the tool.
5206
5207      # First remove it from the list of overridden variables, so we can test
5208      # for unknown variables in the end.
5209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5210
5211      # Check if we try to supply an empty value
5212      if test "x$BASH" = x; then
5213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5214$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5216$as_echo_n "checking for BASH... " >&6; }
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5218$as_echo "disabled" >&6; }
5219      else
5220        # Check if the provided tool contains a complete path.
5221        tool_specified="$BASH"
5222        tool_basename="${tool_specified##*/}"
5223        if test "x$tool_basename" = "x$tool_specified"; then
5224          # A command without a complete path is provided, search $PATH.
5225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5226$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5227          # Extract the first word of "$tool_basename", so it can be a program name with args.
5228set dummy $tool_basename; ac_word=$2
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5230$as_echo_n "checking for $ac_word... " >&6; }
5231if ${ac_cv_path_BASH+:} false; then :
5232  $as_echo_n "(cached) " >&6
5233else
5234  case $BASH in
5235  [\\/]* | ?:[\\/]*)
5236  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5237  ;;
5238  *)
5239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240for as_dir in $PATH
5241do
5242  IFS=$as_save_IFS
5243  test -z "$as_dir" && as_dir=.
5244    for ac_exec_ext in '' $ac_executable_extensions; do
5245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5246    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5248    break 2
5249  fi
5250done
5251  done
5252IFS=$as_save_IFS
5253
5254  ;;
5255esac
5256fi
5257BASH=$ac_cv_path_BASH
5258if test -n "$BASH"; then
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5260$as_echo "$BASH" >&6; }
5261else
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5263$as_echo "no" >&6; }
5264fi
5265
5266
5267          if test "x$BASH" = x; then
5268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5269          fi
5270        else
5271          # Otherwise we believe it is a complete path. Use it as it is.
5272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5273$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5275$as_echo_n "checking for BASH... " >&6; }
5276          if test ! -x "$tool_specified"; then
5277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5278$as_echo "not found" >&6; }
5279            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5280          fi
5281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5282$as_echo "$tool_specified" >&6; }
5283        fi
5284      fi
5285    fi
5286
5287  fi
5288
5289
5290
5291  if test "x$BASH" = x; then
5292    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5293  fi
5294
5295
5296
5297
5298
5299  # Publish this variable in the help.
5300
5301
5302  if [ -z "${CAT+x}" ]; then
5303    # The variable is not set by user, try to locate tool using the code snippet
5304    for ac_prog in cat
5305do
5306  # Extract the first word of "$ac_prog", so it can be a program name with args.
5307set dummy $ac_prog; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if ${ac_cv_path_CAT+:} false; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313  case $CAT in
5314  [\\/]* | ?:[\\/]*)
5315  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5316  ;;
5317  *)
5318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321  IFS=$as_save_IFS
5322  test -z "$as_dir" && as_dir=.
5323    for ac_exec_ext in '' $ac_executable_extensions; do
5324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5325    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327    break 2
5328  fi
5329done
5330  done
5331IFS=$as_save_IFS
5332
5333  ;;
5334esac
5335fi
5336CAT=$ac_cv_path_CAT
5337if test -n "$CAT"; then
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5339$as_echo "$CAT" >&6; }
5340else
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344
5345
5346  test -n "$CAT" && break
5347done
5348
5349  else
5350    # The variable is set, but is it from the command line or the environment?
5351
5352    # Try to remove the string !CAT! from our list.
5353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5355      # If it failed, the variable was not from the command line. Ignore it,
5356      # but warn the user (except for BASH, which is always set by the calling BASH).
5357      if test "xCAT" != xBASH; then
5358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5359$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5360      fi
5361      # Try to locate tool using the code snippet
5362      for ac_prog in cat
5363do
5364  # Extract the first word of "$ac_prog", so it can be a program name with args.
5365set dummy $ac_prog; ac_word=$2
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5367$as_echo_n "checking for $ac_word... " >&6; }
5368if ${ac_cv_path_CAT+:} false; then :
5369  $as_echo_n "(cached) " >&6
5370else
5371  case $CAT in
5372  [\\/]* | ?:[\\/]*)
5373  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5374  ;;
5375  *)
5376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5377for as_dir in $PATH
5378do
5379  IFS=$as_save_IFS
5380  test -z "$as_dir" && as_dir=.
5381    for ac_exec_ext in '' $ac_executable_extensions; do
5382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5383    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5385    break 2
5386  fi
5387done
5388  done
5389IFS=$as_save_IFS
5390
5391  ;;
5392esac
5393fi
5394CAT=$ac_cv_path_CAT
5395if test -n "$CAT"; then
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5397$as_echo "$CAT" >&6; }
5398else
5399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }
5401fi
5402
5403
5404  test -n "$CAT" && break
5405done
5406
5407    else
5408      # If it succeeded, then it was overridden by the user. We will use it
5409      # for the tool.
5410
5411      # First remove it from the list of overridden variables, so we can test
5412      # for unknown variables in the end.
5413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5414
5415      # Check if we try to supply an empty value
5416      if test "x$CAT" = x; then
5417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5418$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5420$as_echo_n "checking for CAT... " >&6; }
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5422$as_echo "disabled" >&6; }
5423      else
5424        # Check if the provided tool contains a complete path.
5425        tool_specified="$CAT"
5426        tool_basename="${tool_specified##*/}"
5427        if test "x$tool_basename" = "x$tool_specified"; then
5428          # A command without a complete path is provided, search $PATH.
5429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5430$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5431          # Extract the first word of "$tool_basename", so it can be a program name with args.
5432set dummy $tool_basename; ac_word=$2
5433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5434$as_echo_n "checking for $ac_word... " >&6; }
5435if ${ac_cv_path_CAT+:} false; then :
5436  $as_echo_n "(cached) " >&6
5437else
5438  case $CAT in
5439  [\\/]* | ?:[\\/]*)
5440  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5441  ;;
5442  *)
5443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5444for as_dir in $PATH
5445do
5446  IFS=$as_save_IFS
5447  test -z "$as_dir" && as_dir=.
5448    for ac_exec_ext in '' $ac_executable_extensions; do
5449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5450    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5452    break 2
5453  fi
5454done
5455  done
5456IFS=$as_save_IFS
5457
5458  ;;
5459esac
5460fi
5461CAT=$ac_cv_path_CAT
5462if test -n "$CAT"; then
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5464$as_echo "$CAT" >&6; }
5465else
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468fi
5469
5470
5471          if test "x$CAT" = x; then
5472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5473          fi
5474        else
5475          # Otherwise we believe it is a complete path. Use it as it is.
5476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5477$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5479$as_echo_n "checking for CAT... " >&6; }
5480          if test ! -x "$tool_specified"; then
5481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5482$as_echo "not found" >&6; }
5483            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5484          fi
5485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5486$as_echo "$tool_specified" >&6; }
5487        fi
5488      fi
5489    fi
5490
5491  fi
5492
5493
5494
5495  if test "x$CAT" = x; then
5496    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5497  fi
5498
5499
5500
5501
5502
5503  # Publish this variable in the help.
5504
5505
5506  if [ -z "${CHMOD+x}" ]; then
5507    # The variable is not set by user, try to locate tool using the code snippet
5508    for ac_prog in chmod
5509do
5510  # Extract the first word of "$ac_prog", so it can be a program name with args.
5511set dummy $ac_prog; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if ${ac_cv_path_CHMOD+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $CHMOD in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540CHMOD=$ac_cv_path_CHMOD
5541if test -n "$CHMOD"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5543$as_echo "$CHMOD" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550  test -n "$CHMOD" && break
5551done
5552
5553  else
5554    # The variable is set, but is it from the command line or the environment?
5555
5556    # Try to remove the string !CHMOD! from our list.
5557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5559      # If it failed, the variable was not from the command line. Ignore it,
5560      # but warn the user (except for BASH, which is always set by the calling BASH).
5561      if test "xCHMOD" != xBASH; then
5562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5563$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5564      fi
5565      # Try to locate tool using the code snippet
5566      for ac_prog in chmod
5567do
5568  # Extract the first word of "$ac_prog", so it can be a program name with args.
5569set dummy $ac_prog; ac_word=$2
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
5572if ${ac_cv_path_CHMOD+:} false; then :
5573  $as_echo_n "(cached) " >&6
5574else
5575  case $CHMOD in
5576  [\\/]* | ?:[\\/]*)
5577  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5578  ;;
5579  *)
5580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581for as_dir in $PATH
5582do
5583  IFS=$as_save_IFS
5584  test -z "$as_dir" && as_dir=.
5585    for ac_exec_ext in '' $ac_executable_extensions; do
5586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5587    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5589    break 2
5590  fi
5591done
5592  done
5593IFS=$as_save_IFS
5594
5595  ;;
5596esac
5597fi
5598CHMOD=$ac_cv_path_CHMOD
5599if test -n "$CHMOD"; then
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5601$as_echo "$CHMOD" >&6; }
5602else
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605fi
5606
5607
5608  test -n "$CHMOD" && break
5609done
5610
5611    else
5612      # If it succeeded, then it was overridden by the user. We will use it
5613      # for the tool.
5614
5615      # First remove it from the list of overridden variables, so we can test
5616      # for unknown variables in the end.
5617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5618
5619      # Check if we try to supply an empty value
5620      if test "x$CHMOD" = x; then
5621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5622$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5624$as_echo_n "checking for CHMOD... " >&6; }
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5626$as_echo "disabled" >&6; }
5627      else
5628        # Check if the provided tool contains a complete path.
5629        tool_specified="$CHMOD"
5630        tool_basename="${tool_specified##*/}"
5631        if test "x$tool_basename" = "x$tool_specified"; then
5632          # A command without a complete path is provided, search $PATH.
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5634$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5635          # Extract the first word of "$tool_basename", so it can be a program name with args.
5636set dummy $tool_basename; ac_word=$2
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5638$as_echo_n "checking for $ac_word... " >&6; }
5639if ${ac_cv_path_CHMOD+:} false; then :
5640  $as_echo_n "(cached) " >&6
5641else
5642  case $CHMOD in
5643  [\\/]* | ?:[\\/]*)
5644  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5645  ;;
5646  *)
5647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5648for as_dir in $PATH
5649do
5650  IFS=$as_save_IFS
5651  test -z "$as_dir" && as_dir=.
5652    for ac_exec_ext in '' $ac_executable_extensions; do
5653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5654    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5656    break 2
5657  fi
5658done
5659  done
5660IFS=$as_save_IFS
5661
5662  ;;
5663esac
5664fi
5665CHMOD=$ac_cv_path_CHMOD
5666if test -n "$CHMOD"; then
5667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5668$as_echo "$CHMOD" >&6; }
5669else
5670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5671$as_echo "no" >&6; }
5672fi
5673
5674
5675          if test "x$CHMOD" = x; then
5676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5677          fi
5678        else
5679          # Otherwise we believe it is a complete path. Use it as it is.
5680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5681$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5683$as_echo_n "checking for CHMOD... " >&6; }
5684          if test ! -x "$tool_specified"; then
5685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5686$as_echo "not found" >&6; }
5687            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5688          fi
5689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5690$as_echo "$tool_specified" >&6; }
5691        fi
5692      fi
5693    fi
5694
5695  fi
5696
5697
5698
5699  if test "x$CHMOD" = x; then
5700    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5701  fi
5702
5703
5704
5705
5706
5707  # Publish this variable in the help.
5708
5709
5710  if [ -z "${CMP+x}" ]; then
5711    # The variable is not set by user, try to locate tool using the code snippet
5712    for ac_prog in cmp
5713do
5714  # Extract the first word of "$ac_prog", so it can be a program name with args.
5715set dummy $ac_prog; ac_word=$2
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5717$as_echo_n "checking for $ac_word... " >&6; }
5718if ${ac_cv_path_CMP+:} false; then :
5719  $as_echo_n "(cached) " >&6
5720else
5721  case $CMP in
5722  [\\/]* | ?:[\\/]*)
5723  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5724  ;;
5725  *)
5726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5727for as_dir in $PATH
5728do
5729  IFS=$as_save_IFS
5730  test -z "$as_dir" && as_dir=.
5731    for ac_exec_ext in '' $ac_executable_extensions; do
5732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5733    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5735    break 2
5736  fi
5737done
5738  done
5739IFS=$as_save_IFS
5740
5741  ;;
5742esac
5743fi
5744CMP=$ac_cv_path_CMP
5745if test -n "$CMP"; then
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5747$as_echo "$CMP" >&6; }
5748else
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; }
5751fi
5752
5753
5754  test -n "$CMP" && break
5755done
5756
5757  else
5758    # The variable is set, but is it from the command line or the environment?
5759
5760    # Try to remove the string !CMP! from our list.
5761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5763      # If it failed, the variable was not from the command line. Ignore it,
5764      # but warn the user (except for BASH, which is always set by the calling BASH).
5765      if test "xCMP" != xBASH; then
5766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5767$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5768      fi
5769      # Try to locate tool using the code snippet
5770      for ac_prog in cmp
5771do
5772  # Extract the first word of "$ac_prog", so it can be a program name with args.
5773set dummy $ac_prog; ac_word=$2
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5775$as_echo_n "checking for $ac_word... " >&6; }
5776if ${ac_cv_path_CMP+:} false; then :
5777  $as_echo_n "(cached) " >&6
5778else
5779  case $CMP in
5780  [\\/]* | ?:[\\/]*)
5781  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5782  ;;
5783  *)
5784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5785for as_dir in $PATH
5786do
5787  IFS=$as_save_IFS
5788  test -z "$as_dir" && as_dir=.
5789    for ac_exec_ext in '' $ac_executable_extensions; do
5790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5791    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5793    break 2
5794  fi
5795done
5796  done
5797IFS=$as_save_IFS
5798
5799  ;;
5800esac
5801fi
5802CMP=$ac_cv_path_CMP
5803if test -n "$CMP"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5805$as_echo "$CMP" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$CMP" && break
5813done
5814
5815    else
5816      # If it succeeded, then it was overridden by the user. We will use it
5817      # for the tool.
5818
5819      # First remove it from the list of overridden variables, so we can test
5820      # for unknown variables in the end.
5821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5822
5823      # Check if we try to supply an empty value
5824      if test "x$CMP" = x; then
5825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5826$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5828$as_echo_n "checking for CMP... " >&6; }
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5830$as_echo "disabled" >&6; }
5831      else
5832        # Check if the provided tool contains a complete path.
5833        tool_specified="$CMP"
5834        tool_basename="${tool_specified##*/}"
5835        if test "x$tool_basename" = "x$tool_specified"; then
5836          # A command without a complete path is provided, search $PATH.
5837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5838$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5839          # Extract the first word of "$tool_basename", so it can be a program name with args.
5840set dummy $tool_basename; ac_word=$2
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5842$as_echo_n "checking for $ac_word... " >&6; }
5843if ${ac_cv_path_CMP+:} false; then :
5844  $as_echo_n "(cached) " >&6
5845else
5846  case $CMP in
5847  [\\/]* | ?:[\\/]*)
5848  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5849  ;;
5850  *)
5851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5852for as_dir in $PATH
5853do
5854  IFS=$as_save_IFS
5855  test -z "$as_dir" && as_dir=.
5856    for ac_exec_ext in '' $ac_executable_extensions; do
5857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5858    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5860    break 2
5861  fi
5862done
5863  done
5864IFS=$as_save_IFS
5865
5866  ;;
5867esac
5868fi
5869CMP=$ac_cv_path_CMP
5870if test -n "$CMP"; then
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5872$as_echo "$CMP" >&6; }
5873else
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875$as_echo "no" >&6; }
5876fi
5877
5878
5879          if test "x$CMP" = x; then
5880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5881          fi
5882        else
5883          # Otherwise we believe it is a complete path. Use it as it is.
5884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5885$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5887$as_echo_n "checking for CMP... " >&6; }
5888          if test ! -x "$tool_specified"; then
5889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5890$as_echo "not found" >&6; }
5891            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5892          fi
5893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5894$as_echo "$tool_specified" >&6; }
5895        fi
5896      fi
5897    fi
5898
5899  fi
5900
5901
5902
5903  if test "x$CMP" = x; then
5904    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5905  fi
5906
5907
5908
5909
5910
5911  # Publish this variable in the help.
5912
5913
5914  if [ -z "${COMM+x}" ]; then
5915    # The variable is not set by user, try to locate tool using the code snippet
5916    for ac_prog in comm
5917do
5918  # Extract the first word of "$ac_prog", so it can be a program name with args.
5919set dummy $ac_prog; ac_word=$2
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
5922if ${ac_cv_path_COMM+:} false; then :
5923  $as_echo_n "(cached) " >&6
5924else
5925  case $COMM in
5926  [\\/]* | ?:[\\/]*)
5927  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5928  ;;
5929  *)
5930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931for as_dir in $PATH
5932do
5933  IFS=$as_save_IFS
5934  test -z "$as_dir" && as_dir=.
5935    for ac_exec_ext in '' $ac_executable_extensions; do
5936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5937    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5939    break 2
5940  fi
5941done
5942  done
5943IFS=$as_save_IFS
5944
5945  ;;
5946esac
5947fi
5948COMM=$ac_cv_path_COMM
5949if test -n "$COMM"; then
5950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5951$as_echo "$COMM" >&6; }
5952else
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5954$as_echo "no" >&6; }
5955fi
5956
5957
5958  test -n "$COMM" && break
5959done
5960
5961  else
5962    # The variable is set, but is it from the command line or the environment?
5963
5964    # Try to remove the string !COMM! from our list.
5965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5967      # If it failed, the variable was not from the command line. Ignore it,
5968      # but warn the user (except for BASH, which is always set by the calling BASH).
5969      if test "xCOMM" != xBASH; then
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5971$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5972      fi
5973      # Try to locate tool using the code snippet
5974      for ac_prog in comm
5975do
5976  # Extract the first word of "$ac_prog", so it can be a program name with args.
5977set dummy $ac_prog; ac_word=$2
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
5980if ${ac_cv_path_COMM+:} false; then :
5981  $as_echo_n "(cached) " >&6
5982else
5983  case $COMM in
5984  [\\/]* | ?:[\\/]*)
5985  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5986  ;;
5987  *)
5988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989for as_dir in $PATH
5990do
5991  IFS=$as_save_IFS
5992  test -z "$as_dir" && as_dir=.
5993    for ac_exec_ext in '' $ac_executable_extensions; do
5994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5995    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5997    break 2
5998  fi
5999done
6000  done
6001IFS=$as_save_IFS
6002
6003  ;;
6004esac
6005fi
6006COMM=$ac_cv_path_COMM
6007if test -n "$COMM"; then
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6009$as_echo "$COMM" >&6; }
6010else
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013fi
6014
6015
6016  test -n "$COMM" && break
6017done
6018
6019    else
6020      # If it succeeded, then it was overridden by the user. We will use it
6021      # for the tool.
6022
6023      # First remove it from the list of overridden variables, so we can test
6024      # for unknown variables in the end.
6025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6026
6027      # Check if we try to supply an empty value
6028      if test "x$COMM" = x; then
6029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6030$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6032$as_echo_n "checking for COMM... " >&6; }
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6034$as_echo "disabled" >&6; }
6035      else
6036        # Check if the provided tool contains a complete path.
6037        tool_specified="$COMM"
6038        tool_basename="${tool_specified##*/}"
6039        if test "x$tool_basename" = "x$tool_specified"; then
6040          # A command without a complete path is provided, search $PATH.
6041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6042$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6043          # Extract the first word of "$tool_basename", so it can be a program name with args.
6044set dummy $tool_basename; ac_word=$2
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6046$as_echo_n "checking for $ac_word... " >&6; }
6047if ${ac_cv_path_COMM+:} false; then :
6048  $as_echo_n "(cached) " >&6
6049else
6050  case $COMM in
6051  [\\/]* | ?:[\\/]*)
6052  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6053  ;;
6054  *)
6055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058  IFS=$as_save_IFS
6059  test -z "$as_dir" && as_dir=.
6060    for ac_exec_ext in '' $ac_executable_extensions; do
6061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6062    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6064    break 2
6065  fi
6066done
6067  done
6068IFS=$as_save_IFS
6069
6070  ;;
6071esac
6072fi
6073COMM=$ac_cv_path_COMM
6074if test -n "$COMM"; then
6075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6076$as_echo "$COMM" >&6; }
6077else
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079$as_echo "no" >&6; }
6080fi
6081
6082
6083          if test "x$COMM" = x; then
6084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6085          fi
6086        else
6087          # Otherwise we believe it is a complete path. Use it as it is.
6088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6089$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6091$as_echo_n "checking for COMM... " >&6; }
6092          if test ! -x "$tool_specified"; then
6093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6094$as_echo "not found" >&6; }
6095            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6096          fi
6097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6098$as_echo "$tool_specified" >&6; }
6099        fi
6100      fi
6101    fi
6102
6103  fi
6104
6105
6106
6107  if test "x$COMM" = x; then
6108    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6109  fi
6110
6111
6112
6113
6114
6115  # Publish this variable in the help.
6116
6117
6118  if [ -z "${CP+x}" ]; then
6119    # The variable is not set by user, try to locate tool using the code snippet
6120    for ac_prog in cp
6121do
6122  # Extract the first word of "$ac_prog", so it can be a program name with args.
6123set dummy $ac_prog; ac_word=$2
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6125$as_echo_n "checking for $ac_word... " >&6; }
6126if ${ac_cv_path_CP+:} false; then :
6127  $as_echo_n "(cached) " >&6
6128else
6129  case $CP in
6130  [\\/]* | ?:[\\/]*)
6131  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6132  ;;
6133  *)
6134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137  IFS=$as_save_IFS
6138  test -z "$as_dir" && as_dir=.
6139    for ac_exec_ext in '' $ac_executable_extensions; do
6140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6141    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6143    break 2
6144  fi
6145done
6146  done
6147IFS=$as_save_IFS
6148
6149  ;;
6150esac
6151fi
6152CP=$ac_cv_path_CP
6153if test -n "$CP"; then
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6155$as_echo "$CP" >&6; }
6156else
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6158$as_echo "no" >&6; }
6159fi
6160
6161
6162  test -n "$CP" && break
6163done
6164
6165  else
6166    # The variable is set, but is it from the command line or the environment?
6167
6168    # Try to remove the string !CP! from our list.
6169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6171      # If it failed, the variable was not from the command line. Ignore it,
6172      # but warn the user (except for BASH, which is always set by the calling BASH).
6173      if test "xCP" != xBASH; then
6174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6175$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6176      fi
6177      # Try to locate tool using the code snippet
6178      for ac_prog in cp
6179do
6180  # Extract the first word of "$ac_prog", so it can be a program name with args.
6181set dummy $ac_prog; ac_word=$2
6182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6183$as_echo_n "checking for $ac_word... " >&6; }
6184if ${ac_cv_path_CP+:} false; then :
6185  $as_echo_n "(cached) " >&6
6186else
6187  case $CP in
6188  [\\/]* | ?:[\\/]*)
6189  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6190  ;;
6191  *)
6192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195  IFS=$as_save_IFS
6196  test -z "$as_dir" && as_dir=.
6197    for ac_exec_ext in '' $ac_executable_extensions; do
6198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6199    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6201    break 2
6202  fi
6203done
6204  done
6205IFS=$as_save_IFS
6206
6207  ;;
6208esac
6209fi
6210CP=$ac_cv_path_CP
6211if test -n "$CP"; then
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6213$as_echo "$CP" >&6; }
6214else
6215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6216$as_echo "no" >&6; }
6217fi
6218
6219
6220  test -n "$CP" && break
6221done
6222
6223    else
6224      # If it succeeded, then it was overridden by the user. We will use it
6225      # for the tool.
6226
6227      # First remove it from the list of overridden variables, so we can test
6228      # for unknown variables in the end.
6229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6230
6231      # Check if we try to supply an empty value
6232      if test "x$CP" = x; then
6233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6234$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6236$as_echo_n "checking for CP... " >&6; }
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6238$as_echo "disabled" >&6; }
6239      else
6240        # Check if the provided tool contains a complete path.
6241        tool_specified="$CP"
6242        tool_basename="${tool_specified##*/}"
6243        if test "x$tool_basename" = "x$tool_specified"; then
6244          # A command without a complete path is provided, search $PATH.
6245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6246$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6247          # Extract the first word of "$tool_basename", so it can be a program name with args.
6248set dummy $tool_basename; ac_word=$2
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6250$as_echo_n "checking for $ac_word... " >&6; }
6251if ${ac_cv_path_CP+:} false; then :
6252  $as_echo_n "(cached) " >&6
6253else
6254  case $CP in
6255  [\\/]* | ?:[\\/]*)
6256  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6257  ;;
6258  *)
6259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH
6261do
6262  IFS=$as_save_IFS
6263  test -z "$as_dir" && as_dir=.
6264    for ac_exec_ext in '' $ac_executable_extensions; do
6265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6266    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6268    break 2
6269  fi
6270done
6271  done
6272IFS=$as_save_IFS
6273
6274  ;;
6275esac
6276fi
6277CP=$ac_cv_path_CP
6278if test -n "$CP"; then
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6280$as_echo "$CP" >&6; }
6281else
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }
6284fi
6285
6286
6287          if test "x$CP" = x; then
6288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6289          fi
6290        else
6291          # Otherwise we believe it is a complete path. Use it as it is.
6292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6293$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6295$as_echo_n "checking for CP... " >&6; }
6296          if test ! -x "$tool_specified"; then
6297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6298$as_echo "not found" >&6; }
6299            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6300          fi
6301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6302$as_echo "$tool_specified" >&6; }
6303        fi
6304      fi
6305    fi
6306
6307  fi
6308
6309
6310
6311  if test "x$CP" = x; then
6312    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6313  fi
6314
6315
6316
6317
6318
6319  # Publish this variable in the help.
6320
6321
6322  if [ -z "${CUT+x}" ]; then
6323    # The variable is not set by user, try to locate tool using the code snippet
6324    for ac_prog in cut
6325do
6326  # Extract the first word of "$ac_prog", so it can be a program name with args.
6327set dummy $ac_prog; ac_word=$2
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6329$as_echo_n "checking for $ac_word... " >&6; }
6330if ${ac_cv_path_CUT+:} false; then :
6331  $as_echo_n "(cached) " >&6
6332else
6333  case $CUT in
6334  [\\/]* | ?:[\\/]*)
6335  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6336  ;;
6337  *)
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_exec_ext in '' $ac_executable_extensions; do
6344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6345    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347    break 2
6348  fi
6349done
6350  done
6351IFS=$as_save_IFS
6352
6353  ;;
6354esac
6355fi
6356CUT=$ac_cv_path_CUT
6357if test -n "$CUT"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6359$as_echo "$CUT" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366  test -n "$CUT" && break
6367done
6368
6369  else
6370    # The variable is set, but is it from the command line or the environment?
6371
6372    # Try to remove the string !CUT! from our list.
6373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6375      # If it failed, the variable was not from the command line. Ignore it,
6376      # but warn the user (except for BASH, which is always set by the calling BASH).
6377      if test "xCUT" != xBASH; then
6378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6379$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6380      fi
6381      # Try to locate tool using the code snippet
6382      for ac_prog in cut
6383do
6384  # Extract the first word of "$ac_prog", so it can be a program name with args.
6385set dummy $ac_prog; ac_word=$2
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387$as_echo_n "checking for $ac_word... " >&6; }
6388if ${ac_cv_path_CUT+:} false; then :
6389  $as_echo_n "(cached) " >&6
6390else
6391  case $CUT in
6392  [\\/]* | ?:[\\/]*)
6393  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6394  ;;
6395  *)
6396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6397for as_dir in $PATH
6398do
6399  IFS=$as_save_IFS
6400  test -z "$as_dir" && as_dir=.
6401    for ac_exec_ext in '' $ac_executable_extensions; do
6402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6403    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6405    break 2
6406  fi
6407done
6408  done
6409IFS=$as_save_IFS
6410
6411  ;;
6412esac
6413fi
6414CUT=$ac_cv_path_CUT
6415if test -n "$CUT"; then
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6417$as_echo "$CUT" >&6; }
6418else
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
6421fi
6422
6423
6424  test -n "$CUT" && break
6425done
6426
6427    else
6428      # If it succeeded, then it was overridden by the user. We will use it
6429      # for the tool.
6430
6431      # First remove it from the list of overridden variables, so we can test
6432      # for unknown variables in the end.
6433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6434
6435      # Check if we try to supply an empty value
6436      if test "x$CUT" = x; then
6437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6438$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6440$as_echo_n "checking for CUT... " >&6; }
6441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6442$as_echo "disabled" >&6; }
6443      else
6444        # Check if the provided tool contains a complete path.
6445        tool_specified="$CUT"
6446        tool_basename="${tool_specified##*/}"
6447        if test "x$tool_basename" = "x$tool_specified"; then
6448          # A command without a complete path is provided, search $PATH.
6449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6450$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6451          # Extract the first word of "$tool_basename", so it can be a program name with args.
6452set dummy $tool_basename; ac_word=$2
6453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6454$as_echo_n "checking for $ac_word... " >&6; }
6455if ${ac_cv_path_CUT+:} false; then :
6456  $as_echo_n "(cached) " >&6
6457else
6458  case $CUT in
6459  [\\/]* | ?:[\\/]*)
6460  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6461  ;;
6462  *)
6463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6464for as_dir in $PATH
6465do
6466  IFS=$as_save_IFS
6467  test -z "$as_dir" && as_dir=.
6468    for ac_exec_ext in '' $ac_executable_extensions; do
6469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6470    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6472    break 2
6473  fi
6474done
6475  done
6476IFS=$as_save_IFS
6477
6478  ;;
6479esac
6480fi
6481CUT=$ac_cv_path_CUT
6482if test -n "$CUT"; then
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6484$as_echo "$CUT" >&6; }
6485else
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6487$as_echo "no" >&6; }
6488fi
6489
6490
6491          if test "x$CUT" = x; then
6492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6493          fi
6494        else
6495          # Otherwise we believe it is a complete path. Use it as it is.
6496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6497$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6499$as_echo_n "checking for CUT... " >&6; }
6500          if test ! -x "$tool_specified"; then
6501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6502$as_echo "not found" >&6; }
6503            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6504          fi
6505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6506$as_echo "$tool_specified" >&6; }
6507        fi
6508      fi
6509    fi
6510
6511  fi
6512
6513
6514
6515  if test "x$CUT" = x; then
6516    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6517  fi
6518
6519
6520
6521
6522
6523  # Publish this variable in the help.
6524
6525
6526  if [ -z "${DATE+x}" ]; then
6527    # The variable is not set by user, try to locate tool using the code snippet
6528    for ac_prog in date
6529do
6530  # Extract the first word of "$ac_prog", so it can be a program name with args.
6531set dummy $ac_prog; ac_word=$2
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533$as_echo_n "checking for $ac_word... " >&6; }
6534if ${ac_cv_path_DATE+:} false; then :
6535  $as_echo_n "(cached) " >&6
6536else
6537  case $DATE in
6538  [\\/]* | ?:[\\/]*)
6539  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6540  ;;
6541  *)
6542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543for as_dir in $PATH
6544do
6545  IFS=$as_save_IFS
6546  test -z "$as_dir" && as_dir=.
6547    for ac_exec_ext in '' $ac_executable_extensions; do
6548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6549    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6551    break 2
6552  fi
6553done
6554  done
6555IFS=$as_save_IFS
6556
6557  ;;
6558esac
6559fi
6560DATE=$ac_cv_path_DATE
6561if test -n "$DATE"; then
6562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6563$as_echo "$DATE" >&6; }
6564else
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
6567fi
6568
6569
6570  test -n "$DATE" && break
6571done
6572
6573  else
6574    # The variable is set, but is it from the command line or the environment?
6575
6576    # Try to remove the string !DATE! from our list.
6577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6579      # If it failed, the variable was not from the command line. Ignore it,
6580      # but warn the user (except for BASH, which is always set by the calling BASH).
6581      if test "xDATE" != xBASH; then
6582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6583$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6584      fi
6585      # Try to locate tool using the code snippet
6586      for ac_prog in date
6587do
6588  # Extract the first word of "$ac_prog", so it can be a program name with args.
6589set dummy $ac_prog; ac_word=$2
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6591$as_echo_n "checking for $ac_word... " >&6; }
6592if ${ac_cv_path_DATE+:} false; then :
6593  $as_echo_n "(cached) " >&6
6594else
6595  case $DATE in
6596  [\\/]* | ?:[\\/]*)
6597  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6598  ;;
6599  *)
6600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6601for as_dir in $PATH
6602do
6603  IFS=$as_save_IFS
6604  test -z "$as_dir" && as_dir=.
6605    for ac_exec_ext in '' $ac_executable_extensions; do
6606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6607    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6609    break 2
6610  fi
6611done
6612  done
6613IFS=$as_save_IFS
6614
6615  ;;
6616esac
6617fi
6618DATE=$ac_cv_path_DATE
6619if test -n "$DATE"; then
6620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6621$as_echo "$DATE" >&6; }
6622else
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6624$as_echo "no" >&6; }
6625fi
6626
6627
6628  test -n "$DATE" && break
6629done
6630
6631    else
6632      # If it succeeded, then it was overridden by the user. We will use it
6633      # for the tool.
6634
6635      # First remove it from the list of overridden variables, so we can test
6636      # for unknown variables in the end.
6637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6638
6639      # Check if we try to supply an empty value
6640      if test "x$DATE" = x; then
6641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6642$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6644$as_echo_n "checking for DATE... " >&6; }
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6646$as_echo "disabled" >&6; }
6647      else
6648        # Check if the provided tool contains a complete path.
6649        tool_specified="$DATE"
6650        tool_basename="${tool_specified##*/}"
6651        if test "x$tool_basename" = "x$tool_specified"; then
6652          # A command without a complete path is provided, search $PATH.
6653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6654$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6655          # Extract the first word of "$tool_basename", so it can be a program name with args.
6656set dummy $tool_basename; ac_word=$2
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6658$as_echo_n "checking for $ac_word... " >&6; }
6659if ${ac_cv_path_DATE+:} false; then :
6660  $as_echo_n "(cached) " >&6
6661else
6662  case $DATE in
6663  [\\/]* | ?:[\\/]*)
6664  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6665  ;;
6666  *)
6667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6668for as_dir in $PATH
6669do
6670  IFS=$as_save_IFS
6671  test -z "$as_dir" && as_dir=.
6672    for ac_exec_ext in '' $ac_executable_extensions; do
6673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6674    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6676    break 2
6677  fi
6678done
6679  done
6680IFS=$as_save_IFS
6681
6682  ;;
6683esac
6684fi
6685DATE=$ac_cv_path_DATE
6686if test -n "$DATE"; then
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6688$as_echo "$DATE" >&6; }
6689else
6690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6691$as_echo "no" >&6; }
6692fi
6693
6694
6695          if test "x$DATE" = x; then
6696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6697          fi
6698        else
6699          # Otherwise we believe it is a complete path. Use it as it is.
6700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6701$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6703$as_echo_n "checking for DATE... " >&6; }
6704          if test ! -x "$tool_specified"; then
6705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6706$as_echo "not found" >&6; }
6707            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6708          fi
6709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6710$as_echo "$tool_specified" >&6; }
6711        fi
6712      fi
6713    fi
6714
6715  fi
6716
6717
6718
6719  if test "x$DATE" = x; then
6720    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6721  fi
6722
6723
6724
6725
6726
6727  # Publish this variable in the help.
6728
6729
6730  if [ -z "${DIFF+x}" ]; then
6731    # The variable is not set by user, try to locate tool using the code snippet
6732    for ac_prog in gdiff diff
6733do
6734  # Extract the first word of "$ac_prog", so it can be a program name with args.
6735set dummy $ac_prog; ac_word=$2
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6737$as_echo_n "checking for $ac_word... " >&6; }
6738if ${ac_cv_path_DIFF+:} false; then :
6739  $as_echo_n "(cached) " >&6
6740else
6741  case $DIFF in
6742  [\\/]* | ?:[\\/]*)
6743  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6744  ;;
6745  *)
6746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6747for as_dir in $PATH
6748do
6749  IFS=$as_save_IFS
6750  test -z "$as_dir" && as_dir=.
6751    for ac_exec_ext in '' $ac_executable_extensions; do
6752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6753    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6755    break 2
6756  fi
6757done
6758  done
6759IFS=$as_save_IFS
6760
6761  ;;
6762esac
6763fi
6764DIFF=$ac_cv_path_DIFF
6765if test -n "$DIFF"; then
6766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6767$as_echo "$DIFF" >&6; }
6768else
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770$as_echo "no" >&6; }
6771fi
6772
6773
6774  test -n "$DIFF" && break
6775done
6776
6777  else
6778    # The variable is set, but is it from the command line or the environment?
6779
6780    # Try to remove the string !DIFF! from our list.
6781    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6782    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6783      # If it failed, the variable was not from the command line. Ignore it,
6784      # but warn the user (except for BASH, which is always set by the calling BASH).
6785      if test "xDIFF" != xBASH; then
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6787$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6788      fi
6789      # Try to locate tool using the code snippet
6790      for ac_prog in gdiff diff
6791do
6792  # Extract the first word of "$ac_prog", so it can be a program name with args.
6793set dummy $ac_prog; ac_word=$2
6794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6795$as_echo_n "checking for $ac_word... " >&6; }
6796if ${ac_cv_path_DIFF+:} false; then :
6797  $as_echo_n "(cached) " >&6
6798else
6799  case $DIFF in
6800  [\\/]* | ?:[\\/]*)
6801  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6802  ;;
6803  *)
6804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6805for as_dir in $PATH
6806do
6807  IFS=$as_save_IFS
6808  test -z "$as_dir" && as_dir=.
6809    for ac_exec_ext in '' $ac_executable_extensions; do
6810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6811    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6813    break 2
6814  fi
6815done
6816  done
6817IFS=$as_save_IFS
6818
6819  ;;
6820esac
6821fi
6822DIFF=$ac_cv_path_DIFF
6823if test -n "$DIFF"; then
6824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6825$as_echo "$DIFF" >&6; }
6826else
6827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6828$as_echo "no" >&6; }
6829fi
6830
6831
6832  test -n "$DIFF" && break
6833done
6834
6835    else
6836      # If it succeeded, then it was overridden by the user. We will use it
6837      # for the tool.
6838
6839      # First remove it from the list of overridden variables, so we can test
6840      # for unknown variables in the end.
6841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6842
6843      # Check if we try to supply an empty value
6844      if test "x$DIFF" = x; then
6845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6846$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6848$as_echo_n "checking for DIFF... " >&6; }
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6850$as_echo "disabled" >&6; }
6851      else
6852        # Check if the provided tool contains a complete path.
6853        tool_specified="$DIFF"
6854        tool_basename="${tool_specified##*/}"
6855        if test "x$tool_basename" = "x$tool_specified"; then
6856          # A command without a complete path is provided, search $PATH.
6857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6858$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6859          # Extract the first word of "$tool_basename", so it can be a program name with args.
6860set dummy $tool_basename; ac_word=$2
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6862$as_echo_n "checking for $ac_word... " >&6; }
6863if ${ac_cv_path_DIFF+:} false; then :
6864  $as_echo_n "(cached) " >&6
6865else
6866  case $DIFF in
6867  [\\/]* | ?:[\\/]*)
6868  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6869  ;;
6870  *)
6871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6872for as_dir in $PATH
6873do
6874  IFS=$as_save_IFS
6875  test -z "$as_dir" && as_dir=.
6876    for ac_exec_ext in '' $ac_executable_extensions; do
6877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6878    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6880    break 2
6881  fi
6882done
6883  done
6884IFS=$as_save_IFS
6885
6886  ;;
6887esac
6888fi
6889DIFF=$ac_cv_path_DIFF
6890if test -n "$DIFF"; then
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6892$as_echo "$DIFF" >&6; }
6893else
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6895$as_echo "no" >&6; }
6896fi
6897
6898
6899          if test "x$DIFF" = x; then
6900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6901          fi
6902        else
6903          # Otherwise we believe it is a complete path. Use it as it is.
6904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6905$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6907$as_echo_n "checking for DIFF... " >&6; }
6908          if test ! -x "$tool_specified"; then
6909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6910$as_echo "not found" >&6; }
6911            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6912          fi
6913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6914$as_echo "$tool_specified" >&6; }
6915        fi
6916      fi
6917    fi
6918
6919  fi
6920
6921
6922
6923  if test "x$DIFF" = x; then
6924    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6925  fi
6926
6927
6928
6929
6930
6931  # Publish this variable in the help.
6932
6933
6934  if [ -z "${DIRNAME+x}" ]; then
6935    # The variable is not set by user, try to locate tool using the code snippet
6936    for ac_prog in dirname
6937do
6938  # Extract the first word of "$ac_prog", so it can be a program name with args.
6939set dummy $ac_prog; ac_word=$2
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6941$as_echo_n "checking for $ac_word... " >&6; }
6942if ${ac_cv_path_DIRNAME+:} false; then :
6943  $as_echo_n "(cached) " >&6
6944else
6945  case $DIRNAME in
6946  [\\/]* | ?:[\\/]*)
6947  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6948  ;;
6949  *)
6950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6951for as_dir in $PATH
6952do
6953  IFS=$as_save_IFS
6954  test -z "$as_dir" && as_dir=.
6955    for ac_exec_ext in '' $ac_executable_extensions; do
6956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6957    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6959    break 2
6960  fi
6961done
6962  done
6963IFS=$as_save_IFS
6964
6965  ;;
6966esac
6967fi
6968DIRNAME=$ac_cv_path_DIRNAME
6969if test -n "$DIRNAME"; then
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6971$as_echo "$DIRNAME" >&6; }
6972else
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974$as_echo "no" >&6; }
6975fi
6976
6977
6978  test -n "$DIRNAME" && break
6979done
6980
6981  else
6982    # The variable is set, but is it from the command line or the environment?
6983
6984    # Try to remove the string !DIRNAME! from our list.
6985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6987      # If it failed, the variable was not from the command line. Ignore it,
6988      # but warn the user (except for BASH, which is always set by the calling BASH).
6989      if test "xDIRNAME" != xBASH; then
6990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6991$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6992      fi
6993      # Try to locate tool using the code snippet
6994      for ac_prog in dirname
6995do
6996  # Extract the first word of "$ac_prog", so it can be a program name with args.
6997set dummy $ac_prog; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_DIRNAME+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $DIRNAME in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026DIRNAME=$ac_cv_path_DIRNAME
7027if test -n "$DIRNAME"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7029$as_echo "$DIRNAME" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035
7036  test -n "$DIRNAME" && break
7037done
7038
7039    else
7040      # If it succeeded, then it was overridden by the user. We will use it
7041      # for the tool.
7042
7043      # First remove it from the list of overridden variables, so we can test
7044      # for unknown variables in the end.
7045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7046
7047      # Check if we try to supply an empty value
7048      if test "x$DIRNAME" = x; then
7049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7050$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7052$as_echo_n "checking for DIRNAME... " >&6; }
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7054$as_echo "disabled" >&6; }
7055      else
7056        # Check if the provided tool contains a complete path.
7057        tool_specified="$DIRNAME"
7058        tool_basename="${tool_specified##*/}"
7059        if test "x$tool_basename" = "x$tool_specified"; then
7060          # A command without a complete path is provided, search $PATH.
7061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7062$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7063          # Extract the first word of "$tool_basename", so it can be a program name with args.
7064set dummy $tool_basename; ac_word=$2
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7066$as_echo_n "checking for $ac_word... " >&6; }
7067if ${ac_cv_path_DIRNAME+:} false; then :
7068  $as_echo_n "(cached) " >&6
7069else
7070  case $DIRNAME in
7071  [\\/]* | ?:[\\/]*)
7072  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7073  ;;
7074  *)
7075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7076for as_dir in $PATH
7077do
7078  IFS=$as_save_IFS
7079  test -z "$as_dir" && as_dir=.
7080    for ac_exec_ext in '' $ac_executable_extensions; do
7081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7082    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7084    break 2
7085  fi
7086done
7087  done
7088IFS=$as_save_IFS
7089
7090  ;;
7091esac
7092fi
7093DIRNAME=$ac_cv_path_DIRNAME
7094if test -n "$DIRNAME"; then
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7096$as_echo "$DIRNAME" >&6; }
7097else
7098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7099$as_echo "no" >&6; }
7100fi
7101
7102
7103          if test "x$DIRNAME" = x; then
7104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7105          fi
7106        else
7107          # Otherwise we believe it is a complete path. Use it as it is.
7108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7109$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7111$as_echo_n "checking for DIRNAME... " >&6; }
7112          if test ! -x "$tool_specified"; then
7113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7114$as_echo "not found" >&6; }
7115            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7116          fi
7117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7118$as_echo "$tool_specified" >&6; }
7119        fi
7120      fi
7121    fi
7122
7123  fi
7124
7125
7126
7127  if test "x$DIRNAME" = x; then
7128    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7129  fi
7130
7131
7132
7133
7134
7135  # Publish this variable in the help.
7136
7137
7138  if [ -z "${ECHO+x}" ]; then
7139    # The variable is not set by user, try to locate tool using the code snippet
7140    for ac_prog in echo
7141do
7142  # Extract the first word of "$ac_prog", so it can be a program name with args.
7143set dummy $ac_prog; ac_word=$2
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7145$as_echo_n "checking for $ac_word... " >&6; }
7146if ${ac_cv_path_ECHO+:} false; then :
7147  $as_echo_n "(cached) " >&6
7148else
7149  case $ECHO in
7150  [\\/]* | ?:[\\/]*)
7151  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7152  ;;
7153  *)
7154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155for as_dir in $PATH
7156do
7157  IFS=$as_save_IFS
7158  test -z "$as_dir" && as_dir=.
7159    for ac_exec_ext in '' $ac_executable_extensions; do
7160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7161    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7163    break 2
7164  fi
7165done
7166  done
7167IFS=$as_save_IFS
7168
7169  ;;
7170esac
7171fi
7172ECHO=$ac_cv_path_ECHO
7173if test -n "$ECHO"; then
7174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7175$as_echo "$ECHO" >&6; }
7176else
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7178$as_echo "no" >&6; }
7179fi
7180
7181
7182  test -n "$ECHO" && break
7183done
7184
7185  else
7186    # The variable is set, but is it from the command line or the environment?
7187
7188    # Try to remove the string !ECHO! from our list.
7189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7191      # If it failed, the variable was not from the command line. Ignore it,
7192      # but warn the user (except for BASH, which is always set by the calling BASH).
7193      if test "xECHO" != xBASH; then
7194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7195$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7196      fi
7197      # Try to locate tool using the code snippet
7198      for ac_prog in echo
7199do
7200  # Extract the first word of "$ac_prog", so it can be a program name with args.
7201set dummy $ac_prog; ac_word=$2
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7203$as_echo_n "checking for $ac_word... " >&6; }
7204if ${ac_cv_path_ECHO+:} false; then :
7205  $as_echo_n "(cached) " >&6
7206else
7207  case $ECHO in
7208  [\\/]* | ?:[\\/]*)
7209  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7210  ;;
7211  *)
7212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213for as_dir in $PATH
7214do
7215  IFS=$as_save_IFS
7216  test -z "$as_dir" && as_dir=.
7217    for ac_exec_ext in '' $ac_executable_extensions; do
7218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7219    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7221    break 2
7222  fi
7223done
7224  done
7225IFS=$as_save_IFS
7226
7227  ;;
7228esac
7229fi
7230ECHO=$ac_cv_path_ECHO
7231if test -n "$ECHO"; then
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7233$as_echo "$ECHO" >&6; }
7234else
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7236$as_echo "no" >&6; }
7237fi
7238
7239
7240  test -n "$ECHO" && break
7241done
7242
7243    else
7244      # If it succeeded, then it was overridden by the user. We will use it
7245      # for the tool.
7246
7247      # First remove it from the list of overridden variables, so we can test
7248      # for unknown variables in the end.
7249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7250
7251      # Check if we try to supply an empty value
7252      if test "x$ECHO" = x; then
7253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7254$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7256$as_echo_n "checking for ECHO... " >&6; }
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7258$as_echo "disabled" >&6; }
7259      else
7260        # Check if the provided tool contains a complete path.
7261        tool_specified="$ECHO"
7262        tool_basename="${tool_specified##*/}"
7263        if test "x$tool_basename" = "x$tool_specified"; then
7264          # A command without a complete path is provided, search $PATH.
7265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7266$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7267          # Extract the first word of "$tool_basename", so it can be a program name with args.
7268set dummy $tool_basename; ac_word=$2
7269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7270$as_echo_n "checking for $ac_word... " >&6; }
7271if ${ac_cv_path_ECHO+:} false; then :
7272  $as_echo_n "(cached) " >&6
7273else
7274  case $ECHO in
7275  [\\/]* | ?:[\\/]*)
7276  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7277  ;;
7278  *)
7279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282  IFS=$as_save_IFS
7283  test -z "$as_dir" && as_dir=.
7284    for ac_exec_ext in '' $ac_executable_extensions; do
7285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7286    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7288    break 2
7289  fi
7290done
7291  done
7292IFS=$as_save_IFS
7293
7294  ;;
7295esac
7296fi
7297ECHO=$ac_cv_path_ECHO
7298if test -n "$ECHO"; then
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7300$as_echo "$ECHO" >&6; }
7301else
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303$as_echo "no" >&6; }
7304fi
7305
7306
7307          if test "x$ECHO" = x; then
7308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7309          fi
7310        else
7311          # Otherwise we believe it is a complete path. Use it as it is.
7312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7313$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7315$as_echo_n "checking for ECHO... " >&6; }
7316          if test ! -x "$tool_specified"; then
7317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7318$as_echo "not found" >&6; }
7319            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7320          fi
7321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7322$as_echo "$tool_specified" >&6; }
7323        fi
7324      fi
7325    fi
7326
7327  fi
7328
7329
7330
7331  if test "x$ECHO" = x; then
7332    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7333  fi
7334
7335
7336
7337
7338
7339  # Publish this variable in the help.
7340
7341
7342  if [ -z "${EXPR+x}" ]; then
7343    # The variable is not set by user, try to locate tool using the code snippet
7344    for ac_prog in expr
7345do
7346  # Extract the first word of "$ac_prog", so it can be a program name with args.
7347set dummy $ac_prog; ac_word=$2
7348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349$as_echo_n "checking for $ac_word... " >&6; }
7350if ${ac_cv_path_EXPR+:} false; then :
7351  $as_echo_n "(cached) " >&6
7352else
7353  case $EXPR in
7354  [\\/]* | ?:[\\/]*)
7355  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7356  ;;
7357  *)
7358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7359for as_dir in $PATH
7360do
7361  IFS=$as_save_IFS
7362  test -z "$as_dir" && as_dir=.
7363    for ac_exec_ext in '' $ac_executable_extensions; do
7364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7365    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7367    break 2
7368  fi
7369done
7370  done
7371IFS=$as_save_IFS
7372
7373  ;;
7374esac
7375fi
7376EXPR=$ac_cv_path_EXPR
7377if test -n "$EXPR"; then
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7379$as_echo "$EXPR" >&6; }
7380else
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7382$as_echo "no" >&6; }
7383fi
7384
7385
7386  test -n "$EXPR" && break
7387done
7388
7389  else
7390    # The variable is set, but is it from the command line or the environment?
7391
7392    # Try to remove the string !EXPR! from our list.
7393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7395      # If it failed, the variable was not from the command line. Ignore it,
7396      # but warn the user (except for BASH, which is always set by the calling BASH).
7397      if test "xEXPR" != xBASH; then
7398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7399$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7400      fi
7401      # Try to locate tool using the code snippet
7402      for ac_prog in expr
7403do
7404  # Extract the first word of "$ac_prog", so it can be a program name with args.
7405set dummy $ac_prog; ac_word=$2
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7407$as_echo_n "checking for $ac_word... " >&6; }
7408if ${ac_cv_path_EXPR+:} false; then :
7409  $as_echo_n "(cached) " >&6
7410else
7411  case $EXPR in
7412  [\\/]* | ?:[\\/]*)
7413  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7414  ;;
7415  *)
7416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7417for as_dir in $PATH
7418do
7419  IFS=$as_save_IFS
7420  test -z "$as_dir" && as_dir=.
7421    for ac_exec_ext in '' $ac_executable_extensions; do
7422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7423    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7425    break 2
7426  fi
7427done
7428  done
7429IFS=$as_save_IFS
7430
7431  ;;
7432esac
7433fi
7434EXPR=$ac_cv_path_EXPR
7435if test -n "$EXPR"; then
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7437$as_echo "$EXPR" >&6; }
7438else
7439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440$as_echo "no" >&6; }
7441fi
7442
7443
7444  test -n "$EXPR" && break
7445done
7446
7447    else
7448      # If it succeeded, then it was overridden by the user. We will use it
7449      # for the tool.
7450
7451      # First remove it from the list of overridden variables, so we can test
7452      # for unknown variables in the end.
7453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7454
7455      # Check if we try to supply an empty value
7456      if test "x$EXPR" = x; then
7457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7458$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7460$as_echo_n "checking for EXPR... " >&6; }
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7462$as_echo "disabled" >&6; }
7463      else
7464        # Check if the provided tool contains a complete path.
7465        tool_specified="$EXPR"
7466        tool_basename="${tool_specified##*/}"
7467        if test "x$tool_basename" = "x$tool_specified"; then
7468          # A command without a complete path is provided, search $PATH.
7469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7470$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7471          # Extract the first word of "$tool_basename", so it can be a program name with args.
7472set dummy $tool_basename; ac_word=$2
7473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7474$as_echo_n "checking for $ac_word... " >&6; }
7475if ${ac_cv_path_EXPR+:} false; then :
7476  $as_echo_n "(cached) " >&6
7477else
7478  case $EXPR in
7479  [\\/]* | ?:[\\/]*)
7480  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7481  ;;
7482  *)
7483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7484for as_dir in $PATH
7485do
7486  IFS=$as_save_IFS
7487  test -z "$as_dir" && as_dir=.
7488    for ac_exec_ext in '' $ac_executable_extensions; do
7489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7490    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7492    break 2
7493  fi
7494done
7495  done
7496IFS=$as_save_IFS
7497
7498  ;;
7499esac
7500fi
7501EXPR=$ac_cv_path_EXPR
7502if test -n "$EXPR"; then
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7504$as_echo "$EXPR" >&6; }
7505else
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7507$as_echo "no" >&6; }
7508fi
7509
7510
7511          if test "x$EXPR" = x; then
7512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7513          fi
7514        else
7515          # Otherwise we believe it is a complete path. Use it as it is.
7516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7517$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7519$as_echo_n "checking for EXPR... " >&6; }
7520          if test ! -x "$tool_specified"; then
7521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7522$as_echo "not found" >&6; }
7523            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7524          fi
7525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7526$as_echo "$tool_specified" >&6; }
7527        fi
7528      fi
7529    fi
7530
7531  fi
7532
7533
7534
7535  if test "x$EXPR" = x; then
7536    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7537  fi
7538
7539
7540
7541
7542
7543  # Publish this variable in the help.
7544
7545
7546  if [ -z "${FILE+x}" ]; then
7547    # The variable is not set by user, try to locate tool using the code snippet
7548    for ac_prog in file
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_FILE+:} false; then :
7555  $as_echo_n "(cached) " >&6
7556else
7557  case $FILE in
7558  [\\/]* | ?:[\\/]*)
7559  ac_cv_path_FILE="$FILE" # 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_FILE="$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
7580FILE=$ac_cv_path_FILE
7581if test -n "$FILE"; then
7582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7583$as_echo "$FILE" >&6; }
7584else
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586$as_echo "no" >&6; }
7587fi
7588
7589
7590  test -n "$FILE" && break
7591done
7592
7593  else
7594    # The variable is set, but is it from the command line or the environment?
7595
7596    # Try to remove the string !FILE! from our list.
7597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7599      # If it failed, the variable was not from the command line. Ignore it,
7600      # but warn the user (except for BASH, which is always set by the calling BASH).
7601      if test "xFILE" != xBASH; then
7602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7603$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7604      fi
7605      # Try to locate tool using the code snippet
7606      for ac_prog in file
7607do
7608  # Extract the first word of "$ac_prog", so it can be a program name with args.
7609set dummy $ac_prog; ac_word=$2
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7611$as_echo_n "checking for $ac_word... " >&6; }
7612if ${ac_cv_path_FILE+:} false; then :
7613  $as_echo_n "(cached) " >&6
7614else
7615  case $FILE in
7616  [\\/]* | ?:[\\/]*)
7617  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7618  ;;
7619  *)
7620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7621for as_dir in $PATH
7622do
7623  IFS=$as_save_IFS
7624  test -z "$as_dir" && as_dir=.
7625    for ac_exec_ext in '' $ac_executable_extensions; do
7626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7627    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7629    break 2
7630  fi
7631done
7632  done
7633IFS=$as_save_IFS
7634
7635  ;;
7636esac
7637fi
7638FILE=$ac_cv_path_FILE
7639if test -n "$FILE"; then
7640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7641$as_echo "$FILE" >&6; }
7642else
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644$as_echo "no" >&6; }
7645fi
7646
7647
7648  test -n "$FILE" && break
7649done
7650
7651    else
7652      # If it succeeded, then it was overridden by the user. We will use it
7653      # for the tool.
7654
7655      # First remove it from the list of overridden variables, so we can test
7656      # for unknown variables in the end.
7657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7658
7659      # Check if we try to supply an empty value
7660      if test "x$FILE" = x; then
7661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7662$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7664$as_echo_n "checking for FILE... " >&6; }
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7666$as_echo "disabled" >&6; }
7667      else
7668        # Check if the provided tool contains a complete path.
7669        tool_specified="$FILE"
7670        tool_basename="${tool_specified##*/}"
7671        if test "x$tool_basename" = "x$tool_specified"; then
7672          # A command without a complete path is provided, search $PATH.
7673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7674$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7675          # Extract the first word of "$tool_basename", so it can be a program name with args.
7676set dummy $tool_basename; ac_word=$2
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7678$as_echo_n "checking for $ac_word... " >&6; }
7679if ${ac_cv_path_FILE+:} false; then :
7680  $as_echo_n "(cached) " >&6
7681else
7682  case $FILE in
7683  [\\/]* | ?:[\\/]*)
7684  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7685  ;;
7686  *)
7687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7688for as_dir in $PATH
7689do
7690  IFS=$as_save_IFS
7691  test -z "$as_dir" && as_dir=.
7692    for ac_exec_ext in '' $ac_executable_extensions; do
7693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7694    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7696    break 2
7697  fi
7698done
7699  done
7700IFS=$as_save_IFS
7701
7702  ;;
7703esac
7704fi
7705FILE=$ac_cv_path_FILE
7706if test -n "$FILE"; then
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7708$as_echo "$FILE" >&6; }
7709else
7710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711$as_echo "no" >&6; }
7712fi
7713
7714
7715          if test "x$FILE" = x; then
7716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7717          fi
7718        else
7719          # Otherwise we believe it is a complete path. Use it as it is.
7720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7721$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7723$as_echo_n "checking for FILE... " >&6; }
7724          if test ! -x "$tool_specified"; then
7725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7726$as_echo "not found" >&6; }
7727            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7728          fi
7729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7730$as_echo "$tool_specified" >&6; }
7731        fi
7732      fi
7733    fi
7734
7735  fi
7736
7737
7738
7739  if test "x$FILE" = x; then
7740    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7741  fi
7742
7743
7744
7745
7746
7747  # Publish this variable in the help.
7748
7749
7750  if [ -z "${FIND+x}" ]; then
7751    # The variable is not set by user, try to locate tool using the code snippet
7752    for ac_prog in find
7753do
7754  # Extract the first word of "$ac_prog", so it can be a program name with args.
7755set dummy $ac_prog; ac_word=$2
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7757$as_echo_n "checking for $ac_word... " >&6; }
7758if ${ac_cv_path_FIND+:} false; then :
7759  $as_echo_n "(cached) " >&6
7760else
7761  case $FIND in
7762  [\\/]* | ?:[\\/]*)
7763  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7764  ;;
7765  *)
7766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767for as_dir in $PATH
7768do
7769  IFS=$as_save_IFS
7770  test -z "$as_dir" && as_dir=.
7771    for ac_exec_ext in '' $ac_executable_extensions; do
7772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7773    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7775    break 2
7776  fi
7777done
7778  done
7779IFS=$as_save_IFS
7780
7781  ;;
7782esac
7783fi
7784FIND=$ac_cv_path_FIND
7785if test -n "$FIND"; then
7786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7787$as_echo "$FIND" >&6; }
7788else
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7790$as_echo "no" >&6; }
7791fi
7792
7793
7794  test -n "$FIND" && break
7795done
7796
7797  else
7798    # The variable is set, but is it from the command line or the environment?
7799
7800    # Try to remove the string !FIND! from our list.
7801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7803      # If it failed, the variable was not from the command line. Ignore it,
7804      # but warn the user (except for BASH, which is always set by the calling BASH).
7805      if test "xFIND" != xBASH; then
7806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7807$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7808      fi
7809      # Try to locate tool using the code snippet
7810      for ac_prog in find
7811do
7812  # Extract the first word of "$ac_prog", so it can be a program name with args.
7813set dummy $ac_prog; ac_word=$2
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7815$as_echo_n "checking for $ac_word... " >&6; }
7816if ${ac_cv_path_FIND+:} false; then :
7817  $as_echo_n "(cached) " >&6
7818else
7819  case $FIND in
7820  [\\/]* | ?:[\\/]*)
7821  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7822  ;;
7823  *)
7824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7825for as_dir in $PATH
7826do
7827  IFS=$as_save_IFS
7828  test -z "$as_dir" && as_dir=.
7829    for ac_exec_ext in '' $ac_executable_extensions; do
7830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7831    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7833    break 2
7834  fi
7835done
7836  done
7837IFS=$as_save_IFS
7838
7839  ;;
7840esac
7841fi
7842FIND=$ac_cv_path_FIND
7843if test -n "$FIND"; then
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7845$as_echo "$FIND" >&6; }
7846else
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848$as_echo "no" >&6; }
7849fi
7850
7851
7852  test -n "$FIND" && break
7853done
7854
7855    else
7856      # If it succeeded, then it was overridden by the user. We will use it
7857      # for the tool.
7858
7859      # First remove it from the list of overridden variables, so we can test
7860      # for unknown variables in the end.
7861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7862
7863      # Check if we try to supply an empty value
7864      if test "x$FIND" = x; then
7865        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7866$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7868$as_echo_n "checking for FIND... " >&6; }
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7870$as_echo "disabled" >&6; }
7871      else
7872        # Check if the provided tool contains a complete path.
7873        tool_specified="$FIND"
7874        tool_basename="${tool_specified##*/}"
7875        if test "x$tool_basename" = "x$tool_specified"; then
7876          # A command without a complete path is provided, search $PATH.
7877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7878$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7879          # Extract the first word of "$tool_basename", so it can be a program name with args.
7880set dummy $tool_basename; ac_word=$2
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7882$as_echo_n "checking for $ac_word... " >&6; }
7883if ${ac_cv_path_FIND+:} false; then :
7884  $as_echo_n "(cached) " >&6
7885else
7886  case $FIND in
7887  [\\/]* | ?:[\\/]*)
7888  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7889  ;;
7890  *)
7891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7892for as_dir in $PATH
7893do
7894  IFS=$as_save_IFS
7895  test -z "$as_dir" && as_dir=.
7896    for ac_exec_ext in '' $ac_executable_extensions; do
7897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7898    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7900    break 2
7901  fi
7902done
7903  done
7904IFS=$as_save_IFS
7905
7906  ;;
7907esac
7908fi
7909FIND=$ac_cv_path_FIND
7910if test -n "$FIND"; then
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7912$as_echo "$FIND" >&6; }
7913else
7914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7915$as_echo "no" >&6; }
7916fi
7917
7918
7919          if test "x$FIND" = x; then
7920            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7921          fi
7922        else
7923          # Otherwise we believe it is a complete path. Use it as it is.
7924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7925$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7926          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7927$as_echo_n "checking for FIND... " >&6; }
7928          if test ! -x "$tool_specified"; then
7929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7930$as_echo "not found" >&6; }
7931            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7932          fi
7933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7934$as_echo "$tool_specified" >&6; }
7935        fi
7936      fi
7937    fi
7938
7939  fi
7940
7941
7942
7943  if test "x$FIND" = x; then
7944    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7945  fi
7946
7947
7948
7949
7950
7951  # Publish this variable in the help.
7952
7953
7954  if [ -z "${HEAD+x}" ]; then
7955    # The variable is not set by user, try to locate tool using the code snippet
7956    for ac_prog in head
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_HEAD+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $HEAD in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988HEAD=$ac_cv_path_HEAD
7989if test -n "$HEAD"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7991$as_echo "$HEAD" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$HEAD" && break
7999done
8000
8001  else
8002    # The variable is set, but is it from the command line or the environment?
8003
8004    # Try to remove the string !HEAD! from our list.
8005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8007      # If it failed, the variable was not from the command line. Ignore it,
8008      # but warn the user (except for BASH, which is always set by the calling BASH).
8009      if test "xHEAD" != xBASH; then
8010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8011$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8012      fi
8013      # Try to locate tool using the code snippet
8014      for ac_prog in head
8015do
8016  # Extract the first word of "$ac_prog", so it can be a program name with args.
8017set dummy $ac_prog; ac_word=$2
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8019$as_echo_n "checking for $ac_word... " >&6; }
8020if ${ac_cv_path_HEAD+:} false; then :
8021  $as_echo_n "(cached) " >&6
8022else
8023  case $HEAD in
8024  [\\/]* | ?:[\\/]*)
8025  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8026  ;;
8027  *)
8028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8029for as_dir in $PATH
8030do
8031  IFS=$as_save_IFS
8032  test -z "$as_dir" && as_dir=.
8033    for ac_exec_ext in '' $ac_executable_extensions; do
8034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8035    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8037    break 2
8038  fi
8039done
8040  done
8041IFS=$as_save_IFS
8042
8043  ;;
8044esac
8045fi
8046HEAD=$ac_cv_path_HEAD
8047if test -n "$HEAD"; then
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8049$as_echo "$HEAD" >&6; }
8050else
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056  test -n "$HEAD" && break
8057done
8058
8059    else
8060      # If it succeeded, then it was overridden by the user. We will use it
8061      # for the tool.
8062
8063      # First remove it from the list of overridden variables, so we can test
8064      # for unknown variables in the end.
8065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8066
8067      # Check if we try to supply an empty value
8068      if test "x$HEAD" = x; then
8069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8070$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8072$as_echo_n "checking for HEAD... " >&6; }
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8074$as_echo "disabled" >&6; }
8075      else
8076        # Check if the provided tool contains a complete path.
8077        tool_specified="$HEAD"
8078        tool_basename="${tool_specified##*/}"
8079        if test "x$tool_basename" = "x$tool_specified"; then
8080          # A command without a complete path is provided, search $PATH.
8081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8082$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8083          # Extract the first word of "$tool_basename", so it can be a program name with args.
8084set dummy $tool_basename; ac_word=$2
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if ${ac_cv_path_HEAD+:} false; then :
8088  $as_echo_n "(cached) " >&6
8089else
8090  case $HEAD in
8091  [\\/]* | ?:[\\/]*)
8092  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8093  ;;
8094  *)
8095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8096for as_dir in $PATH
8097do
8098  IFS=$as_save_IFS
8099  test -z "$as_dir" && as_dir=.
8100    for ac_exec_ext in '' $ac_executable_extensions; do
8101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8102    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8104    break 2
8105  fi
8106done
8107  done
8108IFS=$as_save_IFS
8109
8110  ;;
8111esac
8112fi
8113HEAD=$ac_cv_path_HEAD
8114if test -n "$HEAD"; then
8115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8116$as_echo "$HEAD" >&6; }
8117else
8118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8119$as_echo "no" >&6; }
8120fi
8121
8122
8123          if test "x$HEAD" = x; then
8124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8125          fi
8126        else
8127          # Otherwise we believe it is a complete path. Use it as it is.
8128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8129$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8131$as_echo_n "checking for HEAD... " >&6; }
8132          if test ! -x "$tool_specified"; then
8133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8134$as_echo "not found" >&6; }
8135            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8136          fi
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8138$as_echo "$tool_specified" >&6; }
8139        fi
8140      fi
8141    fi
8142
8143  fi
8144
8145
8146
8147  if test "x$HEAD" = x; then
8148    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8149  fi
8150
8151
8152
8153
8154
8155  # Publish this variable in the help.
8156
8157
8158  if [ -z "${LN+x}" ]; then
8159    # The variable is not set by user, try to locate tool using the code snippet
8160    for ac_prog in ln
8161do
8162  # Extract the first word of "$ac_prog", so it can be a program name with args.
8163set dummy $ac_prog; ac_word=$2
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8165$as_echo_n "checking for $ac_word... " >&6; }
8166if ${ac_cv_path_LN+:} false; then :
8167  $as_echo_n "(cached) " >&6
8168else
8169  case $LN in
8170  [\\/]* | ?:[\\/]*)
8171  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8172  ;;
8173  *)
8174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8175for as_dir in $PATH
8176do
8177  IFS=$as_save_IFS
8178  test -z "$as_dir" && as_dir=.
8179    for ac_exec_ext in '' $ac_executable_extensions; do
8180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8181    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8183    break 2
8184  fi
8185done
8186  done
8187IFS=$as_save_IFS
8188
8189  ;;
8190esac
8191fi
8192LN=$ac_cv_path_LN
8193if test -n "$LN"; then
8194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8195$as_echo "$LN" >&6; }
8196else
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8198$as_echo "no" >&6; }
8199fi
8200
8201
8202  test -n "$LN" && break
8203done
8204
8205  else
8206    # The variable is set, but is it from the command line or the environment?
8207
8208    # Try to remove the string !LN! from our list.
8209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8211      # If it failed, the variable was not from the command line. Ignore it,
8212      # but warn the user (except for BASH, which is always set by the calling BASH).
8213      if test "xLN" != xBASH; then
8214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8215$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8216      fi
8217      # Try to locate tool using the code snippet
8218      for ac_prog in ln
8219do
8220  # Extract the first word of "$ac_prog", so it can be a program name with args.
8221set dummy $ac_prog; ac_word=$2
8222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8223$as_echo_n "checking for $ac_word... " >&6; }
8224if ${ac_cv_path_LN+:} false; then :
8225  $as_echo_n "(cached) " >&6
8226else
8227  case $LN in
8228  [\\/]* | ?:[\\/]*)
8229  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8230  ;;
8231  *)
8232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233for as_dir in $PATH
8234do
8235  IFS=$as_save_IFS
8236  test -z "$as_dir" && as_dir=.
8237    for ac_exec_ext in '' $ac_executable_extensions; do
8238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8239    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8241    break 2
8242  fi
8243done
8244  done
8245IFS=$as_save_IFS
8246
8247  ;;
8248esac
8249fi
8250LN=$ac_cv_path_LN
8251if test -n "$LN"; then
8252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8253$as_echo "$LN" >&6; }
8254else
8255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8256$as_echo "no" >&6; }
8257fi
8258
8259
8260  test -n "$LN" && break
8261done
8262
8263    else
8264      # If it succeeded, then it was overridden by the user. We will use it
8265      # for the tool.
8266
8267      # First remove it from the list of overridden variables, so we can test
8268      # for unknown variables in the end.
8269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8270
8271      # Check if we try to supply an empty value
8272      if test "x$LN" = x; then
8273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8274$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8276$as_echo_n "checking for LN... " >&6; }
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8278$as_echo "disabled" >&6; }
8279      else
8280        # Check if the provided tool contains a complete path.
8281        tool_specified="$LN"
8282        tool_basename="${tool_specified##*/}"
8283        if test "x$tool_basename" = "x$tool_specified"; then
8284          # A command without a complete path is provided, search $PATH.
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8286$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8287          # Extract the first word of "$tool_basename", so it can be a program name with args.
8288set dummy $tool_basename; ac_word=$2
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290$as_echo_n "checking for $ac_word... " >&6; }
8291if ${ac_cv_path_LN+:} false; then :
8292  $as_echo_n "(cached) " >&6
8293else
8294  case $LN in
8295  [\\/]* | ?:[\\/]*)
8296  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8297  ;;
8298  *)
8299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300for as_dir in $PATH
8301do
8302  IFS=$as_save_IFS
8303  test -z "$as_dir" && as_dir=.
8304    for ac_exec_ext in '' $ac_executable_extensions; do
8305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308    break 2
8309  fi
8310done
8311  done
8312IFS=$as_save_IFS
8313
8314  ;;
8315esac
8316fi
8317LN=$ac_cv_path_LN
8318if test -n "$LN"; then
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8320$as_echo "$LN" >&6; }
8321else
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324fi
8325
8326
8327          if test "x$LN" = x; then
8328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8329          fi
8330        else
8331          # Otherwise we believe it is a complete path. Use it as it is.
8332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8333$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8335$as_echo_n "checking for LN... " >&6; }
8336          if test ! -x "$tool_specified"; then
8337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8338$as_echo "not found" >&6; }
8339            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8340          fi
8341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8342$as_echo "$tool_specified" >&6; }
8343        fi
8344      fi
8345    fi
8346
8347  fi
8348
8349
8350
8351  if test "x$LN" = x; then
8352    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8353  fi
8354
8355
8356
8357
8358
8359  # Publish this variable in the help.
8360
8361
8362  if [ -z "${LS+x}" ]; then
8363    # The variable is not set by user, try to locate tool using the code snippet
8364    for ac_prog in ls
8365do
8366  # Extract the first word of "$ac_prog", so it can be a program name with args.
8367set dummy $ac_prog; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_LS+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $LS in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396LS=$ac_cv_path_LS
8397if test -n "$LS"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8399$as_echo "$LS" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406  test -n "$LS" && break
8407done
8408
8409  else
8410    # The variable is set, but is it from the command line or the environment?
8411
8412    # Try to remove the string !LS! from our list.
8413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8415      # If it failed, the variable was not from the command line. Ignore it,
8416      # but warn the user (except for BASH, which is always set by the calling BASH).
8417      if test "xLS" != xBASH; then
8418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8419$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8420      fi
8421      # Try to locate tool using the code snippet
8422      for ac_prog in ls
8423do
8424  # Extract the first word of "$ac_prog", so it can be a program name with args.
8425set dummy $ac_prog; ac_word=$2
8426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8427$as_echo_n "checking for $ac_word... " >&6; }
8428if ${ac_cv_path_LS+:} false; then :
8429  $as_echo_n "(cached) " >&6
8430else
8431  case $LS in
8432  [\\/]* | ?:[\\/]*)
8433  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8434  ;;
8435  *)
8436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8437for as_dir in $PATH
8438do
8439  IFS=$as_save_IFS
8440  test -z "$as_dir" && as_dir=.
8441    for ac_exec_ext in '' $ac_executable_extensions; do
8442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8443    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8445    break 2
8446  fi
8447done
8448  done
8449IFS=$as_save_IFS
8450
8451  ;;
8452esac
8453fi
8454LS=$ac_cv_path_LS
8455if test -n "$LS"; then
8456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8457$as_echo "$LS" >&6; }
8458else
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8460$as_echo "no" >&6; }
8461fi
8462
8463
8464  test -n "$LS" && break
8465done
8466
8467    else
8468      # If it succeeded, then it was overridden by the user. We will use it
8469      # for the tool.
8470
8471      # First remove it from the list of overridden variables, so we can test
8472      # for unknown variables in the end.
8473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8474
8475      # Check if we try to supply an empty value
8476      if test "x$LS" = x; then
8477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8478$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8480$as_echo_n "checking for LS... " >&6; }
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8482$as_echo "disabled" >&6; }
8483      else
8484        # Check if the provided tool contains a complete path.
8485        tool_specified="$LS"
8486        tool_basename="${tool_specified##*/}"
8487        if test "x$tool_basename" = "x$tool_specified"; then
8488          # A command without a complete path is provided, search $PATH.
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8490$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8491          # Extract the first word of "$tool_basename", so it can be a program name with args.
8492set dummy $tool_basename; ac_word=$2
8493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8494$as_echo_n "checking for $ac_word... " >&6; }
8495if ${ac_cv_path_LS+:} false; then :
8496  $as_echo_n "(cached) " >&6
8497else
8498  case $LS in
8499  [\\/]* | ?:[\\/]*)
8500  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8501  ;;
8502  *)
8503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8504for as_dir in $PATH
8505do
8506  IFS=$as_save_IFS
8507  test -z "$as_dir" && as_dir=.
8508    for ac_exec_ext in '' $ac_executable_extensions; do
8509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8510    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8512    break 2
8513  fi
8514done
8515  done
8516IFS=$as_save_IFS
8517
8518  ;;
8519esac
8520fi
8521LS=$ac_cv_path_LS
8522if test -n "$LS"; then
8523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8524$as_echo "$LS" >&6; }
8525else
8526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8527$as_echo "no" >&6; }
8528fi
8529
8530
8531          if test "x$LS" = x; then
8532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8533          fi
8534        else
8535          # Otherwise we believe it is a complete path. Use it as it is.
8536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8537$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8539$as_echo_n "checking for LS... " >&6; }
8540          if test ! -x "$tool_specified"; then
8541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8542$as_echo "not found" >&6; }
8543            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8544          fi
8545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8546$as_echo "$tool_specified" >&6; }
8547        fi
8548      fi
8549    fi
8550
8551  fi
8552
8553
8554
8555  if test "x$LS" = x; then
8556    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8557  fi
8558
8559
8560
8561
8562
8563  # Publish this variable in the help.
8564
8565
8566  if [ -z "${MKDIR+x}" ]; then
8567    # The variable is not set by user, try to locate tool using the code snippet
8568    for ac_prog in mkdir
8569do
8570  # Extract the first word of "$ac_prog", so it can be a program name with args.
8571set dummy $ac_prog; ac_word=$2
8572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8573$as_echo_n "checking for $ac_word... " >&6; }
8574if ${ac_cv_path_MKDIR+:} false; then :
8575  $as_echo_n "(cached) " >&6
8576else
8577  case $MKDIR in
8578  [\\/]* | ?:[\\/]*)
8579  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8580  ;;
8581  *)
8582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8583for as_dir in $PATH
8584do
8585  IFS=$as_save_IFS
8586  test -z "$as_dir" && as_dir=.
8587    for ac_exec_ext in '' $ac_executable_extensions; do
8588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8589    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8591    break 2
8592  fi
8593done
8594  done
8595IFS=$as_save_IFS
8596
8597  ;;
8598esac
8599fi
8600MKDIR=$ac_cv_path_MKDIR
8601if test -n "$MKDIR"; then
8602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8603$as_echo "$MKDIR" >&6; }
8604else
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8606$as_echo "no" >&6; }
8607fi
8608
8609
8610  test -n "$MKDIR" && break
8611done
8612
8613  else
8614    # The variable is set, but is it from the command line or the environment?
8615
8616    # Try to remove the string !MKDIR! from our list.
8617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8619      # If it failed, the variable was not from the command line. Ignore it,
8620      # but warn the user (except for BASH, which is always set by the calling BASH).
8621      if test "xMKDIR" != xBASH; then
8622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8623$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8624      fi
8625      # Try to locate tool using the code snippet
8626      for ac_prog in mkdir
8627do
8628  # Extract the first word of "$ac_prog", so it can be a program name with args.
8629set dummy $ac_prog; ac_word=$2
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631$as_echo_n "checking for $ac_word... " >&6; }
8632if ${ac_cv_path_MKDIR+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  case $MKDIR in
8636  [\\/]* | ?:[\\/]*)
8637  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8638  ;;
8639  *)
8640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641for as_dir in $PATH
8642do
8643  IFS=$as_save_IFS
8644  test -z "$as_dir" && as_dir=.
8645    for ac_exec_ext in '' $ac_executable_extensions; do
8646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8647    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8649    break 2
8650  fi
8651done
8652  done
8653IFS=$as_save_IFS
8654
8655  ;;
8656esac
8657fi
8658MKDIR=$ac_cv_path_MKDIR
8659if test -n "$MKDIR"; then
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8661$as_echo "$MKDIR" >&6; }
8662else
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668  test -n "$MKDIR" && break
8669done
8670
8671    else
8672      # If it succeeded, then it was overridden by the user. We will use it
8673      # for the tool.
8674
8675      # First remove it from the list of overridden variables, so we can test
8676      # for unknown variables in the end.
8677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8678
8679      # Check if we try to supply an empty value
8680      if test "x$MKDIR" = x; then
8681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8682$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8684$as_echo_n "checking for MKDIR... " >&6; }
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8686$as_echo "disabled" >&6; }
8687      else
8688        # Check if the provided tool contains a complete path.
8689        tool_specified="$MKDIR"
8690        tool_basename="${tool_specified##*/}"
8691        if test "x$tool_basename" = "x$tool_specified"; then
8692          # A command without a complete path is provided, search $PATH.
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8694$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8695          # Extract the first word of "$tool_basename", so it can be a program name with args.
8696set dummy $tool_basename; ac_word=$2
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8698$as_echo_n "checking for $ac_word... " >&6; }
8699if ${ac_cv_path_MKDIR+:} false; then :
8700  $as_echo_n "(cached) " >&6
8701else
8702  case $MKDIR in
8703  [\\/]* | ?:[\\/]*)
8704  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8705  ;;
8706  *)
8707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8708for as_dir in $PATH
8709do
8710  IFS=$as_save_IFS
8711  test -z "$as_dir" && as_dir=.
8712    for ac_exec_ext in '' $ac_executable_extensions; do
8713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8714    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8716    break 2
8717  fi
8718done
8719  done
8720IFS=$as_save_IFS
8721
8722  ;;
8723esac
8724fi
8725MKDIR=$ac_cv_path_MKDIR
8726if test -n "$MKDIR"; then
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8728$as_echo "$MKDIR" >&6; }
8729else
8730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8731$as_echo "no" >&6; }
8732fi
8733
8734
8735          if test "x$MKDIR" = x; then
8736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8737          fi
8738        else
8739          # Otherwise we believe it is a complete path. Use it as it is.
8740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8741$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8743$as_echo_n "checking for MKDIR... " >&6; }
8744          if test ! -x "$tool_specified"; then
8745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8746$as_echo "not found" >&6; }
8747            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8748          fi
8749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8750$as_echo "$tool_specified" >&6; }
8751        fi
8752      fi
8753    fi
8754
8755  fi
8756
8757
8758
8759  if test "x$MKDIR" = x; then
8760    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8761  fi
8762
8763
8764
8765
8766
8767  # Publish this variable in the help.
8768
8769
8770  if [ -z "${MKTEMP+x}" ]; then
8771    # The variable is not set by user, try to locate tool using the code snippet
8772    for ac_prog in mktemp
8773do
8774  # Extract the first word of "$ac_prog", so it can be a program name with args.
8775set dummy $ac_prog; ac_word=$2
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8777$as_echo_n "checking for $ac_word... " >&6; }
8778if ${ac_cv_path_MKTEMP+:} false; then :
8779  $as_echo_n "(cached) " >&6
8780else
8781  case $MKTEMP in
8782  [\\/]* | ?:[\\/]*)
8783  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8784  ;;
8785  *)
8786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8787for as_dir in $PATH
8788do
8789  IFS=$as_save_IFS
8790  test -z "$as_dir" && as_dir=.
8791    for ac_exec_ext in '' $ac_executable_extensions; do
8792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8793    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8795    break 2
8796  fi
8797done
8798  done
8799IFS=$as_save_IFS
8800
8801  ;;
8802esac
8803fi
8804MKTEMP=$ac_cv_path_MKTEMP
8805if test -n "$MKTEMP"; then
8806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8807$as_echo "$MKTEMP" >&6; }
8808else
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811fi
8812
8813
8814  test -n "$MKTEMP" && break
8815done
8816
8817  else
8818    # The variable is set, but is it from the command line or the environment?
8819
8820    # Try to remove the string !MKTEMP! from our list.
8821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8823      # If it failed, the variable was not from the command line. Ignore it,
8824      # but warn the user (except for BASH, which is always set by the calling BASH).
8825      if test "xMKTEMP" != xBASH; then
8826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8827$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8828      fi
8829      # Try to locate tool using the code snippet
8830      for ac_prog in mktemp
8831do
8832  # Extract the first word of "$ac_prog", so it can be a program name with args.
8833set dummy $ac_prog; ac_word=$2
8834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8835$as_echo_n "checking for $ac_word... " >&6; }
8836if ${ac_cv_path_MKTEMP+:} false; then :
8837  $as_echo_n "(cached) " >&6
8838else
8839  case $MKTEMP in
8840  [\\/]* | ?:[\\/]*)
8841  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8842  ;;
8843  *)
8844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8845for as_dir in $PATH
8846do
8847  IFS=$as_save_IFS
8848  test -z "$as_dir" && as_dir=.
8849    for ac_exec_ext in '' $ac_executable_extensions; do
8850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8851    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8853    break 2
8854  fi
8855done
8856  done
8857IFS=$as_save_IFS
8858
8859  ;;
8860esac
8861fi
8862MKTEMP=$ac_cv_path_MKTEMP
8863if test -n "$MKTEMP"; then
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8865$as_echo "$MKTEMP" >&6; }
8866else
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8868$as_echo "no" >&6; }
8869fi
8870
8871
8872  test -n "$MKTEMP" && break
8873done
8874
8875    else
8876      # If it succeeded, then it was overridden by the user. We will use it
8877      # for the tool.
8878
8879      # First remove it from the list of overridden variables, so we can test
8880      # for unknown variables in the end.
8881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8882
8883      # Check if we try to supply an empty value
8884      if test "x$MKTEMP" = x; then
8885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8886$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8888$as_echo_n "checking for MKTEMP... " >&6; }
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8890$as_echo "disabled" >&6; }
8891      else
8892        # Check if the provided tool contains a complete path.
8893        tool_specified="$MKTEMP"
8894        tool_basename="${tool_specified##*/}"
8895        if test "x$tool_basename" = "x$tool_specified"; then
8896          # A command without a complete path is provided, search $PATH.
8897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8898$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8899          # Extract the first word of "$tool_basename", so it can be a program name with args.
8900set dummy $tool_basename; ac_word=$2
8901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8902$as_echo_n "checking for $ac_word... " >&6; }
8903if ${ac_cv_path_MKTEMP+:} false; then :
8904  $as_echo_n "(cached) " >&6
8905else
8906  case $MKTEMP in
8907  [\\/]* | ?:[\\/]*)
8908  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8909  ;;
8910  *)
8911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8912for as_dir in $PATH
8913do
8914  IFS=$as_save_IFS
8915  test -z "$as_dir" && as_dir=.
8916    for ac_exec_ext in '' $ac_executable_extensions; do
8917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8918    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8920    break 2
8921  fi
8922done
8923  done
8924IFS=$as_save_IFS
8925
8926  ;;
8927esac
8928fi
8929MKTEMP=$ac_cv_path_MKTEMP
8930if test -n "$MKTEMP"; then
8931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8932$as_echo "$MKTEMP" >&6; }
8933else
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
8936fi
8937
8938
8939          if test "x$MKTEMP" = x; then
8940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8941          fi
8942        else
8943          # Otherwise we believe it is a complete path. Use it as it is.
8944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8945$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8947$as_echo_n "checking for MKTEMP... " >&6; }
8948          if test ! -x "$tool_specified"; then
8949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8950$as_echo "not found" >&6; }
8951            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8952          fi
8953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8954$as_echo "$tool_specified" >&6; }
8955        fi
8956      fi
8957    fi
8958
8959  fi
8960
8961
8962
8963  if test "x$MKTEMP" = x; then
8964    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8965  fi
8966
8967
8968
8969
8970
8971  # Publish this variable in the help.
8972
8973
8974  if [ -z "${MV+x}" ]; then
8975    # The variable is not set by user, try to locate tool using the code snippet
8976    for ac_prog in mv
8977do
8978  # Extract the first word of "$ac_prog", so it can be a program name with args.
8979set dummy $ac_prog; ac_word=$2
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8981$as_echo_n "checking for $ac_word... " >&6; }
8982if ${ac_cv_path_MV+:} false; then :
8983  $as_echo_n "(cached) " >&6
8984else
8985  case $MV in
8986  [\\/]* | ?:[\\/]*)
8987  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8988  ;;
8989  *)
8990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8991for as_dir in $PATH
8992do
8993  IFS=$as_save_IFS
8994  test -z "$as_dir" && as_dir=.
8995    for ac_exec_ext in '' $ac_executable_extensions; do
8996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8997    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8999    break 2
9000  fi
9001done
9002  done
9003IFS=$as_save_IFS
9004
9005  ;;
9006esac
9007fi
9008MV=$ac_cv_path_MV
9009if test -n "$MV"; then
9010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9011$as_echo "$MV" >&6; }
9012else
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
9015fi
9016
9017
9018  test -n "$MV" && break
9019done
9020
9021  else
9022    # The variable is set, but is it from the command line or the environment?
9023
9024    # Try to remove the string !MV! from our list.
9025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9027      # If it failed, the variable was not from the command line. Ignore it,
9028      # but warn the user (except for BASH, which is always set by the calling BASH).
9029      if test "xMV" != xBASH; then
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9031$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9032      fi
9033      # Try to locate tool using the code snippet
9034      for ac_prog in mv
9035do
9036  # Extract the first word of "$ac_prog", so it can be a program name with args.
9037set dummy $ac_prog; ac_word=$2
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9039$as_echo_n "checking for $ac_word... " >&6; }
9040if ${ac_cv_path_MV+:} false; then :
9041  $as_echo_n "(cached) " >&6
9042else
9043  case $MV in
9044  [\\/]* | ?:[\\/]*)
9045  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9046  ;;
9047  *)
9048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049for as_dir in $PATH
9050do
9051  IFS=$as_save_IFS
9052  test -z "$as_dir" && as_dir=.
9053    for ac_exec_ext in '' $ac_executable_extensions; do
9054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9055    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9057    break 2
9058  fi
9059done
9060  done
9061IFS=$as_save_IFS
9062
9063  ;;
9064esac
9065fi
9066MV=$ac_cv_path_MV
9067if test -n "$MV"; then
9068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9069$as_echo "$MV" >&6; }
9070else
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072$as_echo "no" >&6; }
9073fi
9074
9075
9076  test -n "$MV" && break
9077done
9078
9079    else
9080      # If it succeeded, then it was overridden by the user. We will use it
9081      # for the tool.
9082
9083      # First remove it from the list of overridden variables, so we can test
9084      # for unknown variables in the end.
9085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9086
9087      # Check if we try to supply an empty value
9088      if test "x$MV" = x; then
9089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9090$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9092$as_echo_n "checking for MV... " >&6; }
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9094$as_echo "disabled" >&6; }
9095      else
9096        # Check if the provided tool contains a complete path.
9097        tool_specified="$MV"
9098        tool_basename="${tool_specified##*/}"
9099        if test "x$tool_basename" = "x$tool_specified"; then
9100          # A command without a complete path is provided, search $PATH.
9101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9102$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9103          # Extract the first word of "$tool_basename", so it can be a program name with args.
9104set dummy $tool_basename; ac_word=$2
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9106$as_echo_n "checking for $ac_word... " >&6; }
9107if ${ac_cv_path_MV+:} false; then :
9108  $as_echo_n "(cached) " >&6
9109else
9110  case $MV in
9111  [\\/]* | ?:[\\/]*)
9112  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9113  ;;
9114  *)
9115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9116for as_dir in $PATH
9117do
9118  IFS=$as_save_IFS
9119  test -z "$as_dir" && as_dir=.
9120    for ac_exec_ext in '' $ac_executable_extensions; do
9121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9122    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9124    break 2
9125  fi
9126done
9127  done
9128IFS=$as_save_IFS
9129
9130  ;;
9131esac
9132fi
9133MV=$ac_cv_path_MV
9134if test -n "$MV"; then
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9136$as_echo "$MV" >&6; }
9137else
9138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139$as_echo "no" >&6; }
9140fi
9141
9142
9143          if test "x$MV" = x; then
9144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9145          fi
9146        else
9147          # Otherwise we believe it is a complete path. Use it as it is.
9148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9149$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9151$as_echo_n "checking for MV... " >&6; }
9152          if test ! -x "$tool_specified"; then
9153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9154$as_echo "not found" >&6; }
9155            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9156          fi
9157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9158$as_echo "$tool_specified" >&6; }
9159        fi
9160      fi
9161    fi
9162
9163  fi
9164
9165
9166
9167  if test "x$MV" = x; then
9168    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9169  fi
9170
9171
9172
9173
9174
9175  # Publish this variable in the help.
9176
9177
9178  if [ -z "${NAWK+x}" ]; then
9179    # The variable is not set by user, try to locate tool using the code snippet
9180    for ac_prog in nawk gawk awk
9181do
9182  # Extract the first word of "$ac_prog", so it can be a program name with args.
9183set dummy $ac_prog; ac_word=$2
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9185$as_echo_n "checking for $ac_word... " >&6; }
9186if ${ac_cv_path_NAWK+:} false; then :
9187  $as_echo_n "(cached) " >&6
9188else
9189  case $NAWK in
9190  [\\/]* | ?:[\\/]*)
9191  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9192  ;;
9193  *)
9194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9195for as_dir in $PATH
9196do
9197  IFS=$as_save_IFS
9198  test -z "$as_dir" && as_dir=.
9199    for ac_exec_ext in '' $ac_executable_extensions; do
9200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9201    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9203    break 2
9204  fi
9205done
9206  done
9207IFS=$as_save_IFS
9208
9209  ;;
9210esac
9211fi
9212NAWK=$ac_cv_path_NAWK
9213if test -n "$NAWK"; then
9214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9215$as_echo "$NAWK" >&6; }
9216else
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9218$as_echo "no" >&6; }
9219fi
9220
9221
9222  test -n "$NAWK" && break
9223done
9224
9225  else
9226    # The variable is set, but is it from the command line or the environment?
9227
9228    # Try to remove the string !NAWK! from our list.
9229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9231      # If it failed, the variable was not from the command line. Ignore it,
9232      # but warn the user (except for BASH, which is always set by the calling BASH).
9233      if test "xNAWK" != xBASH; then
9234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9235$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9236      fi
9237      # Try to locate tool using the code snippet
9238      for ac_prog in nawk gawk awk
9239do
9240  # Extract the first word of "$ac_prog", so it can be a program name with args.
9241set dummy $ac_prog; ac_word=$2
9242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243$as_echo_n "checking for $ac_word... " >&6; }
9244if ${ac_cv_path_NAWK+:} false; then :
9245  $as_echo_n "(cached) " >&6
9246else
9247  case $NAWK in
9248  [\\/]* | ?:[\\/]*)
9249  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9250  ;;
9251  *)
9252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253for as_dir in $PATH
9254do
9255  IFS=$as_save_IFS
9256  test -z "$as_dir" && as_dir=.
9257    for ac_exec_ext in '' $ac_executable_extensions; do
9258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9259    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9261    break 2
9262  fi
9263done
9264  done
9265IFS=$as_save_IFS
9266
9267  ;;
9268esac
9269fi
9270NAWK=$ac_cv_path_NAWK
9271if test -n "$NAWK"; then
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9273$as_echo "$NAWK" >&6; }
9274else
9275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
9277fi
9278
9279
9280  test -n "$NAWK" && break
9281done
9282
9283    else
9284      # If it succeeded, then it was overridden by the user. We will use it
9285      # for the tool.
9286
9287      # First remove it from the list of overridden variables, so we can test
9288      # for unknown variables in the end.
9289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9290
9291      # Check if we try to supply an empty value
9292      if test "x$NAWK" = x; then
9293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9294$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9296$as_echo_n "checking for NAWK... " >&6; }
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9298$as_echo "disabled" >&6; }
9299      else
9300        # Check if the provided tool contains a complete path.
9301        tool_specified="$NAWK"
9302        tool_basename="${tool_specified##*/}"
9303        if test "x$tool_basename" = "x$tool_specified"; then
9304          # A command without a complete path is provided, search $PATH.
9305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9306$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9307          # Extract the first word of "$tool_basename", so it can be a program name with args.
9308set dummy $tool_basename; ac_word=$2
9309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9310$as_echo_n "checking for $ac_word... " >&6; }
9311if ${ac_cv_path_NAWK+:} false; then :
9312  $as_echo_n "(cached) " >&6
9313else
9314  case $NAWK in
9315  [\\/]* | ?:[\\/]*)
9316  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9317  ;;
9318  *)
9319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9320for as_dir in $PATH
9321do
9322  IFS=$as_save_IFS
9323  test -z "$as_dir" && as_dir=.
9324    for ac_exec_ext in '' $ac_executable_extensions; do
9325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9326    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9328    break 2
9329  fi
9330done
9331  done
9332IFS=$as_save_IFS
9333
9334  ;;
9335esac
9336fi
9337NAWK=$ac_cv_path_NAWK
9338if test -n "$NAWK"; then
9339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9340$as_echo "$NAWK" >&6; }
9341else
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343$as_echo "no" >&6; }
9344fi
9345
9346
9347          if test "x$NAWK" = x; then
9348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9349          fi
9350        else
9351          # Otherwise we believe it is a complete path. Use it as it is.
9352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9353$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9355$as_echo_n "checking for NAWK... " >&6; }
9356          if test ! -x "$tool_specified"; then
9357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9358$as_echo "not found" >&6; }
9359            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9360          fi
9361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9362$as_echo "$tool_specified" >&6; }
9363        fi
9364      fi
9365    fi
9366
9367  fi
9368
9369
9370
9371  if test "x$NAWK" = x; then
9372    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9373  fi
9374
9375
9376
9377
9378
9379  # Publish this variable in the help.
9380
9381
9382  if [ -z "${PRINTF+x}" ]; then
9383    # The variable is not set by user, try to locate tool using the code snippet
9384    for ac_prog in printf
9385do
9386  # Extract the first word of "$ac_prog", so it can be a program name with args.
9387set dummy $ac_prog; ac_word=$2
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9389$as_echo_n "checking for $ac_word... " >&6; }
9390if ${ac_cv_path_PRINTF+:} false; then :
9391  $as_echo_n "(cached) " >&6
9392else
9393  case $PRINTF in
9394  [\\/]* | ?:[\\/]*)
9395  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9396  ;;
9397  *)
9398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9399for as_dir in $PATH
9400do
9401  IFS=$as_save_IFS
9402  test -z "$as_dir" && as_dir=.
9403    for ac_exec_ext in '' $ac_executable_extensions; do
9404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9405    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9407    break 2
9408  fi
9409done
9410  done
9411IFS=$as_save_IFS
9412
9413  ;;
9414esac
9415fi
9416PRINTF=$ac_cv_path_PRINTF
9417if test -n "$PRINTF"; then
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9419$as_echo "$PRINTF" >&6; }
9420else
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
9423fi
9424
9425
9426  test -n "$PRINTF" && break
9427done
9428
9429  else
9430    # The variable is set, but is it from the command line or the environment?
9431
9432    # Try to remove the string !PRINTF! from our list.
9433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9435      # If it failed, the variable was not from the command line. Ignore it,
9436      # but warn the user (except for BASH, which is always set by the calling BASH).
9437      if test "xPRINTF" != xBASH; then
9438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9439$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9440      fi
9441      # Try to locate tool using the code snippet
9442      for ac_prog in printf
9443do
9444  # Extract the first word of "$ac_prog", so it can be a program name with args.
9445set dummy $ac_prog; 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_PRINTF+:} false; then :
9449  $as_echo_n "(cached) " >&6
9450else
9451  case $PRINTF in
9452  [\\/]* | ?:[\\/]*)
9453  ac_cv_path_PRINTF="$PRINTF" # 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_PRINTF="$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
9474PRINTF=$ac_cv_path_PRINTF
9475if test -n "$PRINTF"; then
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9477$as_echo "$PRINTF" >&6; }
9478else
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
9481fi
9482
9483
9484  test -n "$PRINTF" && break
9485done
9486
9487    else
9488      # If it succeeded, then it was overridden by the user. We will use it
9489      # for the tool.
9490
9491      # First remove it from the list of overridden variables, so we can test
9492      # for unknown variables in the end.
9493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9494
9495      # Check if we try to supply an empty value
9496      if test "x$PRINTF" = x; then
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9498$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9500$as_echo_n "checking for PRINTF... " >&6; }
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9502$as_echo "disabled" >&6; }
9503      else
9504        # Check if the provided tool contains a complete path.
9505        tool_specified="$PRINTF"
9506        tool_basename="${tool_specified##*/}"
9507        if test "x$tool_basename" = "x$tool_specified"; then
9508          # A command without a complete path is provided, search $PATH.
9509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9510$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9511          # Extract the first word of "$tool_basename", so it can be a program name with args.
9512set dummy $tool_basename; ac_word=$2
9513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9514$as_echo_n "checking for $ac_word... " >&6; }
9515if ${ac_cv_path_PRINTF+:} false; then :
9516  $as_echo_n "(cached) " >&6
9517else
9518  case $PRINTF in
9519  [\\/]* | ?:[\\/]*)
9520  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9521  ;;
9522  *)
9523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9524for as_dir in $PATH
9525do
9526  IFS=$as_save_IFS
9527  test -z "$as_dir" && as_dir=.
9528    for ac_exec_ext in '' $ac_executable_extensions; do
9529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9530    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9532    break 2
9533  fi
9534done
9535  done
9536IFS=$as_save_IFS
9537
9538  ;;
9539esac
9540fi
9541PRINTF=$ac_cv_path_PRINTF
9542if test -n "$PRINTF"; then
9543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9544$as_echo "$PRINTF" >&6; }
9545else
9546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9547$as_echo "no" >&6; }
9548fi
9549
9550
9551          if test "x$PRINTF" = x; then
9552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9553          fi
9554        else
9555          # Otherwise we believe it is a complete path. Use it as it is.
9556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9557$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9559$as_echo_n "checking for PRINTF... " >&6; }
9560          if test ! -x "$tool_specified"; then
9561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9562$as_echo "not found" >&6; }
9563            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9564          fi
9565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9566$as_echo "$tool_specified" >&6; }
9567        fi
9568      fi
9569    fi
9570
9571  fi
9572
9573
9574
9575  if test "x$PRINTF" = x; then
9576    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9577  fi
9578
9579
9580
9581
9582
9583  # Publish this variable in the help.
9584
9585
9586  if [ -z "${RM+x}" ]; then
9587    # The variable is not set by user, try to locate tool using the code snippet
9588    for ac_prog in rm
9589do
9590  # Extract the first word of "$ac_prog", so it can be a program name with args.
9591set dummy $ac_prog; ac_word=$2
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if ${ac_cv_path_RM+:} false; then :
9595  $as_echo_n "(cached) " >&6
9596else
9597  case $RM in
9598  [\\/]* | ?:[\\/]*)
9599  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9600  ;;
9601  *)
9602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9603for as_dir in $PATH
9604do
9605  IFS=$as_save_IFS
9606  test -z "$as_dir" && as_dir=.
9607    for ac_exec_ext in '' $ac_executable_extensions; do
9608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9609    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9611    break 2
9612  fi
9613done
9614  done
9615IFS=$as_save_IFS
9616
9617  ;;
9618esac
9619fi
9620RM=$ac_cv_path_RM
9621if test -n "$RM"; then
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9623$as_echo "$RM" >&6; }
9624else
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627fi
9628
9629
9630  test -n "$RM" && break
9631done
9632
9633  else
9634    # The variable is set, but is it from the command line or the environment?
9635
9636    # Try to remove the string !RM! from our list.
9637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9639      # If it failed, the variable was not from the command line. Ignore it,
9640      # but warn the user (except for BASH, which is always set by the calling BASH).
9641      if test "xRM" != xBASH; then
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9643$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9644      fi
9645      # Try to locate tool using the code snippet
9646      for ac_prog in rm
9647do
9648  # Extract the first word of "$ac_prog", so it can be a program name with args.
9649set dummy $ac_prog; ac_word=$2
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9651$as_echo_n "checking for $ac_word... " >&6; }
9652if ${ac_cv_path_RM+:} false; then :
9653  $as_echo_n "(cached) " >&6
9654else
9655  case $RM in
9656  [\\/]* | ?:[\\/]*)
9657  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9658  ;;
9659  *)
9660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9661for as_dir in $PATH
9662do
9663  IFS=$as_save_IFS
9664  test -z "$as_dir" && as_dir=.
9665    for ac_exec_ext in '' $ac_executable_extensions; do
9666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9667    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9669    break 2
9670  fi
9671done
9672  done
9673IFS=$as_save_IFS
9674
9675  ;;
9676esac
9677fi
9678RM=$ac_cv_path_RM
9679if test -n "$RM"; then
9680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9681$as_echo "$RM" >&6; }
9682else
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
9685fi
9686
9687
9688  test -n "$RM" && break
9689done
9690
9691    else
9692      # If it succeeded, then it was overridden by the user. We will use it
9693      # for the tool.
9694
9695      # First remove it from the list of overridden variables, so we can test
9696      # for unknown variables in the end.
9697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9698
9699      # Check if we try to supply an empty value
9700      if test "x$RM" = x; then
9701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9702$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9704$as_echo_n "checking for RM... " >&6; }
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9706$as_echo "disabled" >&6; }
9707      else
9708        # Check if the provided tool contains a complete path.
9709        tool_specified="$RM"
9710        tool_basename="${tool_specified##*/}"
9711        if test "x$tool_basename" = "x$tool_specified"; then
9712          # A command without a complete path is provided, search $PATH.
9713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9714$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9715          # Extract the first word of "$tool_basename", so it can be a program name with args.
9716set dummy $tool_basename; ac_word=$2
9717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9718$as_echo_n "checking for $ac_word... " >&6; }
9719if ${ac_cv_path_RM+:} false; then :
9720  $as_echo_n "(cached) " >&6
9721else
9722  case $RM in
9723  [\\/]* | ?:[\\/]*)
9724  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9725  ;;
9726  *)
9727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9728for as_dir in $PATH
9729do
9730  IFS=$as_save_IFS
9731  test -z "$as_dir" && as_dir=.
9732    for ac_exec_ext in '' $ac_executable_extensions; do
9733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9734    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9736    break 2
9737  fi
9738done
9739  done
9740IFS=$as_save_IFS
9741
9742  ;;
9743esac
9744fi
9745RM=$ac_cv_path_RM
9746if test -n "$RM"; then
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9748$as_echo "$RM" >&6; }
9749else
9750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9751$as_echo "no" >&6; }
9752fi
9753
9754
9755          if test "x$RM" = x; then
9756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9757          fi
9758        else
9759          # Otherwise we believe it is a complete path. Use it as it is.
9760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9761$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9763$as_echo_n "checking for RM... " >&6; }
9764          if test ! -x "$tool_specified"; then
9765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9766$as_echo "not found" >&6; }
9767            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9768          fi
9769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9770$as_echo "$tool_specified" >&6; }
9771        fi
9772      fi
9773    fi
9774
9775  fi
9776
9777
9778
9779  if test "x$RM" = x; then
9780    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9781  fi
9782
9783
9784
9785
9786
9787  # Publish this variable in the help.
9788
9789
9790  if [ -z "${RMDIR+x}" ]; then
9791    # The variable is not set by user, try to locate tool using the code snippet
9792    for ac_prog in rmdir
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_RMDIR+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $RMDIR in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824RMDIR=$ac_cv_path_RMDIR
9825if test -n "$RMDIR"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9827$as_echo "$RMDIR" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$RMDIR" && break
9835done
9836
9837  else
9838    # The variable is set, but is it from the command line or the environment?
9839
9840    # Try to remove the string !RMDIR! from our list.
9841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9843      # If it failed, the variable was not from the command line. Ignore it,
9844      # but warn the user (except for BASH, which is always set by the calling BASH).
9845      if test "xRMDIR" != xBASH; then
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9847$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9848      fi
9849      # Try to locate tool using the code snippet
9850      for ac_prog in rmdir
9851do
9852  # Extract the first word of "$ac_prog", so it can be a program name with args.
9853set dummy $ac_prog; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_RMDIR+:} false; then :
9857  $as_echo_n "(cached) " >&6
9858else
9859  case $RMDIR in
9860  [\\/]* | ?:[\\/]*)
9861  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9862  ;;
9863  *)
9864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  test -z "$as_dir" && as_dir=.
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879  ;;
9880esac
9881fi
9882RMDIR=$ac_cv_path_RMDIR
9883if test -n "$RMDIR"; then
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9885$as_echo "$RMDIR" >&6; }
9886else
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891
9892  test -n "$RMDIR" && break
9893done
9894
9895    else
9896      # If it succeeded, then it was overridden by the user. We will use it
9897      # for the tool.
9898
9899      # First remove it from the list of overridden variables, so we can test
9900      # for unknown variables in the end.
9901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9902
9903      # Check if we try to supply an empty value
9904      if test "x$RMDIR" = x; then
9905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9906$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9908$as_echo_n "checking for RMDIR... " >&6; }
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9910$as_echo "disabled" >&6; }
9911      else
9912        # Check if the provided tool contains a complete path.
9913        tool_specified="$RMDIR"
9914        tool_basename="${tool_specified##*/}"
9915        if test "x$tool_basename" = "x$tool_specified"; then
9916          # A command without a complete path is provided, search $PATH.
9917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9918$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9919          # Extract the first word of "$tool_basename", so it can be a program name with args.
9920set dummy $tool_basename; ac_word=$2
9921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9922$as_echo_n "checking for $ac_word... " >&6; }
9923if ${ac_cv_path_RMDIR+:} false; then :
9924  $as_echo_n "(cached) " >&6
9925else
9926  case $RMDIR in
9927  [\\/]* | ?:[\\/]*)
9928  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9929  ;;
9930  *)
9931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9932for as_dir in $PATH
9933do
9934  IFS=$as_save_IFS
9935  test -z "$as_dir" && as_dir=.
9936    for ac_exec_ext in '' $ac_executable_extensions; do
9937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9938    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9940    break 2
9941  fi
9942done
9943  done
9944IFS=$as_save_IFS
9945
9946  ;;
9947esac
9948fi
9949RMDIR=$ac_cv_path_RMDIR
9950if test -n "$RMDIR"; then
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9952$as_echo "$RMDIR" >&6; }
9953else
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
9956fi
9957
9958
9959          if test "x$RMDIR" = x; then
9960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9961          fi
9962        else
9963          # Otherwise we believe it is a complete path. Use it as it is.
9964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9965$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9967$as_echo_n "checking for RMDIR... " >&6; }
9968          if test ! -x "$tool_specified"; then
9969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9970$as_echo "not found" >&6; }
9971            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9972          fi
9973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9974$as_echo "$tool_specified" >&6; }
9975        fi
9976      fi
9977    fi
9978
9979  fi
9980
9981
9982
9983  if test "x$RMDIR" = x; then
9984    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9985  fi
9986
9987
9988
9989
9990
9991  # Publish this variable in the help.
9992
9993
9994  if [ -z "${SH+x}" ]; then
9995    # The variable is not set by user, try to locate tool using the code snippet
9996    for ac_prog in sh
9997do
9998  # Extract the first word of "$ac_prog", so it can be a program name with args.
9999set dummy $ac_prog; ac_word=$2
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10001$as_echo_n "checking for $ac_word... " >&6; }
10002if ${ac_cv_path_SH+:} false; then :
10003  $as_echo_n "(cached) " >&6
10004else
10005  case $SH in
10006  [\\/]* | ?:[\\/]*)
10007  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10008  ;;
10009  *)
10010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10011for as_dir in $PATH
10012do
10013  IFS=$as_save_IFS
10014  test -z "$as_dir" && as_dir=.
10015    for ac_exec_ext in '' $ac_executable_extensions; do
10016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10017    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10019    break 2
10020  fi
10021done
10022  done
10023IFS=$as_save_IFS
10024
10025  ;;
10026esac
10027fi
10028SH=$ac_cv_path_SH
10029if test -n "$SH"; then
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10031$as_echo "$SH" >&6; }
10032else
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
10035fi
10036
10037
10038  test -n "$SH" && break
10039done
10040
10041  else
10042    # The variable is set, but is it from the command line or the environment?
10043
10044    # Try to remove the string !SH! from our list.
10045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10047      # If it failed, the variable was not from the command line. Ignore it,
10048      # but warn the user (except for BASH, which is always set by the calling BASH).
10049      if test "xSH" != xBASH; then
10050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10051$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10052      fi
10053      # Try to locate tool using the code snippet
10054      for ac_prog in sh
10055do
10056  # Extract the first word of "$ac_prog", so it can be a program name with args.
10057set dummy $ac_prog; ac_word=$2
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10059$as_echo_n "checking for $ac_word... " >&6; }
10060if ${ac_cv_path_SH+:} false; then :
10061  $as_echo_n "(cached) " >&6
10062else
10063  case $SH in
10064  [\\/]* | ?:[\\/]*)
10065  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10066  ;;
10067  *)
10068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10069for as_dir in $PATH
10070do
10071  IFS=$as_save_IFS
10072  test -z "$as_dir" && as_dir=.
10073    for ac_exec_ext in '' $ac_executable_extensions; do
10074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10075    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10077    break 2
10078  fi
10079done
10080  done
10081IFS=$as_save_IFS
10082
10083  ;;
10084esac
10085fi
10086SH=$ac_cv_path_SH
10087if test -n "$SH"; then
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10089$as_echo "$SH" >&6; }
10090else
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
10093fi
10094
10095
10096  test -n "$SH" && break
10097done
10098
10099    else
10100      # If it succeeded, then it was overridden by the user. We will use it
10101      # for the tool.
10102
10103      # First remove it from the list of overridden variables, so we can test
10104      # for unknown variables in the end.
10105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10106
10107      # Check if we try to supply an empty value
10108      if test "x$SH" = x; then
10109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10110$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10112$as_echo_n "checking for SH... " >&6; }
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10114$as_echo "disabled" >&6; }
10115      else
10116        # Check if the provided tool contains a complete path.
10117        tool_specified="$SH"
10118        tool_basename="${tool_specified##*/}"
10119        if test "x$tool_basename" = "x$tool_specified"; then
10120          # A command without a complete path is provided, search $PATH.
10121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10122$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10123          # Extract the first word of "$tool_basename", so it can be a program name with args.
10124set dummy $tool_basename; ac_word=$2
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126$as_echo_n "checking for $ac_word... " >&6; }
10127if ${ac_cv_path_SH+:} false; then :
10128  $as_echo_n "(cached) " >&6
10129else
10130  case $SH in
10131  [\\/]* | ?:[\\/]*)
10132  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10133  ;;
10134  *)
10135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136for as_dir in $PATH
10137do
10138  IFS=$as_save_IFS
10139  test -z "$as_dir" && as_dir=.
10140    for ac_exec_ext in '' $ac_executable_extensions; do
10141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10142    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10144    break 2
10145  fi
10146done
10147  done
10148IFS=$as_save_IFS
10149
10150  ;;
10151esac
10152fi
10153SH=$ac_cv_path_SH
10154if test -n "$SH"; then
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10156$as_echo "$SH" >&6; }
10157else
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160fi
10161
10162
10163          if test "x$SH" = x; then
10164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10165          fi
10166        else
10167          # Otherwise we believe it is a complete path. Use it as it is.
10168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10169$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10171$as_echo_n "checking for SH... " >&6; }
10172          if test ! -x "$tool_specified"; then
10173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10174$as_echo "not found" >&6; }
10175            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10176          fi
10177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10178$as_echo "$tool_specified" >&6; }
10179        fi
10180      fi
10181    fi
10182
10183  fi
10184
10185
10186
10187  if test "x$SH" = x; then
10188    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10189  fi
10190
10191
10192
10193
10194
10195  # Publish this variable in the help.
10196
10197
10198  if [ -z "${SORT+x}" ]; then
10199    # The variable is not set by user, try to locate tool using the code snippet
10200    for ac_prog in sort
10201do
10202  # Extract the first word of "$ac_prog", so it can be a program name with args.
10203set dummy $ac_prog; ac_word=$2
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205$as_echo_n "checking for $ac_word... " >&6; }
10206if ${ac_cv_path_SORT+:} false; then :
10207  $as_echo_n "(cached) " >&6
10208else
10209  case $SORT in
10210  [\\/]* | ?:[\\/]*)
10211  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10212  ;;
10213  *)
10214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215for as_dir in $PATH
10216do
10217  IFS=$as_save_IFS
10218  test -z "$as_dir" && as_dir=.
10219    for ac_exec_ext in '' $ac_executable_extensions; do
10220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10221    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223    break 2
10224  fi
10225done
10226  done
10227IFS=$as_save_IFS
10228
10229  ;;
10230esac
10231fi
10232SORT=$ac_cv_path_SORT
10233if test -n "$SORT"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10235$as_echo "$SORT" >&6; }
10236else
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242  test -n "$SORT" && break
10243done
10244
10245  else
10246    # The variable is set, but is it from the command line or the environment?
10247
10248    # Try to remove the string !SORT! from our list.
10249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10251      # If it failed, the variable was not from the command line. Ignore it,
10252      # but warn the user (except for BASH, which is always set by the calling BASH).
10253      if test "xSORT" != xBASH; then
10254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10255$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10256      fi
10257      # Try to locate tool using the code snippet
10258      for ac_prog in sort
10259do
10260  # Extract the first word of "$ac_prog", so it can be a program name with args.
10261set dummy $ac_prog; ac_word=$2
10262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10263$as_echo_n "checking for $ac_word... " >&6; }
10264if ${ac_cv_path_SORT+:} false; then :
10265  $as_echo_n "(cached) " >&6
10266else
10267  case $SORT in
10268  [\\/]* | ?:[\\/]*)
10269  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10270  ;;
10271  *)
10272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10273for as_dir in $PATH
10274do
10275  IFS=$as_save_IFS
10276  test -z "$as_dir" && as_dir=.
10277    for ac_exec_ext in '' $ac_executable_extensions; do
10278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10279    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10281    break 2
10282  fi
10283done
10284  done
10285IFS=$as_save_IFS
10286
10287  ;;
10288esac
10289fi
10290SORT=$ac_cv_path_SORT
10291if test -n "$SORT"; then
10292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10293$as_echo "$SORT" >&6; }
10294else
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10296$as_echo "no" >&6; }
10297fi
10298
10299
10300  test -n "$SORT" && break
10301done
10302
10303    else
10304      # If it succeeded, then it was overridden by the user. We will use it
10305      # for the tool.
10306
10307      # First remove it from the list of overridden variables, so we can test
10308      # for unknown variables in the end.
10309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10310
10311      # Check if we try to supply an empty value
10312      if test "x$SORT" = x; then
10313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10314$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10316$as_echo_n "checking for SORT... " >&6; }
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10318$as_echo "disabled" >&6; }
10319      else
10320        # Check if the provided tool contains a complete path.
10321        tool_specified="$SORT"
10322        tool_basename="${tool_specified##*/}"
10323        if test "x$tool_basename" = "x$tool_specified"; then
10324          # A command without a complete path is provided, search $PATH.
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10326$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10327          # Extract the first word of "$tool_basename", so it can be a program name with args.
10328set dummy $tool_basename; ac_word=$2
10329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10330$as_echo_n "checking for $ac_word... " >&6; }
10331if ${ac_cv_path_SORT+:} false; then :
10332  $as_echo_n "(cached) " >&6
10333else
10334  case $SORT in
10335  [\\/]* | ?:[\\/]*)
10336  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10337  ;;
10338  *)
10339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10340for as_dir in $PATH
10341do
10342  IFS=$as_save_IFS
10343  test -z "$as_dir" && as_dir=.
10344    for ac_exec_ext in '' $ac_executable_extensions; do
10345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10346    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10348    break 2
10349  fi
10350done
10351  done
10352IFS=$as_save_IFS
10353
10354  ;;
10355esac
10356fi
10357SORT=$ac_cv_path_SORT
10358if test -n "$SORT"; then
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10360$as_echo "$SORT" >&6; }
10361else
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363$as_echo "no" >&6; }
10364fi
10365
10366
10367          if test "x$SORT" = x; then
10368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10369          fi
10370        else
10371          # Otherwise we believe it is a complete path. Use it as it is.
10372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10373$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10375$as_echo_n "checking for SORT... " >&6; }
10376          if test ! -x "$tool_specified"; then
10377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10378$as_echo "not found" >&6; }
10379            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10380          fi
10381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10382$as_echo "$tool_specified" >&6; }
10383        fi
10384      fi
10385    fi
10386
10387  fi
10388
10389
10390
10391  if test "x$SORT" = x; then
10392    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10393  fi
10394
10395
10396
10397
10398
10399  # Publish this variable in the help.
10400
10401
10402  if [ -z "${TAIL+x}" ]; then
10403    # The variable is not set by user, try to locate tool using the code snippet
10404    for ac_prog in tail
10405do
10406  # Extract the first word of "$ac_prog", so it can be a program name with args.
10407set dummy $ac_prog; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_TAIL+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $TAIL in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10425    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436TAIL=$ac_cv_path_TAIL
10437if test -n "$TAIL"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10439$as_echo "$TAIL" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446  test -n "$TAIL" && break
10447done
10448
10449  else
10450    # The variable is set, but is it from the command line or the environment?
10451
10452    # Try to remove the string !TAIL! from our list.
10453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10455      # If it failed, the variable was not from the command line. Ignore it,
10456      # but warn the user (except for BASH, which is always set by the calling BASH).
10457      if test "xTAIL" != xBASH; then
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10459$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10460      fi
10461      # Try to locate tool using the code snippet
10462      for ac_prog in tail
10463do
10464  # Extract the first word of "$ac_prog", so it can be a program name with args.
10465set dummy $ac_prog; ac_word=$2
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467$as_echo_n "checking for $ac_word... " >&6; }
10468if ${ac_cv_path_TAIL+:} false; then :
10469  $as_echo_n "(cached) " >&6
10470else
10471  case $TAIL in
10472  [\\/]* | ?:[\\/]*)
10473  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10474  ;;
10475  *)
10476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477for as_dir in $PATH
10478do
10479  IFS=$as_save_IFS
10480  test -z "$as_dir" && as_dir=.
10481    for ac_exec_ext in '' $ac_executable_extensions; do
10482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485    break 2
10486  fi
10487done
10488  done
10489IFS=$as_save_IFS
10490
10491  ;;
10492esac
10493fi
10494TAIL=$ac_cv_path_TAIL
10495if test -n "$TAIL"; then
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10497$as_echo "$TAIL" >&6; }
10498else
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501fi
10502
10503
10504  test -n "$TAIL" && break
10505done
10506
10507    else
10508      # If it succeeded, then it was overridden by the user. We will use it
10509      # for the tool.
10510
10511      # First remove it from the list of overridden variables, so we can test
10512      # for unknown variables in the end.
10513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10514
10515      # Check if we try to supply an empty value
10516      if test "x$TAIL" = x; then
10517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10518$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10520$as_echo_n "checking for TAIL... " >&6; }
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10522$as_echo "disabled" >&6; }
10523      else
10524        # Check if the provided tool contains a complete path.
10525        tool_specified="$TAIL"
10526        tool_basename="${tool_specified##*/}"
10527        if test "x$tool_basename" = "x$tool_specified"; then
10528          # A command without a complete path is provided, search $PATH.
10529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10530$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10531          # Extract the first word of "$tool_basename", so it can be a program name with args.
10532set dummy $tool_basename; ac_word=$2
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10534$as_echo_n "checking for $ac_word... " >&6; }
10535if ${ac_cv_path_TAIL+:} false; then :
10536  $as_echo_n "(cached) " >&6
10537else
10538  case $TAIL in
10539  [\\/]* | ?:[\\/]*)
10540  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10541  ;;
10542  *)
10543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544for as_dir in $PATH
10545do
10546  IFS=$as_save_IFS
10547  test -z "$as_dir" && as_dir=.
10548    for ac_exec_ext in '' $ac_executable_extensions; do
10549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10550    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552    break 2
10553  fi
10554done
10555  done
10556IFS=$as_save_IFS
10557
10558  ;;
10559esac
10560fi
10561TAIL=$ac_cv_path_TAIL
10562if test -n "$TAIL"; then
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10564$as_echo "$TAIL" >&6; }
10565else
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
10568fi
10569
10570
10571          if test "x$TAIL" = x; then
10572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10573          fi
10574        else
10575          # Otherwise we believe it is a complete path. Use it as it is.
10576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10577$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10579$as_echo_n "checking for TAIL... " >&6; }
10580          if test ! -x "$tool_specified"; then
10581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10582$as_echo "not found" >&6; }
10583            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10584          fi
10585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10586$as_echo "$tool_specified" >&6; }
10587        fi
10588      fi
10589    fi
10590
10591  fi
10592
10593
10594
10595  if test "x$TAIL" = x; then
10596    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10597  fi
10598
10599
10600
10601
10602
10603  # Publish this variable in the help.
10604
10605
10606  if [ -z "${TAR+x}" ]; then
10607    # The variable is not set by user, try to locate tool using the code snippet
10608    for ac_prog in tar
10609do
10610  # Extract the first word of "$ac_prog", so it can be a program name with args.
10611set dummy $ac_prog; ac_word=$2
10612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10613$as_echo_n "checking for $ac_word... " >&6; }
10614if ${ac_cv_path_TAR+:} false; then :
10615  $as_echo_n "(cached) " >&6
10616else
10617  case $TAR in
10618  [\\/]* | ?:[\\/]*)
10619  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10620  ;;
10621  *)
10622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10623for as_dir in $PATH
10624do
10625  IFS=$as_save_IFS
10626  test -z "$as_dir" && as_dir=.
10627    for ac_exec_ext in '' $ac_executable_extensions; do
10628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10629    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10631    break 2
10632  fi
10633done
10634  done
10635IFS=$as_save_IFS
10636
10637  ;;
10638esac
10639fi
10640TAR=$ac_cv_path_TAR
10641if test -n "$TAR"; then
10642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10643$as_echo "$TAR" >&6; }
10644else
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10646$as_echo "no" >&6; }
10647fi
10648
10649
10650  test -n "$TAR" && break
10651done
10652
10653  else
10654    # The variable is set, but is it from the command line or the environment?
10655
10656    # Try to remove the string !TAR! from our list.
10657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10659      # If it failed, the variable was not from the command line. Ignore it,
10660      # but warn the user (except for BASH, which is always set by the calling BASH).
10661      if test "xTAR" != xBASH; then
10662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10663$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10664      fi
10665      # Try to locate tool using the code snippet
10666      for ac_prog in tar
10667do
10668  # Extract the first word of "$ac_prog", so it can be a program name with args.
10669set dummy $ac_prog; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if ${ac_cv_path_TAR+:} false; then :
10673  $as_echo_n "(cached) " >&6
10674else
10675  case $TAR in
10676  [\\/]* | ?:[\\/]*)
10677  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10678  ;;
10679  *)
10680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681for as_dir in $PATH
10682do
10683  IFS=$as_save_IFS
10684  test -z "$as_dir" && as_dir=.
10685    for ac_exec_ext in '' $ac_executable_extensions; do
10686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10687    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689    break 2
10690  fi
10691done
10692  done
10693IFS=$as_save_IFS
10694
10695  ;;
10696esac
10697fi
10698TAR=$ac_cv_path_TAR
10699if test -n "$TAR"; then
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10701$as_echo "$TAR" >&6; }
10702else
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
10705fi
10706
10707
10708  test -n "$TAR" && break
10709done
10710
10711    else
10712      # If it succeeded, then it was overridden by the user. We will use it
10713      # for the tool.
10714
10715      # First remove it from the list of overridden variables, so we can test
10716      # for unknown variables in the end.
10717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10718
10719      # Check if we try to supply an empty value
10720      if test "x$TAR" = x; then
10721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10722$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10724$as_echo_n "checking for TAR... " >&6; }
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10726$as_echo "disabled" >&6; }
10727      else
10728        # Check if the provided tool contains a complete path.
10729        tool_specified="$TAR"
10730        tool_basename="${tool_specified##*/}"
10731        if test "x$tool_basename" = "x$tool_specified"; then
10732          # A command without a complete path is provided, search $PATH.
10733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10734$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10735          # Extract the first word of "$tool_basename", so it can be a program name with args.
10736set dummy $tool_basename; ac_word=$2
10737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10738$as_echo_n "checking for $ac_word... " >&6; }
10739if ${ac_cv_path_TAR+:} false; then :
10740  $as_echo_n "(cached) " >&6
10741else
10742  case $TAR in
10743  [\\/]* | ?:[\\/]*)
10744  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10745  ;;
10746  *)
10747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10748for as_dir in $PATH
10749do
10750  IFS=$as_save_IFS
10751  test -z "$as_dir" && as_dir=.
10752    for ac_exec_ext in '' $ac_executable_extensions; do
10753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10754    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10756    break 2
10757  fi
10758done
10759  done
10760IFS=$as_save_IFS
10761
10762  ;;
10763esac
10764fi
10765TAR=$ac_cv_path_TAR
10766if test -n "$TAR"; then
10767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10768$as_echo "$TAR" >&6; }
10769else
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
10772fi
10773
10774
10775          if test "x$TAR" = x; then
10776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10777          fi
10778        else
10779          # Otherwise we believe it is a complete path. Use it as it is.
10780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10781$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10783$as_echo_n "checking for TAR... " >&6; }
10784          if test ! -x "$tool_specified"; then
10785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10786$as_echo "not found" >&6; }
10787            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10788          fi
10789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10790$as_echo "$tool_specified" >&6; }
10791        fi
10792      fi
10793    fi
10794
10795  fi
10796
10797
10798
10799  if test "x$TAR" = x; then
10800    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10801  fi
10802
10803
10804
10805
10806
10807  # Publish this variable in the help.
10808
10809
10810  if [ -z "${TEE+x}" ]; then
10811    # The variable is not set by user, try to locate tool using the code snippet
10812    for ac_prog in tee
10813do
10814  # Extract the first word of "$ac_prog", so it can be a program name with args.
10815set dummy $ac_prog; ac_word=$2
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10817$as_echo_n "checking for $ac_word... " >&6; }
10818if ${ac_cv_path_TEE+:} false; then :
10819  $as_echo_n "(cached) " >&6
10820else
10821  case $TEE in
10822  [\\/]* | ?:[\\/]*)
10823  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10824  ;;
10825  *)
10826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10827for as_dir in $PATH
10828do
10829  IFS=$as_save_IFS
10830  test -z "$as_dir" && as_dir=.
10831    for ac_exec_ext in '' $ac_executable_extensions; do
10832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10833    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10835    break 2
10836  fi
10837done
10838  done
10839IFS=$as_save_IFS
10840
10841  ;;
10842esac
10843fi
10844TEE=$ac_cv_path_TEE
10845if test -n "$TEE"; then
10846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10847$as_echo "$TEE" >&6; }
10848else
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10850$as_echo "no" >&6; }
10851fi
10852
10853
10854  test -n "$TEE" && break
10855done
10856
10857  else
10858    # The variable is set, but is it from the command line or the environment?
10859
10860    # Try to remove the string !TEE! from our list.
10861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10863      # If it failed, the variable was not from the command line. Ignore it,
10864      # but warn the user (except for BASH, which is always set by the calling BASH).
10865      if test "xTEE" != xBASH; then
10866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10867$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10868      fi
10869      # Try to locate tool using the code snippet
10870      for ac_prog in tee
10871do
10872  # Extract the first word of "$ac_prog", so it can be a program name with args.
10873set dummy $ac_prog; ac_word=$2
10874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10875$as_echo_n "checking for $ac_word... " >&6; }
10876if ${ac_cv_path_TEE+:} false; then :
10877  $as_echo_n "(cached) " >&6
10878else
10879  case $TEE in
10880  [\\/]* | ?:[\\/]*)
10881  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10882  ;;
10883  *)
10884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10885for as_dir in $PATH
10886do
10887  IFS=$as_save_IFS
10888  test -z "$as_dir" && as_dir=.
10889    for ac_exec_ext in '' $ac_executable_extensions; do
10890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10891    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10893    break 2
10894  fi
10895done
10896  done
10897IFS=$as_save_IFS
10898
10899  ;;
10900esac
10901fi
10902TEE=$ac_cv_path_TEE
10903if test -n "$TEE"; then
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10905$as_echo "$TEE" >&6; }
10906else
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10908$as_echo "no" >&6; }
10909fi
10910
10911
10912  test -n "$TEE" && break
10913done
10914
10915    else
10916      # If it succeeded, then it was overridden by the user. We will use it
10917      # for the tool.
10918
10919      # First remove it from the list of overridden variables, so we can test
10920      # for unknown variables in the end.
10921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10922
10923      # Check if we try to supply an empty value
10924      if test "x$TEE" = x; then
10925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10926$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10928$as_echo_n "checking for TEE... " >&6; }
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10930$as_echo "disabled" >&6; }
10931      else
10932        # Check if the provided tool contains a complete path.
10933        tool_specified="$TEE"
10934        tool_basename="${tool_specified##*/}"
10935        if test "x$tool_basename" = "x$tool_specified"; then
10936          # A command without a complete path is provided, search $PATH.
10937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10938$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10939          # Extract the first word of "$tool_basename", so it can be a program name with args.
10940set dummy $tool_basename; ac_word=$2
10941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10942$as_echo_n "checking for $ac_word... " >&6; }
10943if ${ac_cv_path_TEE+:} false; then :
10944  $as_echo_n "(cached) " >&6
10945else
10946  case $TEE in
10947  [\\/]* | ?:[\\/]*)
10948  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10949  ;;
10950  *)
10951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10952for as_dir in $PATH
10953do
10954  IFS=$as_save_IFS
10955  test -z "$as_dir" && as_dir=.
10956    for ac_exec_ext in '' $ac_executable_extensions; do
10957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10958    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10960    break 2
10961  fi
10962done
10963  done
10964IFS=$as_save_IFS
10965
10966  ;;
10967esac
10968fi
10969TEE=$ac_cv_path_TEE
10970if test -n "$TEE"; then
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10972$as_echo "$TEE" >&6; }
10973else
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10975$as_echo "no" >&6; }
10976fi
10977
10978
10979          if test "x$TEE" = x; then
10980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10981          fi
10982        else
10983          # Otherwise we believe it is a complete path. Use it as it is.
10984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10985$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10987$as_echo_n "checking for TEE... " >&6; }
10988          if test ! -x "$tool_specified"; then
10989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10990$as_echo "not found" >&6; }
10991            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10992          fi
10993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10994$as_echo "$tool_specified" >&6; }
10995        fi
10996      fi
10997    fi
10998
10999  fi
11000
11001
11002
11003  if test "x$TEE" = x; then
11004    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11005  fi
11006
11007
11008
11009
11010
11011  # Publish this variable in the help.
11012
11013
11014  if [ -z "${TOUCH+x}" ]; then
11015    # The variable is not set by user, try to locate tool using the code snippet
11016    for ac_prog in touch
11017do
11018  # Extract the first word of "$ac_prog", so it can be a program name with args.
11019set dummy $ac_prog; ac_word=$2
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11021$as_echo_n "checking for $ac_word... " >&6; }
11022if ${ac_cv_path_TOUCH+:} false; then :
11023  $as_echo_n "(cached) " >&6
11024else
11025  case $TOUCH in
11026  [\\/]* | ?:[\\/]*)
11027  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11028  ;;
11029  *)
11030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033  IFS=$as_save_IFS
11034  test -z "$as_dir" && as_dir=.
11035    for ac_exec_ext in '' $ac_executable_extensions; do
11036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039    break 2
11040  fi
11041done
11042  done
11043IFS=$as_save_IFS
11044
11045  ;;
11046esac
11047fi
11048TOUCH=$ac_cv_path_TOUCH
11049if test -n "$TOUCH"; then
11050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11051$as_echo "$TOUCH" >&6; }
11052else
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
11055fi
11056
11057
11058  test -n "$TOUCH" && break
11059done
11060
11061  else
11062    # The variable is set, but is it from the command line or the environment?
11063
11064    # Try to remove the string !TOUCH! from our list.
11065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11067      # If it failed, the variable was not from the command line. Ignore it,
11068      # but warn the user (except for BASH, which is always set by the calling BASH).
11069      if test "xTOUCH" != xBASH; then
11070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11071$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11072      fi
11073      # Try to locate tool using the code snippet
11074      for ac_prog in touch
11075do
11076  # Extract the first word of "$ac_prog", so it can be a program name with args.
11077set dummy $ac_prog; ac_word=$2
11078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11079$as_echo_n "checking for $ac_word... " >&6; }
11080if ${ac_cv_path_TOUCH+:} false; then :
11081  $as_echo_n "(cached) " >&6
11082else
11083  case $TOUCH in
11084  [\\/]* | ?:[\\/]*)
11085  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11086  ;;
11087  *)
11088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11089for as_dir in $PATH
11090do
11091  IFS=$as_save_IFS
11092  test -z "$as_dir" && as_dir=.
11093    for ac_exec_ext in '' $ac_executable_extensions; do
11094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11095    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11097    break 2
11098  fi
11099done
11100  done
11101IFS=$as_save_IFS
11102
11103  ;;
11104esac
11105fi
11106TOUCH=$ac_cv_path_TOUCH
11107if test -n "$TOUCH"; then
11108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11109$as_echo "$TOUCH" >&6; }
11110else
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11112$as_echo "no" >&6; }
11113fi
11114
11115
11116  test -n "$TOUCH" && break
11117done
11118
11119    else
11120      # If it succeeded, then it was overridden by the user. We will use it
11121      # for the tool.
11122
11123      # First remove it from the list of overridden variables, so we can test
11124      # for unknown variables in the end.
11125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11126
11127      # Check if we try to supply an empty value
11128      if test "x$TOUCH" = x; then
11129        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11130$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11132$as_echo_n "checking for TOUCH... " >&6; }
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11134$as_echo "disabled" >&6; }
11135      else
11136        # Check if the provided tool contains a complete path.
11137        tool_specified="$TOUCH"
11138        tool_basename="${tool_specified##*/}"
11139        if test "x$tool_basename" = "x$tool_specified"; then
11140          # A command without a complete path is provided, search $PATH.
11141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11142$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11143          # Extract the first word of "$tool_basename", so it can be a program name with args.
11144set dummy $tool_basename; ac_word=$2
11145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11146$as_echo_n "checking for $ac_word... " >&6; }
11147if ${ac_cv_path_TOUCH+:} false; then :
11148  $as_echo_n "(cached) " >&6
11149else
11150  case $TOUCH in
11151  [\\/]* | ?:[\\/]*)
11152  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11153  ;;
11154  *)
11155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11156for as_dir in $PATH
11157do
11158  IFS=$as_save_IFS
11159  test -z "$as_dir" && as_dir=.
11160    for ac_exec_ext in '' $ac_executable_extensions; do
11161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11162    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11164    break 2
11165  fi
11166done
11167  done
11168IFS=$as_save_IFS
11169
11170  ;;
11171esac
11172fi
11173TOUCH=$ac_cv_path_TOUCH
11174if test -n "$TOUCH"; then
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11176$as_echo "$TOUCH" >&6; }
11177else
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
11180fi
11181
11182
11183          if test "x$TOUCH" = x; then
11184            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11185          fi
11186        else
11187          # Otherwise we believe it is a complete path. Use it as it is.
11188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11189$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11190          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11191$as_echo_n "checking for TOUCH... " >&6; }
11192          if test ! -x "$tool_specified"; then
11193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11194$as_echo "not found" >&6; }
11195            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11196          fi
11197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11198$as_echo "$tool_specified" >&6; }
11199        fi
11200      fi
11201    fi
11202
11203  fi
11204
11205
11206
11207  if test "x$TOUCH" = x; then
11208    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11209  fi
11210
11211
11212
11213
11214
11215  # Publish this variable in the help.
11216
11217
11218  if [ -z "${TR+x}" ]; then
11219    # The variable is not set by user, try to locate tool using the code snippet
11220    for ac_prog in tr
11221do
11222  # Extract the first word of "$ac_prog", so it can be a program name with args.
11223set dummy $ac_prog; ac_word=$2
11224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11225$as_echo_n "checking for $ac_word... " >&6; }
11226if ${ac_cv_path_TR+:} false; then :
11227  $as_echo_n "(cached) " >&6
11228else
11229  case $TR in
11230  [\\/]* | ?:[\\/]*)
11231  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11232  ;;
11233  *)
11234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11235for as_dir in $PATH
11236do
11237  IFS=$as_save_IFS
11238  test -z "$as_dir" && as_dir=.
11239    for ac_exec_ext in '' $ac_executable_extensions; do
11240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11241    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11243    break 2
11244  fi
11245done
11246  done
11247IFS=$as_save_IFS
11248
11249  ;;
11250esac
11251fi
11252TR=$ac_cv_path_TR
11253if test -n "$TR"; then
11254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11255$as_echo "$TR" >&6; }
11256else
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
11259fi
11260
11261
11262  test -n "$TR" && break
11263done
11264
11265  else
11266    # The variable is set, but is it from the command line or the environment?
11267
11268    # Try to remove the string !TR! from our list.
11269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11271      # If it failed, the variable was not from the command line. Ignore it,
11272      # but warn the user (except for BASH, which is always set by the calling BASH).
11273      if test "xTR" != xBASH; then
11274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11275$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11276      fi
11277      # Try to locate tool using the code snippet
11278      for ac_prog in tr
11279do
11280  # Extract the first word of "$ac_prog", so it can be a program name with args.
11281set dummy $ac_prog; ac_word=$2
11282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11283$as_echo_n "checking for $ac_word... " >&6; }
11284if ${ac_cv_path_TR+:} false; then :
11285  $as_echo_n "(cached) " >&6
11286else
11287  case $TR in
11288  [\\/]* | ?:[\\/]*)
11289  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11290  ;;
11291  *)
11292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11293for as_dir in $PATH
11294do
11295  IFS=$as_save_IFS
11296  test -z "$as_dir" && as_dir=.
11297    for ac_exec_ext in '' $ac_executable_extensions; do
11298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11299    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11301    break 2
11302  fi
11303done
11304  done
11305IFS=$as_save_IFS
11306
11307  ;;
11308esac
11309fi
11310TR=$ac_cv_path_TR
11311if test -n "$TR"; then
11312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11313$as_echo "$TR" >&6; }
11314else
11315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
11317fi
11318
11319
11320  test -n "$TR" && break
11321done
11322
11323    else
11324      # If it succeeded, then it was overridden by the user. We will use it
11325      # for the tool.
11326
11327      # First remove it from the list of overridden variables, so we can test
11328      # for unknown variables in the end.
11329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11330
11331      # Check if we try to supply an empty value
11332      if test "x$TR" = x; then
11333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11334$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11336$as_echo_n "checking for TR... " >&6; }
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11338$as_echo "disabled" >&6; }
11339      else
11340        # Check if the provided tool contains a complete path.
11341        tool_specified="$TR"
11342        tool_basename="${tool_specified##*/}"
11343        if test "x$tool_basename" = "x$tool_specified"; then
11344          # A command without a complete path is provided, search $PATH.
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11346$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11347          # Extract the first word of "$tool_basename", so it can be a program name with args.
11348set dummy $tool_basename; ac_word=$2
11349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11350$as_echo_n "checking for $ac_word... " >&6; }
11351if ${ac_cv_path_TR+:} false; then :
11352  $as_echo_n "(cached) " >&6
11353else
11354  case $TR in
11355  [\\/]* | ?:[\\/]*)
11356  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11357  ;;
11358  *)
11359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11360for as_dir in $PATH
11361do
11362  IFS=$as_save_IFS
11363  test -z "$as_dir" && as_dir=.
11364    for ac_exec_ext in '' $ac_executable_extensions; do
11365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11366    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11368    break 2
11369  fi
11370done
11371  done
11372IFS=$as_save_IFS
11373
11374  ;;
11375esac
11376fi
11377TR=$ac_cv_path_TR
11378if test -n "$TR"; then
11379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11380$as_echo "$TR" >&6; }
11381else
11382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
11384fi
11385
11386
11387          if test "x$TR" = x; then
11388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11389          fi
11390        else
11391          # Otherwise we believe it is a complete path. Use it as it is.
11392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11393$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11395$as_echo_n "checking for TR... " >&6; }
11396          if test ! -x "$tool_specified"; then
11397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11398$as_echo "not found" >&6; }
11399            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11400          fi
11401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11402$as_echo "$tool_specified" >&6; }
11403        fi
11404      fi
11405    fi
11406
11407  fi
11408
11409
11410
11411  if test "x$TR" = x; then
11412    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11413  fi
11414
11415
11416
11417
11418
11419  # Publish this variable in the help.
11420
11421
11422  if [ -z "${UNAME+x}" ]; then
11423    # The variable is not set by user, try to locate tool using the code snippet
11424    for ac_prog in uname
11425do
11426  # Extract the first word of "$ac_prog", so it can be a program name with args.
11427set dummy $ac_prog; ac_word=$2
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11429$as_echo_n "checking for $ac_word... " >&6; }
11430if ${ac_cv_path_UNAME+:} false; then :
11431  $as_echo_n "(cached) " >&6
11432else
11433  case $UNAME in
11434  [\\/]* | ?:[\\/]*)
11435  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11436  ;;
11437  *)
11438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11439for as_dir in $PATH
11440do
11441  IFS=$as_save_IFS
11442  test -z "$as_dir" && as_dir=.
11443    for ac_exec_ext in '' $ac_executable_extensions; do
11444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11445    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11447    break 2
11448  fi
11449done
11450  done
11451IFS=$as_save_IFS
11452
11453  ;;
11454esac
11455fi
11456UNAME=$ac_cv_path_UNAME
11457if test -n "$UNAME"; then
11458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11459$as_echo "$UNAME" >&6; }
11460else
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11462$as_echo "no" >&6; }
11463fi
11464
11465
11466  test -n "$UNAME" && break
11467done
11468
11469  else
11470    # The variable is set, but is it from the command line or the environment?
11471
11472    # Try to remove the string !UNAME! from our list.
11473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11475      # If it failed, the variable was not from the command line. Ignore it,
11476      # but warn the user (except for BASH, which is always set by the calling BASH).
11477      if test "xUNAME" != xBASH; then
11478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11479$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11480      fi
11481      # Try to locate tool using the code snippet
11482      for ac_prog in uname
11483do
11484  # Extract the first word of "$ac_prog", so it can be a program name with args.
11485set dummy $ac_prog; ac_word=$2
11486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11487$as_echo_n "checking for $ac_word... " >&6; }
11488if ${ac_cv_path_UNAME+:} false; then :
11489  $as_echo_n "(cached) " >&6
11490else
11491  case $UNAME in
11492  [\\/]* | ?:[\\/]*)
11493  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11494  ;;
11495  *)
11496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11497for as_dir in $PATH
11498do
11499  IFS=$as_save_IFS
11500  test -z "$as_dir" && as_dir=.
11501    for ac_exec_ext in '' $ac_executable_extensions; do
11502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11503    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11505    break 2
11506  fi
11507done
11508  done
11509IFS=$as_save_IFS
11510
11511  ;;
11512esac
11513fi
11514UNAME=$ac_cv_path_UNAME
11515if test -n "$UNAME"; then
11516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11517$as_echo "$UNAME" >&6; }
11518else
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11520$as_echo "no" >&6; }
11521fi
11522
11523
11524  test -n "$UNAME" && break
11525done
11526
11527    else
11528      # If it succeeded, then it was overridden by the user. We will use it
11529      # for the tool.
11530
11531      # First remove it from the list of overridden variables, so we can test
11532      # for unknown variables in the end.
11533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11534
11535      # Check if we try to supply an empty value
11536      if test "x$UNAME" = x; then
11537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11538$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11540$as_echo_n "checking for UNAME... " >&6; }
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11542$as_echo "disabled" >&6; }
11543      else
11544        # Check if the provided tool contains a complete path.
11545        tool_specified="$UNAME"
11546        tool_basename="${tool_specified##*/}"
11547        if test "x$tool_basename" = "x$tool_specified"; then
11548          # A command without a complete path is provided, search $PATH.
11549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11550$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11551          # Extract the first word of "$tool_basename", so it can be a program name with args.
11552set dummy $tool_basename; ac_word=$2
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11554$as_echo_n "checking for $ac_word... " >&6; }
11555if ${ac_cv_path_UNAME+:} false; then :
11556  $as_echo_n "(cached) " >&6
11557else
11558  case $UNAME in
11559  [\\/]* | ?:[\\/]*)
11560  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11561  ;;
11562  *)
11563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11564for as_dir in $PATH
11565do
11566  IFS=$as_save_IFS
11567  test -z "$as_dir" && as_dir=.
11568    for ac_exec_ext in '' $ac_executable_extensions; do
11569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11570    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11572    break 2
11573  fi
11574done
11575  done
11576IFS=$as_save_IFS
11577
11578  ;;
11579esac
11580fi
11581UNAME=$ac_cv_path_UNAME
11582if test -n "$UNAME"; then
11583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11584$as_echo "$UNAME" >&6; }
11585else
11586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
11588fi
11589
11590
11591          if test "x$UNAME" = x; then
11592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11593          fi
11594        else
11595          # Otherwise we believe it is a complete path. Use it as it is.
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11597$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11599$as_echo_n "checking for UNAME... " >&6; }
11600          if test ! -x "$tool_specified"; then
11601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11602$as_echo "not found" >&6; }
11603            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11604          fi
11605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11606$as_echo "$tool_specified" >&6; }
11607        fi
11608      fi
11609    fi
11610
11611  fi
11612
11613
11614
11615  if test "x$UNAME" = x; then
11616    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11617  fi
11618
11619
11620
11621
11622
11623  # Publish this variable in the help.
11624
11625
11626  if [ -z "${UNIQ+x}" ]; then
11627    # The variable is not set by user, try to locate tool using the code snippet
11628    for ac_prog in uniq
11629do
11630  # Extract the first word of "$ac_prog", so it can be a program name with args.
11631set dummy $ac_prog; ac_word=$2
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11633$as_echo_n "checking for $ac_word... " >&6; }
11634if ${ac_cv_path_UNIQ+:} false; then :
11635  $as_echo_n "(cached) " >&6
11636else
11637  case $UNIQ in
11638  [\\/]* | ?:[\\/]*)
11639  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11640  ;;
11641  *)
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_exec_ext in '' $ac_executable_extensions; do
11648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11649    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11651    break 2
11652  fi
11653done
11654  done
11655IFS=$as_save_IFS
11656
11657  ;;
11658esac
11659fi
11660UNIQ=$ac_cv_path_UNIQ
11661if test -n "$UNIQ"; then
11662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11663$as_echo "$UNIQ" >&6; }
11664else
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11666$as_echo "no" >&6; }
11667fi
11668
11669
11670  test -n "$UNIQ" && break
11671done
11672
11673  else
11674    # The variable is set, but is it from the command line or the environment?
11675
11676    # Try to remove the string !UNIQ! from our list.
11677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11679      # If it failed, the variable was not from the command line. Ignore it,
11680      # but warn the user (except for BASH, which is always set by the calling BASH).
11681      if test "xUNIQ" != xBASH; then
11682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11683$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11684      fi
11685      # Try to locate tool using the code snippet
11686      for ac_prog in uniq
11687do
11688  # Extract the first word of "$ac_prog", so it can be a program name with args.
11689set dummy $ac_prog; ac_word=$2
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11691$as_echo_n "checking for $ac_word... " >&6; }
11692if ${ac_cv_path_UNIQ+:} false; then :
11693  $as_echo_n "(cached) " >&6
11694else
11695  case $UNIQ in
11696  [\\/]* | ?:[\\/]*)
11697  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11698  ;;
11699  *)
11700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11701for as_dir in $PATH
11702do
11703  IFS=$as_save_IFS
11704  test -z "$as_dir" && as_dir=.
11705    for ac_exec_ext in '' $ac_executable_extensions; do
11706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11707    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11709    break 2
11710  fi
11711done
11712  done
11713IFS=$as_save_IFS
11714
11715  ;;
11716esac
11717fi
11718UNIQ=$ac_cv_path_UNIQ
11719if test -n "$UNIQ"; then
11720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11721$as_echo "$UNIQ" >&6; }
11722else
11723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11724$as_echo "no" >&6; }
11725fi
11726
11727
11728  test -n "$UNIQ" && break
11729done
11730
11731    else
11732      # If it succeeded, then it was overridden by the user. We will use it
11733      # for the tool.
11734
11735      # First remove it from the list of overridden variables, so we can test
11736      # for unknown variables in the end.
11737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11738
11739      # Check if we try to supply an empty value
11740      if test "x$UNIQ" = x; then
11741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11742$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11744$as_echo_n "checking for UNIQ... " >&6; }
11745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11746$as_echo "disabled" >&6; }
11747      else
11748        # Check if the provided tool contains a complete path.
11749        tool_specified="$UNIQ"
11750        tool_basename="${tool_specified##*/}"
11751        if test "x$tool_basename" = "x$tool_specified"; then
11752          # A command without a complete path is provided, search $PATH.
11753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11754$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11755          # Extract the first word of "$tool_basename", so it can be a program name with args.
11756set dummy $tool_basename; 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_UNIQ+:} false; then :
11760  $as_echo_n "(cached) " >&6
11761else
11762  case $UNIQ in
11763  [\\/]* | ?:[\\/]*)
11764  ac_cv_path_UNIQ="$UNIQ" # 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_UNIQ="$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
11785UNIQ=$ac_cv_path_UNIQ
11786if test -n "$UNIQ"; then
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11788$as_echo "$UNIQ" >&6; }
11789else
11790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
11792fi
11793
11794
11795          if test "x$UNIQ" = x; then
11796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11797          fi
11798        else
11799          # Otherwise we believe it is a complete path. Use it as it is.
11800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11801$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11803$as_echo_n "checking for UNIQ... " >&6; }
11804          if test ! -x "$tool_specified"; then
11805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11806$as_echo "not found" >&6; }
11807            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11808          fi
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11810$as_echo "$tool_specified" >&6; }
11811        fi
11812      fi
11813    fi
11814
11815  fi
11816
11817
11818
11819  if test "x$UNIQ" = x; then
11820    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11821  fi
11822
11823
11824
11825
11826
11827  # Publish this variable in the help.
11828
11829
11830  if [ -z "${WC+x}" ]; then
11831    # The variable is not set by user, try to locate tool using the code snippet
11832    for ac_prog in wc
11833do
11834  # Extract the first word of "$ac_prog", so it can be a program name with args.
11835set dummy $ac_prog; ac_word=$2
11836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11837$as_echo_n "checking for $ac_word... " >&6; }
11838if ${ac_cv_path_WC+:} false; then :
11839  $as_echo_n "(cached) " >&6
11840else
11841  case $WC in
11842  [\\/]* | ?:[\\/]*)
11843  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11844  ;;
11845  *)
11846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11847for as_dir in $PATH
11848do
11849  IFS=$as_save_IFS
11850  test -z "$as_dir" && as_dir=.
11851    for ac_exec_ext in '' $ac_executable_extensions; do
11852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11853    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11855    break 2
11856  fi
11857done
11858  done
11859IFS=$as_save_IFS
11860
11861  ;;
11862esac
11863fi
11864WC=$ac_cv_path_WC
11865if test -n "$WC"; then
11866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11867$as_echo "$WC" >&6; }
11868else
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11870$as_echo "no" >&6; }
11871fi
11872
11873
11874  test -n "$WC" && break
11875done
11876
11877  else
11878    # The variable is set, but is it from the command line or the environment?
11879
11880    # Try to remove the string !WC! from our list.
11881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11883      # If it failed, the variable was not from the command line. Ignore it,
11884      # but warn the user (except for BASH, which is always set by the calling BASH).
11885      if test "xWC" != xBASH; then
11886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11887$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11888      fi
11889      # Try to locate tool using the code snippet
11890      for ac_prog in wc
11891do
11892  # Extract the first word of "$ac_prog", so it can be a program name with args.
11893set dummy $ac_prog; ac_word=$2
11894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11895$as_echo_n "checking for $ac_word... " >&6; }
11896if ${ac_cv_path_WC+:} false; then :
11897  $as_echo_n "(cached) " >&6
11898else
11899  case $WC in
11900  [\\/]* | ?:[\\/]*)
11901  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11902  ;;
11903  *)
11904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11905for as_dir in $PATH
11906do
11907  IFS=$as_save_IFS
11908  test -z "$as_dir" && as_dir=.
11909    for ac_exec_ext in '' $ac_executable_extensions; do
11910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11911    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11913    break 2
11914  fi
11915done
11916  done
11917IFS=$as_save_IFS
11918
11919  ;;
11920esac
11921fi
11922WC=$ac_cv_path_WC
11923if test -n "$WC"; then
11924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11925$as_echo "$WC" >&6; }
11926else
11927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11928$as_echo "no" >&6; }
11929fi
11930
11931
11932  test -n "$WC" && break
11933done
11934
11935    else
11936      # If it succeeded, then it was overridden by the user. We will use it
11937      # for the tool.
11938
11939      # First remove it from the list of overridden variables, so we can test
11940      # for unknown variables in the end.
11941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11942
11943      # Check if we try to supply an empty value
11944      if test "x$WC" = x; then
11945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11946$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11948$as_echo_n "checking for WC... " >&6; }
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11950$as_echo "disabled" >&6; }
11951      else
11952        # Check if the provided tool contains a complete path.
11953        tool_specified="$WC"
11954        tool_basename="${tool_specified##*/}"
11955        if test "x$tool_basename" = "x$tool_specified"; then
11956          # A command without a complete path is provided, search $PATH.
11957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11958$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11959          # Extract the first word of "$tool_basename", so it can be a program name with args.
11960set dummy $tool_basename; 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_path_WC+:} false; then :
11964  $as_echo_n "(cached) " >&6
11965else
11966  case $WC in
11967  [\\/]* | ?:[\\/]*)
11968  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11969  ;;
11970  *)
11971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11972for as_dir in $PATH
11973do
11974  IFS=$as_save_IFS
11975  test -z "$as_dir" && as_dir=.
11976    for ac_exec_ext in '' $ac_executable_extensions; do
11977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11978    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11980    break 2
11981  fi
11982done
11983  done
11984IFS=$as_save_IFS
11985
11986  ;;
11987esac
11988fi
11989WC=$ac_cv_path_WC
11990if test -n "$WC"; then
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11992$as_echo "$WC" >&6; }
11993else
11994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11995$as_echo "no" >&6; }
11996fi
11997
11998
11999          if test "x$WC" = x; then
12000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12001          fi
12002        else
12003          # Otherwise we believe it is a complete path. Use it as it is.
12004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12005$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12007$as_echo_n "checking for WC... " >&6; }
12008          if test ! -x "$tool_specified"; then
12009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12010$as_echo "not found" >&6; }
12011            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12012          fi
12013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12014$as_echo "$tool_specified" >&6; }
12015        fi
12016      fi
12017    fi
12018
12019  fi
12020
12021
12022
12023  if test "x$WC" = x; then
12024    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12025  fi
12026
12027
12028
12029
12030
12031  # Publish this variable in the help.
12032
12033
12034  if [ -z "${WHICH+x}" ]; then
12035    # The variable is not set by user, try to locate tool using the code snippet
12036    for ac_prog in which
12037do
12038  # Extract the first word of "$ac_prog", so it can be a program name with args.
12039set dummy $ac_prog; ac_word=$2
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12041$as_echo_n "checking for $ac_word... " >&6; }
12042if ${ac_cv_path_WHICH+:} false; then :
12043  $as_echo_n "(cached) " >&6
12044else
12045  case $WHICH in
12046  [\\/]* | ?:[\\/]*)
12047  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12048  ;;
12049  *)
12050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12051for as_dir in $PATH
12052do
12053  IFS=$as_save_IFS
12054  test -z "$as_dir" && as_dir=.
12055    for ac_exec_ext in '' $ac_executable_extensions; do
12056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12057    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12059    break 2
12060  fi
12061done
12062  done
12063IFS=$as_save_IFS
12064
12065  ;;
12066esac
12067fi
12068WHICH=$ac_cv_path_WHICH
12069if test -n "$WHICH"; then
12070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12071$as_echo "$WHICH" >&6; }
12072else
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074$as_echo "no" >&6; }
12075fi
12076
12077
12078  test -n "$WHICH" && break
12079done
12080
12081  else
12082    # The variable is set, but is it from the command line or the environment?
12083
12084    # Try to remove the string !WHICH! from our list.
12085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12087      # If it failed, the variable was not from the command line. Ignore it,
12088      # but warn the user (except for BASH, which is always set by the calling BASH).
12089      if test "xWHICH" != xBASH; then
12090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12091$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12092      fi
12093      # Try to locate tool using the code snippet
12094      for ac_prog in which
12095do
12096  # Extract the first word of "$ac_prog", so it can be a program name with args.
12097set dummy $ac_prog; ac_word=$2
12098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12099$as_echo_n "checking for $ac_word... " >&6; }
12100if ${ac_cv_path_WHICH+:} false; then :
12101  $as_echo_n "(cached) " >&6
12102else
12103  case $WHICH in
12104  [\\/]* | ?:[\\/]*)
12105  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12106  ;;
12107  *)
12108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12109for as_dir in $PATH
12110do
12111  IFS=$as_save_IFS
12112  test -z "$as_dir" && as_dir=.
12113    for ac_exec_ext in '' $ac_executable_extensions; do
12114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12115    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12117    break 2
12118  fi
12119done
12120  done
12121IFS=$as_save_IFS
12122
12123  ;;
12124esac
12125fi
12126WHICH=$ac_cv_path_WHICH
12127if test -n "$WHICH"; then
12128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12129$as_echo "$WHICH" >&6; }
12130else
12131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
12133fi
12134
12135
12136  test -n "$WHICH" && break
12137done
12138
12139    else
12140      # If it succeeded, then it was overridden by the user. We will use it
12141      # for the tool.
12142
12143      # First remove it from the list of overridden variables, so we can test
12144      # for unknown variables in the end.
12145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12146
12147      # Check if we try to supply an empty value
12148      if test "x$WHICH" = x; then
12149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12150$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12152$as_echo_n "checking for WHICH... " >&6; }
12153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12154$as_echo "disabled" >&6; }
12155      else
12156        # Check if the provided tool contains a complete path.
12157        tool_specified="$WHICH"
12158        tool_basename="${tool_specified##*/}"
12159        if test "x$tool_basename" = "x$tool_specified"; then
12160          # A command without a complete path is provided, search $PATH.
12161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12162$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12163          # Extract the first word of "$tool_basename", so it can be a program name with args.
12164set dummy $tool_basename; ac_word=$2
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12166$as_echo_n "checking for $ac_word... " >&6; }
12167if ${ac_cv_path_WHICH+:} false; then :
12168  $as_echo_n "(cached) " >&6
12169else
12170  case $WHICH in
12171  [\\/]* | ?:[\\/]*)
12172  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12173  ;;
12174  *)
12175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12176for as_dir in $PATH
12177do
12178  IFS=$as_save_IFS
12179  test -z "$as_dir" && as_dir=.
12180    for ac_exec_ext in '' $ac_executable_extensions; do
12181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12182    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12184    break 2
12185  fi
12186done
12187  done
12188IFS=$as_save_IFS
12189
12190  ;;
12191esac
12192fi
12193WHICH=$ac_cv_path_WHICH
12194if test -n "$WHICH"; then
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12196$as_echo "$WHICH" >&6; }
12197else
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12199$as_echo "no" >&6; }
12200fi
12201
12202
12203          if test "x$WHICH" = x; then
12204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12205          fi
12206        else
12207          # Otherwise we believe it is a complete path. Use it as it is.
12208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12209$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12211$as_echo_n "checking for WHICH... " >&6; }
12212          if test ! -x "$tool_specified"; then
12213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12214$as_echo "not found" >&6; }
12215            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12216          fi
12217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12218$as_echo "$tool_specified" >&6; }
12219        fi
12220      fi
12221    fi
12222
12223  fi
12224
12225
12226
12227  if test "x$WHICH" = x; then
12228    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12229  fi
12230
12231
12232
12233
12234
12235  # Publish this variable in the help.
12236
12237
12238  if [ -z "${XARGS+x}" ]; then
12239    # The variable is not set by user, try to locate tool using the code snippet
12240    for ac_prog in xargs
12241do
12242  # Extract the first word of "$ac_prog", so it can be a program name with args.
12243set dummy $ac_prog; ac_word=$2
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12245$as_echo_n "checking for $ac_word... " >&6; }
12246if ${ac_cv_path_XARGS+:} false; then :
12247  $as_echo_n "(cached) " >&6
12248else
12249  case $XARGS in
12250  [\\/]* | ?:[\\/]*)
12251  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12252  ;;
12253  *)
12254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12255for as_dir in $PATH
12256do
12257  IFS=$as_save_IFS
12258  test -z "$as_dir" && as_dir=.
12259    for ac_exec_ext in '' $ac_executable_extensions; do
12260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12261    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12263    break 2
12264  fi
12265done
12266  done
12267IFS=$as_save_IFS
12268
12269  ;;
12270esac
12271fi
12272XARGS=$ac_cv_path_XARGS
12273if test -n "$XARGS"; then
12274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12275$as_echo "$XARGS" >&6; }
12276else
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12278$as_echo "no" >&6; }
12279fi
12280
12281
12282  test -n "$XARGS" && break
12283done
12284
12285  else
12286    # The variable is set, but is it from the command line or the environment?
12287
12288    # Try to remove the string !XARGS! from our list.
12289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12291      # If it failed, the variable was not from the command line. Ignore it,
12292      # but warn the user (except for BASH, which is always set by the calling BASH).
12293      if test "xXARGS" != xBASH; then
12294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12295$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12296      fi
12297      # Try to locate tool using the code snippet
12298      for ac_prog in xargs
12299do
12300  # Extract the first word of "$ac_prog", so it can be a program name with args.
12301set dummy $ac_prog; ac_word=$2
12302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12303$as_echo_n "checking for $ac_word... " >&6; }
12304if ${ac_cv_path_XARGS+:} false; then :
12305  $as_echo_n "(cached) " >&6
12306else
12307  case $XARGS in
12308  [\\/]* | ?:[\\/]*)
12309  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12310  ;;
12311  *)
12312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12313for as_dir in $PATH
12314do
12315  IFS=$as_save_IFS
12316  test -z "$as_dir" && as_dir=.
12317    for ac_exec_ext in '' $ac_executable_extensions; do
12318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12319    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12321    break 2
12322  fi
12323done
12324  done
12325IFS=$as_save_IFS
12326
12327  ;;
12328esac
12329fi
12330XARGS=$ac_cv_path_XARGS
12331if test -n "$XARGS"; then
12332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12333$as_echo "$XARGS" >&6; }
12334else
12335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
12337fi
12338
12339
12340  test -n "$XARGS" && break
12341done
12342
12343    else
12344      # If it succeeded, then it was overridden by the user. We will use it
12345      # for the tool.
12346
12347      # First remove it from the list of overridden variables, so we can test
12348      # for unknown variables in the end.
12349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12350
12351      # Check if we try to supply an empty value
12352      if test "x$XARGS" = x; then
12353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12354$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12356$as_echo_n "checking for XARGS... " >&6; }
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12358$as_echo "disabled" >&6; }
12359      else
12360        # Check if the provided tool contains a complete path.
12361        tool_specified="$XARGS"
12362        tool_basename="${tool_specified##*/}"
12363        if test "x$tool_basename" = "x$tool_specified"; then
12364          # A command without a complete path is provided, search $PATH.
12365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12366$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12367          # Extract the first word of "$tool_basename", so it can be a program name with args.
12368set dummy $tool_basename; ac_word=$2
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12370$as_echo_n "checking for $ac_word... " >&6; }
12371if ${ac_cv_path_XARGS+:} false; then :
12372  $as_echo_n "(cached) " >&6
12373else
12374  case $XARGS in
12375  [\\/]* | ?:[\\/]*)
12376  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12377  ;;
12378  *)
12379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12380for as_dir in $PATH
12381do
12382  IFS=$as_save_IFS
12383  test -z "$as_dir" && as_dir=.
12384    for ac_exec_ext in '' $ac_executable_extensions; do
12385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12386    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12388    break 2
12389  fi
12390done
12391  done
12392IFS=$as_save_IFS
12393
12394  ;;
12395esac
12396fi
12397XARGS=$ac_cv_path_XARGS
12398if test -n "$XARGS"; then
12399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12400$as_echo "$XARGS" >&6; }
12401else
12402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12403$as_echo "no" >&6; }
12404fi
12405
12406
12407          if test "x$XARGS" = x; then
12408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12409          fi
12410        else
12411          # Otherwise we believe it is a complete path. Use it as it is.
12412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12413$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12415$as_echo_n "checking for XARGS... " >&6; }
12416          if test ! -x "$tool_specified"; then
12417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12418$as_echo "not found" >&6; }
12419            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12420          fi
12421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12422$as_echo "$tool_specified" >&6; }
12423        fi
12424      fi
12425    fi
12426
12427  fi
12428
12429
12430
12431  if test "x$XARGS" = x; then
12432    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12433  fi
12434
12435
12436
12437  # Then required tools that require some special treatment.
12438
12439
12440  # Publish this variable in the help.
12441
12442
12443  if [ -z "${AWK+x}" ]; then
12444    # The variable is not set by user, try to locate tool using the code snippet
12445    for ac_prog in gawk mawk nawk awk
12446do
12447  # Extract the first word of "$ac_prog", so it can be a program name with args.
12448set dummy $ac_prog; ac_word=$2
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12450$as_echo_n "checking for $ac_word... " >&6; }
12451if ${ac_cv_prog_AWK+:} false; then :
12452  $as_echo_n "(cached) " >&6
12453else
12454  if test -n "$AWK"; then
12455  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12456else
12457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12458for as_dir in $PATH
12459do
12460  IFS=$as_save_IFS
12461  test -z "$as_dir" && as_dir=.
12462    for ac_exec_ext in '' $ac_executable_extensions; do
12463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12464    ac_cv_prog_AWK="$ac_prog"
12465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12466    break 2
12467  fi
12468done
12469  done
12470IFS=$as_save_IFS
12471
12472fi
12473fi
12474AWK=$ac_cv_prog_AWK
12475if test -n "$AWK"; then
12476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12477$as_echo "$AWK" >&6; }
12478else
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12480$as_echo "no" >&6; }
12481fi
12482
12483
12484  test -n "$AWK" && break
12485done
12486
12487  else
12488    # The variable is set, but is it from the command line or the environment?
12489
12490    # Try to remove the string !AWK! from our list.
12491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12493      # If it failed, the variable was not from the command line. Ignore it,
12494      # but warn the user (except for BASH, which is always set by the calling BASH).
12495      if test "xAWK" != xBASH; then
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12497$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12498      fi
12499      # Try to locate tool using the code snippet
12500      for ac_prog in gawk mawk nawk awk
12501do
12502  # Extract the first word of "$ac_prog", so it can be a program name with args.
12503set dummy $ac_prog; ac_word=$2
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12505$as_echo_n "checking for $ac_word... " >&6; }
12506if ${ac_cv_prog_AWK+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  if test -n "$AWK"; then
12510  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12511else
12512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12513for as_dir in $PATH
12514do
12515  IFS=$as_save_IFS
12516  test -z "$as_dir" && as_dir=.
12517    for ac_exec_ext in '' $ac_executable_extensions; do
12518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12519    ac_cv_prog_AWK="$ac_prog"
12520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12521    break 2
12522  fi
12523done
12524  done
12525IFS=$as_save_IFS
12526
12527fi
12528fi
12529AWK=$ac_cv_prog_AWK
12530if test -n "$AWK"; then
12531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12532$as_echo "$AWK" >&6; }
12533else
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12535$as_echo "no" >&6; }
12536fi
12537
12538
12539  test -n "$AWK" && break
12540done
12541
12542    else
12543      # If it succeeded, then it was overridden by the user. We will use it
12544      # for the tool.
12545
12546      # First remove it from the list of overridden variables, so we can test
12547      # for unknown variables in the end.
12548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12549
12550      # Check if we try to supply an empty value
12551      if test "x$AWK" = x; then
12552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12553$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12555$as_echo_n "checking for AWK... " >&6; }
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12557$as_echo "disabled" >&6; }
12558      else
12559        # Check if the provided tool contains a complete path.
12560        tool_specified="$AWK"
12561        tool_basename="${tool_specified##*/}"
12562        if test "x$tool_basename" = "x$tool_specified"; then
12563          # A command without a complete path is provided, search $PATH.
12564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12565$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12566          # Extract the first word of "$tool_basename", so it can be a program name with args.
12567set dummy $tool_basename; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_AWK+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $AWK in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596AWK=$ac_cv_path_AWK
12597if test -n "$AWK"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12599$as_echo "$AWK" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606          if test "x$AWK" = x; then
12607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12608          fi
12609        else
12610          # Otherwise we believe it is a complete path. Use it as it is.
12611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12612$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12614$as_echo_n "checking for AWK... " >&6; }
12615          if test ! -x "$tool_specified"; then
12616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12617$as_echo "not found" >&6; }
12618            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12619          fi
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12621$as_echo "$tool_specified" >&6; }
12622        fi
12623      fi
12624    fi
12625
12626  fi
12627
12628
12629  if test "x$AWK" = x; then
12630    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12631  fi
12632
12633
12634
12635
12636  # Publish this variable in the help.
12637
12638
12639  if [ -z "${GREP+x}" ]; then
12640    # The variable is not set by user, try to locate tool using the code snippet
12641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12642$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12643if ${ac_cv_path_GREP+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  if test -z "$GREP"; then
12647  ac_path_GREP_found=false
12648  # Loop through the user's path and test for each of PROGNAME-LIST
12649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12650for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12651do
12652  IFS=$as_save_IFS
12653  test -z "$as_dir" && as_dir=.
12654    for ac_prog in grep ggrep; do
12655    for ac_exec_ext in '' $ac_executable_extensions; do
12656      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12657      as_fn_executable_p "$ac_path_GREP" || continue
12658# Check for GNU ac_path_GREP and select it if it is found.
12659  # Check for GNU $ac_path_GREP
12660case `"$ac_path_GREP" --version 2>&1` in
12661*GNU*)
12662  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12663*)
12664  ac_count=0
12665  $as_echo_n 0123456789 >"conftest.in"
12666  while :
12667  do
12668    cat "conftest.in" "conftest.in" >"conftest.tmp"
12669    mv "conftest.tmp" "conftest.in"
12670    cp "conftest.in" "conftest.nl"
12671    $as_echo 'GREP' >> "conftest.nl"
12672    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12673    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12674    as_fn_arith $ac_count + 1 && ac_count=$as_val
12675    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12676      # Best one so far, save it but keep looking for a better one
12677      ac_cv_path_GREP="$ac_path_GREP"
12678      ac_path_GREP_max=$ac_count
12679    fi
12680    # 10*(2^10) chars as input seems more than enough
12681    test $ac_count -gt 10 && break
12682  done
12683  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12684esac
12685
12686      $ac_path_GREP_found && break 3
12687    done
12688  done
12689  done
12690IFS=$as_save_IFS
12691  if test -z "$ac_cv_path_GREP"; then
12692    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12693  fi
12694else
12695  ac_cv_path_GREP=$GREP
12696fi
12697
12698fi
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12700$as_echo "$ac_cv_path_GREP" >&6; }
12701 GREP="$ac_cv_path_GREP"
12702
12703
12704  else
12705    # The variable is set, but is it from the command line or the environment?
12706
12707    # Try to remove the string !GREP! from our list.
12708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12710      # If it failed, the variable was not from the command line. Ignore it,
12711      # but warn the user (except for BASH, which is always set by the calling BASH).
12712      if test "xGREP" != xBASH; then
12713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12714$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12715      fi
12716      # Try to locate tool using the code snippet
12717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12718$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12719if ${ac_cv_path_GREP+:} false; then :
12720  $as_echo_n "(cached) " >&6
12721else
12722  if test -z "$GREP"; then
12723  ac_path_GREP_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 grep ggrep; do
12731    for ac_exec_ext in '' $ac_executable_extensions; do
12732      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12733      as_fn_executable_p "$ac_path_GREP" || continue
12734# Check for GNU ac_path_GREP and select it if it is found.
12735  # Check for GNU $ac_path_GREP
12736case `"$ac_path_GREP" --version 2>&1` in
12737*GNU*)
12738  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_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 'GREP' >> "conftest.nl"
12748    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "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_GREP_max-0}; then
12752      # Best one so far, save it but keep looking for a better one
12753      ac_cv_path_GREP="$ac_path_GREP"
12754      ac_path_GREP_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_GREP_found && break 3
12763    done
12764  done
12765  done
12766IFS=$as_save_IFS
12767  if test -z "$ac_cv_path_GREP"; then
12768    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12769  fi
12770else
12771  ac_cv_path_GREP=$GREP
12772fi
12773
12774fi
12775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12776$as_echo "$ac_cv_path_GREP" >&6; }
12777 GREP="$ac_cv_path_GREP"
12778
12779
12780    else
12781      # If it succeeded, then it was overridden by the user. We will use it
12782      # for the tool.
12783
12784      # First remove it from the list of overridden variables, so we can test
12785      # for unknown variables in the end.
12786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12787
12788      # Check if we try to supply an empty value
12789      if test "x$GREP" = x; then
12790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12791$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12793$as_echo_n "checking for GREP... " >&6; }
12794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12795$as_echo "disabled" >&6; }
12796      else
12797        # Check if the provided tool contains a complete path.
12798        tool_specified="$GREP"
12799        tool_basename="${tool_specified##*/}"
12800        if test "x$tool_basename" = "x$tool_specified"; then
12801          # A command without a complete path is provided, search $PATH.
12802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12803$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12804          # Extract the first word of "$tool_basename", so it can be a program name with args.
12805set dummy $tool_basename; ac_word=$2
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12807$as_echo_n "checking for $ac_word... " >&6; }
12808if ${ac_cv_path_GREP+:} false; then :
12809  $as_echo_n "(cached) " >&6
12810else
12811  case $GREP in
12812  [\\/]* | ?:[\\/]*)
12813  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12814  ;;
12815  *)
12816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12817for as_dir in $PATH
12818do
12819  IFS=$as_save_IFS
12820  test -z "$as_dir" && as_dir=.
12821    for ac_exec_ext in '' $ac_executable_extensions; do
12822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12823    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12825    break 2
12826  fi
12827done
12828  done
12829IFS=$as_save_IFS
12830
12831  ;;
12832esac
12833fi
12834GREP=$ac_cv_path_GREP
12835if test -n "$GREP"; then
12836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12837$as_echo "$GREP" >&6; }
12838else
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12840$as_echo "no" >&6; }
12841fi
12842
12843
12844          if test "x$GREP" = x; then
12845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12846          fi
12847        else
12848          # Otherwise we believe it is a complete path. Use it as it is.
12849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12850$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12852$as_echo_n "checking for GREP... " >&6; }
12853          if test ! -x "$tool_specified"; then
12854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12855$as_echo "not found" >&6; }
12856            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12857          fi
12858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12859$as_echo "$tool_specified" >&6; }
12860        fi
12861      fi
12862    fi
12863
12864  fi
12865
12866
12867  if test "x$GREP" = x; then
12868    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12869  fi
12870
12871
12872
12873
12874  # Publish this variable in the help.
12875
12876
12877  if [ -z "${EGREP+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 egrep" >&5
12880$as_echo_n "checking for egrep... " >&6; }
12881if ${ac_cv_path_EGREP+:} false; then :
12882  $as_echo_n "(cached) " >&6
12883else
12884  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12885   then ac_cv_path_EGREP="$GREP -E"
12886   else
12887     if test -z "$EGREP"; then
12888  ac_path_EGREP_found=false
12889  # Loop through the user's path and test for each of PROGNAME-LIST
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_prog in egrep; do
12896    for ac_exec_ext in '' $ac_executable_extensions; do
12897      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12898      as_fn_executable_p "$ac_path_EGREP" || continue
12899# Check for GNU ac_path_EGREP and select it if it is found.
12900  # Check for GNU $ac_path_EGREP
12901case `"$ac_path_EGREP" --version 2>&1` in
12902*GNU*)
12903  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12904*)
12905  ac_count=0
12906  $as_echo_n 0123456789 >"conftest.in"
12907  while :
12908  do
12909    cat "conftest.in" "conftest.in" >"conftest.tmp"
12910    mv "conftest.tmp" "conftest.in"
12911    cp "conftest.in" "conftest.nl"
12912    $as_echo 'EGREP' >> "conftest.nl"
12913    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12915    as_fn_arith $ac_count + 1 && ac_count=$as_val
12916    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12917      # Best one so far, save it but keep looking for a better one
12918      ac_cv_path_EGREP="$ac_path_EGREP"
12919      ac_path_EGREP_max=$ac_count
12920    fi
12921    # 10*(2^10) chars as input seems more than enough
12922    test $ac_count -gt 10 && break
12923  done
12924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12925esac
12926
12927      $ac_path_EGREP_found && break 3
12928    done
12929  done
12930  done
12931IFS=$as_save_IFS
12932  if test -z "$ac_cv_path_EGREP"; then
12933    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12934  fi
12935else
12936  ac_cv_path_EGREP=$EGREP
12937fi
12938
12939   fi
12940fi
12941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12942$as_echo "$ac_cv_path_EGREP" >&6; }
12943 EGREP="$ac_cv_path_EGREP"
12944
12945
12946  else
12947    # The variable is set, but is it from the command line or the environment?
12948
12949    # Try to remove the string !EGREP! from our list.
12950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12952      # If it failed, the variable was not from the command line. Ignore it,
12953      # but warn the user (except for BASH, which is always set by the calling BASH).
12954      if test "xEGREP" != xBASH; then
12955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12956$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12957      fi
12958      # Try to locate tool using the code snippet
12959      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12960$as_echo_n "checking for egrep... " >&6; }
12961if ${ac_cv_path_EGREP+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12965   then ac_cv_path_EGREP="$GREP -E"
12966   else
12967     if test -z "$EGREP"; then
12968  ac_path_EGREP_found=false
12969  # Loop through the user's path and test for each of PROGNAME-LIST
12970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12971for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12972do
12973  IFS=$as_save_IFS
12974  test -z "$as_dir" && as_dir=.
12975    for ac_prog in egrep; do
12976    for ac_exec_ext in '' $ac_executable_extensions; do
12977      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12978      as_fn_executable_p "$ac_path_EGREP" || continue
12979# Check for GNU ac_path_EGREP and select it if it is found.
12980  # Check for GNU $ac_path_EGREP
12981case `"$ac_path_EGREP" --version 2>&1` in
12982*GNU*)
12983  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12984*)
12985  ac_count=0
12986  $as_echo_n 0123456789 >"conftest.in"
12987  while :
12988  do
12989    cat "conftest.in" "conftest.in" >"conftest.tmp"
12990    mv "conftest.tmp" "conftest.in"
12991    cp "conftest.in" "conftest.nl"
12992    $as_echo 'EGREP' >> "conftest.nl"
12993    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12994    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12995    as_fn_arith $ac_count + 1 && ac_count=$as_val
12996    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12997      # Best one so far, save it but keep looking for a better one
12998      ac_cv_path_EGREP="$ac_path_EGREP"
12999      ac_path_EGREP_max=$ac_count
13000    fi
13001    # 10*(2^10) chars as input seems more than enough
13002    test $ac_count -gt 10 && break
13003  done
13004  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13005esac
13006
13007      $ac_path_EGREP_found && break 3
13008    done
13009  done
13010  done
13011IFS=$as_save_IFS
13012  if test -z "$ac_cv_path_EGREP"; then
13013    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13014  fi
13015else
13016  ac_cv_path_EGREP=$EGREP
13017fi
13018
13019   fi
13020fi
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13022$as_echo "$ac_cv_path_EGREP" >&6; }
13023 EGREP="$ac_cv_path_EGREP"
13024
13025
13026    else
13027      # If it succeeded, then it was overridden by the user. We will use it
13028      # for the tool.
13029
13030      # First remove it from the list of overridden variables, so we can test
13031      # for unknown variables in the end.
13032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13033
13034      # Check if we try to supply an empty value
13035      if test "x$EGREP" = x; then
13036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13037$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13039$as_echo_n "checking for EGREP... " >&6; }
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13041$as_echo "disabled" >&6; }
13042      else
13043        # Check if the provided tool contains a complete path.
13044        tool_specified="$EGREP"
13045        tool_basename="${tool_specified##*/}"
13046        if test "x$tool_basename" = "x$tool_specified"; then
13047          # A command without a complete path is provided, search $PATH.
13048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13049$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13050          # Extract the first word of "$tool_basename", so it can be a program name with args.
13051set dummy $tool_basename; ac_word=$2
13052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13053$as_echo_n "checking for $ac_word... " >&6; }
13054if ${ac_cv_path_EGREP+:} false; then :
13055  $as_echo_n "(cached) " >&6
13056else
13057  case $EGREP in
13058  [\\/]* | ?:[\\/]*)
13059  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13060  ;;
13061  *)
13062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13063for as_dir in $PATH
13064do
13065  IFS=$as_save_IFS
13066  test -z "$as_dir" && as_dir=.
13067    for ac_exec_ext in '' $ac_executable_extensions; do
13068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13069    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13071    break 2
13072  fi
13073done
13074  done
13075IFS=$as_save_IFS
13076
13077  ;;
13078esac
13079fi
13080EGREP=$ac_cv_path_EGREP
13081if test -n "$EGREP"; then
13082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13083$as_echo "$EGREP" >&6; }
13084else
13085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13086$as_echo "no" >&6; }
13087fi
13088
13089
13090          if test "x$EGREP" = x; then
13091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13092          fi
13093        else
13094          # Otherwise we believe it is a complete path. Use it as it is.
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13096$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13098$as_echo_n "checking for EGREP... " >&6; }
13099          if test ! -x "$tool_specified"; then
13100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13101$as_echo "not found" >&6; }
13102            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13103          fi
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13105$as_echo "$tool_specified" >&6; }
13106        fi
13107      fi
13108    fi
13109
13110  fi
13111
13112
13113  if test "x$EGREP" = x; then
13114    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13115  fi
13116
13117
13118
13119
13120  # Publish this variable in the help.
13121
13122
13123  if [ -z "${FGREP+x}" ]; then
13124    # The variable is not set by user, try to locate tool using the code snippet
13125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13126$as_echo_n "checking for fgrep... " >&6; }
13127if ${ac_cv_path_FGREP+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13131   then ac_cv_path_FGREP="$GREP -F"
13132   else
13133     if test -z "$FGREP"; then
13134  ac_path_FGREP_found=false
13135  # Loop through the user's path and test for each of PROGNAME-LIST
13136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13138do
13139  IFS=$as_save_IFS
13140  test -z "$as_dir" && as_dir=.
13141    for ac_prog in fgrep; do
13142    for ac_exec_ext in '' $ac_executable_extensions; do
13143      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13144      as_fn_executable_p "$ac_path_FGREP" || continue
13145# Check for GNU ac_path_FGREP and select it if it is found.
13146  # Check for GNU $ac_path_FGREP
13147case `"$ac_path_FGREP" --version 2>&1` in
13148*GNU*)
13149  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13150*)
13151  ac_count=0
13152  $as_echo_n 0123456789 >"conftest.in"
13153  while :
13154  do
13155    cat "conftest.in" "conftest.in" >"conftest.tmp"
13156    mv "conftest.tmp" "conftest.in"
13157    cp "conftest.in" "conftest.nl"
13158    $as_echo 'FGREP' >> "conftest.nl"
13159    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13161    as_fn_arith $ac_count + 1 && ac_count=$as_val
13162    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13163      # Best one so far, save it but keep looking for a better one
13164      ac_cv_path_FGREP="$ac_path_FGREP"
13165      ac_path_FGREP_max=$ac_count
13166    fi
13167    # 10*(2^10) chars as input seems more than enough
13168    test $ac_count -gt 10 && break
13169  done
13170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13171esac
13172
13173      $ac_path_FGREP_found && break 3
13174    done
13175  done
13176  done
13177IFS=$as_save_IFS
13178  if test -z "$ac_cv_path_FGREP"; then
13179    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13180  fi
13181else
13182  ac_cv_path_FGREP=$FGREP
13183fi
13184
13185   fi
13186fi
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13188$as_echo "$ac_cv_path_FGREP" >&6; }
13189 FGREP="$ac_cv_path_FGREP"
13190
13191
13192  else
13193    # The variable is set, but is it from the command line or the environment?
13194
13195    # Try to remove the string !FGREP! from our list.
13196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13198      # If it failed, the variable was not from the command line. Ignore it,
13199      # but warn the user (except for BASH, which is always set by the calling BASH).
13200      if test "xFGREP" != xBASH; then
13201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13202$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13203      fi
13204      # Try to locate tool using the code snippet
13205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13206$as_echo_n "checking for fgrep... " >&6; }
13207if ${ac_cv_path_FGREP+:} false; then :
13208  $as_echo_n "(cached) " >&6
13209else
13210  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13211   then ac_cv_path_FGREP="$GREP -F"
13212   else
13213     if test -z "$FGREP"; then
13214  ac_path_FGREP_found=false
13215  # Loop through the user's path and test for each of PROGNAME-LIST
13216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13218do
13219  IFS=$as_save_IFS
13220  test -z "$as_dir" && as_dir=.
13221    for ac_prog in fgrep; do
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13224      as_fn_executable_p "$ac_path_FGREP" || continue
13225# Check for GNU ac_path_FGREP and select it if it is found.
13226  # Check for GNU $ac_path_FGREP
13227case `"$ac_path_FGREP" --version 2>&1` in
13228*GNU*)
13229  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13230*)
13231  ac_count=0
13232  $as_echo_n 0123456789 >"conftest.in"
13233  while :
13234  do
13235    cat "conftest.in" "conftest.in" >"conftest.tmp"
13236    mv "conftest.tmp" "conftest.in"
13237    cp "conftest.in" "conftest.nl"
13238    $as_echo 'FGREP' >> "conftest.nl"
13239    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13240    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13241    as_fn_arith $ac_count + 1 && ac_count=$as_val
13242    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13243      # Best one so far, save it but keep looking for a better one
13244      ac_cv_path_FGREP="$ac_path_FGREP"
13245      ac_path_FGREP_max=$ac_count
13246    fi
13247    # 10*(2^10) chars as input seems more than enough
13248    test $ac_count -gt 10 && break
13249  done
13250  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13251esac
13252
13253      $ac_path_FGREP_found && break 3
13254    done
13255  done
13256  done
13257IFS=$as_save_IFS
13258  if test -z "$ac_cv_path_FGREP"; then
13259    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13260  fi
13261else
13262  ac_cv_path_FGREP=$FGREP
13263fi
13264
13265   fi
13266fi
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13268$as_echo "$ac_cv_path_FGREP" >&6; }
13269 FGREP="$ac_cv_path_FGREP"
13270
13271
13272    else
13273      # If it succeeded, then it was overridden by the user. We will use it
13274      # for the tool.
13275
13276      # First remove it from the list of overridden variables, so we can test
13277      # for unknown variables in the end.
13278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13279
13280      # Check if we try to supply an empty value
13281      if test "x$FGREP" = x; then
13282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13283$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13285$as_echo_n "checking for FGREP... " >&6; }
13286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13287$as_echo "disabled" >&6; }
13288      else
13289        # Check if the provided tool contains a complete path.
13290        tool_specified="$FGREP"
13291        tool_basename="${tool_specified##*/}"
13292        if test "x$tool_basename" = "x$tool_specified"; then
13293          # A command without a complete path is provided, search $PATH.
13294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13295$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13296          # Extract the first word of "$tool_basename", so it can be a program name with args.
13297set dummy $tool_basename; ac_word=$2
13298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13299$as_echo_n "checking for $ac_word... " >&6; }
13300if ${ac_cv_path_FGREP+:} false; then :
13301  $as_echo_n "(cached) " >&6
13302else
13303  case $FGREP in
13304  [\\/]* | ?:[\\/]*)
13305  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13306  ;;
13307  *)
13308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13309for as_dir in $PATH
13310do
13311  IFS=$as_save_IFS
13312  test -z "$as_dir" && as_dir=.
13313    for ac_exec_ext in '' $ac_executable_extensions; do
13314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13315    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13317    break 2
13318  fi
13319done
13320  done
13321IFS=$as_save_IFS
13322
13323  ;;
13324esac
13325fi
13326FGREP=$ac_cv_path_FGREP
13327if test -n "$FGREP"; then
13328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13329$as_echo "$FGREP" >&6; }
13330else
13331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13332$as_echo "no" >&6; }
13333fi
13334
13335
13336          if test "x$FGREP" = x; then
13337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13338          fi
13339        else
13340          # Otherwise we believe it is a complete path. Use it as it is.
13341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13342$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13344$as_echo_n "checking for FGREP... " >&6; }
13345          if test ! -x "$tool_specified"; then
13346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13347$as_echo "not found" >&6; }
13348            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13349          fi
13350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13351$as_echo "$tool_specified" >&6; }
13352        fi
13353      fi
13354    fi
13355
13356  fi
13357
13358
13359  if test "x$FGREP" = x; then
13360    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13361  fi
13362
13363
13364
13365
13366  # Publish this variable in the help.
13367
13368
13369  if [ -z "${SED+x}" ]; then
13370    # The variable is not set by user, try to locate tool using the code snippet
13371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13372$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13373if ${ac_cv_path_SED+:} false; then :
13374  $as_echo_n "(cached) " >&6
13375else
13376            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13377     for ac_i in 1 2 3 4 5 6 7; do
13378       ac_script="$ac_script$as_nl$ac_script"
13379     done
13380     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13381     { ac_script=; unset ac_script;}
13382     if test -z "$SED"; then
13383  ac_path_SED_found=false
13384  # Loop through the user's path and test for each of PROGNAME-LIST
13385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13386for as_dir in $PATH
13387do
13388  IFS=$as_save_IFS
13389  test -z "$as_dir" && as_dir=.
13390    for ac_prog in sed gsed; do
13391    for ac_exec_ext in '' $ac_executable_extensions; do
13392      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13393      as_fn_executable_p "$ac_path_SED" || continue
13394# Check for GNU ac_path_SED and select it if it is found.
13395  # Check for GNU $ac_path_SED
13396case `"$ac_path_SED" --version 2>&1` in
13397*GNU*)
13398  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13399*)
13400  ac_count=0
13401  $as_echo_n 0123456789 >"conftest.in"
13402  while :
13403  do
13404    cat "conftest.in" "conftest.in" >"conftest.tmp"
13405    mv "conftest.tmp" "conftest.in"
13406    cp "conftest.in" "conftest.nl"
13407    $as_echo '' >> "conftest.nl"
13408    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13409    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13410    as_fn_arith $ac_count + 1 && ac_count=$as_val
13411    if test $ac_count -gt ${ac_path_SED_max-0}; then
13412      # Best one so far, save it but keep looking for a better one
13413      ac_cv_path_SED="$ac_path_SED"
13414      ac_path_SED_max=$ac_count
13415    fi
13416    # 10*(2^10) chars as input seems more than enough
13417    test $ac_count -gt 10 && break
13418  done
13419  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13420esac
13421
13422      $ac_path_SED_found && break 3
13423    done
13424  done
13425  done
13426IFS=$as_save_IFS
13427  if test -z "$ac_cv_path_SED"; then
13428    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13429  fi
13430else
13431  ac_cv_path_SED=$SED
13432fi
13433
13434fi
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13436$as_echo "$ac_cv_path_SED" >&6; }
13437 SED="$ac_cv_path_SED"
13438  rm -f conftest.sed
13439
13440  else
13441    # The variable is set, but is it from the command line or the environment?
13442
13443    # Try to remove the string !SED! from our list.
13444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13446      # If it failed, the variable was not from the command line. Ignore it,
13447      # but warn the user (except for BASH, which is always set by the calling BASH).
13448      if test "xSED" != xBASH; then
13449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13450$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13451      fi
13452      # Try to locate tool using the code snippet
13453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13454$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13455if ${ac_cv_path_SED+:} false; then :
13456  $as_echo_n "(cached) " >&6
13457else
13458            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13459     for ac_i in 1 2 3 4 5 6 7; do
13460       ac_script="$ac_script$as_nl$ac_script"
13461     done
13462     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13463     { ac_script=; unset ac_script;}
13464     if test -z "$SED"; then
13465  ac_path_SED_found=false
13466  # Loop through the user's path and test for each of PROGNAME-LIST
13467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13468for as_dir in $PATH
13469do
13470  IFS=$as_save_IFS
13471  test -z "$as_dir" && as_dir=.
13472    for ac_prog in sed gsed; do
13473    for ac_exec_ext in '' $ac_executable_extensions; do
13474      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13475      as_fn_executable_p "$ac_path_SED" || continue
13476# Check for GNU ac_path_SED and select it if it is found.
13477  # Check for GNU $ac_path_SED
13478case `"$ac_path_SED" --version 2>&1` in
13479*GNU*)
13480  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13481*)
13482  ac_count=0
13483  $as_echo_n 0123456789 >"conftest.in"
13484  while :
13485  do
13486    cat "conftest.in" "conftest.in" >"conftest.tmp"
13487    mv "conftest.tmp" "conftest.in"
13488    cp "conftest.in" "conftest.nl"
13489    $as_echo '' >> "conftest.nl"
13490    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13491    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13492    as_fn_arith $ac_count + 1 && ac_count=$as_val
13493    if test $ac_count -gt ${ac_path_SED_max-0}; then
13494      # Best one so far, save it but keep looking for a better one
13495      ac_cv_path_SED="$ac_path_SED"
13496      ac_path_SED_max=$ac_count
13497    fi
13498    # 10*(2^10) chars as input seems more than enough
13499    test $ac_count -gt 10 && break
13500  done
13501  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13502esac
13503
13504      $ac_path_SED_found && break 3
13505    done
13506  done
13507  done
13508IFS=$as_save_IFS
13509  if test -z "$ac_cv_path_SED"; then
13510    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13511  fi
13512else
13513  ac_cv_path_SED=$SED
13514fi
13515
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13518$as_echo "$ac_cv_path_SED" >&6; }
13519 SED="$ac_cv_path_SED"
13520  rm -f conftest.sed
13521
13522    else
13523      # If it succeeded, then it was overridden by the user. We will use it
13524      # for the tool.
13525
13526      # First remove it from the list of overridden variables, so we can test
13527      # for unknown variables in the end.
13528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13529
13530      # Check if we try to supply an empty value
13531      if test "x$SED" = x; then
13532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13533$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13535$as_echo_n "checking for SED... " >&6; }
13536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13537$as_echo "disabled" >&6; }
13538      else
13539        # Check if the provided tool contains a complete path.
13540        tool_specified="$SED"
13541        tool_basename="${tool_specified##*/}"
13542        if test "x$tool_basename" = "x$tool_specified"; then
13543          # A command without a complete path is provided, search $PATH.
13544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13545$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13546          # Extract the first word of "$tool_basename", so it can be a program name with args.
13547set dummy $tool_basename; ac_word=$2
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13549$as_echo_n "checking for $ac_word... " >&6; }
13550if ${ac_cv_path_SED+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553  case $SED in
13554  [\\/]* | ?:[\\/]*)
13555  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13556  ;;
13557  *)
13558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13559for as_dir in $PATH
13560do
13561  IFS=$as_save_IFS
13562  test -z "$as_dir" && as_dir=.
13563    for ac_exec_ext in '' $ac_executable_extensions; do
13564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13565    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13567    break 2
13568  fi
13569done
13570  done
13571IFS=$as_save_IFS
13572
13573  ;;
13574esac
13575fi
13576SED=$ac_cv_path_SED
13577if test -n "$SED"; then
13578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13579$as_echo "$SED" >&6; }
13580else
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13582$as_echo "no" >&6; }
13583fi
13584
13585
13586          if test "x$SED" = x; then
13587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13588          fi
13589        else
13590          # Otherwise we believe it is a complete path. Use it as it is.
13591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13592$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13594$as_echo_n "checking for SED... " >&6; }
13595          if test ! -x "$tool_specified"; then
13596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13597$as_echo "not found" >&6; }
13598            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13599          fi
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13601$as_echo "$tool_specified" >&6; }
13602        fi
13603      fi
13604    fi
13605
13606  fi
13607
13608
13609  if test "x$SED" = x; then
13610    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13611  fi
13612
13613
13614
13615  # Always force rm.
13616  RM="$RM -f"
13617
13618  # pwd behaves differently on various platforms and some don't support the -L flag.
13619  # Always use the bash builtin pwd to get uniform behavior.
13620  THEPWDCMD=pwd
13621
13622  # These are not required on all platforms
13623
13624
13625  # Publish this variable in the help.
13626
13627
13628  if [ -z "${CYGPATH+x}" ]; then
13629    # The variable is not set by user, try to locate tool using the code snippet
13630    for ac_prog in cygpath
13631do
13632  # Extract the first word of "$ac_prog", so it can be a program name with args.
13633set dummy $ac_prog; ac_word=$2
13634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13635$as_echo_n "checking for $ac_word... " >&6; }
13636if ${ac_cv_path_CYGPATH+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  case $CYGPATH in
13640  [\\/]* | ?:[\\/]*)
13641  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13642  ;;
13643  *)
13644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH
13646do
13647  IFS=$as_save_IFS
13648  test -z "$as_dir" && as_dir=.
13649    for ac_exec_ext in '' $ac_executable_extensions; do
13650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13651    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13653    break 2
13654  fi
13655done
13656  done
13657IFS=$as_save_IFS
13658
13659  ;;
13660esac
13661fi
13662CYGPATH=$ac_cv_path_CYGPATH
13663if test -n "$CYGPATH"; then
13664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13665$as_echo "$CYGPATH" >&6; }
13666else
13667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13668$as_echo "no" >&6; }
13669fi
13670
13671
13672  test -n "$CYGPATH" && break
13673done
13674
13675  else
13676    # The variable is set, but is it from the command line or the environment?
13677
13678    # Try to remove the string !CYGPATH! from our list.
13679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13681      # If it failed, the variable was not from the command line. Ignore it,
13682      # but warn the user (except for BASH, which is always set by the calling BASH).
13683      if test "xCYGPATH" != xBASH; then
13684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13685$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13686      fi
13687      # Try to locate tool using the code snippet
13688      for ac_prog in cygpath
13689do
13690  # Extract the first word of "$ac_prog", so it can be a program name with args.
13691set dummy $ac_prog; ac_word=$2
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13693$as_echo_n "checking for $ac_word... " >&6; }
13694if ${ac_cv_path_CYGPATH+:} false; then :
13695  $as_echo_n "(cached) " >&6
13696else
13697  case $CYGPATH in
13698  [\\/]* | ?:[\\/]*)
13699  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13700  ;;
13701  *)
13702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13703for as_dir in $PATH
13704do
13705  IFS=$as_save_IFS
13706  test -z "$as_dir" && as_dir=.
13707    for ac_exec_ext in '' $ac_executable_extensions; do
13708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13709    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13711    break 2
13712  fi
13713done
13714  done
13715IFS=$as_save_IFS
13716
13717  ;;
13718esac
13719fi
13720CYGPATH=$ac_cv_path_CYGPATH
13721if test -n "$CYGPATH"; then
13722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13723$as_echo "$CYGPATH" >&6; }
13724else
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13726$as_echo "no" >&6; }
13727fi
13728
13729
13730  test -n "$CYGPATH" && break
13731done
13732
13733    else
13734      # If it succeeded, then it was overridden by the user. We will use it
13735      # for the tool.
13736
13737      # First remove it from the list of overridden variables, so we can test
13738      # for unknown variables in the end.
13739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13740
13741      # Check if we try to supply an empty value
13742      if test "x$CYGPATH" = x; then
13743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13744$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13746$as_echo_n "checking for CYGPATH... " >&6; }
13747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13748$as_echo "disabled" >&6; }
13749      else
13750        # Check if the provided tool contains a complete path.
13751        tool_specified="$CYGPATH"
13752        tool_basename="${tool_specified##*/}"
13753        if test "x$tool_basename" = "x$tool_specified"; then
13754          # A command without a complete path is provided, search $PATH.
13755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13756$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13757          # Extract the first word of "$tool_basename", so it can be a program name with args.
13758set dummy $tool_basename; ac_word=$2
13759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13760$as_echo_n "checking for $ac_word... " >&6; }
13761if ${ac_cv_path_CYGPATH+:} false; then :
13762  $as_echo_n "(cached) " >&6
13763else
13764  case $CYGPATH in
13765  [\\/]* | ?:[\\/]*)
13766  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13767  ;;
13768  *)
13769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13770for as_dir in $PATH
13771do
13772  IFS=$as_save_IFS
13773  test -z "$as_dir" && as_dir=.
13774    for ac_exec_ext in '' $ac_executable_extensions; do
13775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13776    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13778    break 2
13779  fi
13780done
13781  done
13782IFS=$as_save_IFS
13783
13784  ;;
13785esac
13786fi
13787CYGPATH=$ac_cv_path_CYGPATH
13788if test -n "$CYGPATH"; then
13789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13790$as_echo "$CYGPATH" >&6; }
13791else
13792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13793$as_echo "no" >&6; }
13794fi
13795
13796
13797          if test "x$CYGPATH" = x; then
13798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13799          fi
13800        else
13801          # Otherwise we believe it is a complete path. Use it as it is.
13802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13803$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13805$as_echo_n "checking for CYGPATH... " >&6; }
13806          if test ! -x "$tool_specified"; then
13807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13808$as_echo "not found" >&6; }
13809            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13810          fi
13811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13812$as_echo "$tool_specified" >&6; }
13813        fi
13814      fi
13815    fi
13816
13817  fi
13818
13819
13820
13821
13822  # Publish this variable in the help.
13823
13824
13825  if [ -z "${READLINK+x}" ]; then
13826    # The variable is not set by user, try to locate tool using the code snippet
13827    for ac_prog in greadlink readlink
13828do
13829  # Extract the first word of "$ac_prog", so it can be a program name with args.
13830set dummy $ac_prog; ac_word=$2
13831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13832$as_echo_n "checking for $ac_word... " >&6; }
13833if ${ac_cv_path_READLINK+:} false; then :
13834  $as_echo_n "(cached) " >&6
13835else
13836  case $READLINK in
13837  [\\/]* | ?:[\\/]*)
13838  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13839  ;;
13840  *)
13841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13842for as_dir in $PATH
13843do
13844  IFS=$as_save_IFS
13845  test -z "$as_dir" && as_dir=.
13846    for ac_exec_ext in '' $ac_executable_extensions; do
13847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13848    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13850    break 2
13851  fi
13852done
13853  done
13854IFS=$as_save_IFS
13855
13856  ;;
13857esac
13858fi
13859READLINK=$ac_cv_path_READLINK
13860if test -n "$READLINK"; then
13861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13862$as_echo "$READLINK" >&6; }
13863else
13864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13865$as_echo "no" >&6; }
13866fi
13867
13868
13869  test -n "$READLINK" && break
13870done
13871
13872  else
13873    # The variable is set, but is it from the command line or the environment?
13874
13875    # Try to remove the string !READLINK! from our list.
13876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13878      # If it failed, the variable was not from the command line. Ignore it,
13879      # but warn the user (except for BASH, which is always set by the calling BASH).
13880      if test "xREADLINK" != xBASH; then
13881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13882$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13883      fi
13884      # Try to locate tool using the code snippet
13885      for ac_prog in greadlink readlink
13886do
13887  # Extract the first word of "$ac_prog", so it can be a program name with args.
13888set dummy $ac_prog; ac_word=$2
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13890$as_echo_n "checking for $ac_word... " >&6; }
13891if ${ac_cv_path_READLINK+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  case $READLINK in
13895  [\\/]* | ?:[\\/]*)
13896  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13897  ;;
13898  *)
13899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13900for as_dir in $PATH
13901do
13902  IFS=$as_save_IFS
13903  test -z "$as_dir" && as_dir=.
13904    for ac_exec_ext in '' $ac_executable_extensions; do
13905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13906    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13908    break 2
13909  fi
13910done
13911  done
13912IFS=$as_save_IFS
13913
13914  ;;
13915esac
13916fi
13917READLINK=$ac_cv_path_READLINK
13918if test -n "$READLINK"; then
13919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13920$as_echo "$READLINK" >&6; }
13921else
13922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13923$as_echo "no" >&6; }
13924fi
13925
13926
13927  test -n "$READLINK" && break
13928done
13929
13930    else
13931      # If it succeeded, then it was overridden by the user. We will use it
13932      # for the tool.
13933
13934      # First remove it from the list of overridden variables, so we can test
13935      # for unknown variables in the end.
13936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13937
13938      # Check if we try to supply an empty value
13939      if test "x$READLINK" = x; then
13940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13941$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13943$as_echo_n "checking for READLINK... " >&6; }
13944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13945$as_echo "disabled" >&6; }
13946      else
13947        # Check if the provided tool contains a complete path.
13948        tool_specified="$READLINK"
13949        tool_basename="${tool_specified##*/}"
13950        if test "x$tool_basename" = "x$tool_specified"; then
13951          # A command without a complete path is provided, search $PATH.
13952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13953$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13954          # Extract the first word of "$tool_basename", so it can be a program name with args.
13955set dummy $tool_basename; ac_word=$2
13956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13957$as_echo_n "checking for $ac_word... " >&6; }
13958if ${ac_cv_path_READLINK+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  case $READLINK in
13962  [\\/]* | ?:[\\/]*)
13963  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13964  ;;
13965  *)
13966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13967for as_dir in $PATH
13968do
13969  IFS=$as_save_IFS
13970  test -z "$as_dir" && as_dir=.
13971    for ac_exec_ext in '' $ac_executable_extensions; do
13972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13973    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13975    break 2
13976  fi
13977done
13978  done
13979IFS=$as_save_IFS
13980
13981  ;;
13982esac
13983fi
13984READLINK=$ac_cv_path_READLINK
13985if test -n "$READLINK"; then
13986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13987$as_echo "$READLINK" >&6; }
13988else
13989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13990$as_echo "no" >&6; }
13991fi
13992
13993
13994          if test "x$READLINK" = x; then
13995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13996          fi
13997        else
13998          # Otherwise we believe it is a complete path. Use it as it is.
13999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14000$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14002$as_echo_n "checking for READLINK... " >&6; }
14003          if test ! -x "$tool_specified"; then
14004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14005$as_echo "not found" >&6; }
14006            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14007          fi
14008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14009$as_echo "$tool_specified" >&6; }
14010        fi
14011      fi
14012    fi
14013
14014  fi
14015
14016
14017
14018
14019  # Publish this variable in the help.
14020
14021
14022  if [ -z "${DF+x}" ]; then
14023    # The variable is not set by user, try to locate tool using the code snippet
14024    for ac_prog in df
14025do
14026  # Extract the first word of "$ac_prog", so it can be a program name with args.
14027set dummy $ac_prog; ac_word=$2
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14029$as_echo_n "checking for $ac_word... " >&6; }
14030if ${ac_cv_path_DF+:} false; then :
14031  $as_echo_n "(cached) " >&6
14032else
14033  case $DF in
14034  [\\/]* | ?:[\\/]*)
14035  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14036  ;;
14037  *)
14038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14039for as_dir in $PATH
14040do
14041  IFS=$as_save_IFS
14042  test -z "$as_dir" && as_dir=.
14043    for ac_exec_ext in '' $ac_executable_extensions; do
14044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14045    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14047    break 2
14048  fi
14049done
14050  done
14051IFS=$as_save_IFS
14052
14053  ;;
14054esac
14055fi
14056DF=$ac_cv_path_DF
14057if test -n "$DF"; then
14058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14059$as_echo "$DF" >&6; }
14060else
14061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14062$as_echo "no" >&6; }
14063fi
14064
14065
14066  test -n "$DF" && break
14067done
14068
14069  else
14070    # The variable is set, but is it from the command line or the environment?
14071
14072    # Try to remove the string !DF! from our list.
14073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14075      # If it failed, the variable was not from the command line. Ignore it,
14076      # but warn the user (except for BASH, which is always set by the calling BASH).
14077      if test "xDF" != xBASH; then
14078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14079$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14080      fi
14081      # Try to locate tool using the code snippet
14082      for ac_prog in df
14083do
14084  # Extract the first word of "$ac_prog", so it can be a program name with args.
14085set dummy $ac_prog; ac_word=$2
14086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14087$as_echo_n "checking for $ac_word... " >&6; }
14088if ${ac_cv_path_DF+:} false; then :
14089  $as_echo_n "(cached) " >&6
14090else
14091  case $DF in
14092  [\\/]* | ?:[\\/]*)
14093  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14094  ;;
14095  *)
14096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14097for as_dir in $PATH
14098do
14099  IFS=$as_save_IFS
14100  test -z "$as_dir" && as_dir=.
14101    for ac_exec_ext in '' $ac_executable_extensions; do
14102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14103    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14105    break 2
14106  fi
14107done
14108  done
14109IFS=$as_save_IFS
14110
14111  ;;
14112esac
14113fi
14114DF=$ac_cv_path_DF
14115if test -n "$DF"; then
14116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14117$as_echo "$DF" >&6; }
14118else
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14120$as_echo "no" >&6; }
14121fi
14122
14123
14124  test -n "$DF" && break
14125done
14126
14127    else
14128      # If it succeeded, then it was overridden by the user. We will use it
14129      # for the tool.
14130
14131      # First remove it from the list of overridden variables, so we can test
14132      # for unknown variables in the end.
14133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14134
14135      # Check if we try to supply an empty value
14136      if test "x$DF" = x; then
14137        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14138$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14140$as_echo_n "checking for DF... " >&6; }
14141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14142$as_echo "disabled" >&6; }
14143      else
14144        # Check if the provided tool contains a complete path.
14145        tool_specified="$DF"
14146        tool_basename="${tool_specified##*/}"
14147        if test "x$tool_basename" = "x$tool_specified"; then
14148          # A command without a complete path is provided, search $PATH.
14149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14150$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14151          # Extract the first word of "$tool_basename", so it can be a program name with args.
14152set dummy $tool_basename; ac_word=$2
14153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14154$as_echo_n "checking for $ac_word... " >&6; }
14155if ${ac_cv_path_DF+:} false; then :
14156  $as_echo_n "(cached) " >&6
14157else
14158  case $DF in
14159  [\\/]* | ?:[\\/]*)
14160  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14161  ;;
14162  *)
14163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14164for as_dir in $PATH
14165do
14166  IFS=$as_save_IFS
14167  test -z "$as_dir" && as_dir=.
14168    for ac_exec_ext in '' $ac_executable_extensions; do
14169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14170    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14172    break 2
14173  fi
14174done
14175  done
14176IFS=$as_save_IFS
14177
14178  ;;
14179esac
14180fi
14181DF=$ac_cv_path_DF
14182if test -n "$DF"; then
14183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14184$as_echo "$DF" >&6; }
14185else
14186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14187$as_echo "no" >&6; }
14188fi
14189
14190
14191          if test "x$DF" = x; then
14192            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14193          fi
14194        else
14195          # Otherwise we believe it is a complete path. Use it as it is.
14196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14197$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14198          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14199$as_echo_n "checking for DF... " >&6; }
14200          if test ! -x "$tool_specified"; then
14201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14202$as_echo "not found" >&6; }
14203            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14204          fi
14205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14206$as_echo "$tool_specified" >&6; }
14207        fi
14208      fi
14209    fi
14210
14211  fi
14212
14213
14214
14215
14216  # Publish this variable in the help.
14217
14218
14219  if [ -z "${CPIO+x}" ]; then
14220    # The variable is not set by user, try to locate tool using the code snippet
14221    for ac_prog in cpio bsdcpio
14222do
14223  # Extract the first word of "$ac_prog", so it can be a program name with args.
14224set dummy $ac_prog; ac_word=$2
14225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14226$as_echo_n "checking for $ac_word... " >&6; }
14227if ${ac_cv_path_CPIO+:} false; then :
14228  $as_echo_n "(cached) " >&6
14229else
14230  case $CPIO in
14231  [\\/]* | ?:[\\/]*)
14232  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14233  ;;
14234  *)
14235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14236for as_dir in $PATH
14237do
14238  IFS=$as_save_IFS
14239  test -z "$as_dir" && as_dir=.
14240    for ac_exec_ext in '' $ac_executable_extensions; do
14241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14242    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14244    break 2
14245  fi
14246done
14247  done
14248IFS=$as_save_IFS
14249
14250  ;;
14251esac
14252fi
14253CPIO=$ac_cv_path_CPIO
14254if test -n "$CPIO"; then
14255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14256$as_echo "$CPIO" >&6; }
14257else
14258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14259$as_echo "no" >&6; }
14260fi
14261
14262
14263  test -n "$CPIO" && break
14264done
14265
14266  else
14267    # The variable is set, but is it from the command line or the environment?
14268
14269    # Try to remove the string !CPIO! from our list.
14270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14272      # If it failed, the variable was not from the command line. Ignore it,
14273      # but warn the user (except for BASH, which is always set by the calling BASH).
14274      if test "xCPIO" != xBASH; then
14275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14276$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14277      fi
14278      # Try to locate tool using the code snippet
14279      for ac_prog in cpio bsdcpio
14280do
14281  # Extract the first word of "$ac_prog", so it can be a program name with args.
14282set dummy $ac_prog; ac_word=$2
14283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14284$as_echo_n "checking for $ac_word... " >&6; }
14285if ${ac_cv_path_CPIO+:} false; then :
14286  $as_echo_n "(cached) " >&6
14287else
14288  case $CPIO in
14289  [\\/]* | ?:[\\/]*)
14290  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14291  ;;
14292  *)
14293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14294for as_dir in $PATH
14295do
14296  IFS=$as_save_IFS
14297  test -z "$as_dir" && as_dir=.
14298    for ac_exec_ext in '' $ac_executable_extensions; do
14299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14300    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14302    break 2
14303  fi
14304done
14305  done
14306IFS=$as_save_IFS
14307
14308  ;;
14309esac
14310fi
14311CPIO=$ac_cv_path_CPIO
14312if test -n "$CPIO"; then
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14314$as_echo "$CPIO" >&6; }
14315else
14316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14317$as_echo "no" >&6; }
14318fi
14319
14320
14321  test -n "$CPIO" && break
14322done
14323
14324    else
14325      # If it succeeded, then it was overridden by the user. We will use it
14326      # for the tool.
14327
14328      # First remove it from the list of overridden variables, so we can test
14329      # for unknown variables in the end.
14330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14331
14332      # Check if we try to supply an empty value
14333      if test "x$CPIO" = x; then
14334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14335$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14337$as_echo_n "checking for CPIO... " >&6; }
14338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14339$as_echo "disabled" >&6; }
14340      else
14341        # Check if the provided tool contains a complete path.
14342        tool_specified="$CPIO"
14343        tool_basename="${tool_specified##*/}"
14344        if test "x$tool_basename" = "x$tool_specified"; then
14345          # A command without a complete path is provided, search $PATH.
14346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14347$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14348          # Extract the first word of "$tool_basename", so it can be a program name with args.
14349set dummy $tool_basename; ac_word=$2
14350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14351$as_echo_n "checking for $ac_word... " >&6; }
14352if ${ac_cv_path_CPIO+:} false; then :
14353  $as_echo_n "(cached) " >&6
14354else
14355  case $CPIO in
14356  [\\/]* | ?:[\\/]*)
14357  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14358  ;;
14359  *)
14360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14361for as_dir in $PATH
14362do
14363  IFS=$as_save_IFS
14364  test -z "$as_dir" && as_dir=.
14365    for ac_exec_ext in '' $ac_executable_extensions; do
14366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14367    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14369    break 2
14370  fi
14371done
14372  done
14373IFS=$as_save_IFS
14374
14375  ;;
14376esac
14377fi
14378CPIO=$ac_cv_path_CPIO
14379if test -n "$CPIO"; then
14380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14381$as_echo "$CPIO" >&6; }
14382else
14383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14384$as_echo "no" >&6; }
14385fi
14386
14387
14388          if test "x$CPIO" = x; then
14389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14390          fi
14391        else
14392          # Otherwise we believe it is a complete path. Use it as it is.
14393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14394$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14396$as_echo_n "checking for CPIO... " >&6; }
14397          if test ! -x "$tool_specified"; then
14398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14399$as_echo "not found" >&6; }
14400            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14401          fi
14402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14403$as_echo "$tool_specified" >&6; }
14404        fi
14405      fi
14406    fi
14407
14408  fi
14409
14410
14411
14412
14413  # Publish this variable in the help.
14414
14415
14416  if [ -z "${NICE+x}" ]; then
14417    # The variable is not set by user, try to locate tool using the code snippet
14418    for ac_prog in nice
14419do
14420  # Extract the first word of "$ac_prog", so it can be a program name with args.
14421set dummy $ac_prog; ac_word=$2
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14423$as_echo_n "checking for $ac_word... " >&6; }
14424if ${ac_cv_path_NICE+:} false; then :
14425  $as_echo_n "(cached) " >&6
14426else
14427  case $NICE in
14428  [\\/]* | ?:[\\/]*)
14429  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14430  ;;
14431  *)
14432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14433for as_dir in $PATH
14434do
14435  IFS=$as_save_IFS
14436  test -z "$as_dir" && as_dir=.
14437    for ac_exec_ext in '' $ac_executable_extensions; do
14438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14439    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14441    break 2
14442  fi
14443done
14444  done
14445IFS=$as_save_IFS
14446
14447  ;;
14448esac
14449fi
14450NICE=$ac_cv_path_NICE
14451if test -n "$NICE"; then
14452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14453$as_echo "$NICE" >&6; }
14454else
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456$as_echo "no" >&6; }
14457fi
14458
14459
14460  test -n "$NICE" && break
14461done
14462
14463  else
14464    # The variable is set, but is it from the command line or the environment?
14465
14466    # Try to remove the string !NICE! from our list.
14467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14469      # If it failed, the variable was not from the command line. Ignore it,
14470      # but warn the user (except for BASH, which is always set by the calling BASH).
14471      if test "xNICE" != xBASH; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14473$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14474      fi
14475      # Try to locate tool using the code snippet
14476      for ac_prog in nice
14477do
14478  # Extract the first word of "$ac_prog", so it can be a program name with args.
14479set dummy $ac_prog; ac_word=$2
14480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14481$as_echo_n "checking for $ac_word... " >&6; }
14482if ${ac_cv_path_NICE+:} false; then :
14483  $as_echo_n "(cached) " >&6
14484else
14485  case $NICE in
14486  [\\/]* | ?:[\\/]*)
14487  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14488  ;;
14489  *)
14490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14491for as_dir in $PATH
14492do
14493  IFS=$as_save_IFS
14494  test -z "$as_dir" && as_dir=.
14495    for ac_exec_ext in '' $ac_executable_extensions; do
14496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14497    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14499    break 2
14500  fi
14501done
14502  done
14503IFS=$as_save_IFS
14504
14505  ;;
14506esac
14507fi
14508NICE=$ac_cv_path_NICE
14509if test -n "$NICE"; then
14510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14511$as_echo "$NICE" >&6; }
14512else
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14514$as_echo "no" >&6; }
14515fi
14516
14517
14518  test -n "$NICE" && break
14519done
14520
14521    else
14522      # If it succeeded, then it was overridden by the user. We will use it
14523      # for the tool.
14524
14525      # First remove it from the list of overridden variables, so we can test
14526      # for unknown variables in the end.
14527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14528
14529      # Check if we try to supply an empty value
14530      if test "x$NICE" = x; then
14531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14532$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14534$as_echo_n "checking for NICE... " >&6; }
14535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14536$as_echo "disabled" >&6; }
14537      else
14538        # Check if the provided tool contains a complete path.
14539        tool_specified="$NICE"
14540        tool_basename="${tool_specified##*/}"
14541        if test "x$tool_basename" = "x$tool_specified"; then
14542          # A command without a complete path is provided, search $PATH.
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14544$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14545          # Extract the first word of "$tool_basename", so it can be a program name with args.
14546set dummy $tool_basename; ac_word=$2
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14548$as_echo_n "checking for $ac_word... " >&6; }
14549if ${ac_cv_path_NICE+:} false; then :
14550  $as_echo_n "(cached) " >&6
14551else
14552  case $NICE in
14553  [\\/]* | ?:[\\/]*)
14554  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14555  ;;
14556  *)
14557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14558for as_dir in $PATH
14559do
14560  IFS=$as_save_IFS
14561  test -z "$as_dir" && as_dir=.
14562    for ac_exec_ext in '' $ac_executable_extensions; do
14563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14564    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14566    break 2
14567  fi
14568done
14569  done
14570IFS=$as_save_IFS
14571
14572  ;;
14573esac
14574fi
14575NICE=$ac_cv_path_NICE
14576if test -n "$NICE"; then
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14578$as_echo "$NICE" >&6; }
14579else
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14581$as_echo "no" >&6; }
14582fi
14583
14584
14585          if test "x$NICE" = x; then
14586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14587          fi
14588        else
14589          # Otherwise we believe it is a complete path. Use it as it is.
14590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14591$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14593$as_echo_n "checking for NICE... " >&6; }
14594          if test ! -x "$tool_specified"; then
14595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14596$as_echo "not found" >&6; }
14597            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14598          fi
14599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14600$as_echo "$tool_specified" >&6; }
14601        fi
14602      fi
14603    fi
14604
14605  fi
14606
14607
14608
14609
14610# Now we can determine OpenJDK build and target platforms. This is required to
14611# have early on.
14612# Make sure we can run config.sub.
14613$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14614  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14615
14616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14617$as_echo_n "checking build system type... " >&6; }
14618if ${ac_cv_build+:} false; then :
14619  $as_echo_n "(cached) " >&6
14620else
14621  ac_build_alias=$build_alias
14622test "x$ac_build_alias" = x &&
14623  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14624test "x$ac_build_alias" = x &&
14625  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14626ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14627  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14628
14629fi
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14631$as_echo "$ac_cv_build" >&6; }
14632case $ac_cv_build in
14633*-*-*) ;;
14634*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14635esac
14636build=$ac_cv_build
14637ac_save_IFS=$IFS; IFS='-'
14638set x $ac_cv_build
14639shift
14640build_cpu=$1
14641build_vendor=$2
14642shift; shift
14643# Remember, the first character of IFS is used to create $*,
14644# except with old shells:
14645build_os=$*
14646IFS=$ac_save_IFS
14647case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14648
14649
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14651$as_echo_n "checking host system type... " >&6; }
14652if ${ac_cv_host+:} false; then :
14653  $as_echo_n "(cached) " >&6
14654else
14655  if test "x$host_alias" = x; then
14656  ac_cv_host=$ac_cv_build
14657else
14658  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14659    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14660fi
14661
14662fi
14663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14664$as_echo "$ac_cv_host" >&6; }
14665case $ac_cv_host in
14666*-*-*) ;;
14667*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14668esac
14669host=$ac_cv_host
14670ac_save_IFS=$IFS; IFS='-'
14671set x $ac_cv_host
14672shift
14673host_cpu=$1
14674host_vendor=$2
14675shift; shift
14676# Remember, the first character of IFS is used to create $*,
14677# except with old shells:
14678host_os=$*
14679IFS=$ac_save_IFS
14680case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14681
14682
14683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14684$as_echo_n "checking target system type... " >&6; }
14685if ${ac_cv_target+:} false; then :
14686  $as_echo_n "(cached) " >&6
14687else
14688  if test "x$target_alias" = x; then
14689  ac_cv_target=$ac_cv_host
14690else
14691  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14692    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14693fi
14694
14695fi
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14697$as_echo "$ac_cv_target" >&6; }
14698case $ac_cv_target in
14699*-*-*) ;;
14700*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14701esac
14702target=$ac_cv_target
14703ac_save_IFS=$IFS; IFS='-'
14704set x $ac_cv_target
14705shift
14706target_cpu=$1
14707target_vendor=$2
14708shift; shift
14709# Remember, the first character of IFS is used to create $*,
14710# except with old shells:
14711target_os=$*
14712IFS=$ac_save_IFS
14713case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14714
14715
14716# The aliases save the names the user supplied, while $host etc.
14717# will get canonicalized.
14718test -n "$target_alias" &&
14719  test "$program_prefix$program_suffix$program_transform_name" = \
14720    NONENONEs,x,x, &&
14721  program_prefix=${target_alias}-
14722
14723  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14724  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14725  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14726  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14727  # to use the configure naming style.
14728
14729
14730
14731
14732
14733  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14734  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14735  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14736  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14737  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14738  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14739
14740
14741
14742  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14743
14744  case "$build_os" in
14745    *linux*)
14746      VAR_OS=linux
14747      VAR_OS_TYPE=unix
14748      ;;
14749    *solaris*)
14750      VAR_OS=solaris
14751      VAR_OS_TYPE=unix
14752      ;;
14753    *darwin*)
14754      VAR_OS=macosx
14755      VAR_OS_TYPE=unix
14756      ;;
14757    *bsd*)
14758      VAR_OS=bsd
14759      VAR_OS_TYPE=unix
14760      ;;
14761    *cygwin*)
14762      VAR_OS=windows
14763      VAR_OS_ENV=windows.cygwin
14764      ;;
14765    *mingw*)
14766      VAR_OS=windows
14767      VAR_OS_ENV=windows.msys
14768      ;;
14769    *aix*)
14770      VAR_OS=aix
14771      VAR_OS_TYPE=unix
14772      ;;
14773    *)
14774      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14775      ;;
14776  esac
14777
14778
14779  # First argument is the cpu name from the trip/quad
14780  case "$build_cpu" in
14781    x86_64)
14782      VAR_CPU=x86_64
14783      VAR_CPU_ARCH=x86
14784      VAR_CPU_BITS=64
14785      VAR_CPU_ENDIAN=little
14786      ;;
14787    i?86)
14788      VAR_CPU=x86
14789      VAR_CPU_ARCH=x86
14790      VAR_CPU_BITS=32
14791      VAR_CPU_ENDIAN=little
14792      ;;
14793    arm*)
14794      VAR_CPU=arm
14795      VAR_CPU_ARCH=arm
14796      VAR_CPU_BITS=32
14797      VAR_CPU_ENDIAN=little
14798      ;;
14799    aarch64)
14800      VAR_CPU=aarch64
14801      VAR_CPU_ARCH=aarch64
14802      VAR_CPU_BITS=64
14803      VAR_CPU_ENDIAN=little
14804      ;;
14805    powerpc)
14806      VAR_CPU=ppc
14807      VAR_CPU_ARCH=ppc
14808      VAR_CPU_BITS=32
14809      VAR_CPU_ENDIAN=big
14810      ;;
14811    powerpc64)
14812      VAR_CPU=ppc64
14813      VAR_CPU_ARCH=ppc
14814      VAR_CPU_BITS=64
14815      VAR_CPU_ENDIAN=big
14816      ;;
14817    powerpc64le)
14818      VAR_CPU=ppc64le
14819      VAR_CPU_ARCH=ppc
14820      VAR_CPU_BITS=64
14821      VAR_CPU_ENDIAN=little
14822      ;;
14823    s390)
14824      VAR_CPU=s390
14825      VAR_CPU_ARCH=s390
14826      VAR_CPU_BITS=32
14827      VAR_CPU_ENDIAN=big
14828      ;;
14829    s390x)
14830      VAR_CPU=s390x
14831      VAR_CPU_ARCH=s390
14832      VAR_CPU_BITS=64
14833      VAR_CPU_ENDIAN=big
14834      ;;
14835    sparc)
14836      VAR_CPU=sparc
14837      VAR_CPU_ARCH=sparc
14838      VAR_CPU_BITS=32
14839      VAR_CPU_ENDIAN=big
14840      ;;
14841    sparcv9|sparc64)
14842      VAR_CPU=sparcv9
14843      VAR_CPU_ARCH=sparc
14844      VAR_CPU_BITS=64
14845      VAR_CPU_ENDIAN=big
14846      ;;
14847    *)
14848      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14849      ;;
14850  esac
14851
14852  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14853  OPENJDK_BUILD_OS="$VAR_OS"
14854  if test "x$VAR_OS_TYPE" != x; then
14855    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14856  else
14857    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14858  fi
14859  if test "x$VAR_OS_ENV" != x; then
14860    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14861  else
14862    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14863  fi
14864  OPENJDK_BUILD_CPU="$VAR_CPU"
14865  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14866  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14867  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14868
14869
14870
14871
14872
14873
14874
14875
14876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14877$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14879$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14880
14881  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14882
14883  case "$host_os" in
14884    *linux*)
14885      VAR_OS=linux
14886      VAR_OS_TYPE=unix
14887      ;;
14888    *solaris*)
14889      VAR_OS=solaris
14890      VAR_OS_TYPE=unix
14891      ;;
14892    *darwin*)
14893      VAR_OS=macosx
14894      VAR_OS_TYPE=unix
14895      ;;
14896    *bsd*)
14897      VAR_OS=bsd
14898      VAR_OS_TYPE=unix
14899      ;;
14900    *cygwin*)
14901      VAR_OS=windows
14902      VAR_OS_ENV=windows.cygwin
14903      ;;
14904    *mingw*)
14905      VAR_OS=windows
14906      VAR_OS_ENV=windows.msys
14907      ;;
14908    *aix*)
14909      VAR_OS=aix
14910      VAR_OS_TYPE=unix
14911      ;;
14912    *)
14913      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14914      ;;
14915  esac
14916
14917
14918  # First argument is the cpu name from the trip/quad
14919  case "$host_cpu" in
14920    x86_64)
14921      VAR_CPU=x86_64
14922      VAR_CPU_ARCH=x86
14923      VAR_CPU_BITS=64
14924      VAR_CPU_ENDIAN=little
14925      ;;
14926    i?86)
14927      VAR_CPU=x86
14928      VAR_CPU_ARCH=x86
14929      VAR_CPU_BITS=32
14930      VAR_CPU_ENDIAN=little
14931      ;;
14932    arm*)
14933      VAR_CPU=arm
14934      VAR_CPU_ARCH=arm
14935      VAR_CPU_BITS=32
14936      VAR_CPU_ENDIAN=little
14937      ;;
14938    aarch64)
14939      VAR_CPU=aarch64
14940      VAR_CPU_ARCH=aarch64
14941      VAR_CPU_BITS=64
14942      VAR_CPU_ENDIAN=little
14943      ;;
14944    powerpc)
14945      VAR_CPU=ppc
14946      VAR_CPU_ARCH=ppc
14947      VAR_CPU_BITS=32
14948      VAR_CPU_ENDIAN=big
14949      ;;
14950    powerpc64)
14951      VAR_CPU=ppc64
14952      VAR_CPU_ARCH=ppc
14953      VAR_CPU_BITS=64
14954      VAR_CPU_ENDIAN=big
14955      ;;
14956    powerpc64le)
14957      VAR_CPU=ppc64le
14958      VAR_CPU_ARCH=ppc
14959      VAR_CPU_BITS=64
14960      VAR_CPU_ENDIAN=little
14961      ;;
14962    s390)
14963      VAR_CPU=s390
14964      VAR_CPU_ARCH=s390
14965      VAR_CPU_BITS=32
14966      VAR_CPU_ENDIAN=big
14967      ;;
14968    s390x)
14969      VAR_CPU=s390x
14970      VAR_CPU_ARCH=s390
14971      VAR_CPU_BITS=64
14972      VAR_CPU_ENDIAN=big
14973      ;;
14974    sparc)
14975      VAR_CPU=sparc
14976      VAR_CPU_ARCH=sparc
14977      VAR_CPU_BITS=32
14978      VAR_CPU_ENDIAN=big
14979      ;;
14980    sparcv9|sparc64)
14981      VAR_CPU=sparcv9
14982      VAR_CPU_ARCH=sparc
14983      VAR_CPU_BITS=64
14984      VAR_CPU_ENDIAN=big
14985      ;;
14986    *)
14987      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14988      ;;
14989  esac
14990
14991  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14992  OPENJDK_TARGET_OS="$VAR_OS"
14993  if test "x$VAR_OS_TYPE" != x; then
14994    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14995  else
14996    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14997  fi
14998  if test "x$VAR_OS_ENV" != x; then
14999    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15000  else
15001    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15002  fi
15003  OPENJDK_TARGET_CPU="$VAR_CPU"
15004  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15005  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15006  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15007
15008
15009
15010
15011
15012
15013
15014
15015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15016$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15018$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15019
15020
15021
15022# Check whether --with-target-bits was given.
15023if test "${with_target_bits+set}" = set; then :
15024  withval=$with_target_bits;
15025fi
15026
15027
15028  # We have three types of compiles:
15029  # native  == normal compilation, target system == build system
15030  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15031  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15032  #
15033  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15034    # We're doing a proper cross-compilation
15035    COMPILE_TYPE="cross"
15036  else
15037    COMPILE_TYPE="native"
15038  fi
15039
15040  if test "x$with_target_bits" != x; then
15041    if test "x$COMPILE_TYPE" = "xcross"; then
15042      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15043    fi
15044
15045    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15046      # A reduced build is requested
15047      COMPILE_TYPE="reduced"
15048      OPENJDK_TARGET_CPU_BITS=32
15049      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15050        OPENJDK_TARGET_CPU=x86
15051      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15052        OPENJDK_TARGET_CPU=sparc
15053      else
15054        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15055      fi
15056    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15057      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
15058    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15059      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15060$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15061    else
15062      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15063    fi
15064  fi
15065
15066
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15068$as_echo_n "checking compilation type... " >&6; }
15069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15070$as_echo "$COMPILE_TYPE" >&6; }
15071
15072
15073  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15074    REQUIRED_OS_NAME=SunOS
15075    REQUIRED_OS_VERSION=5.10
15076  fi
15077  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15078    REQUIRED_OS_NAME=Linux
15079    REQUIRED_OS_VERSION=2.6
15080  fi
15081  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15082    REQUIRED_OS_NAME=Windows
15083    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15084      REQUIRED_OS_VERSION=5.2
15085    else
15086      REQUIRED_OS_VERSION=5.1
15087    fi
15088  fi
15089  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15090    REQUIRED_OS_NAME=Darwin
15091    REQUIRED_OS_VERSION=11.2
15092  fi
15093
15094
15095
15096
15097
15098  # Also store the legacy naming of the cpu.
15099  # Ie i586 and amd64 instead of x86 and x86_64
15100  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15101  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15102    OPENJDK_TARGET_CPU_LEGACY="i586"
15103  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15104    # On all platforms except MacOSX replace x86_64 with amd64.
15105    OPENJDK_TARGET_CPU_LEGACY="amd64"
15106  fi
15107
15108
15109  # And the second legacy naming of the cpu.
15110  # Ie i386 and amd64 instead of x86 and x86_64.
15111  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15112  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15113    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15114  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15115    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15116  fi
15117
15118
15119  # This is the name of the cpu (but using i386 and amd64 instead of
15120  # x86 and x86_64, respectively), preceeded by a /, to be used when
15121  # locating libraries. On macosx, it's empty, though.
15122  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15123  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15124    OPENJDK_TARGET_CPU_LIBDIR=""
15125  fi
15126
15127
15128  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15129  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15130  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15131  OPENJDK_TARGET_CPU_ISADIR=""
15132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15133    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15134      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15135    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15136      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15137    fi
15138  fi
15139
15140
15141  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15142  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15143  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15144    # On linux only, we replace x86 with i386.
15145    OPENJDK_TARGET_CPU_OSARCH="i386"
15146  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15147    # On all platforms except macosx, we replace x86_64 with amd64.
15148    OPENJDK_TARGET_CPU_OSARCH="amd64"
15149  fi
15150
15151
15152  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15153  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15154    OPENJDK_TARGET_CPU_JLI="i386"
15155  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15156    # On all platforms except macosx, we replace x86_64 with amd64.
15157    OPENJDK_TARGET_CPU_JLI="amd64"
15158  fi
15159  # Now setup the -D flags for building libjli.
15160  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15161  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15162    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15163      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15164    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15165      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15166    fi
15167  fi
15168
15169
15170  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15171      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15172  else
15173      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15174  fi
15175
15176
15177  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15178    A_LP64="LP64:="
15179    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15180    # unpack200.exe
15181    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15182      ADD_LP64="-D_LP64=1"
15183    fi
15184  fi
15185  LP64=$A_LP64
15186
15187
15188  if test "x$COMPILE_TYPE" = "xcross"; then
15189    # FIXME: ... or should this include reduced builds..?
15190    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15191  else
15192    DEFINE_CROSS_COMPILE_ARCH=""
15193  fi
15194
15195
15196  # ZERO_ARCHDEF is used to enable architecture-specific code
15197  case "${OPENJDK_TARGET_CPU}" in
15198    ppc)     ZERO_ARCHDEF=PPC32 ;;
15199    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15200    s390*)   ZERO_ARCHDEF=S390  ;;
15201    sparc*)  ZERO_ARCHDEF=SPARC ;;
15202    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15203    x86)     ZERO_ARCHDEF=IA32  ;;
15204    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15205  esac
15206
15207
15208
15209
15210# Continue setting up basic stuff. Most remaining code require fundamental tools.
15211
15212  # Save the current directory this script was started from
15213  CURDIR="$PWD"
15214
15215  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15216  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15217  # was not available at that time.
15218  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15219  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15220    ORIGINAL_PATH="$REWRITTEN_PATH"
15221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15222$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15223  fi
15224
15225  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15226    PATH_SEP=";"
15227
15228  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15229  if test $SRC_ROOT_LENGTH -gt 100; then
15230    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15231  fi
15232
15233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15235$as_echo_n "checking cygwin release... " >&6; }
15236    CYGWIN_VERSION=`$UNAME -r`
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15238$as_echo "$CYGWIN_VERSION" >&6; }
15239    WINDOWS_ENV_VENDOR='cygwin'
15240    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15241
15242    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15243    if test "x$CYGWIN_VERSION_OLD" != x; then
15244      { $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
15245$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;}
15246      as_fn_error $? "Cannot continue" "$LINENO" 5
15247    fi
15248    if test "x$CYGPATH" = x; then
15249      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15250    fi
15251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15252$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15253    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15254    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15255    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15256    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15258$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15259    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15260    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15261    if test "x$test_cygdrive_prefix" = x; then
15262      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15263    fi
15264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15266$as_echo_n "checking msys release... " >&6; }
15267    MSYS_VERSION=`$UNAME -r`
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15269$as_echo "$MSYS_VERSION" >&6; }
15270
15271    WINDOWS_ENV_VENDOR='msys'
15272    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15273
15274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15275$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15276    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15277    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15278
15279  windows_path="$MSYS_ROOT_PATH"
15280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15281    unix_path=`$CYGPATH -u "$windows_path"`
15282    MSYS_ROOT_PATH="$unix_path"
15283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15285    MSYS_ROOT_PATH="$unix_path"
15286  fi
15287
15288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15289$as_echo "$MSYS_ROOT_PATH" >&6; }
15290    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15291  else
15292    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15293  fi
15294
15295  # Test if windows or unix (cygwin/msys) find is first in path.
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15297$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15298  FIND_BINARY_OUTPUT=`find --version 2>&1`
15299  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15301$as_echo "unix style" >&6; }
15302  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15304$as_echo "Windows" >&6; }
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15306$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15307    { $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
15308$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15309    as_fn_error $? "Cannot continue" "$LINENO" 5
15310  else
15311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15312$as_echo "unknown" >&6; }
15313    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15314$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15315  fi
15316
15317  else
15318    PATH_SEP=":"
15319  fi
15320
15321
15322  # We get the top-level directory from the supporting wrappers.
15323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15324$as_echo_n "checking for top-level directory... " >&6; }
15325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15326$as_echo "$TOPDIR" >&6; }
15327
15328
15329  # Save the original version of TOPDIR for string comparisons
15330  ORIGINAL_TOPDIR="$TOPDIR"
15331
15332
15333  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15334
15335  # Only process if variable expands to non-empty
15336
15337  if test "x$CURDIR" != x; then
15338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15339
15340  # Input might be given as Windows format, start by converting to
15341  # unix format.
15342  path="$CURDIR"
15343  new_path=`$CYGPATH -u "$path"`
15344
15345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15348  # "foo.exe" is OK but "foo" is an error.
15349  #
15350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15351  # It is also a way to make sure we got the proper file name for the real test later on.
15352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15353  if test "x$test_shortpath" = x; then
15354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15355$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15356    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15357  fi
15358
15359  # Call helper function which possibly converts this using DOS-style short mode.
15360  # If so, the updated path is stored in $new_path.
15361
15362  input_path="$new_path"
15363  # Check if we need to convert this using DOS-style short mode. If the path
15364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15365  # take no chances and rewrite it.
15366  # Note: m4 eats our [], so we need to use [ and ] instead.
15367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15368  if test "x$has_forbidden_chars" != x; then
15369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15373      # Going to short mode and back again did indeed matter. Since short mode is
15374      # case insensitive, let's make it lowercase to improve readability.
15375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15376      # Now convert it back to Unix-style (cygpath)
15377      input_path=`$CYGPATH -u "$shortmode_path"`
15378      new_path="$input_path"
15379    fi
15380  fi
15381
15382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15383  if test "x$test_cygdrive_prefix" = x; then
15384    # As a simple fix, exclude /usr/bin since it's not a real path.
15385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15387      # a path prefixed by /cygdrive for fixpath to work.
15388      new_path="$CYGWIN_ROOT_PATH$input_path"
15389    fi
15390  fi
15391
15392
15393  if test "x$path" != "x$new_path"; then
15394    CURDIR="$new_path"
15395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15396$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15397  fi
15398
15399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15400
15401  path="$CURDIR"
15402  has_colon=`$ECHO $path | $GREP ^.:`
15403  new_path="$path"
15404  if test "x$has_colon" = x; then
15405    # Not in mixed or Windows style, start by that.
15406    new_path=`cmd //c echo $path`
15407  fi
15408
15409
15410  input_path="$new_path"
15411  # Check if we need to convert this using DOS-style short mode. If the path
15412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15413  # take no chances and rewrite it.
15414  # Note: m4 eats our [], so we need to use [ and ] instead.
15415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15416  if test "x$has_forbidden_chars" != x; then
15417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15419  fi
15420
15421
15422  windows_path="$new_path"
15423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15424    unix_path=`$CYGPATH -u "$windows_path"`
15425    new_path="$unix_path"
15426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15428    new_path="$unix_path"
15429  fi
15430
15431  if test "x$path" != "x$new_path"; then
15432    CURDIR="$new_path"
15433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15434$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15435  fi
15436
15437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15439
15440    else
15441      # We're on a unix platform. Hooray! :)
15442      path="$CURDIR"
15443      has_space=`$ECHO "$path" | $GREP " "`
15444      if test "x$has_space" != x; then
15445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15446$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15448      fi
15449
15450      # Use eval to expand a potential ~
15451      eval path="$path"
15452      if test ! -f "$path" && test ! -d "$path"; then
15453        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15454      fi
15455
15456      if test -d "$path"; then
15457        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15458      else
15459        dir="`$DIRNAME "$path"`"
15460        base="`$BASENAME "$path"`"
15461        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15462      fi
15463    fi
15464  fi
15465
15466
15467  # Only process if variable expands to non-empty
15468
15469  if test "x$TOPDIR" != x; then
15470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471
15472  # Input might be given as Windows format, start by converting to
15473  # unix format.
15474  path="$TOPDIR"
15475  new_path=`$CYGPATH -u "$path"`
15476
15477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15480  # "foo.exe" is OK but "foo" is an error.
15481  #
15482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15483  # It is also a way to make sure we got the proper file name for the real test later on.
15484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15485  if test "x$test_shortpath" = x; then
15486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15487$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15488    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15489  fi
15490
15491  # Call helper function which possibly converts this using DOS-style short mode.
15492  # If so, the updated path is stored in $new_path.
15493
15494  input_path="$new_path"
15495  # Check if we need to convert this using DOS-style short mode. If the path
15496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15497  # take no chances and rewrite it.
15498  # Note: m4 eats our [], so we need to use [ and ] instead.
15499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15500  if test "x$has_forbidden_chars" != x; then
15501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15505      # Going to short mode and back again did indeed matter. Since short mode is
15506      # case insensitive, let's make it lowercase to improve readability.
15507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15508      # Now convert it back to Unix-style (cygpath)
15509      input_path=`$CYGPATH -u "$shortmode_path"`
15510      new_path="$input_path"
15511    fi
15512  fi
15513
15514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15515  if test "x$test_cygdrive_prefix" = x; then
15516    # As a simple fix, exclude /usr/bin since it's not a real path.
15517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15519      # a path prefixed by /cygdrive for fixpath to work.
15520      new_path="$CYGWIN_ROOT_PATH$input_path"
15521    fi
15522  fi
15523
15524
15525  if test "x$path" != "x$new_path"; then
15526    TOPDIR="$new_path"
15527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15528$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15529  fi
15530
15531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15532
15533  path="$TOPDIR"
15534  has_colon=`$ECHO $path | $GREP ^.:`
15535  new_path="$path"
15536  if test "x$has_colon" = x; then
15537    # Not in mixed or Windows style, start by that.
15538    new_path=`cmd //c echo $path`
15539  fi
15540
15541
15542  input_path="$new_path"
15543  # Check if we need to convert this using DOS-style short mode. If the path
15544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15545  # take no chances and rewrite it.
15546  # Note: m4 eats our [], so we need to use [ and ] instead.
15547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15548  if test "x$has_forbidden_chars" != x; then
15549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15551  fi
15552
15553
15554  windows_path="$new_path"
15555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15556    unix_path=`$CYGPATH -u "$windows_path"`
15557    new_path="$unix_path"
15558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15560    new_path="$unix_path"
15561  fi
15562
15563  if test "x$path" != "x$new_path"; then
15564    TOPDIR="$new_path"
15565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15566$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15567  fi
15568
15569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15571
15572    else
15573      # We're on a unix platform. Hooray! :)
15574      path="$TOPDIR"
15575      has_space=`$ECHO "$path" | $GREP " "`
15576      if test "x$has_space" != x; then
15577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15578$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15580      fi
15581
15582      # Use eval to expand a potential ~
15583      eval path="$path"
15584      if test ! -f "$path" && test ! -d "$path"; then
15585        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15586      fi
15587
15588      if test -d "$path"; then
15589        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15590      else
15591        dir="`$DIRNAME "$path"`"
15592        base="`$BASENAME "$path"`"
15593        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15594      fi
15595    fi
15596  fi
15597
15598  # SRC_ROOT is a traditional alias for TOPDIR.
15599  SRC_ROOT=$TOPDIR
15600
15601  # Calculate a canonical version of TOPDIR for string comparisons
15602  CANONICAL_TOPDIR=$TOPDIR
15603
15604  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15605    # Follow a chain of symbolic links. Use readlink
15606    # where it exists, else fall back to horribly
15607    # complicated shell code.
15608    if test "x$READLINK_TESTED" != yes; then
15609      # On MacOSX there is a readlink tool with a different
15610      # purpose than the GNU readlink tool. Check the found readlink.
15611      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15612      if test "x$ISGNU" = x; then
15613        # A readlink that we do not know how to use.
15614        # Are there other non-GNU readlinks out there?
15615        READLINK_TESTED=yes
15616        READLINK=
15617      fi
15618    fi
15619
15620    if test "x$READLINK" != x; then
15621      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15622    else
15623      # Save the current directory for restoring afterwards
15624      STARTDIR=$PWD
15625      COUNTER=0
15626      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15627      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15628      cd $sym_link_dir
15629      # Use -P flag to resolve symlinks in directories.
15630      cd `$THEPWDCMD -P`
15631      sym_link_dir=`$THEPWDCMD -P`
15632      # Resolve file symlinks
15633      while test $COUNTER -lt 20; do
15634        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15635        if test "x$ISLINK" == x; then
15636          # This is not a symbolic link! We are done!
15637          break
15638        fi
15639        # Again resolve directory symlinks since the target of the just found
15640        # link could be in a different directory
15641        cd `$DIRNAME $ISLINK`
15642        sym_link_dir=`$THEPWDCMD -P`
15643        sym_link_file=`$BASENAME $ISLINK`
15644        let COUNTER=COUNTER+1
15645      done
15646      cd $STARTDIR
15647      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15648    fi
15649  fi
15650
15651
15652
15653  # Locate the directory of this script.
15654  AUTOCONF_DIR=$TOPDIR/common/autoconf
15655
15656  # Setup username (for use in adhoc version strings etc)
15657  # Outer [ ] to quote m4.
15658   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15659
15660
15661
15662# Check if it's a pure open build or if custom sources are to be used.
15663
15664  # Check whether --enable-openjdk-only was given.
15665if test "${enable_openjdk_only+set}" = set; then :
15666  enableval=$enable_openjdk_only;
15667else
15668  enable_openjdk_only="no"
15669fi
15670
15671
15672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15673$as_echo_n "checking for presence of closed sources... " >&6; }
15674  if test -d "$SRC_ROOT/jdk/src/closed"; then
15675    CLOSED_SOURCE_PRESENT=yes
15676  else
15677    CLOSED_SOURCE_PRESENT=no
15678  fi
15679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15680$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15681
15682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15683$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15684  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15686$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15687
15688  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15689    OPENJDK=true
15690    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15691      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15692$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15693    fi
15694  else
15695    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15696      OPENJDK=true
15697    else
15698      OPENJDK=false
15699    fi
15700  fi
15701
15702  if test "x$OPENJDK" = "xtrue"; then
15703    SET_OPENJDK="OPENJDK=true"
15704  fi
15705
15706
15707
15708  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15709  # the IncludeCustomExtension macro.
15710
15711
15712# Check whether --with-custom-make-dir was given.
15713if test "${with_custom_make_dir+set}" = set; then :
15714  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
15715$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15716fi
15717
15718
15719
15720
15721# These are needed to be able to create a configuration name (and thus the output directory)
15722
15723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15724$as_echo_n "checking which variant of the JDK to build... " >&6; }
15725
15726# Check whether --with-jdk-variant was given.
15727if test "${with_jdk_variant+set}" = set; then :
15728  withval=$with_jdk_variant;
15729fi
15730
15731
15732  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15733    JDK_VARIANT="normal"
15734  else
15735    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15736  fi
15737
15738
15739
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15741$as_echo "$JDK_VARIANT" >&6; }
15742
15743
15744
15745# Check whether --with-jvm-interpreter was given.
15746if test "${with_jvm_interpreter+set}" = set; then :
15747  withval=$with_jvm_interpreter;
15748fi
15749
15750
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15752$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15753  if test "x$with_jvm_interpreter" = x; then
15754    JVM_INTERPRETER="template"
15755  else
15756    JVM_INTERPRETER="$with_jvm_interpreter"
15757  fi
15758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15759$as_echo "$JVM_INTERPRETER" >&6; }
15760
15761  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15762    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15763  fi
15764
15765
15766
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15769$as_echo_n "checking which variants of the JVM to build... " >&6; }
15770
15771# Check whether --with-jvm-variants was given.
15772if test "${with_jvm_variants+set}" = set; then :
15773  withval=$with_jvm_variants;
15774fi
15775
15776
15777  if test "x$with_jvm_variants" = x; then
15778    with_jvm_variants="server"
15779  fi
15780
15781  JVM_VARIANTS=",$with_jvm_variants,"
15782  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15783
15784  if test "x$TEST_VARIANTS" != "x,"; then
15785    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15786  fi
15787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15788$as_echo "$with_jvm_variants" >&6; }
15789
15790  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15791  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15792  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15793  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15794  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15795  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15796
15797  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15798    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15799      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15800    fi
15801  fi
15802  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15803    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15804      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15805    fi
15806  fi
15807
15808  # Replace the commas with AND for use in the build directory name.
15809  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15810  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15811  if test "x$COUNT_VARIANTS" != "x,1"; then
15812    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15813  else
15814    BUILDING_MULTIPLE_JVM_VARIANTS=no
15815  fi
15816
15817  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15818    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15819  fi
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829  INCLUDE_SA=true
15830  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15831    INCLUDE_SA=false
15832  fi
15833  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15834    INCLUDE_SA=false
15835  fi
15836  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15837    INCLUDE_SA=false
15838  fi
15839  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15840    INCLUDE_SA=false
15841  fi
15842
15843
15844  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15845    MACOSX_UNIVERSAL="true"
15846  fi
15847
15848
15849
15850
15851  DEBUG_LEVEL="release"
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15853$as_echo_n "checking which debug level to use... " >&6; }
15854  # Check whether --enable-debug was given.
15855if test "${enable_debug+set}" = set; then :
15856  enableval=$enable_debug;
15857        ENABLE_DEBUG="${enableval}"
15858        DEBUG_LEVEL="fastdebug"
15859
15860else
15861  ENABLE_DEBUG="no"
15862fi
15863
15864
15865
15866# Check whether --with-debug-level was given.
15867if test "${with_debug_level+set}" = set; then :
15868  withval=$with_debug_level;
15869        DEBUG_LEVEL="${withval}"
15870        if test "x$ENABLE_DEBUG" = xyes; then
15871          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15872        fi
15873
15874fi
15875
15876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15877$as_echo "$DEBUG_LEVEL" >&6; }
15878
15879  if test "x$DEBUG_LEVEL" != xrelease && \
15880      test "x$DEBUG_LEVEL" != xoptimized && \
15881      test "x$DEBUG_LEVEL" != xfastdebug && \
15882      test "x$DEBUG_LEVEL" != xslowdebug; then
15883    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15884  fi
15885
15886
15887  case $DEBUG_LEVEL in
15888    release )
15889      VARIANT="OPT"
15890      FASTDEBUG="false"
15891      DEBUG_CLASSFILES="false"
15892      BUILD_VARIANT_RELEASE=""
15893      HOTSPOT_DEBUG_LEVEL="product"
15894      HOTSPOT_EXPORT="product"
15895      ;;
15896    fastdebug )
15897      VARIANT="DBG"
15898      FASTDEBUG="true"
15899      DEBUG_CLASSFILES="true"
15900      BUILD_VARIANT_RELEASE="-fastdebug"
15901      HOTSPOT_DEBUG_LEVEL="fastdebug"
15902      HOTSPOT_EXPORT="fastdebug"
15903      ;;
15904    slowdebug )
15905      VARIANT="DBG"
15906      FASTDEBUG="false"
15907      DEBUG_CLASSFILES="true"
15908      BUILD_VARIANT_RELEASE="-debug"
15909      HOTSPOT_DEBUG_LEVEL="debug"
15910      HOTSPOT_EXPORT="debug"
15911      ;;
15912    optimized )
15913      VARIANT="OPT"
15914      FASTDEBUG="false"
15915      DEBUG_CLASSFILES="false"
15916      BUILD_VARIANT_RELEASE="-optimized"
15917      HOTSPOT_DEBUG_LEVEL="optimized"
15918      HOTSPOT_EXPORT="optimized"
15919      ;;
15920  esac
15921
15922  # The debug level 'optimized' is a little special because it is currently only
15923  # applicable to the HotSpot build where it means to build a completely
15924  # optimized version of the VM without any debugging code (like for the
15925  # 'release' debug level which is called 'product' in the HotSpot build) but
15926  # with the exception that it can contain additional code which is otherwise
15927  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15928  # test new and/or experimental features which are not intended for customer
15929  # shipment. Because these new features need to be tested and benchmarked in
15930  # real world scenarios, we want to build the containing JDK at the 'release'
15931  # debug level.
15932  if test "x$DEBUG_LEVEL" = xoptimized; then
15933    DEBUG_LEVEL="release"
15934  fi
15935
15936  #####
15937  # Generate the legacy makefile targets for hotspot.
15938  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15939  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15940  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15941  # But until then ...
15942  HOTSPOT_TARGET=""
15943
15944  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15945    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15946  fi
15947
15948  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15949    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15950  fi
15951
15952  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15953    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15954  fi
15955
15956  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15957    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15958  fi
15959
15960  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15961    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15962  fi
15963
15964  if test "x$JVM_VARIANT_CORE" = xtrue; then
15965    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15966  fi
15967
15968  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15969
15970  # On Macosx universal binaries are produced, but they only contain
15971  # 64 bit intel. This invalidates control of which jvms are built
15972  # from configure, but only server is valid anyway. Fix this
15973  # when hotspot makefiles are rewritten.
15974  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15975    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15976  fi
15977
15978  #####
15979
15980
15981
15982
15983
15984
15985
15986
15987# With basic setup done, call the custom early hook.
15988
15989
15990# Check if we have devkits, extra paths or sysroot set.
15991
15992
15993# Check whether --with-devkit was given.
15994if test "${with_devkit+set}" = set; then :
15995  withval=$with_devkit;
15996
15997  # Only process if variable expands to non-empty
15998
15999  if test "x$with_devkit" != x; then
16000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16001
16002  # Input might be given as Windows format, start by converting to
16003  # unix format.
16004  path="$with_devkit"
16005  new_path=`$CYGPATH -u "$path"`
16006
16007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16010  # "foo.exe" is OK but "foo" is an error.
16011  #
16012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16013  # It is also a way to make sure we got the proper file name for the real test later on.
16014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16015  if test "x$test_shortpath" = x; then
16016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16017$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16018    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16019  fi
16020
16021  # Call helper function which possibly converts this using DOS-style short mode.
16022  # If so, the updated path is stored in $new_path.
16023
16024  input_path="$new_path"
16025  # Check if we need to convert this using DOS-style short mode. If the path
16026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16027  # take no chances and rewrite it.
16028  # Note: m4 eats our [], so we need to use [ and ] instead.
16029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16030  if test "x$has_forbidden_chars" != x; then
16031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16035      # Going to short mode and back again did indeed matter. Since short mode is
16036      # case insensitive, let's make it lowercase to improve readability.
16037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16038      # Now convert it back to Unix-style (cygpath)
16039      input_path=`$CYGPATH -u "$shortmode_path"`
16040      new_path="$input_path"
16041    fi
16042  fi
16043
16044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16045  if test "x$test_cygdrive_prefix" = x; then
16046    # As a simple fix, exclude /usr/bin since it's not a real path.
16047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16049      # a path prefixed by /cygdrive for fixpath to work.
16050      new_path="$CYGWIN_ROOT_PATH$input_path"
16051    fi
16052  fi
16053
16054
16055  if test "x$path" != "x$new_path"; then
16056    with_devkit="$new_path"
16057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16058$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16059  fi
16060
16061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16062
16063  path="$with_devkit"
16064  has_colon=`$ECHO $path | $GREP ^.:`
16065  new_path="$path"
16066  if test "x$has_colon" = x; then
16067    # Not in mixed or Windows style, start by that.
16068    new_path=`cmd //c echo $path`
16069  fi
16070
16071
16072  input_path="$new_path"
16073  # Check if we need to convert this using DOS-style short mode. If the path
16074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16075  # take no chances and rewrite it.
16076  # Note: m4 eats our [], so we need to use [ and ] instead.
16077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16078  if test "x$has_forbidden_chars" != x; then
16079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16081  fi
16082
16083
16084  windows_path="$new_path"
16085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16086    unix_path=`$CYGPATH -u "$windows_path"`
16087    new_path="$unix_path"
16088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16090    new_path="$unix_path"
16091  fi
16092
16093  if test "x$path" != "x$new_path"; then
16094    with_devkit="$new_path"
16095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16096$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16097  fi
16098
16099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16101
16102    else
16103      # We're on a unix platform. Hooray! :)
16104      path="$with_devkit"
16105      has_space=`$ECHO "$path" | $GREP " "`
16106      if test "x$has_space" != x; then
16107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16108$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16110      fi
16111
16112      # Use eval to expand a potential ~
16113      eval path="$path"
16114      if test ! -f "$path" && test ! -d "$path"; then
16115        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16116      fi
16117
16118      if test -d "$path"; then
16119        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16120      else
16121        dir="`$DIRNAME "$path"`"
16122        base="`$BASENAME "$path"`"
16123        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16124      fi
16125    fi
16126  fi
16127
16128        DEVKIT_ROOT="$with_devkit"
16129        # Check for a meta data info file in the root of the devkit
16130        if test -f "$DEVKIT_ROOT/devkit.info"; then
16131          . $DEVKIT_ROOT/devkit.info
16132          # This potentially sets the following:
16133          # A descriptive name of the devkit
16134
16135  if test "x$DEVKIT_NAME" = x; then
16136    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16137  fi
16138
16139          # Corresponds to --with-extra-path
16140
16141  if test "x$DEVKIT_EXTRA_PATH" = x; then
16142    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16143  fi
16144
16145          # Corresponds to --with-toolchain-path
16146
16147  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16148    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16149  fi
16150
16151          # Corresponds to --with-sysroot
16152
16153  if test "x$DEVKIT_SYSROOT" = x; then
16154    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16155  fi
16156
16157
16158          # Identifies the Visual Studio version in the devkit
16159
16160  if test "x$DEVKIT_VS_VERSION" = x; then
16161    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16162  fi
16163
16164          # The Visual Studio include environment variable
16165
16166  if test "x$DEVKIT_VS_INCLUDE" = x; then
16167    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16168  fi
16169
16170          # The Visual Studio lib environment variable
16171
16172  if test "x$DEVKIT_VS_LIB" = x; then
16173    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16174  fi
16175
16176          # Corresponds to --with-msvcr-dll
16177
16178  if test "x$DEVKIT_MSVCR_DLL" = x; then
16179    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16180  fi
16181
16182          # Corresponds to --with-msvcp-dll
16183
16184  if test "x$DEVKIT_MSVCP_DLL" = x; then
16185    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16186  fi
16187
16188        fi
16189
16190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16191$as_echo_n "checking for devkit... " >&6; }
16192        if test "x$DEVKIT_NAME" != x; then
16193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16194$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16195        else
16196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16197$as_echo "$DEVKIT_ROOT" >&6; }
16198        fi
16199
16200
16201  if test "x$DEVKIT_EXTRA_PATH" != x; then
16202    if test "x$EXTRA_PATH" = x; then
16203      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16204    else
16205      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16206    fi
16207  fi
16208
16209
16210        # Fallback default of just /bin if DEVKIT_PATH is not defined
16211        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16212          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16213        fi
16214
16215  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16216    if test "x$TOOLCHAIN_PATH" = x; then
16217      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16218    else
16219      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16220    fi
16221  fi
16222
16223
16224        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16225        # places for backwards compatiblity.
16226        if test "x$DEVKIT_SYSROOT" != x; then
16227          SYSROOT="$DEVKIT_SYSROOT"
16228        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16229          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16230        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16231          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16232        fi
16233
16234
16235fi
16236
16237
16238  # You can force the sysroot if the sysroot encoded into the compiler tools
16239  # is not correct.
16240
16241# Check whether --with-sys-root was given.
16242if test "${with_sys_root+set}" = set; then :
16243  withval=$with_sys_root; SYSROOT=$with_sys_root
16244
16245fi
16246
16247
16248
16249# Check whether --with-sysroot was given.
16250if test "${with_sysroot+set}" = set; then :
16251  withval=$with_sysroot; SYSROOT=$with_sysroot
16252
16253fi
16254
16255
16256
16257# Check whether --with-tools-dir was given.
16258if test "${with_tools_dir+set}" = set; then :
16259  withval=$with_tools_dir;
16260  if test "x$with_tools_dir" != x; then
16261    if test "x$TOOLCHAIN_PATH" = x; then
16262      TOOLCHAIN_PATH="$with_tools_dir"
16263    else
16264      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16265    fi
16266  fi
16267
16268
16269fi
16270
16271
16272
16273# Check whether --with-toolchain-path was given.
16274if test "${with_toolchain_path+set}" = set; then :
16275  withval=$with_toolchain_path;
16276  if test "x$with_toolchain_path" != x; then
16277    if test "x$TOOLCHAIN_PATH" = x; then
16278      TOOLCHAIN_PATH="$with_toolchain_path"
16279    else
16280      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16281    fi
16282  fi
16283
16284
16285fi
16286
16287
16288
16289# Check whether --with-extra-path was given.
16290if test "${with_extra_path+set}" = set; then :
16291  withval=$with_extra_path;
16292  if test "x$with_extra_path" != x; then
16293    if test "x$EXTRA_PATH" = x; then
16294      EXTRA_PATH="$with_extra_path"
16295    else
16296      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16297    fi
16298  fi
16299
16300
16301fi
16302
16303
16304  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16305    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16306    # If not, detect if Xcode is installed by running xcodebuild -version
16307    # if no Xcode installed, xcodebuild exits with 1
16308    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16309    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16310      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16311      # fall back on the stub binary in /usr/bin/xcodebuild
16312      # Extract the first word of "xcodebuild", so it can be a program name with args.
16313set dummy xcodebuild; ac_word=$2
16314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16315$as_echo_n "checking for $ac_word... " >&6; }
16316if ${ac_cv_path_XCODEBUILD+:} false; then :
16317  $as_echo_n "(cached) " >&6
16318else
16319  case $XCODEBUILD in
16320  [\\/]* | ?:[\\/]*)
16321  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16322  ;;
16323  *)
16324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16325for as_dir in $TOOLCHAIN_PATH
16326do
16327  IFS=$as_save_IFS
16328  test -z "$as_dir" && as_dir=.
16329    for ac_exec_ext in '' $ac_executable_extensions; do
16330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16331    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16333    break 2
16334  fi
16335done
16336  done
16337IFS=$as_save_IFS
16338
16339  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16340  ;;
16341esac
16342fi
16343XCODEBUILD=$ac_cv_path_XCODEBUILD
16344if test -n "$XCODEBUILD"; then
16345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16346$as_echo "$XCODEBUILD" >&6; }
16347else
16348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16349$as_echo "no" >&6; }
16350fi
16351
16352
16353    else
16354      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16355      # when only the command line tools are installed there are no SDKs, so headers
16356      # are copied into the system frameworks
16357      XCODEBUILD=
16358
16359    fi
16360
16361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16362$as_echo_n "checking for sdk name... " >&6; }
16363
16364# Check whether --with-sdk-name was given.
16365if test "${with_sdk_name+set}" = set; then :
16366  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16367
16368fi
16369
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16371$as_echo "$SDKNAME" >&6; }
16372
16373    # if toolchain path is specified then don't rely on system headers, they may not compile
16374    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16375    test -z "$TOOLCHAIN_PATH" && \
16376      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16377
16378    if test -z "$SYSROOT"; then
16379      if test -n "$XCODEBUILD"; then
16380        # if we don't have system headers, use default SDK name (last resort)
16381        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16382          SDKNAME=${SDKNAME:-macosx}
16383        fi
16384
16385        if test -n "$SDKNAME"; then
16386          # Call xcodebuild to determine SYSROOT
16387          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16388        fi
16389      else
16390        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16391          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
16392        fi
16393      fi
16394    else
16395      # warn user if --with-sdk-name was also set
16396      if test -n "$with_sdk_name"; then
16397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16398$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16399      fi
16400    fi
16401
16402    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16403      # If no system framework headers, then SYSROOT must be set, or we won't build
16404      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
16405    fi
16406
16407    # Perform a basic sanity test
16408    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16409      if test -z "$SYSROOT"; then
16410        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
16411      else
16412        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16413      fi
16414    fi
16415
16416    # set SDKROOT too, Xcode tools will pick it up
16417    SDKROOT=$SYSROOT
16418
16419  fi
16420
16421  # Prepend the extra path to the global path
16422
16423  if test "x$EXTRA_PATH" != x; then
16424    if test "x$PATH" = x; then
16425      PATH="$EXTRA_PATH"
16426    else
16427      PATH="$EXTRA_PATH:$PATH"
16428    fi
16429  fi
16430
16431
16432  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16433    # Add extra search paths on solaris for utilities like ar and as etc...
16434    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16435  fi
16436
16437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16438$as_echo_n "checking for sysroot... " >&6; }
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16440$as_echo "$SYSROOT" >&6; }
16441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16442$as_echo_n "checking for toolchain path... " >&6; }
16443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16444$as_echo "$TOOLCHAIN_PATH" >&6; }
16445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16446$as_echo_n "checking for extra path... " >&6; }
16447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16448$as_echo "$EXTRA_PATH" >&6; }
16449
16450
16451# To properly create a configuration name, we need to have the OpenJDK target
16452# and options (variants and debug level) parsed.
16453
16454
16455
16456# Check whether --with-conf-name was given.
16457if test "${with_conf_name+set}" = set; then :
16458  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16459fi
16460
16461
16462  # Test from where we are running configure, in or outside of src root.
16463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16464$as_echo_n "checking where to store configuration... " >&6; }
16465  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16466      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16467      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16468    # We are running configure from the src root.
16469    # Create a default ./build/target-variant-debuglevel output root.
16470    if test "x${CONF_NAME}" = x; then
16471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16472$as_echo "in default location" >&6; }
16473      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16474    else
16475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16476$as_echo "in build directory with custom name" >&6; }
16477    fi
16478    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16479    $MKDIR -p "$OUTPUT_ROOT"
16480    if test ! -d "$OUTPUT_ROOT"; then
16481      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16482    fi
16483  else
16484    # We are running configure from outside of the src dir.
16485    # Then use the current directory as output dir!
16486    # If configuration is situated in normal build directory, just use the build
16487    # directory name as configuration name, otherwise use the complete path.
16488    if test "x${CONF_NAME}" = x; then
16489      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16490    fi
16491    OUTPUT_ROOT="$CURDIR"
16492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16493$as_echo "in current directory" >&6; }
16494
16495    # WARNING: This might be a bad thing to do. You need to be sure you want to
16496    # have a configuration in this directory. Do some sanity checks!
16497
16498    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16499      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16500      # other files
16501      files_present=`$LS $OUTPUT_ROOT`
16502      # Configure has already touched config.log and confdefs.h in the current dir when this check
16503      # is performed.
16504      filtered_files=`$ECHO "$files_present" \
16505          | $SED -e 's/config.log//g' \
16506              -e 's/configure.log//g' \
16507              -e 's/confdefs.h//g' \
16508              -e 's/ //g' \
16509          | $TR -d '\n'`
16510      if test "x$filtered_files" != x; then
16511        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16512$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16514$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16515        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16516$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16517        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16518$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16519        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16520$as_echo "$as_me: seriously mess up just about everything." >&6;}
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16522$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16523        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16524$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16525        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16526      fi
16527    fi
16528  fi
16529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16530$as_echo_n "checking what configuration name to use... " >&6; }
16531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16532$as_echo "$CONF_NAME" >&6; }
16533
16534
16535  # Only process if variable expands to non-empty
16536
16537  if test "x$OUTPUT_ROOT" != x; then
16538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16539
16540  # Input might be given as Windows format, start by converting to
16541  # unix format.
16542  path="$OUTPUT_ROOT"
16543  new_path=`$CYGPATH -u "$path"`
16544
16545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16548  # "foo.exe" is OK but "foo" is an error.
16549  #
16550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16551  # It is also a way to make sure we got the proper file name for the real test later on.
16552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16553  if test "x$test_shortpath" = x; then
16554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16555$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16556    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16557  fi
16558
16559  # Call helper function which possibly converts this using DOS-style short mode.
16560  # If so, the updated path is stored in $new_path.
16561
16562  input_path="$new_path"
16563  # Check if we need to convert this using DOS-style short mode. If the path
16564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16565  # take no chances and rewrite it.
16566  # Note: m4 eats our [], so we need to use [ and ] instead.
16567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16568  if test "x$has_forbidden_chars" != x; then
16569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16573      # Going to short mode and back again did indeed matter. Since short mode is
16574      # case insensitive, let's make it lowercase to improve readability.
16575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16576      # Now convert it back to Unix-style (cygpath)
16577      input_path=`$CYGPATH -u "$shortmode_path"`
16578      new_path="$input_path"
16579    fi
16580  fi
16581
16582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16583  if test "x$test_cygdrive_prefix" = x; then
16584    # As a simple fix, exclude /usr/bin since it's not a real path.
16585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16587      # a path prefixed by /cygdrive for fixpath to work.
16588      new_path="$CYGWIN_ROOT_PATH$input_path"
16589    fi
16590  fi
16591
16592
16593  if test "x$path" != "x$new_path"; then
16594    OUTPUT_ROOT="$new_path"
16595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16596$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16597  fi
16598
16599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16600
16601  path="$OUTPUT_ROOT"
16602  has_colon=`$ECHO $path | $GREP ^.:`
16603  new_path="$path"
16604  if test "x$has_colon" = x; then
16605    # Not in mixed or Windows style, start by that.
16606    new_path=`cmd //c echo $path`
16607  fi
16608
16609
16610  input_path="$new_path"
16611  # Check if we need to convert this using DOS-style short mode. If the path
16612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16613  # take no chances and rewrite it.
16614  # Note: m4 eats our [], so we need to use [ and ] instead.
16615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16616  if test "x$has_forbidden_chars" != x; then
16617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16619  fi
16620
16621
16622  windows_path="$new_path"
16623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16624    unix_path=`$CYGPATH -u "$windows_path"`
16625    new_path="$unix_path"
16626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16628    new_path="$unix_path"
16629  fi
16630
16631  if test "x$path" != "x$new_path"; then
16632    OUTPUT_ROOT="$new_path"
16633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16634$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16635  fi
16636
16637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16639
16640    else
16641      # We're on a unix platform. Hooray! :)
16642      path="$OUTPUT_ROOT"
16643      has_space=`$ECHO "$path" | $GREP " "`
16644      if test "x$has_space" != x; then
16645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16646$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16648      fi
16649
16650      # Use eval to expand a potential ~
16651      eval path="$path"
16652      if test ! -f "$path" && test ! -d "$path"; then
16653        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16654      fi
16655
16656      if test -d "$path"; then
16657        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16658      else
16659        dir="`$DIRNAME "$path"`"
16660        base="`$BASENAME "$path"`"
16661        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16662      fi
16663    fi
16664  fi
16665
16666
16667  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16668  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16669
16670  SPEC=$OUTPUT_ROOT/spec.gmk
16671
16672  CONF_NAME=$CONF_NAME
16673
16674  OUTPUT_ROOT=$OUTPUT_ROOT
16675
16676
16677
16678  # The spec.gmk file contains all variables for the make system.
16679  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16680
16681  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16682  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16683
16684  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16685  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16686
16687  # The compare.sh is used to compare the build output to other builds.
16688  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16689
16690  # The generated Makefile knows where the spec.gmk is and where the source is.
16691  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16692  # which will look for generated configurations
16693  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16694
16695
16696
16697# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16698
16699  for ac_prog in apt-get yum port pkgutil pkgadd
16700do
16701  # Extract the first word of "$ac_prog", so it can be a program name with args.
16702set dummy $ac_prog; ac_word=$2
16703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16704$as_echo_n "checking for $ac_word... " >&6; }
16705if ${ac_cv_prog_PKGHANDLER+:} false; then :
16706  $as_echo_n "(cached) " >&6
16707else
16708  if test -n "$PKGHANDLER"; then
16709  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16710else
16711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16712for as_dir in $PATH
16713do
16714  IFS=$as_save_IFS
16715  test -z "$as_dir" && as_dir=.
16716    for ac_exec_ext in '' $ac_executable_extensions; do
16717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16718    ac_cv_prog_PKGHANDLER="$ac_prog"
16719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16720    break 2
16721  fi
16722done
16723  done
16724IFS=$as_save_IFS
16725
16726fi
16727fi
16728PKGHANDLER=$ac_cv_prog_PKGHANDLER
16729if test -n "$PKGHANDLER"; then
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16731$as_echo "$PKGHANDLER" >&6; }
16732else
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734$as_echo "no" >&6; }
16735fi
16736
16737
16738  test -n "$PKGHANDLER" && break
16739done
16740
16741
16742
16743# Setup tools that requires more complex handling, or that is not needed by the configure script.
16744
16745
16746
16747  # Publish this variable in the help.
16748
16749
16750  if [ -z "${MAKE+x}" ]; then
16751    # The variable is not set by user, try to locate tool using the code snippet
16752
16753    # Try our hardest to locate a correct version of GNU make
16754    for ac_prog in gmake
16755do
16756  # Extract the first word of "$ac_prog", so it can be a program name with args.
16757set dummy $ac_prog; ac_word=$2
16758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16759$as_echo_n "checking for $ac_word... " >&6; }
16760if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16761  $as_echo_n "(cached) " >&6
16762else
16763  case $CHECK_GMAKE in
16764  [\\/]* | ?:[\\/]*)
16765  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16766  ;;
16767  *)
16768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16769for as_dir in $PATH
16770do
16771  IFS=$as_save_IFS
16772  test -z "$as_dir" && as_dir=.
16773    for ac_exec_ext in '' $ac_executable_extensions; do
16774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16775    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16777    break 2
16778  fi
16779done
16780  done
16781IFS=$as_save_IFS
16782
16783  ;;
16784esac
16785fi
16786CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16787if test -n "$CHECK_GMAKE"; then
16788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16789$as_echo "$CHECK_GMAKE" >&6; }
16790else
16791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16792$as_echo "no" >&6; }
16793fi
16794
16795
16796  test -n "$CHECK_GMAKE" && break
16797done
16798
16799
16800  MAKE_CANDIDATE=""$CHECK_GMAKE""
16801  DESCRIPTION="gmake in PATH"
16802
16803  # On Cygwin, we require a newer version of make than on other platforms
16804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16805    MAKE_VERSION_EXPR="-e 4\."
16806    MAKE_REQUIRED_VERSION="4.0"
16807   else
16808    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16809    MAKE_REQUIRED_VERSION="3.81"
16810  fi
16811
16812  if test "x$MAKE_CANDIDATE" != x; then
16813    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16814$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16815    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16816    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16817    if test "x$IS_GNU_MAKE" = x; then
16818      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16819$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16820    else
16821      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16822      if test "x$IS_MODERN_MAKE" = x; then
16823        { $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
16824$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;}
16825      else
16826        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16827          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16828            MAKE_EXPECTED_ENV='cygwin'
16829          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16830            MAKE_EXPECTED_ENV='msys'
16831          else
16832            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16833          fi
16834          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16835          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16836        else
16837          # Not relevant for non-Windows
16838          IS_MAKE_CORRECT_ENV=true
16839        fi
16840        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16841          { $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
16842$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;}
16843        else
16844          FOUND_MAKE=$MAKE_CANDIDATE
16845
16846  # Only process if variable expands to non-empty
16847
16848  if test "x$FOUND_MAKE" != x; then
16849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16850
16851  # First separate the path from the arguments. This will split at the first
16852  # space.
16853  complete="$FOUND_MAKE"
16854  path="${complete%% *}"
16855  tmp="$complete EOL"
16856  arguments="${tmp#* }"
16857
16858  # Input might be given as Windows format, start by converting to
16859  # unix format.
16860  new_path=`$CYGPATH -u "$path"`
16861
16862  # Now try to locate executable using which
16863  new_path=`$WHICH "$new_path" 2> /dev/null`
16864  # bat and cmd files are not always considered executable in cygwin causing which
16865  # to not find them
16866  if test "x$new_path" = x \
16867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16869    new_path=`$CYGPATH -u "$path"`
16870  fi
16871  if test "x$new_path" = x; then
16872    # Oops. Which didn't find the executable.
16873    # The splitting of arguments from the executable at a space might have been incorrect,
16874    # since paths with space are more likely in Windows. Give it another try with the whole
16875    # argument.
16876    path="$complete"
16877    arguments="EOL"
16878    new_path=`$CYGPATH -u "$path"`
16879    new_path=`$WHICH "$new_path" 2> /dev/null`
16880    # bat and cmd files are not always considered executable in cygwin causing which
16881    # to not find them
16882    if test "x$new_path" = x \
16883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16885      new_path=`$CYGPATH -u "$path"`
16886    fi
16887    if test "x$new_path" = x; then
16888      # It's still not found. Now this is an unrecoverable error.
16889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16891      has_space=`$ECHO "$complete" | $GREP " "`
16892      if test "x$has_space" != x; then
16893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16895      fi
16896      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16897    fi
16898  fi
16899
16900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16903  # "foo.exe" is OK but "foo" is an error.
16904  #
16905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16906  # It is also a way to make sure we got the proper file name for the real test later on.
16907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16908  if test "x$test_shortpath" = x; then
16909    # Short path failed, file does not exist as specified.
16910    # Try adding .exe or .cmd
16911    if test -f "${new_path}.exe"; then
16912      input_to_shortpath="${new_path}.exe"
16913    elif test -f "${new_path}.cmd"; then
16914      input_to_shortpath="${new_path}.cmd"
16915    else
16916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16917$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16921    fi
16922  else
16923    input_to_shortpath="$new_path"
16924  fi
16925
16926  # Call helper function which possibly converts this using DOS-style short mode.
16927  # If so, the updated path is stored in $new_path.
16928  new_path="$input_to_shortpath"
16929
16930  input_path="$input_to_shortpath"
16931  # Check if we need to convert this using DOS-style short mode. If the path
16932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16933  # take no chances and rewrite it.
16934  # Note: m4 eats our [], so we need to use [ and ] instead.
16935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16936  if test "x$has_forbidden_chars" != x; then
16937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16941      # Going to short mode and back again did indeed matter. Since short mode is
16942      # case insensitive, let's make it lowercase to improve readability.
16943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16944      # Now convert it back to Unix-style (cygpath)
16945      input_path=`$CYGPATH -u "$shortmode_path"`
16946      new_path="$input_path"
16947    fi
16948  fi
16949
16950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16951  if test "x$test_cygdrive_prefix" = x; then
16952    # As a simple fix, exclude /usr/bin since it's not a real path.
16953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16955      # a path prefixed by /cygdrive for fixpath to work.
16956      new_path="$CYGWIN_ROOT_PATH$input_path"
16957    fi
16958  fi
16959
16960  # remove trailing .exe if any
16961  new_path="${new_path/%.exe/}"
16962
16963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964
16965  # First separate the path from the arguments. This will split at the first
16966  # space.
16967  complete="$FOUND_MAKE"
16968  path="${complete%% *}"
16969  tmp="$complete EOL"
16970  arguments="${tmp#* }"
16971
16972  # Input might be given as Windows format, start by converting to
16973  # unix format.
16974  new_path="$path"
16975
16976  windows_path="$new_path"
16977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978    unix_path=`$CYGPATH -u "$windows_path"`
16979    new_path="$unix_path"
16980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16982    new_path="$unix_path"
16983  fi
16984
16985
16986  # Now try to locate executable using which
16987  new_path=`$WHICH "$new_path" 2> /dev/null`
16988
16989  if test "x$new_path" = x; then
16990    # Oops. Which didn't find the executable.
16991    # The splitting of arguments from the executable at a space might have been incorrect,
16992    # since paths with space are more likely in Windows. Give it another try with the whole
16993    # argument.
16994    path="$complete"
16995    arguments="EOL"
16996    new_path="$path"
16997
16998  windows_path="$new_path"
16999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17000    unix_path=`$CYGPATH -u "$windows_path"`
17001    new_path="$unix_path"
17002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17004    new_path="$unix_path"
17005  fi
17006
17007
17008    new_path=`$WHICH "$new_path" 2> /dev/null`
17009    # bat and cmd files are not always considered executable in MSYS causing which
17010    # to not find them
17011    if test "x$new_path" = x \
17012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17014      new_path="$path"
17015
17016  windows_path="$new_path"
17017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018    unix_path=`$CYGPATH -u "$windows_path"`
17019    new_path="$unix_path"
17020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17022    new_path="$unix_path"
17023  fi
17024
17025    fi
17026
17027    if test "x$new_path" = x; then
17028      # It's still not found. Now this is an unrecoverable error.
17029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17031      has_space=`$ECHO "$complete" | $GREP " "`
17032      if test "x$has_space" != x; then
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17035      fi
17036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17037    fi
17038  fi
17039
17040  # Now new_path has a complete unix path to the binary
17041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17042    # Keep paths in /bin as-is, but remove trailing .exe if any
17043    new_path="${new_path/%.exe/}"
17044    # Do not save /bin paths to all_fixpath_prefixes!
17045  else
17046    # Not in mixed or Windows style, start by that.
17047    new_path=`cmd //c echo $new_path`
17048
17049  input_path="$new_path"
17050  # Check if we need to convert this using DOS-style short mode. If the path
17051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17052  # take no chances and rewrite it.
17053  # Note: m4 eats our [], so we need to use [ and ] instead.
17054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17055  if test "x$has_forbidden_chars" != x; then
17056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17058  fi
17059
17060    # Output is in $new_path
17061
17062  windows_path="$new_path"
17063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064    unix_path=`$CYGPATH -u "$windows_path"`
17065    new_path="$unix_path"
17066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17068    new_path="$unix_path"
17069  fi
17070
17071    # remove trailing .exe if any
17072    new_path="${new_path/%.exe/}"
17073
17074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17076  fi
17077
17078    else
17079      # We're on a unix platform. Hooray! :)
17080      # First separate the path from the arguments. This will split at the first
17081      # space.
17082      complete="$FOUND_MAKE"
17083      path="${complete%% *}"
17084      tmp="$complete EOL"
17085      arguments="${tmp#* }"
17086
17087      # Cannot rely on the command "which" here since it doesn't always work.
17088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17089      if test -z "$is_absolute_path"; then
17090        # Path to executable is not absolute. Find it.
17091        IFS_save="$IFS"
17092        IFS=:
17093        for p in $PATH; do
17094          if test -f "$p/$path" && test -x "$p/$path"; then
17095            new_path="$p/$path"
17096            break
17097          fi
17098        done
17099        IFS="$IFS_save"
17100      else
17101        # This is an absolute path, we can use it without further modifications.
17102        new_path="$path"
17103      fi
17104
17105      if test "x$new_path" = x; then
17106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17108        has_space=`$ECHO "$complete" | $GREP " "`
17109        if test "x$has_space" != x; then
17110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17112        fi
17113        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17114      fi
17115    fi
17116
17117    # Now join together the path and the arguments once again
17118    if test "x$arguments" != xEOL; then
17119      new_complete="$new_path ${arguments% *}"
17120    else
17121      new_complete="$new_path"
17122    fi
17123
17124    if test "x$complete" != "x$new_complete"; then
17125      FOUND_MAKE="$new_complete"
17126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17127$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17128    fi
17129  fi
17130
17131        fi
17132      fi
17133    fi
17134  fi
17135
17136
17137    if test "x$FOUND_MAKE" = x; then
17138      for ac_prog in make
17139do
17140  # Extract the first word of "$ac_prog", so it can be a program name with args.
17141set dummy $ac_prog; ac_word=$2
17142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17143$as_echo_n "checking for $ac_word... " >&6; }
17144if ${ac_cv_path_CHECK_MAKE+:} false; then :
17145  $as_echo_n "(cached) " >&6
17146else
17147  case $CHECK_MAKE in
17148  [\\/]* | ?:[\\/]*)
17149  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17150  ;;
17151  *)
17152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17153for as_dir in $PATH
17154do
17155  IFS=$as_save_IFS
17156  test -z "$as_dir" && as_dir=.
17157    for ac_exec_ext in '' $ac_executable_extensions; do
17158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17159    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17161    break 2
17162  fi
17163done
17164  done
17165IFS=$as_save_IFS
17166
17167  ;;
17168esac
17169fi
17170CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17171if test -n "$CHECK_MAKE"; then
17172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17173$as_echo "$CHECK_MAKE" >&6; }
17174else
17175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17176$as_echo "no" >&6; }
17177fi
17178
17179
17180  test -n "$CHECK_MAKE" && break
17181done
17182
17183
17184  MAKE_CANDIDATE=""$CHECK_MAKE""
17185  DESCRIPTION="make in PATH"
17186
17187  # On Cygwin, we require a newer version of make than on other platforms
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    MAKE_VERSION_EXPR="-e 4\."
17190    MAKE_REQUIRED_VERSION="4.0"
17191   else
17192    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17193    MAKE_REQUIRED_VERSION="3.81"
17194  fi
17195
17196  if test "x$MAKE_CANDIDATE" != x; then
17197    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17198$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17199    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17200    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17201    if test "x$IS_GNU_MAKE" = x; then
17202      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17203$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17204    else
17205      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17206      if test "x$IS_MODERN_MAKE" = x; then
17207        { $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
17208$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;}
17209      else
17210        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17211          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17212            MAKE_EXPECTED_ENV='cygwin'
17213          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214            MAKE_EXPECTED_ENV='msys'
17215          else
17216            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17217          fi
17218          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17219          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17220        else
17221          # Not relevant for non-Windows
17222          IS_MAKE_CORRECT_ENV=true
17223        fi
17224        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17225          { $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
17226$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;}
17227        else
17228          FOUND_MAKE=$MAKE_CANDIDATE
17229
17230  # Only process if variable expands to non-empty
17231
17232  if test "x$FOUND_MAKE" != x; then
17233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234
17235  # First separate the path from the arguments. This will split at the first
17236  # space.
17237  complete="$FOUND_MAKE"
17238  path="${complete%% *}"
17239  tmp="$complete EOL"
17240  arguments="${tmp#* }"
17241
17242  # Input might be given as Windows format, start by converting to
17243  # unix format.
17244  new_path=`$CYGPATH -u "$path"`
17245
17246  # Now try to locate executable using which
17247  new_path=`$WHICH "$new_path" 2> /dev/null`
17248  # bat and cmd files are not always considered executable in cygwin causing which
17249  # to not find them
17250  if test "x$new_path" = x \
17251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17253    new_path=`$CYGPATH -u "$path"`
17254  fi
17255  if test "x$new_path" = x; then
17256    # Oops. Which didn't find the executable.
17257    # The splitting of arguments from the executable at a space might have been incorrect,
17258    # since paths with space are more likely in Windows. Give it another try with the whole
17259    # argument.
17260    path="$complete"
17261    arguments="EOL"
17262    new_path=`$CYGPATH -u "$path"`
17263    new_path=`$WHICH "$new_path" 2> /dev/null`
17264    # bat and cmd files are not always considered executable in cygwin causing which
17265    # to not find them
17266    if test "x$new_path" = x \
17267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17269      new_path=`$CYGPATH -u "$path"`
17270    fi
17271    if test "x$new_path" = x; then
17272      # It's still not found. Now this is an unrecoverable error.
17273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17275      has_space=`$ECHO "$complete" | $GREP " "`
17276      if test "x$has_space" != x; then
17277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17279      fi
17280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17281    fi
17282  fi
17283
17284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17287  # "foo.exe" is OK but "foo" is an error.
17288  #
17289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17290  # It is also a way to make sure we got the proper file name for the real test later on.
17291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17292  if test "x$test_shortpath" = x; then
17293    # Short path failed, file does not exist as specified.
17294    # Try adding .exe or .cmd
17295    if test -f "${new_path}.exe"; then
17296      input_to_shortpath="${new_path}.exe"
17297    elif test -f "${new_path}.cmd"; then
17298      input_to_shortpath="${new_path}.cmd"
17299    else
17300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17301$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17304      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17305    fi
17306  else
17307    input_to_shortpath="$new_path"
17308  fi
17309
17310  # Call helper function which possibly converts this using DOS-style short mode.
17311  # If so, the updated path is stored in $new_path.
17312  new_path="$input_to_shortpath"
17313
17314  input_path="$input_to_shortpath"
17315  # Check if we need to convert this using DOS-style short mode. If the path
17316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17317  # take no chances and rewrite it.
17318  # Note: m4 eats our [], so we need to use [ and ] instead.
17319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17320  if test "x$has_forbidden_chars" != x; then
17321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17325      # Going to short mode and back again did indeed matter. Since short mode is
17326      # case insensitive, let's make it lowercase to improve readability.
17327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17328      # Now convert it back to Unix-style (cygpath)
17329      input_path=`$CYGPATH -u "$shortmode_path"`
17330      new_path="$input_path"
17331    fi
17332  fi
17333
17334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17335  if test "x$test_cygdrive_prefix" = x; then
17336    # As a simple fix, exclude /usr/bin since it's not a real path.
17337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17339      # a path prefixed by /cygdrive for fixpath to work.
17340      new_path="$CYGWIN_ROOT_PATH$input_path"
17341    fi
17342  fi
17343
17344  # remove trailing .exe if any
17345  new_path="${new_path/%.exe/}"
17346
17347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17348
17349  # First separate the path from the arguments. This will split at the first
17350  # space.
17351  complete="$FOUND_MAKE"
17352  path="${complete%% *}"
17353  tmp="$complete EOL"
17354  arguments="${tmp#* }"
17355
17356  # Input might be given as Windows format, start by converting to
17357  # unix format.
17358  new_path="$path"
17359
17360  windows_path="$new_path"
17361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17362    unix_path=`$CYGPATH -u "$windows_path"`
17363    new_path="$unix_path"
17364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17366    new_path="$unix_path"
17367  fi
17368
17369
17370  # Now try to locate executable using which
17371  new_path=`$WHICH "$new_path" 2> /dev/null`
17372
17373  if test "x$new_path" = x; then
17374    # Oops. Which didn't find the executable.
17375    # The splitting of arguments from the executable at a space might have been incorrect,
17376    # since paths with space are more likely in Windows. Give it another try with the whole
17377    # argument.
17378    path="$complete"
17379    arguments="EOL"
17380    new_path="$path"
17381
17382  windows_path="$new_path"
17383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17384    unix_path=`$CYGPATH -u "$windows_path"`
17385    new_path="$unix_path"
17386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17388    new_path="$unix_path"
17389  fi
17390
17391
17392    new_path=`$WHICH "$new_path" 2> /dev/null`
17393    # bat and cmd files are not always considered executable in MSYS causing which
17394    # to not find them
17395    if test "x$new_path" = x \
17396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17398      new_path="$path"
17399
17400  windows_path="$new_path"
17401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17402    unix_path=`$CYGPATH -u "$windows_path"`
17403    new_path="$unix_path"
17404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17406    new_path="$unix_path"
17407  fi
17408
17409    fi
17410
17411    if test "x$new_path" = x; then
17412      # It's still not found. Now this is an unrecoverable error.
17413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17415      has_space=`$ECHO "$complete" | $GREP " "`
17416      if test "x$has_space" != x; then
17417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17419      fi
17420      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17421    fi
17422  fi
17423
17424  # Now new_path has a complete unix path to the binary
17425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17426    # Keep paths in /bin as-is, but remove trailing .exe if any
17427    new_path="${new_path/%.exe/}"
17428    # Do not save /bin paths to all_fixpath_prefixes!
17429  else
17430    # Not in mixed or Windows style, start by that.
17431    new_path=`cmd //c echo $new_path`
17432
17433  input_path="$new_path"
17434  # Check if we need to convert this using DOS-style short mode. If the path
17435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17436  # take no chances and rewrite it.
17437  # Note: m4 eats our [], so we need to use [ and ] instead.
17438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17439  if test "x$has_forbidden_chars" != x; then
17440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17442  fi
17443
17444    # Output is in $new_path
17445
17446  windows_path="$new_path"
17447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17448    unix_path=`$CYGPATH -u "$windows_path"`
17449    new_path="$unix_path"
17450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17452    new_path="$unix_path"
17453  fi
17454
17455    # remove trailing .exe if any
17456    new_path="${new_path/%.exe/}"
17457
17458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17460  fi
17461
17462    else
17463      # We're on a unix platform. Hooray! :)
17464      # First separate the path from the arguments. This will split at the first
17465      # space.
17466      complete="$FOUND_MAKE"
17467      path="${complete%% *}"
17468      tmp="$complete EOL"
17469      arguments="${tmp#* }"
17470
17471      # Cannot rely on the command "which" here since it doesn't always work.
17472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17473      if test -z "$is_absolute_path"; then
17474        # Path to executable is not absolute. Find it.
17475        IFS_save="$IFS"
17476        IFS=:
17477        for p in $PATH; do
17478          if test -f "$p/$path" && test -x "$p/$path"; then
17479            new_path="$p/$path"
17480            break
17481          fi
17482        done
17483        IFS="$IFS_save"
17484      else
17485        # This is an absolute path, we can use it without further modifications.
17486        new_path="$path"
17487      fi
17488
17489      if test "x$new_path" = x; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17492        has_space=`$ECHO "$complete" | $GREP " "`
17493        if test "x$has_space" != x; then
17494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17496        fi
17497        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17498      fi
17499    fi
17500
17501    # Now join together the path and the arguments once again
17502    if test "x$arguments" != xEOL; then
17503      new_complete="$new_path ${arguments% *}"
17504    else
17505      new_complete="$new_path"
17506    fi
17507
17508    if test "x$complete" != "x$new_complete"; then
17509      FOUND_MAKE="$new_complete"
17510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17511$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17512    fi
17513  fi
17514
17515        fi
17516      fi
17517    fi
17518  fi
17519
17520    fi
17521
17522    if test "x$FOUND_MAKE" = x; then
17523      if test "x$TOOLCHAIN_PATH" != x; then
17524        # We have a toolchain path, check that as well before giving up.
17525        OLD_PATH=$PATH
17526        PATH=$TOOLCHAIN_PATH:$PATH
17527        for ac_prog in gmake
17528do
17529  # Extract the first word of "$ac_prog", so it can be a program name with args.
17530set dummy $ac_prog; ac_word=$2
17531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17532$as_echo_n "checking for $ac_word... " >&6; }
17533if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17534  $as_echo_n "(cached) " >&6
17535else
17536  case $CHECK_TOOLSDIR_GMAKE in
17537  [\\/]* | ?:[\\/]*)
17538  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17539  ;;
17540  *)
17541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17542for as_dir in $PATH
17543do
17544  IFS=$as_save_IFS
17545  test -z "$as_dir" && as_dir=.
17546    for ac_exec_ext in '' $ac_executable_extensions; do
17547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17548    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17550    break 2
17551  fi
17552done
17553  done
17554IFS=$as_save_IFS
17555
17556  ;;
17557esac
17558fi
17559CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17560if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17562$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17563else
17564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17565$as_echo "no" >&6; }
17566fi
17567
17568
17569  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17570done
17571
17572
17573  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17574  DESCRIPTION="gmake in tools-dir"
17575
17576  # On Cygwin, we require a newer version of make than on other platforms
17577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17578    MAKE_VERSION_EXPR="-e 4\."
17579    MAKE_REQUIRED_VERSION="4.0"
17580   else
17581    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17582    MAKE_REQUIRED_VERSION="3.81"
17583  fi
17584
17585  if test "x$MAKE_CANDIDATE" != x; then
17586    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17587$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17588    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17589    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17590    if test "x$IS_GNU_MAKE" = x; then
17591      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17592$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17593    else
17594      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17595      if test "x$IS_MODERN_MAKE" = x; then
17596        { $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
17597$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;}
17598      else
17599        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17600          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17601            MAKE_EXPECTED_ENV='cygwin'
17602          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17603            MAKE_EXPECTED_ENV='msys'
17604          else
17605            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17606          fi
17607          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17608          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17609        else
17610          # Not relevant for non-Windows
17611          IS_MAKE_CORRECT_ENV=true
17612        fi
17613        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17614          { $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
17615$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;}
17616        else
17617          FOUND_MAKE=$MAKE_CANDIDATE
17618
17619  # Only process if variable expands to non-empty
17620
17621  if test "x$FOUND_MAKE" != x; then
17622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17623
17624  # First separate the path from the arguments. This will split at the first
17625  # space.
17626  complete="$FOUND_MAKE"
17627  path="${complete%% *}"
17628  tmp="$complete EOL"
17629  arguments="${tmp#* }"
17630
17631  # Input might be given as Windows format, start by converting to
17632  # unix format.
17633  new_path=`$CYGPATH -u "$path"`
17634
17635  # Now try to locate executable using which
17636  new_path=`$WHICH "$new_path" 2> /dev/null`
17637  # bat and cmd files are not always considered executable in cygwin causing which
17638  # to not find them
17639  if test "x$new_path" = x \
17640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17642    new_path=`$CYGPATH -u "$path"`
17643  fi
17644  if test "x$new_path" = x; then
17645    # Oops. Which didn't find the executable.
17646    # The splitting of arguments from the executable at a space might have been incorrect,
17647    # since paths with space are more likely in Windows. Give it another try with the whole
17648    # argument.
17649    path="$complete"
17650    arguments="EOL"
17651    new_path=`$CYGPATH -u "$path"`
17652    new_path=`$WHICH "$new_path" 2> /dev/null`
17653    # bat and cmd files are not always considered executable in cygwin causing which
17654    # to not find them
17655    if test "x$new_path" = x \
17656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17658      new_path=`$CYGPATH -u "$path"`
17659    fi
17660    if test "x$new_path" = x; then
17661      # It's still not found. Now this is an unrecoverable error.
17662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17664      has_space=`$ECHO "$complete" | $GREP " "`
17665      if test "x$has_space" != x; then
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17668      fi
17669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17670    fi
17671  fi
17672
17673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17676  # "foo.exe" is OK but "foo" is an error.
17677  #
17678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17679  # It is also a way to make sure we got the proper file name for the real test later on.
17680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17681  if test "x$test_shortpath" = x; then
17682    # Short path failed, file does not exist as specified.
17683    # Try adding .exe or .cmd
17684    if test -f "${new_path}.exe"; then
17685      input_to_shortpath="${new_path}.exe"
17686    elif test -f "${new_path}.cmd"; then
17687      input_to_shortpath="${new_path}.cmd"
17688    else
17689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17694    fi
17695  else
17696    input_to_shortpath="$new_path"
17697  fi
17698
17699  # Call helper function which possibly converts this using DOS-style short mode.
17700  # If so, the updated path is stored in $new_path.
17701  new_path="$input_to_shortpath"
17702
17703  input_path="$input_to_shortpath"
17704  # Check if we need to convert this using DOS-style short mode. If the path
17705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17706  # take no chances and rewrite it.
17707  # Note: m4 eats our [], so we need to use [ and ] instead.
17708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17709  if test "x$has_forbidden_chars" != x; then
17710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17714      # Going to short mode and back again did indeed matter. Since short mode is
17715      # case insensitive, let's make it lowercase to improve readability.
17716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17717      # Now convert it back to Unix-style (cygpath)
17718      input_path=`$CYGPATH -u "$shortmode_path"`
17719      new_path="$input_path"
17720    fi
17721  fi
17722
17723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17724  if test "x$test_cygdrive_prefix" = x; then
17725    # As a simple fix, exclude /usr/bin since it's not a real path.
17726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17728      # a path prefixed by /cygdrive for fixpath to work.
17729      new_path="$CYGWIN_ROOT_PATH$input_path"
17730    fi
17731  fi
17732
17733  # remove trailing .exe if any
17734  new_path="${new_path/%.exe/}"
17735
17736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17737
17738  # First separate the path from the arguments. This will split at the first
17739  # space.
17740  complete="$FOUND_MAKE"
17741  path="${complete%% *}"
17742  tmp="$complete EOL"
17743  arguments="${tmp#* }"
17744
17745  # Input might be given as Windows format, start by converting to
17746  # unix format.
17747  new_path="$path"
17748
17749  windows_path="$new_path"
17750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17751    unix_path=`$CYGPATH -u "$windows_path"`
17752    new_path="$unix_path"
17753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17755    new_path="$unix_path"
17756  fi
17757
17758
17759  # Now try to locate executable using which
17760  new_path=`$WHICH "$new_path" 2> /dev/null`
17761
17762  if test "x$new_path" = x; then
17763    # Oops. Which didn't find the executable.
17764    # The splitting of arguments from the executable at a space might have been incorrect,
17765    # since paths with space are more likely in Windows. Give it another try with the whole
17766    # argument.
17767    path="$complete"
17768    arguments="EOL"
17769    new_path="$path"
17770
17771  windows_path="$new_path"
17772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17773    unix_path=`$CYGPATH -u "$windows_path"`
17774    new_path="$unix_path"
17775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17777    new_path="$unix_path"
17778  fi
17779
17780
17781    new_path=`$WHICH "$new_path" 2> /dev/null`
17782    # bat and cmd files are not always considered executable in MSYS causing which
17783    # to not find them
17784    if test "x$new_path" = x \
17785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17787      new_path="$path"
17788
17789  windows_path="$new_path"
17790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17791    unix_path=`$CYGPATH -u "$windows_path"`
17792    new_path="$unix_path"
17793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17795    new_path="$unix_path"
17796  fi
17797
17798    fi
17799
17800    if test "x$new_path" = x; then
17801      # It's still not found. Now this is an unrecoverable error.
17802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17803$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17804      has_space=`$ECHO "$complete" | $GREP " "`
17805      if test "x$has_space" != x; then
17806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17808      fi
17809      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17810    fi
17811  fi
17812
17813  # Now new_path has a complete unix path to the binary
17814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17815    # Keep paths in /bin as-is, but remove trailing .exe if any
17816    new_path="${new_path/%.exe/}"
17817    # Do not save /bin paths to all_fixpath_prefixes!
17818  else
17819    # Not in mixed or Windows style, start by that.
17820    new_path=`cmd //c echo $new_path`
17821
17822  input_path="$new_path"
17823  # Check if we need to convert this using DOS-style short mode. If the path
17824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17825  # take no chances and rewrite it.
17826  # Note: m4 eats our [], so we need to use [ and ] instead.
17827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17828  if test "x$has_forbidden_chars" != x; then
17829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17831  fi
17832
17833    # Output is in $new_path
17834
17835  windows_path="$new_path"
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837    unix_path=`$CYGPATH -u "$windows_path"`
17838    new_path="$unix_path"
17839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17841    new_path="$unix_path"
17842  fi
17843
17844    # remove trailing .exe if any
17845    new_path="${new_path/%.exe/}"
17846
17847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17849  fi
17850
17851    else
17852      # We're on a unix platform. Hooray! :)
17853      # First separate the path from the arguments. This will split at the first
17854      # space.
17855      complete="$FOUND_MAKE"
17856      path="${complete%% *}"
17857      tmp="$complete EOL"
17858      arguments="${tmp#* }"
17859
17860      # Cannot rely on the command "which" here since it doesn't always work.
17861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17862      if test -z "$is_absolute_path"; then
17863        # Path to executable is not absolute. Find it.
17864        IFS_save="$IFS"
17865        IFS=:
17866        for p in $PATH; do
17867          if test -f "$p/$path" && test -x "$p/$path"; then
17868            new_path="$p/$path"
17869            break
17870          fi
17871        done
17872        IFS="$IFS_save"
17873      else
17874        # This is an absolute path, we can use it without further modifications.
17875        new_path="$path"
17876      fi
17877
17878      if test "x$new_path" = x; then
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17880$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17881        has_space=`$ECHO "$complete" | $GREP " "`
17882        if test "x$has_space" != x; then
17883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17885        fi
17886        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17887      fi
17888    fi
17889
17890    # Now join together the path and the arguments once again
17891    if test "x$arguments" != xEOL; then
17892      new_complete="$new_path ${arguments% *}"
17893    else
17894      new_complete="$new_path"
17895    fi
17896
17897    if test "x$complete" != "x$new_complete"; then
17898      FOUND_MAKE="$new_complete"
17899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17900$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17901    fi
17902  fi
17903
17904        fi
17905      fi
17906    fi
17907  fi
17908
17909        if test "x$FOUND_MAKE" = x; then
17910          for ac_prog in make
17911do
17912  # Extract the first word of "$ac_prog", so it can be a program name with args.
17913set dummy $ac_prog; ac_word=$2
17914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17915$as_echo_n "checking for $ac_word... " >&6; }
17916if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17917  $as_echo_n "(cached) " >&6
17918else
17919  case $CHECK_TOOLSDIR_MAKE in
17920  [\\/]* | ?:[\\/]*)
17921  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17922  ;;
17923  *)
17924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17925for as_dir in $PATH
17926do
17927  IFS=$as_save_IFS
17928  test -z "$as_dir" && as_dir=.
17929    for ac_exec_ext in '' $ac_executable_extensions; do
17930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17931    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17933    break 2
17934  fi
17935done
17936  done
17937IFS=$as_save_IFS
17938
17939  ;;
17940esac
17941fi
17942CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17943if test -n "$CHECK_TOOLSDIR_MAKE"; then
17944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17945$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17946else
17947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17948$as_echo "no" >&6; }
17949fi
17950
17951
17952  test -n "$CHECK_TOOLSDIR_MAKE" && break
17953done
17954
17955
17956  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17957  DESCRIPTION="make in tools-dir"
17958
17959  # On Cygwin, we require a newer version of make than on other platforms
17960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17961    MAKE_VERSION_EXPR="-e 4\."
17962    MAKE_REQUIRED_VERSION="4.0"
17963   else
17964    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17965    MAKE_REQUIRED_VERSION="3.81"
17966  fi
17967
17968  if test "x$MAKE_CANDIDATE" != x; then
17969    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17970$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17971    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17972    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17973    if test "x$IS_GNU_MAKE" = x; then
17974      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17975$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17976    else
17977      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17978      if test "x$IS_MODERN_MAKE" = x; then
17979        { $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
17980$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;}
17981      else
17982        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17983          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17984            MAKE_EXPECTED_ENV='cygwin'
17985          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17986            MAKE_EXPECTED_ENV='msys'
17987          else
17988            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17989          fi
17990          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17991          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17992        else
17993          # Not relevant for non-Windows
17994          IS_MAKE_CORRECT_ENV=true
17995        fi
17996        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17997          { $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
17998$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;}
17999        else
18000          FOUND_MAKE=$MAKE_CANDIDATE
18001
18002  # Only process if variable expands to non-empty
18003
18004  if test "x$FOUND_MAKE" != x; then
18005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18006
18007  # First separate the path from the arguments. This will split at the first
18008  # space.
18009  complete="$FOUND_MAKE"
18010  path="${complete%% *}"
18011  tmp="$complete EOL"
18012  arguments="${tmp#* }"
18013
18014  # Input might be given as Windows format, start by converting to
18015  # unix format.
18016  new_path=`$CYGPATH -u "$path"`
18017
18018  # Now try to locate executable using which
18019  new_path=`$WHICH "$new_path" 2> /dev/null`
18020  # bat and cmd files are not always considered executable in cygwin causing which
18021  # to not find them
18022  if test "x$new_path" = x \
18023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18025    new_path=`$CYGPATH -u "$path"`
18026  fi
18027  if test "x$new_path" = x; then
18028    # Oops. Which didn't find the executable.
18029    # The splitting of arguments from the executable at a space might have been incorrect,
18030    # since paths with space are more likely in Windows. Give it another try with the whole
18031    # argument.
18032    path="$complete"
18033    arguments="EOL"
18034    new_path=`$CYGPATH -u "$path"`
18035    new_path=`$WHICH "$new_path" 2> /dev/null`
18036    # bat and cmd files are not always considered executable in cygwin causing which
18037    # to not find them
18038    if test "x$new_path" = x \
18039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18041      new_path=`$CYGPATH -u "$path"`
18042    fi
18043    if test "x$new_path" = x; then
18044      # It's still not found. Now this is an unrecoverable error.
18045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18046$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18047      has_space=`$ECHO "$complete" | $GREP " "`
18048      if test "x$has_space" != x; then
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18051      fi
18052      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18053    fi
18054  fi
18055
18056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18059  # "foo.exe" is OK but "foo" is an error.
18060  #
18061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18062  # It is also a way to make sure we got the proper file name for the real test later on.
18063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18064  if test "x$test_shortpath" = x; then
18065    # Short path failed, file does not exist as specified.
18066    # Try adding .exe or .cmd
18067    if test -f "${new_path}.exe"; then
18068      input_to_shortpath="${new_path}.exe"
18069    elif test -f "${new_path}.cmd"; then
18070      input_to_shortpath="${new_path}.cmd"
18071    else
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18073$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18076      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18077    fi
18078  else
18079    input_to_shortpath="$new_path"
18080  fi
18081
18082  # Call helper function which possibly converts this using DOS-style short mode.
18083  # If so, the updated path is stored in $new_path.
18084  new_path="$input_to_shortpath"
18085
18086  input_path="$input_to_shortpath"
18087  # Check if we need to convert this using DOS-style short mode. If the path
18088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18089  # take no chances and rewrite it.
18090  # Note: m4 eats our [], so we need to use [ and ] instead.
18091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18092  if test "x$has_forbidden_chars" != x; then
18093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18097      # Going to short mode and back again did indeed matter. Since short mode is
18098      # case insensitive, let's make it lowercase to improve readability.
18099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18100      # Now convert it back to Unix-style (cygpath)
18101      input_path=`$CYGPATH -u "$shortmode_path"`
18102      new_path="$input_path"
18103    fi
18104  fi
18105
18106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18107  if test "x$test_cygdrive_prefix" = x; then
18108    # As a simple fix, exclude /usr/bin since it's not a real path.
18109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18111      # a path prefixed by /cygdrive for fixpath to work.
18112      new_path="$CYGWIN_ROOT_PATH$input_path"
18113    fi
18114  fi
18115
18116  # remove trailing .exe if any
18117  new_path="${new_path/%.exe/}"
18118
18119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120
18121  # First separate the path from the arguments. This will split at the first
18122  # space.
18123  complete="$FOUND_MAKE"
18124  path="${complete%% *}"
18125  tmp="$complete EOL"
18126  arguments="${tmp#* }"
18127
18128  # Input might be given as Windows format, start by converting to
18129  # unix format.
18130  new_path="$path"
18131
18132  windows_path="$new_path"
18133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18134    unix_path=`$CYGPATH -u "$windows_path"`
18135    new_path="$unix_path"
18136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18138    new_path="$unix_path"
18139  fi
18140
18141
18142  # Now try to locate executable using which
18143  new_path=`$WHICH "$new_path" 2> /dev/null`
18144
18145  if test "x$new_path" = x; then
18146    # Oops. Which didn't find the executable.
18147    # The splitting of arguments from the executable at a space might have been incorrect,
18148    # since paths with space are more likely in Windows. Give it another try with the whole
18149    # argument.
18150    path="$complete"
18151    arguments="EOL"
18152    new_path="$path"
18153
18154  windows_path="$new_path"
18155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18156    unix_path=`$CYGPATH -u "$windows_path"`
18157    new_path="$unix_path"
18158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18160    new_path="$unix_path"
18161  fi
18162
18163
18164    new_path=`$WHICH "$new_path" 2> /dev/null`
18165    # bat and cmd files are not always considered executable in MSYS causing which
18166    # to not find them
18167    if test "x$new_path" = x \
18168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18170      new_path="$path"
18171
18172  windows_path="$new_path"
18173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18174    unix_path=`$CYGPATH -u "$windows_path"`
18175    new_path="$unix_path"
18176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18178    new_path="$unix_path"
18179  fi
18180
18181    fi
18182
18183    if test "x$new_path" = x; then
18184      # It's still not found. Now this is an unrecoverable error.
18185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18186$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18187      has_space=`$ECHO "$complete" | $GREP " "`
18188      if test "x$has_space" != x; then
18189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18191      fi
18192      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18193    fi
18194  fi
18195
18196  # Now new_path has a complete unix path to the binary
18197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18198    # Keep paths in /bin as-is, but remove trailing .exe if any
18199    new_path="${new_path/%.exe/}"
18200    # Do not save /bin paths to all_fixpath_prefixes!
18201  else
18202    # Not in mixed or Windows style, start by that.
18203    new_path=`cmd //c echo $new_path`
18204
18205  input_path="$new_path"
18206  # Check if we need to convert this using DOS-style short mode. If the path
18207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18208  # take no chances and rewrite it.
18209  # Note: m4 eats our [], so we need to use [ and ] instead.
18210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18211  if test "x$has_forbidden_chars" != x; then
18212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18214  fi
18215
18216    # Output is in $new_path
18217
18218  windows_path="$new_path"
18219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18220    unix_path=`$CYGPATH -u "$windows_path"`
18221    new_path="$unix_path"
18222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18224    new_path="$unix_path"
18225  fi
18226
18227    # remove trailing .exe if any
18228    new_path="${new_path/%.exe/}"
18229
18230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18232  fi
18233
18234    else
18235      # We're on a unix platform. Hooray! :)
18236      # First separate the path from the arguments. This will split at the first
18237      # space.
18238      complete="$FOUND_MAKE"
18239      path="${complete%% *}"
18240      tmp="$complete EOL"
18241      arguments="${tmp#* }"
18242
18243      # Cannot rely on the command "which" here since it doesn't always work.
18244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18245      if test -z "$is_absolute_path"; then
18246        # Path to executable is not absolute. Find it.
18247        IFS_save="$IFS"
18248        IFS=:
18249        for p in $PATH; do
18250          if test -f "$p/$path" && test -x "$p/$path"; then
18251            new_path="$p/$path"
18252            break
18253          fi
18254        done
18255        IFS="$IFS_save"
18256      else
18257        # This is an absolute path, we can use it without further modifications.
18258        new_path="$path"
18259      fi
18260
18261      if test "x$new_path" = x; then
18262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18264        has_space=`$ECHO "$complete" | $GREP " "`
18265        if test "x$has_space" != x; then
18266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18268        fi
18269        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18270      fi
18271    fi
18272
18273    # Now join together the path and the arguments once again
18274    if test "x$arguments" != xEOL; then
18275      new_complete="$new_path ${arguments% *}"
18276    else
18277      new_complete="$new_path"
18278    fi
18279
18280    if test "x$complete" != "x$new_complete"; then
18281      FOUND_MAKE="$new_complete"
18282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18283$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18284    fi
18285  fi
18286
18287        fi
18288      fi
18289    fi
18290  fi
18291
18292        fi
18293        PATH=$OLD_PATH
18294      fi
18295    fi
18296
18297    if test "x$FOUND_MAKE" = x; then
18298      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
18299    fi
18300
18301  else
18302    # The variable is set, but is it from the command line or the environment?
18303
18304    # Try to remove the string !MAKE! from our list.
18305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18307      # If it failed, the variable was not from the command line. Ignore it,
18308      # but warn the user (except for BASH, which is always set by the calling BASH).
18309      if test "xMAKE" != xBASH; then
18310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18311$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18312      fi
18313      # Try to locate tool using the code snippet
18314
18315    # Try our hardest to locate a correct version of GNU make
18316    for ac_prog in gmake
18317do
18318  # Extract the first word of "$ac_prog", so it can be a program name with args.
18319set dummy $ac_prog; ac_word=$2
18320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18321$as_echo_n "checking for $ac_word... " >&6; }
18322if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18323  $as_echo_n "(cached) " >&6
18324else
18325  case $CHECK_GMAKE in
18326  [\\/]* | ?:[\\/]*)
18327  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18328  ;;
18329  *)
18330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18331for as_dir in $PATH
18332do
18333  IFS=$as_save_IFS
18334  test -z "$as_dir" && as_dir=.
18335    for ac_exec_ext in '' $ac_executable_extensions; do
18336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18337    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18339    break 2
18340  fi
18341done
18342  done
18343IFS=$as_save_IFS
18344
18345  ;;
18346esac
18347fi
18348CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18349if test -n "$CHECK_GMAKE"; then
18350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18351$as_echo "$CHECK_GMAKE" >&6; }
18352else
18353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18354$as_echo "no" >&6; }
18355fi
18356
18357
18358  test -n "$CHECK_GMAKE" && break
18359done
18360
18361
18362  MAKE_CANDIDATE=""$CHECK_GMAKE""
18363  DESCRIPTION="gmake in PATH"
18364
18365  # On Cygwin, we require a newer version of make than on other platforms
18366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18367    MAKE_VERSION_EXPR="-e 4\."
18368    MAKE_REQUIRED_VERSION="4.0"
18369   else
18370    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18371    MAKE_REQUIRED_VERSION="3.81"
18372  fi
18373
18374  if test "x$MAKE_CANDIDATE" != x; then
18375    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18376$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18377    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18378    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18379    if test "x$IS_GNU_MAKE" = x; then
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18381$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18382    else
18383      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18384      if test "x$IS_MODERN_MAKE" = x; then
18385        { $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
18386$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;}
18387      else
18388        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18389          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18390            MAKE_EXPECTED_ENV='cygwin'
18391          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18392            MAKE_EXPECTED_ENV='msys'
18393          else
18394            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18395          fi
18396          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18397          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18398        else
18399          # Not relevant for non-Windows
18400          IS_MAKE_CORRECT_ENV=true
18401        fi
18402        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18403          { $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
18404$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;}
18405        else
18406          FOUND_MAKE=$MAKE_CANDIDATE
18407
18408  # Only process if variable expands to non-empty
18409
18410  if test "x$FOUND_MAKE" != x; then
18411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18412
18413  # First separate the path from the arguments. This will split at the first
18414  # space.
18415  complete="$FOUND_MAKE"
18416  path="${complete%% *}"
18417  tmp="$complete EOL"
18418  arguments="${tmp#* }"
18419
18420  # Input might be given as Windows format, start by converting to
18421  # unix format.
18422  new_path=`$CYGPATH -u "$path"`
18423
18424  # Now try to locate executable using which
18425  new_path=`$WHICH "$new_path" 2> /dev/null`
18426  # bat and cmd files are not always considered executable in cygwin causing which
18427  # to not find them
18428  if test "x$new_path" = x \
18429      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18430      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18431    new_path=`$CYGPATH -u "$path"`
18432  fi
18433  if test "x$new_path" = x; then
18434    # Oops. Which didn't find the executable.
18435    # The splitting of arguments from the executable at a space might have been incorrect,
18436    # since paths with space are more likely in Windows. Give it another try with the whole
18437    # argument.
18438    path="$complete"
18439    arguments="EOL"
18440    new_path=`$CYGPATH -u "$path"`
18441    new_path=`$WHICH "$new_path" 2> /dev/null`
18442    # bat and cmd files are not always considered executable in cygwin causing which
18443    # to not find them
18444    if test "x$new_path" = x \
18445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18447      new_path=`$CYGPATH -u "$path"`
18448    fi
18449    if test "x$new_path" = x; then
18450      # It's still not found. Now this is an unrecoverable error.
18451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18453      has_space=`$ECHO "$complete" | $GREP " "`
18454      if test "x$has_space" != x; then
18455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18457      fi
18458      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18459    fi
18460  fi
18461
18462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18465  # "foo.exe" is OK but "foo" is an error.
18466  #
18467  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18468  # It is also a way to make sure we got the proper file name for the real test later on.
18469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18470  if test "x$test_shortpath" = x; then
18471    # Short path failed, file does not exist as specified.
18472    # Try adding .exe or .cmd
18473    if test -f "${new_path}.exe"; then
18474      input_to_shortpath="${new_path}.exe"
18475    elif test -f "${new_path}.cmd"; then
18476      input_to_shortpath="${new_path}.cmd"
18477    else
18478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18479$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18480      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18481$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18482      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18483    fi
18484  else
18485    input_to_shortpath="$new_path"
18486  fi
18487
18488  # Call helper function which possibly converts this using DOS-style short mode.
18489  # If so, the updated path is stored in $new_path.
18490  new_path="$input_to_shortpath"
18491
18492  input_path="$input_to_shortpath"
18493  # Check if we need to convert this using DOS-style short mode. If the path
18494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18495  # take no chances and rewrite it.
18496  # Note: m4 eats our [], so we need to use [ and ] instead.
18497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18498  if test "x$has_forbidden_chars" != x; then
18499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18503      # Going to short mode and back again did indeed matter. Since short mode is
18504      # case insensitive, let's make it lowercase to improve readability.
18505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18506      # Now convert it back to Unix-style (cygpath)
18507      input_path=`$CYGPATH -u "$shortmode_path"`
18508      new_path="$input_path"
18509    fi
18510  fi
18511
18512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18513  if test "x$test_cygdrive_prefix" = x; then
18514    # As a simple fix, exclude /usr/bin since it's not a real path.
18515    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18517      # a path prefixed by /cygdrive for fixpath to work.
18518      new_path="$CYGWIN_ROOT_PATH$input_path"
18519    fi
18520  fi
18521
18522  # remove trailing .exe if any
18523  new_path="${new_path/%.exe/}"
18524
18525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18526
18527  # First separate the path from the arguments. This will split at the first
18528  # space.
18529  complete="$FOUND_MAKE"
18530  path="${complete%% *}"
18531  tmp="$complete EOL"
18532  arguments="${tmp#* }"
18533
18534  # Input might be given as Windows format, start by converting to
18535  # unix format.
18536  new_path="$path"
18537
18538  windows_path="$new_path"
18539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18540    unix_path=`$CYGPATH -u "$windows_path"`
18541    new_path="$unix_path"
18542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18544    new_path="$unix_path"
18545  fi
18546
18547
18548  # Now try to locate executable using which
18549  new_path=`$WHICH "$new_path" 2> /dev/null`
18550
18551  if test "x$new_path" = x; then
18552    # Oops. Which didn't find the executable.
18553    # The splitting of arguments from the executable at a space might have been incorrect,
18554    # since paths with space are more likely in Windows. Give it another try with the whole
18555    # argument.
18556    path="$complete"
18557    arguments="EOL"
18558    new_path="$path"
18559
18560  windows_path="$new_path"
18561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18562    unix_path=`$CYGPATH -u "$windows_path"`
18563    new_path="$unix_path"
18564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18566    new_path="$unix_path"
18567  fi
18568
18569
18570    new_path=`$WHICH "$new_path" 2> /dev/null`
18571    # bat and cmd files are not always considered executable in MSYS causing which
18572    # to not find them
18573    if test "x$new_path" = x \
18574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18576      new_path="$path"
18577
18578  windows_path="$new_path"
18579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18580    unix_path=`$CYGPATH -u "$windows_path"`
18581    new_path="$unix_path"
18582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18584    new_path="$unix_path"
18585  fi
18586
18587    fi
18588
18589    if test "x$new_path" = x; then
18590      # It's still not found. Now this is an unrecoverable error.
18591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18593      has_space=`$ECHO "$complete" | $GREP " "`
18594      if test "x$has_space" != x; then
18595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18597      fi
18598      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18599    fi
18600  fi
18601
18602  # Now new_path has a complete unix path to the binary
18603  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18604    # Keep paths in /bin as-is, but remove trailing .exe if any
18605    new_path="${new_path/%.exe/}"
18606    # Do not save /bin paths to all_fixpath_prefixes!
18607  else
18608    # Not in mixed or Windows style, start by that.
18609    new_path=`cmd //c echo $new_path`
18610
18611  input_path="$new_path"
18612  # Check if we need to convert this using DOS-style short mode. If the path
18613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18614  # take no chances and rewrite it.
18615  # Note: m4 eats our [], so we need to use [ and ] instead.
18616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18617  if test "x$has_forbidden_chars" != x; then
18618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18620  fi
18621
18622    # Output is in $new_path
18623
18624  windows_path="$new_path"
18625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626    unix_path=`$CYGPATH -u "$windows_path"`
18627    new_path="$unix_path"
18628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18630    new_path="$unix_path"
18631  fi
18632
18633    # remove trailing .exe if any
18634    new_path="${new_path/%.exe/}"
18635
18636    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18637    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18638  fi
18639
18640    else
18641      # We're on a unix platform. Hooray! :)
18642      # First separate the path from the arguments. This will split at the first
18643      # space.
18644      complete="$FOUND_MAKE"
18645      path="${complete%% *}"
18646      tmp="$complete EOL"
18647      arguments="${tmp#* }"
18648
18649      # Cannot rely on the command "which" here since it doesn't always work.
18650      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18651      if test -z "$is_absolute_path"; then
18652        # Path to executable is not absolute. Find it.
18653        IFS_save="$IFS"
18654        IFS=:
18655        for p in $PATH; do
18656          if test -f "$p/$path" && test -x "$p/$path"; then
18657            new_path="$p/$path"
18658            break
18659          fi
18660        done
18661        IFS="$IFS_save"
18662      else
18663        # This is an absolute path, we can use it without further modifications.
18664        new_path="$path"
18665      fi
18666
18667      if test "x$new_path" = x; then
18668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18670        has_space=`$ECHO "$complete" | $GREP " "`
18671        if test "x$has_space" != x; then
18672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18674        fi
18675        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18676      fi
18677    fi
18678
18679    # Now join together the path and the arguments once again
18680    if test "x$arguments" != xEOL; then
18681      new_complete="$new_path ${arguments% *}"
18682    else
18683      new_complete="$new_path"
18684    fi
18685
18686    if test "x$complete" != "x$new_complete"; then
18687      FOUND_MAKE="$new_complete"
18688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18689$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18690    fi
18691  fi
18692
18693        fi
18694      fi
18695    fi
18696  fi
18697
18698
18699    if test "x$FOUND_MAKE" = x; then
18700      for ac_prog in make
18701do
18702  # Extract the first word of "$ac_prog", so it can be a program name with args.
18703set dummy $ac_prog; ac_word=$2
18704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18705$as_echo_n "checking for $ac_word... " >&6; }
18706if ${ac_cv_path_CHECK_MAKE+:} false; then :
18707  $as_echo_n "(cached) " >&6
18708else
18709  case $CHECK_MAKE in
18710  [\\/]* | ?:[\\/]*)
18711  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18712  ;;
18713  *)
18714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18715for as_dir in $PATH
18716do
18717  IFS=$as_save_IFS
18718  test -z "$as_dir" && as_dir=.
18719    for ac_exec_ext in '' $ac_executable_extensions; do
18720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18721    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18723    break 2
18724  fi
18725done
18726  done
18727IFS=$as_save_IFS
18728
18729  ;;
18730esac
18731fi
18732CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18733if test -n "$CHECK_MAKE"; then
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18735$as_echo "$CHECK_MAKE" >&6; }
18736else
18737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18738$as_echo "no" >&6; }
18739fi
18740
18741
18742  test -n "$CHECK_MAKE" && break
18743done
18744
18745
18746  MAKE_CANDIDATE=""$CHECK_MAKE""
18747  DESCRIPTION="make in PATH"
18748
18749  # On Cygwin, we require a newer version of make than on other platforms
18750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18751    MAKE_VERSION_EXPR="-e 4\."
18752    MAKE_REQUIRED_VERSION="4.0"
18753   else
18754    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18755    MAKE_REQUIRED_VERSION="3.81"
18756  fi
18757
18758  if test "x$MAKE_CANDIDATE" != x; then
18759    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18760$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18761    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18762    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18763    if test "x$IS_GNU_MAKE" = x; then
18764      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18765$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18766    else
18767      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18768      if test "x$IS_MODERN_MAKE" = x; then
18769        { $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
18770$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;}
18771      else
18772        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18773          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18774            MAKE_EXPECTED_ENV='cygwin'
18775          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18776            MAKE_EXPECTED_ENV='msys'
18777          else
18778            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18779          fi
18780          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18781          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18782        else
18783          # Not relevant for non-Windows
18784          IS_MAKE_CORRECT_ENV=true
18785        fi
18786        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18787          { $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
18788$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;}
18789        else
18790          FOUND_MAKE=$MAKE_CANDIDATE
18791
18792  # Only process if variable expands to non-empty
18793
18794  if test "x$FOUND_MAKE" != x; then
18795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18796
18797  # First separate the path from the arguments. This will split at the first
18798  # space.
18799  complete="$FOUND_MAKE"
18800  path="${complete%% *}"
18801  tmp="$complete EOL"
18802  arguments="${tmp#* }"
18803
18804  # Input might be given as Windows format, start by converting to
18805  # unix format.
18806  new_path=`$CYGPATH -u "$path"`
18807
18808  # Now try to locate executable using which
18809  new_path=`$WHICH "$new_path" 2> /dev/null`
18810  # bat and cmd files are not always considered executable in cygwin causing which
18811  # to not find them
18812  if test "x$new_path" = x \
18813      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18814      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18815    new_path=`$CYGPATH -u "$path"`
18816  fi
18817  if test "x$new_path" = x; then
18818    # Oops. Which didn't find the executable.
18819    # The splitting of arguments from the executable at a space might have been incorrect,
18820    # since paths with space are more likely in Windows. Give it another try with the whole
18821    # argument.
18822    path="$complete"
18823    arguments="EOL"
18824    new_path=`$CYGPATH -u "$path"`
18825    new_path=`$WHICH "$new_path" 2> /dev/null`
18826    # bat and cmd files are not always considered executable in cygwin causing which
18827    # to not find them
18828    if test "x$new_path" = x \
18829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18831      new_path=`$CYGPATH -u "$path"`
18832    fi
18833    if test "x$new_path" = x; then
18834      # It's still not found. Now this is an unrecoverable error.
18835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18836$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18837      has_space=`$ECHO "$complete" | $GREP " "`
18838      if test "x$has_space" != x; then
18839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18841      fi
18842      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18843    fi
18844  fi
18845
18846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18849  # "foo.exe" is OK but "foo" is an error.
18850  #
18851  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18852  # It is also a way to make sure we got the proper file name for the real test later on.
18853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18854  if test "x$test_shortpath" = x; then
18855    # Short path failed, file does not exist as specified.
18856    # Try adding .exe or .cmd
18857    if test -f "${new_path}.exe"; then
18858      input_to_shortpath="${new_path}.exe"
18859    elif test -f "${new_path}.cmd"; then
18860      input_to_shortpath="${new_path}.cmd"
18861    else
18862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18864      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18865$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18867    fi
18868  else
18869    input_to_shortpath="$new_path"
18870  fi
18871
18872  # Call helper function which possibly converts this using DOS-style short mode.
18873  # If so, the updated path is stored in $new_path.
18874  new_path="$input_to_shortpath"
18875
18876  input_path="$input_to_shortpath"
18877  # Check if we need to convert this using DOS-style short mode. If the path
18878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18879  # take no chances and rewrite it.
18880  # Note: m4 eats our [], so we need to use [ and ] instead.
18881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18882  if test "x$has_forbidden_chars" != x; then
18883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18887      # Going to short mode and back again did indeed matter. Since short mode is
18888      # case insensitive, let's make it lowercase to improve readability.
18889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18890      # Now convert it back to Unix-style (cygpath)
18891      input_path=`$CYGPATH -u "$shortmode_path"`
18892      new_path="$input_path"
18893    fi
18894  fi
18895
18896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18897  if test "x$test_cygdrive_prefix" = x; then
18898    # As a simple fix, exclude /usr/bin since it's not a real path.
18899    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18901      # a path prefixed by /cygdrive for fixpath to work.
18902      new_path="$CYGWIN_ROOT_PATH$input_path"
18903    fi
18904  fi
18905
18906  # remove trailing .exe if any
18907  new_path="${new_path/%.exe/}"
18908
18909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18910
18911  # First separate the path from the arguments. This will split at the first
18912  # space.
18913  complete="$FOUND_MAKE"
18914  path="${complete%% *}"
18915  tmp="$complete EOL"
18916  arguments="${tmp#* }"
18917
18918  # Input might be given as Windows format, start by converting to
18919  # unix format.
18920  new_path="$path"
18921
18922  windows_path="$new_path"
18923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18924    unix_path=`$CYGPATH -u "$windows_path"`
18925    new_path="$unix_path"
18926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18928    new_path="$unix_path"
18929  fi
18930
18931
18932  # Now try to locate executable using which
18933  new_path=`$WHICH "$new_path" 2> /dev/null`
18934
18935  if test "x$new_path" = x; then
18936    # Oops. Which didn't find the executable.
18937    # The splitting of arguments from the executable at a space might have been incorrect,
18938    # since paths with space are more likely in Windows. Give it another try with the whole
18939    # argument.
18940    path="$complete"
18941    arguments="EOL"
18942    new_path="$path"
18943
18944  windows_path="$new_path"
18945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18946    unix_path=`$CYGPATH -u "$windows_path"`
18947    new_path="$unix_path"
18948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18950    new_path="$unix_path"
18951  fi
18952
18953
18954    new_path=`$WHICH "$new_path" 2> /dev/null`
18955    # bat and cmd files are not always considered executable in MSYS causing which
18956    # to not find them
18957    if test "x$new_path" = x \
18958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18960      new_path="$path"
18961
18962  windows_path="$new_path"
18963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18964    unix_path=`$CYGPATH -u "$windows_path"`
18965    new_path="$unix_path"
18966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18968    new_path="$unix_path"
18969  fi
18970
18971    fi
18972
18973    if test "x$new_path" = x; then
18974      # It's still not found. Now this is an unrecoverable error.
18975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18977      has_space=`$ECHO "$complete" | $GREP " "`
18978      if test "x$has_space" != x; then
18979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18981      fi
18982      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18983    fi
18984  fi
18985
18986  # Now new_path has a complete unix path to the binary
18987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18988    # Keep paths in /bin as-is, but remove trailing .exe if any
18989    new_path="${new_path/%.exe/}"
18990    # Do not save /bin paths to all_fixpath_prefixes!
18991  else
18992    # Not in mixed or Windows style, start by that.
18993    new_path=`cmd //c echo $new_path`
18994
18995  input_path="$new_path"
18996  # Check if we need to convert this using DOS-style short mode. If the path
18997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18998  # take no chances and rewrite it.
18999  # Note: m4 eats our [], so we need to use [ and ] instead.
19000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19001  if test "x$has_forbidden_chars" != x; then
19002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19004  fi
19005
19006    # Output is in $new_path
19007
19008  windows_path="$new_path"
19009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19010    unix_path=`$CYGPATH -u "$windows_path"`
19011    new_path="$unix_path"
19012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19014    new_path="$unix_path"
19015  fi
19016
19017    # remove trailing .exe if any
19018    new_path="${new_path/%.exe/}"
19019
19020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19022  fi
19023
19024    else
19025      # We're on a unix platform. Hooray! :)
19026      # First separate the path from the arguments. This will split at the first
19027      # space.
19028      complete="$FOUND_MAKE"
19029      path="${complete%% *}"
19030      tmp="$complete EOL"
19031      arguments="${tmp#* }"
19032
19033      # Cannot rely on the command "which" here since it doesn't always work.
19034      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19035      if test -z "$is_absolute_path"; then
19036        # Path to executable is not absolute. Find it.
19037        IFS_save="$IFS"
19038        IFS=:
19039        for p in $PATH; do
19040          if test -f "$p/$path" && test -x "$p/$path"; then
19041            new_path="$p/$path"
19042            break
19043          fi
19044        done
19045        IFS="$IFS_save"
19046      else
19047        # This is an absolute path, we can use it without further modifications.
19048        new_path="$path"
19049      fi
19050
19051      if test "x$new_path" = x; then
19052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19054        has_space=`$ECHO "$complete" | $GREP " "`
19055        if test "x$has_space" != x; then
19056          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19058        fi
19059        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19060      fi
19061    fi
19062
19063    # Now join together the path and the arguments once again
19064    if test "x$arguments" != xEOL; then
19065      new_complete="$new_path ${arguments% *}"
19066    else
19067      new_complete="$new_path"
19068    fi
19069
19070    if test "x$complete" != "x$new_complete"; then
19071      FOUND_MAKE="$new_complete"
19072      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19073$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19074    fi
19075  fi
19076
19077        fi
19078      fi
19079    fi
19080  fi
19081
19082    fi
19083
19084    if test "x$FOUND_MAKE" = x; then
19085      if test "x$TOOLCHAIN_PATH" != x; then
19086        # We have a toolchain path, check that as well before giving up.
19087        OLD_PATH=$PATH
19088        PATH=$TOOLCHAIN_PATH:$PATH
19089        for ac_prog in gmake
19090do
19091  # Extract the first word of "$ac_prog", so it can be a program name with args.
19092set dummy $ac_prog; ac_word=$2
19093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19094$as_echo_n "checking for $ac_word... " >&6; }
19095if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19096  $as_echo_n "(cached) " >&6
19097else
19098  case $CHECK_TOOLSDIR_GMAKE in
19099  [\\/]* | ?:[\\/]*)
19100  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19101  ;;
19102  *)
19103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19104for as_dir in $PATH
19105do
19106  IFS=$as_save_IFS
19107  test -z "$as_dir" && as_dir=.
19108    for ac_exec_ext in '' $ac_executable_extensions; do
19109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19110    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19112    break 2
19113  fi
19114done
19115  done
19116IFS=$as_save_IFS
19117
19118  ;;
19119esac
19120fi
19121CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19122if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19124$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19125else
19126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19127$as_echo "no" >&6; }
19128fi
19129
19130
19131  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19132done
19133
19134
19135  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19136  DESCRIPTION="gmake in tools-dir"
19137
19138  # On Cygwin, we require a newer version of make than on other platforms
19139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19140    MAKE_VERSION_EXPR="-e 4\."
19141    MAKE_REQUIRED_VERSION="4.0"
19142   else
19143    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19144    MAKE_REQUIRED_VERSION="3.81"
19145  fi
19146
19147  if test "x$MAKE_CANDIDATE" != x; then
19148    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19149$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19150    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19151    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19152    if test "x$IS_GNU_MAKE" = x; then
19153      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19154$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19155    else
19156      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19157      if test "x$IS_MODERN_MAKE" = x; then
19158        { $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
19159$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;}
19160      else
19161        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19162          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19163            MAKE_EXPECTED_ENV='cygwin'
19164          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19165            MAKE_EXPECTED_ENV='msys'
19166          else
19167            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19168          fi
19169          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19170          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19171        else
19172          # Not relevant for non-Windows
19173          IS_MAKE_CORRECT_ENV=true
19174        fi
19175        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19176          { $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
19177$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;}
19178        else
19179          FOUND_MAKE=$MAKE_CANDIDATE
19180
19181  # Only process if variable expands to non-empty
19182
19183  if test "x$FOUND_MAKE" != x; then
19184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19185
19186  # First separate the path from the arguments. This will split at the first
19187  # space.
19188  complete="$FOUND_MAKE"
19189  path="${complete%% *}"
19190  tmp="$complete EOL"
19191  arguments="${tmp#* }"
19192
19193  # Input might be given as Windows format, start by converting to
19194  # unix format.
19195  new_path=`$CYGPATH -u "$path"`
19196
19197  # Now try to locate executable using which
19198  new_path=`$WHICH "$new_path" 2> /dev/null`
19199  # bat and cmd files are not always considered executable in cygwin causing which
19200  # to not find them
19201  if test "x$new_path" = x \
19202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19204    new_path=`$CYGPATH -u "$path"`
19205  fi
19206  if test "x$new_path" = x; then
19207    # Oops. Which didn't find the executable.
19208    # The splitting of arguments from the executable at a space might have been incorrect,
19209    # since paths with space are more likely in Windows. Give it another try with the whole
19210    # argument.
19211    path="$complete"
19212    arguments="EOL"
19213    new_path=`$CYGPATH -u "$path"`
19214    new_path=`$WHICH "$new_path" 2> /dev/null`
19215    # bat and cmd files are not always considered executable in cygwin causing which
19216    # to not find them
19217    if test "x$new_path" = x \
19218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19220      new_path=`$CYGPATH -u "$path"`
19221    fi
19222    if test "x$new_path" = x; then
19223      # It's still not found. Now this is an unrecoverable error.
19224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19226      has_space=`$ECHO "$complete" | $GREP " "`
19227      if test "x$has_space" != x; then
19228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19230      fi
19231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19232    fi
19233  fi
19234
19235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19238  # "foo.exe" is OK but "foo" is an error.
19239  #
19240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19241  # It is also a way to make sure we got the proper file name for the real test later on.
19242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19243  if test "x$test_shortpath" = x; then
19244    # Short path failed, file does not exist as specified.
19245    # Try adding .exe or .cmd
19246    if test -f "${new_path}.exe"; then
19247      input_to_shortpath="${new_path}.exe"
19248    elif test -f "${new_path}.cmd"; then
19249      input_to_shortpath="${new_path}.cmd"
19250    else
19251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19256    fi
19257  else
19258    input_to_shortpath="$new_path"
19259  fi
19260
19261  # Call helper function which possibly converts this using DOS-style short mode.
19262  # If so, the updated path is stored in $new_path.
19263  new_path="$input_to_shortpath"
19264
19265  input_path="$input_to_shortpath"
19266  # Check if we need to convert this using DOS-style short mode. If the path
19267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19268  # take no chances and rewrite it.
19269  # Note: m4 eats our [], so we need to use [ and ] instead.
19270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19271  if test "x$has_forbidden_chars" != x; then
19272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19276      # Going to short mode and back again did indeed matter. Since short mode is
19277      # case insensitive, let's make it lowercase to improve readability.
19278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19279      # Now convert it back to Unix-style (cygpath)
19280      input_path=`$CYGPATH -u "$shortmode_path"`
19281      new_path="$input_path"
19282    fi
19283  fi
19284
19285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19286  if test "x$test_cygdrive_prefix" = x; then
19287    # As a simple fix, exclude /usr/bin since it's not a real path.
19288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19290      # a path prefixed by /cygdrive for fixpath to work.
19291      new_path="$CYGWIN_ROOT_PATH$input_path"
19292    fi
19293  fi
19294
19295  # remove trailing .exe if any
19296  new_path="${new_path/%.exe/}"
19297
19298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19299
19300  # First separate the path from the arguments. This will split at the first
19301  # space.
19302  complete="$FOUND_MAKE"
19303  path="${complete%% *}"
19304  tmp="$complete EOL"
19305  arguments="${tmp#* }"
19306
19307  # Input might be given as Windows format, start by converting to
19308  # unix format.
19309  new_path="$path"
19310
19311  windows_path="$new_path"
19312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19313    unix_path=`$CYGPATH -u "$windows_path"`
19314    new_path="$unix_path"
19315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19317    new_path="$unix_path"
19318  fi
19319
19320
19321  # Now try to locate executable using which
19322  new_path=`$WHICH "$new_path" 2> /dev/null`
19323
19324  if test "x$new_path" = x; then
19325    # Oops. Which didn't find the executable.
19326    # The splitting of arguments from the executable at a space might have been incorrect,
19327    # since paths with space are more likely in Windows. Give it another try with the whole
19328    # argument.
19329    path="$complete"
19330    arguments="EOL"
19331    new_path="$path"
19332
19333  windows_path="$new_path"
19334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19335    unix_path=`$CYGPATH -u "$windows_path"`
19336    new_path="$unix_path"
19337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19339    new_path="$unix_path"
19340  fi
19341
19342
19343    new_path=`$WHICH "$new_path" 2> /dev/null`
19344    # bat and cmd files are not always considered executable in MSYS causing which
19345    # to not find them
19346    if test "x$new_path" = x \
19347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19349      new_path="$path"
19350
19351  windows_path="$new_path"
19352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19353    unix_path=`$CYGPATH -u "$windows_path"`
19354    new_path="$unix_path"
19355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19357    new_path="$unix_path"
19358  fi
19359
19360    fi
19361
19362    if test "x$new_path" = x; then
19363      # It's still not found. Now this is an unrecoverable error.
19364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19366      has_space=`$ECHO "$complete" | $GREP " "`
19367      if test "x$has_space" != x; then
19368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19370      fi
19371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19372    fi
19373  fi
19374
19375  # Now new_path has a complete unix path to the binary
19376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19377    # Keep paths in /bin as-is, but remove trailing .exe if any
19378    new_path="${new_path/%.exe/}"
19379    # Do not save /bin paths to all_fixpath_prefixes!
19380  else
19381    # Not in mixed or Windows style, start by that.
19382    new_path=`cmd //c echo $new_path`
19383
19384  input_path="$new_path"
19385  # Check if we need to convert this using DOS-style short mode. If the path
19386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19387  # take no chances and rewrite it.
19388  # Note: m4 eats our [], so we need to use [ and ] instead.
19389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19390  if test "x$has_forbidden_chars" != x; then
19391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19393  fi
19394
19395    # Output is in $new_path
19396
19397  windows_path="$new_path"
19398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399    unix_path=`$CYGPATH -u "$windows_path"`
19400    new_path="$unix_path"
19401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19403    new_path="$unix_path"
19404  fi
19405
19406    # remove trailing .exe if any
19407    new_path="${new_path/%.exe/}"
19408
19409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19411  fi
19412
19413    else
19414      # We're on a unix platform. Hooray! :)
19415      # First separate the path from the arguments. This will split at the first
19416      # space.
19417      complete="$FOUND_MAKE"
19418      path="${complete%% *}"
19419      tmp="$complete EOL"
19420      arguments="${tmp#* }"
19421
19422      # Cannot rely on the command "which" here since it doesn't always work.
19423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19424      if test -z "$is_absolute_path"; then
19425        # Path to executable is not absolute. Find it.
19426        IFS_save="$IFS"
19427        IFS=:
19428        for p in $PATH; do
19429          if test -f "$p/$path" && test -x "$p/$path"; then
19430            new_path="$p/$path"
19431            break
19432          fi
19433        done
19434        IFS="$IFS_save"
19435      else
19436        # This is an absolute path, we can use it without further modifications.
19437        new_path="$path"
19438      fi
19439
19440      if test "x$new_path" = x; then
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19443        has_space=`$ECHO "$complete" | $GREP " "`
19444        if test "x$has_space" != x; then
19445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19447        fi
19448        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19449      fi
19450    fi
19451
19452    # Now join together the path and the arguments once again
19453    if test "x$arguments" != xEOL; then
19454      new_complete="$new_path ${arguments% *}"
19455    else
19456      new_complete="$new_path"
19457    fi
19458
19459    if test "x$complete" != "x$new_complete"; then
19460      FOUND_MAKE="$new_complete"
19461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19462$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19463    fi
19464  fi
19465
19466        fi
19467      fi
19468    fi
19469  fi
19470
19471        if test "x$FOUND_MAKE" = x; then
19472          for ac_prog in make
19473do
19474  # Extract the first word of "$ac_prog", so it can be a program name with args.
19475set dummy $ac_prog; ac_word=$2
19476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19477$as_echo_n "checking for $ac_word... " >&6; }
19478if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19479  $as_echo_n "(cached) " >&6
19480else
19481  case $CHECK_TOOLSDIR_MAKE in
19482  [\\/]* | ?:[\\/]*)
19483  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19484  ;;
19485  *)
19486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19487for as_dir in $PATH
19488do
19489  IFS=$as_save_IFS
19490  test -z "$as_dir" && as_dir=.
19491    for ac_exec_ext in '' $ac_executable_extensions; do
19492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19493    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19495    break 2
19496  fi
19497done
19498  done
19499IFS=$as_save_IFS
19500
19501  ;;
19502esac
19503fi
19504CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19505if test -n "$CHECK_TOOLSDIR_MAKE"; then
19506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19507$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19508else
19509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19510$as_echo "no" >&6; }
19511fi
19512
19513
19514  test -n "$CHECK_TOOLSDIR_MAKE" && break
19515done
19516
19517
19518  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19519  DESCRIPTION="make in tools-dir"
19520
19521  # On Cygwin, we require a newer version of make than on other platforms
19522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19523    MAKE_VERSION_EXPR="-e 4\."
19524    MAKE_REQUIRED_VERSION="4.0"
19525   else
19526    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19527    MAKE_REQUIRED_VERSION="3.81"
19528  fi
19529
19530  if test "x$MAKE_CANDIDATE" != x; then
19531    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19532$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19533    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19534    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19535    if test "x$IS_GNU_MAKE" = x; then
19536      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19537$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19538    else
19539      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19540      if test "x$IS_MODERN_MAKE" = x; then
19541        { $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
19542$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;}
19543      else
19544        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19545          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19546            MAKE_EXPECTED_ENV='cygwin'
19547          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19548            MAKE_EXPECTED_ENV='msys'
19549          else
19550            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19551          fi
19552          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19553          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19554        else
19555          # Not relevant for non-Windows
19556          IS_MAKE_CORRECT_ENV=true
19557        fi
19558        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19559          { $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
19560$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;}
19561        else
19562          FOUND_MAKE=$MAKE_CANDIDATE
19563
19564  # Only process if variable expands to non-empty
19565
19566  if test "x$FOUND_MAKE" != x; then
19567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19568
19569  # First separate the path from the arguments. This will split at the first
19570  # space.
19571  complete="$FOUND_MAKE"
19572  path="${complete%% *}"
19573  tmp="$complete EOL"
19574  arguments="${tmp#* }"
19575
19576  # Input might be given as Windows format, start by converting to
19577  # unix format.
19578  new_path=`$CYGPATH -u "$path"`
19579
19580  # Now try to locate executable using which
19581  new_path=`$WHICH "$new_path" 2> /dev/null`
19582  # bat and cmd files are not always considered executable in cygwin causing which
19583  # to not find them
19584  if test "x$new_path" = x \
19585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19587    new_path=`$CYGPATH -u "$path"`
19588  fi
19589  if test "x$new_path" = x; then
19590    # Oops. Which didn't find the executable.
19591    # The splitting of arguments from the executable at a space might have been incorrect,
19592    # since paths with space are more likely in Windows. Give it another try with the whole
19593    # argument.
19594    path="$complete"
19595    arguments="EOL"
19596    new_path=`$CYGPATH -u "$path"`
19597    new_path=`$WHICH "$new_path" 2> /dev/null`
19598    # bat and cmd files are not always considered executable in cygwin causing which
19599    # to not find them
19600    if test "x$new_path" = x \
19601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19603      new_path=`$CYGPATH -u "$path"`
19604    fi
19605    if test "x$new_path" = x; then
19606      # It's still not found. Now this is an unrecoverable error.
19607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19608$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19609      has_space=`$ECHO "$complete" | $GREP " "`
19610      if test "x$has_space" != x; then
19611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19613      fi
19614      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19615    fi
19616  fi
19617
19618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19621  # "foo.exe" is OK but "foo" is an error.
19622  #
19623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19624  # It is also a way to make sure we got the proper file name for the real test later on.
19625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19626  if test "x$test_shortpath" = x; then
19627    # Short path failed, file does not exist as specified.
19628    # Try adding .exe or .cmd
19629    if test -f "${new_path}.exe"; then
19630      input_to_shortpath="${new_path}.exe"
19631    elif test -f "${new_path}.cmd"; then
19632      input_to_shortpath="${new_path}.cmd"
19633    else
19634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19635$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19638      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19639    fi
19640  else
19641    input_to_shortpath="$new_path"
19642  fi
19643
19644  # Call helper function which possibly converts this using DOS-style short mode.
19645  # If so, the updated path is stored in $new_path.
19646  new_path="$input_to_shortpath"
19647
19648  input_path="$input_to_shortpath"
19649  # Check if we need to convert this using DOS-style short mode. If the path
19650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19651  # take no chances and rewrite it.
19652  # Note: m4 eats our [], so we need to use [ and ] instead.
19653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19654  if test "x$has_forbidden_chars" != x; then
19655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19659      # Going to short mode and back again did indeed matter. Since short mode is
19660      # case insensitive, let's make it lowercase to improve readability.
19661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19662      # Now convert it back to Unix-style (cygpath)
19663      input_path=`$CYGPATH -u "$shortmode_path"`
19664      new_path="$input_path"
19665    fi
19666  fi
19667
19668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19669  if test "x$test_cygdrive_prefix" = x; then
19670    # As a simple fix, exclude /usr/bin since it's not a real path.
19671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19673      # a path prefixed by /cygdrive for fixpath to work.
19674      new_path="$CYGWIN_ROOT_PATH$input_path"
19675    fi
19676  fi
19677
19678  # remove trailing .exe if any
19679  new_path="${new_path/%.exe/}"
19680
19681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682
19683  # First separate the path from the arguments. This will split at the first
19684  # space.
19685  complete="$FOUND_MAKE"
19686  path="${complete%% *}"
19687  tmp="$complete EOL"
19688  arguments="${tmp#* }"
19689
19690  # Input might be given as Windows format, start by converting to
19691  # unix format.
19692  new_path="$path"
19693
19694  windows_path="$new_path"
19695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19696    unix_path=`$CYGPATH -u "$windows_path"`
19697    new_path="$unix_path"
19698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19700    new_path="$unix_path"
19701  fi
19702
19703
19704  # Now try to locate executable using which
19705  new_path=`$WHICH "$new_path" 2> /dev/null`
19706
19707  if test "x$new_path" = x; then
19708    # Oops. Which didn't find the executable.
19709    # The splitting of arguments from the executable at a space might have been incorrect,
19710    # since paths with space are more likely in Windows. Give it another try with the whole
19711    # argument.
19712    path="$complete"
19713    arguments="EOL"
19714    new_path="$path"
19715
19716  windows_path="$new_path"
19717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19718    unix_path=`$CYGPATH -u "$windows_path"`
19719    new_path="$unix_path"
19720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19722    new_path="$unix_path"
19723  fi
19724
19725
19726    new_path=`$WHICH "$new_path" 2> /dev/null`
19727    # bat and cmd files are not always considered executable in MSYS causing which
19728    # to not find them
19729    if test "x$new_path" = x \
19730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19732      new_path="$path"
19733
19734  windows_path="$new_path"
19735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19736    unix_path=`$CYGPATH -u "$windows_path"`
19737    new_path="$unix_path"
19738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19740    new_path="$unix_path"
19741  fi
19742
19743    fi
19744
19745    if test "x$new_path" = x; then
19746      # It's still not found. Now this is an unrecoverable error.
19747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19748$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19749      has_space=`$ECHO "$complete" | $GREP " "`
19750      if test "x$has_space" != x; then
19751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19753      fi
19754      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19755    fi
19756  fi
19757
19758  # Now new_path has a complete unix path to the binary
19759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19760    # Keep paths in /bin as-is, but remove trailing .exe if any
19761    new_path="${new_path/%.exe/}"
19762    # Do not save /bin paths to all_fixpath_prefixes!
19763  else
19764    # Not in mixed or Windows style, start by that.
19765    new_path=`cmd //c echo $new_path`
19766
19767  input_path="$new_path"
19768  # Check if we need to convert this using DOS-style short mode. If the path
19769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19770  # take no chances and rewrite it.
19771  # Note: m4 eats our [], so we need to use [ and ] instead.
19772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19773  if test "x$has_forbidden_chars" != x; then
19774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19776  fi
19777
19778    # Output is in $new_path
19779
19780  windows_path="$new_path"
19781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19782    unix_path=`$CYGPATH -u "$windows_path"`
19783    new_path="$unix_path"
19784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19786    new_path="$unix_path"
19787  fi
19788
19789    # remove trailing .exe if any
19790    new_path="${new_path/%.exe/}"
19791
19792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19794  fi
19795
19796    else
19797      # We're on a unix platform. Hooray! :)
19798      # First separate the path from the arguments. This will split at the first
19799      # space.
19800      complete="$FOUND_MAKE"
19801      path="${complete%% *}"
19802      tmp="$complete EOL"
19803      arguments="${tmp#* }"
19804
19805      # Cannot rely on the command "which" here since it doesn't always work.
19806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19807      if test -z "$is_absolute_path"; then
19808        # Path to executable is not absolute. Find it.
19809        IFS_save="$IFS"
19810        IFS=:
19811        for p in $PATH; do
19812          if test -f "$p/$path" && test -x "$p/$path"; then
19813            new_path="$p/$path"
19814            break
19815          fi
19816        done
19817        IFS="$IFS_save"
19818      else
19819        # This is an absolute path, we can use it without further modifications.
19820        new_path="$path"
19821      fi
19822
19823      if test "x$new_path" = x; then
19824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19825$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19826        has_space=`$ECHO "$complete" | $GREP " "`
19827        if test "x$has_space" != x; then
19828          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19830        fi
19831        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19832      fi
19833    fi
19834
19835    # Now join together the path and the arguments once again
19836    if test "x$arguments" != xEOL; then
19837      new_complete="$new_path ${arguments% *}"
19838    else
19839      new_complete="$new_path"
19840    fi
19841
19842    if test "x$complete" != "x$new_complete"; then
19843      FOUND_MAKE="$new_complete"
19844      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19845$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19846    fi
19847  fi
19848
19849        fi
19850      fi
19851    fi
19852  fi
19853
19854        fi
19855        PATH=$OLD_PATH
19856      fi
19857    fi
19858
19859    if test "x$FOUND_MAKE" = x; then
19860      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
19861    fi
19862
19863    else
19864      # If it succeeded, then it was overridden by the user. We will use it
19865      # for the tool.
19866
19867      # First remove it from the list of overridden variables, so we can test
19868      # for unknown variables in the end.
19869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19870
19871      # Check if we try to supply an empty value
19872      if test "x$MAKE" = x; then
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19874$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19876$as_echo_n "checking for MAKE... " >&6; }
19877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19878$as_echo "disabled" >&6; }
19879      else
19880        # Check if the provided tool contains a complete path.
19881        tool_specified="$MAKE"
19882        tool_basename="${tool_specified##*/}"
19883        if test "x$tool_basename" = "x$tool_specified"; then
19884          # A command without a complete path is provided, search $PATH.
19885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19886$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19887          # Extract the first word of "$tool_basename", so it can be a program name with args.
19888set dummy $tool_basename; ac_word=$2
19889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19890$as_echo_n "checking for $ac_word... " >&6; }
19891if ${ac_cv_path_MAKE+:} false; then :
19892  $as_echo_n "(cached) " >&6
19893else
19894  case $MAKE in
19895  [\\/]* | ?:[\\/]*)
19896  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19897  ;;
19898  *)
19899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19900for as_dir in $PATH
19901do
19902  IFS=$as_save_IFS
19903  test -z "$as_dir" && as_dir=.
19904    for ac_exec_ext in '' $ac_executable_extensions; do
19905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19906    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19908    break 2
19909  fi
19910done
19911  done
19912IFS=$as_save_IFS
19913
19914  ;;
19915esac
19916fi
19917MAKE=$ac_cv_path_MAKE
19918if test -n "$MAKE"; then
19919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19920$as_echo "$MAKE" >&6; }
19921else
19922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19923$as_echo "no" >&6; }
19924fi
19925
19926
19927          if test "x$MAKE" = x; then
19928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19929          fi
19930        else
19931          # Otherwise we believe it is a complete path. Use it as it is.
19932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19933$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19935$as_echo_n "checking for MAKE... " >&6; }
19936          if test ! -x "$tool_specified"; then
19937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19938$as_echo "not found" >&6; }
19939            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19940          fi
19941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19942$as_echo "$tool_specified" >&6; }
19943        fi
19944      fi
19945    fi
19946
19947    # If MAKE was set by user, verify the version
19948
19949  MAKE_CANDIDATE=""$MAKE""
19950  DESCRIPTION="user supplied MAKE=$MAKE"
19951
19952  # On Cygwin, we require a newer version of make than on other platforms
19953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19954    MAKE_VERSION_EXPR="-e 4\."
19955    MAKE_REQUIRED_VERSION="4.0"
19956   else
19957    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19958    MAKE_REQUIRED_VERSION="3.81"
19959  fi
19960
19961  if test "x$MAKE_CANDIDATE" != x; then
19962    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19963$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19964    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19965    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19966    if test "x$IS_GNU_MAKE" = x; then
19967      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19968$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19969    else
19970      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19971      if test "x$IS_MODERN_MAKE" = x; then
19972        { $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
19973$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;}
19974      else
19975        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19976          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19977            MAKE_EXPECTED_ENV='cygwin'
19978          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19979            MAKE_EXPECTED_ENV='msys'
19980          else
19981            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19982          fi
19983          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19984          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19985        else
19986          # Not relevant for non-Windows
19987          IS_MAKE_CORRECT_ENV=true
19988        fi
19989        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19990          { $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
19991$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;}
19992        else
19993          FOUND_MAKE=$MAKE_CANDIDATE
19994
19995  # Only process if variable expands to non-empty
19996
19997  if test "x$FOUND_MAKE" != x; then
19998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19999
20000  # First separate the path from the arguments. This will split at the first
20001  # space.
20002  complete="$FOUND_MAKE"
20003  path="${complete%% *}"
20004  tmp="$complete EOL"
20005  arguments="${tmp#* }"
20006
20007  # Input might be given as Windows format, start by converting to
20008  # unix format.
20009  new_path=`$CYGPATH -u "$path"`
20010
20011  # Now try to locate executable using which
20012  new_path=`$WHICH "$new_path" 2> /dev/null`
20013  # bat and cmd files are not always considered executable in cygwin causing which
20014  # to not find them
20015  if test "x$new_path" = x \
20016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20018    new_path=`$CYGPATH -u "$path"`
20019  fi
20020  if test "x$new_path" = x; then
20021    # Oops. Which didn't find the executable.
20022    # The splitting of arguments from the executable at a space might have been incorrect,
20023    # since paths with space are more likely in Windows. Give it another try with the whole
20024    # argument.
20025    path="$complete"
20026    arguments="EOL"
20027    new_path=`$CYGPATH -u "$path"`
20028    new_path=`$WHICH "$new_path" 2> /dev/null`
20029    # bat and cmd files are not always considered executable in cygwin causing which
20030    # to not find them
20031    if test "x$new_path" = x \
20032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20034      new_path=`$CYGPATH -u "$path"`
20035    fi
20036    if test "x$new_path" = x; then
20037      # It's still not found. Now this is an unrecoverable error.
20038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20040      has_space=`$ECHO "$complete" | $GREP " "`
20041      if test "x$has_space" != x; then
20042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20044      fi
20045      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20046    fi
20047  fi
20048
20049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20052  # "foo.exe" is OK but "foo" is an error.
20053  #
20054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20055  # It is also a way to make sure we got the proper file name for the real test later on.
20056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20057  if test "x$test_shortpath" = x; then
20058    # Short path failed, file does not exist as specified.
20059    # Try adding .exe or .cmd
20060    if test -f "${new_path}.exe"; then
20061      input_to_shortpath="${new_path}.exe"
20062    elif test -f "${new_path}.cmd"; then
20063      input_to_shortpath="${new_path}.cmd"
20064    else
20065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20066$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20069      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20070    fi
20071  else
20072    input_to_shortpath="$new_path"
20073  fi
20074
20075  # Call helper function which possibly converts this using DOS-style short mode.
20076  # If so, the updated path is stored in $new_path.
20077  new_path="$input_to_shortpath"
20078
20079  input_path="$input_to_shortpath"
20080  # Check if we need to convert this using DOS-style short mode. If the path
20081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20082  # take no chances and rewrite it.
20083  # Note: m4 eats our [], so we need to use [ and ] instead.
20084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20085  if test "x$has_forbidden_chars" != x; then
20086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20090      # Going to short mode and back again did indeed matter. Since short mode is
20091      # case insensitive, let's make it lowercase to improve readability.
20092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20093      # Now convert it back to Unix-style (cygpath)
20094      input_path=`$CYGPATH -u "$shortmode_path"`
20095      new_path="$input_path"
20096    fi
20097  fi
20098
20099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20100  if test "x$test_cygdrive_prefix" = x; then
20101    # As a simple fix, exclude /usr/bin since it's not a real path.
20102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20104      # a path prefixed by /cygdrive for fixpath to work.
20105      new_path="$CYGWIN_ROOT_PATH$input_path"
20106    fi
20107  fi
20108
20109  # remove trailing .exe if any
20110  new_path="${new_path/%.exe/}"
20111
20112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20113
20114  # First separate the path from the arguments. This will split at the first
20115  # space.
20116  complete="$FOUND_MAKE"
20117  path="${complete%% *}"
20118  tmp="$complete EOL"
20119  arguments="${tmp#* }"
20120
20121  # Input might be given as Windows format, start by converting to
20122  # unix format.
20123  new_path="$path"
20124
20125  windows_path="$new_path"
20126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20127    unix_path=`$CYGPATH -u "$windows_path"`
20128    new_path="$unix_path"
20129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20131    new_path="$unix_path"
20132  fi
20133
20134
20135  # Now try to locate executable using which
20136  new_path=`$WHICH "$new_path" 2> /dev/null`
20137
20138  if test "x$new_path" = x; then
20139    # Oops. Which didn't find the executable.
20140    # The splitting of arguments from the executable at a space might have been incorrect,
20141    # since paths with space are more likely in Windows. Give it another try with the whole
20142    # argument.
20143    path="$complete"
20144    arguments="EOL"
20145    new_path="$path"
20146
20147  windows_path="$new_path"
20148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20149    unix_path=`$CYGPATH -u "$windows_path"`
20150    new_path="$unix_path"
20151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20153    new_path="$unix_path"
20154  fi
20155
20156
20157    new_path=`$WHICH "$new_path" 2> /dev/null`
20158    # bat and cmd files are not always considered executable in MSYS causing which
20159    # to not find them
20160    if test "x$new_path" = x \
20161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20163      new_path="$path"
20164
20165  windows_path="$new_path"
20166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20167    unix_path=`$CYGPATH -u "$windows_path"`
20168    new_path="$unix_path"
20169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20171    new_path="$unix_path"
20172  fi
20173
20174    fi
20175
20176    if test "x$new_path" = x; then
20177      # It's still not found. Now this is an unrecoverable error.
20178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20179$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20180      has_space=`$ECHO "$complete" | $GREP " "`
20181      if test "x$has_space" != x; then
20182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20184      fi
20185      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20186    fi
20187  fi
20188
20189  # Now new_path has a complete unix path to the binary
20190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20191    # Keep paths in /bin as-is, but remove trailing .exe if any
20192    new_path="${new_path/%.exe/}"
20193    # Do not save /bin paths to all_fixpath_prefixes!
20194  else
20195    # Not in mixed or Windows style, start by that.
20196    new_path=`cmd //c echo $new_path`
20197
20198  input_path="$new_path"
20199  # Check if we need to convert this using DOS-style short mode. If the path
20200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20201  # take no chances and rewrite it.
20202  # Note: m4 eats our [], so we need to use [ and ] instead.
20203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20204  if test "x$has_forbidden_chars" != x; then
20205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20207  fi
20208
20209    # Output is in $new_path
20210
20211  windows_path="$new_path"
20212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20213    unix_path=`$CYGPATH -u "$windows_path"`
20214    new_path="$unix_path"
20215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20217    new_path="$unix_path"
20218  fi
20219
20220    # remove trailing .exe if any
20221    new_path="${new_path/%.exe/}"
20222
20223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20225  fi
20226
20227    else
20228      # We're on a unix platform. Hooray! :)
20229      # First separate the path from the arguments. This will split at the first
20230      # space.
20231      complete="$FOUND_MAKE"
20232      path="${complete%% *}"
20233      tmp="$complete EOL"
20234      arguments="${tmp#* }"
20235
20236      # Cannot rely on the command "which" here since it doesn't always work.
20237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20238      if test -z "$is_absolute_path"; then
20239        # Path to executable is not absolute. Find it.
20240        IFS_save="$IFS"
20241        IFS=:
20242        for p in $PATH; do
20243          if test -f "$p/$path" && test -x "$p/$path"; then
20244            new_path="$p/$path"
20245            break
20246          fi
20247        done
20248        IFS="$IFS_save"
20249      else
20250        # This is an absolute path, we can use it without further modifications.
20251        new_path="$path"
20252      fi
20253
20254      if test "x$new_path" = x; then
20255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20257        has_space=`$ECHO "$complete" | $GREP " "`
20258        if test "x$has_space" != x; then
20259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20261        fi
20262        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20263      fi
20264    fi
20265
20266    # Now join together the path and the arguments once again
20267    if test "x$arguments" != xEOL; then
20268      new_complete="$new_path ${arguments% *}"
20269    else
20270      new_complete="$new_path"
20271    fi
20272
20273    if test "x$complete" != "x$new_complete"; then
20274      FOUND_MAKE="$new_complete"
20275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20276$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20277    fi
20278  fi
20279
20280        fi
20281      fi
20282    fi
20283  fi
20284
20285    if test "x$FOUND_MAKE" = x; then
20286      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20287    fi
20288
20289  fi
20290
20291
20292  MAKE=$FOUND_MAKE
20293
20294  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20295$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20296
20297
20298  # Check if make supports the output sync option and if so, setup using it.
20299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20300$as_echo_n "checking if make --output-sync is supported... " >&6; }
20301  if $MAKE --version -O > /dev/null 2>&1; then
20302    OUTPUT_SYNC_SUPPORTED=true
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20304$as_echo "yes" >&6; }
20305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20306$as_echo_n "checking for output-sync value... " >&6; }
20307
20308# Check whether --with-output-sync was given.
20309if test "${with_output_sync+set}" = set; then :
20310  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20311fi
20312
20313    if test "x$OUTPUT_SYNC" = "x"; then
20314      OUTPUT_SYNC=none
20315    fi
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20317$as_echo "$OUTPUT_SYNC" >&6; }
20318    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20319      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20320    fi
20321  else
20322    OUTPUT_SYNC_SUPPORTED=false
20323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20324$as_echo "no" >&6; }
20325  fi
20326
20327
20328
20329
20330
20331
20332  # Test if find supports -delete
20333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20334$as_echo_n "checking if find supports -delete... " >&6; }
20335  FIND_DELETE="-delete"
20336
20337  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20338
20339  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20340
20341  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20342  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20343    # No, it does not.
20344    rm $DELETEDIR/TestIfFindSupportsDelete
20345    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20346      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20347      FIND_DELETE="-print | xargs rm"
20348    else
20349      FIND_DELETE="-exec rm \{\} \+"
20350    fi
20351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20352$as_echo "no" >&6; }
20353  else
20354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20355$as_echo "yes" >&6; }
20356  fi
20357  rmdir $DELETEDIR
20358
20359
20360
20361  # These tools might not be installed by default,
20362  # need hint on how to install them.
20363
20364
20365
20366  # Publish this variable in the help.
20367
20368
20369  if [ -z "${UNZIP+x}" ]; then
20370    # The variable is not set by user, try to locate tool using the code snippet
20371    for ac_prog in unzip
20372do
20373  # Extract the first word of "$ac_prog", so it can be a program name with args.
20374set dummy $ac_prog; ac_word=$2
20375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20376$as_echo_n "checking for $ac_word... " >&6; }
20377if ${ac_cv_path_UNZIP+:} false; then :
20378  $as_echo_n "(cached) " >&6
20379else
20380  case $UNZIP in
20381  [\\/]* | ?:[\\/]*)
20382  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20383  ;;
20384  *)
20385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20386for as_dir in $PATH
20387do
20388  IFS=$as_save_IFS
20389  test -z "$as_dir" && as_dir=.
20390    for ac_exec_ext in '' $ac_executable_extensions; do
20391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20392    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20394    break 2
20395  fi
20396done
20397  done
20398IFS=$as_save_IFS
20399
20400  ;;
20401esac
20402fi
20403UNZIP=$ac_cv_path_UNZIP
20404if test -n "$UNZIP"; then
20405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20406$as_echo "$UNZIP" >&6; }
20407else
20408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20409$as_echo "no" >&6; }
20410fi
20411
20412
20413  test -n "$UNZIP" && break
20414done
20415
20416  else
20417    # The variable is set, but is it from the command line or the environment?
20418
20419    # Try to remove the string !UNZIP! from our list.
20420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20422      # If it failed, the variable was not from the command line. Ignore it,
20423      # but warn the user (except for BASH, which is always set by the calling BASH).
20424      if test "xUNZIP" != xBASH; then
20425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20426$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20427      fi
20428      # Try to locate tool using the code snippet
20429      for ac_prog in unzip
20430do
20431  # Extract the first word of "$ac_prog", so it can be a program name with args.
20432set dummy $ac_prog; ac_word=$2
20433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20434$as_echo_n "checking for $ac_word... " >&6; }
20435if ${ac_cv_path_UNZIP+:} false; then :
20436  $as_echo_n "(cached) " >&6
20437else
20438  case $UNZIP in
20439  [\\/]* | ?:[\\/]*)
20440  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20441  ;;
20442  *)
20443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20444for as_dir in $PATH
20445do
20446  IFS=$as_save_IFS
20447  test -z "$as_dir" && as_dir=.
20448    for ac_exec_ext in '' $ac_executable_extensions; do
20449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20450    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20452    break 2
20453  fi
20454done
20455  done
20456IFS=$as_save_IFS
20457
20458  ;;
20459esac
20460fi
20461UNZIP=$ac_cv_path_UNZIP
20462if test -n "$UNZIP"; then
20463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20464$as_echo "$UNZIP" >&6; }
20465else
20466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20467$as_echo "no" >&6; }
20468fi
20469
20470
20471  test -n "$UNZIP" && break
20472done
20473
20474    else
20475      # If it succeeded, then it was overridden by the user. We will use it
20476      # for the tool.
20477
20478      # First remove it from the list of overridden variables, so we can test
20479      # for unknown variables in the end.
20480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20481
20482      # Check if we try to supply an empty value
20483      if test "x$UNZIP" = x; then
20484        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20485$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20487$as_echo_n "checking for UNZIP... " >&6; }
20488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20489$as_echo "disabled" >&6; }
20490      else
20491        # Check if the provided tool contains a complete path.
20492        tool_specified="$UNZIP"
20493        tool_basename="${tool_specified##*/}"
20494        if test "x$tool_basename" = "x$tool_specified"; then
20495          # A command without a complete path is provided, search $PATH.
20496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20497$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20498          # Extract the first word of "$tool_basename", so it can be a program name with args.
20499set dummy $tool_basename; ac_word=$2
20500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20501$as_echo_n "checking for $ac_word... " >&6; }
20502if ${ac_cv_path_UNZIP+:} false; then :
20503  $as_echo_n "(cached) " >&6
20504else
20505  case $UNZIP in
20506  [\\/]* | ?:[\\/]*)
20507  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20508  ;;
20509  *)
20510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20511for as_dir in $PATH
20512do
20513  IFS=$as_save_IFS
20514  test -z "$as_dir" && as_dir=.
20515    for ac_exec_ext in '' $ac_executable_extensions; do
20516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20517    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20519    break 2
20520  fi
20521done
20522  done
20523IFS=$as_save_IFS
20524
20525  ;;
20526esac
20527fi
20528UNZIP=$ac_cv_path_UNZIP
20529if test -n "$UNZIP"; then
20530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20531$as_echo "$UNZIP" >&6; }
20532else
20533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20534$as_echo "no" >&6; }
20535fi
20536
20537
20538          if test "x$UNZIP" = x; then
20539            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20540          fi
20541        else
20542          # Otherwise we believe it is a complete path. Use it as it is.
20543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20544$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20545          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20546$as_echo_n "checking for UNZIP... " >&6; }
20547          if test ! -x "$tool_specified"; then
20548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20549$as_echo "not found" >&6; }
20550            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20551          fi
20552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20553$as_echo "$tool_specified" >&6; }
20554        fi
20555      fi
20556    fi
20557
20558  fi
20559
20560
20561
20562  if test "x$UNZIP" = x; then
20563    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20564  fi
20565
20566
20567
20568
20569
20570  # Publish this variable in the help.
20571
20572
20573  if [ -z "${ZIP+x}" ]; then
20574    # The variable is not set by user, try to locate tool using the code snippet
20575    for ac_prog in zip
20576do
20577  # Extract the first word of "$ac_prog", so it can be a program name with args.
20578set dummy $ac_prog; 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_ZIP+:} false; then :
20582  $as_echo_n "(cached) " >&6
20583else
20584  case $ZIP in
20585  [\\/]* | ?:[\\/]*)
20586  ac_cv_path_ZIP="$ZIP" # 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_ZIP="$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
20607ZIP=$ac_cv_path_ZIP
20608if test -n "$ZIP"; then
20609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20610$as_echo "$ZIP" >&6; }
20611else
20612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20613$as_echo "no" >&6; }
20614fi
20615
20616
20617  test -n "$ZIP" && break
20618done
20619
20620  else
20621    # The variable is set, but is it from the command line or the environment?
20622
20623    # Try to remove the string !ZIP! from our list.
20624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20626      # If it failed, the variable was not from the command line. Ignore it,
20627      # but warn the user (except for BASH, which is always set by the calling BASH).
20628      if test "xZIP" != xBASH; then
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20630$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20631      fi
20632      # Try to locate tool using the code snippet
20633      for ac_prog in zip
20634do
20635  # Extract the first word of "$ac_prog", so it can be a program name with args.
20636set dummy $ac_prog; ac_word=$2
20637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20638$as_echo_n "checking for $ac_word... " >&6; }
20639if ${ac_cv_path_ZIP+:} false; then :
20640  $as_echo_n "(cached) " >&6
20641else
20642  case $ZIP in
20643  [\\/]* | ?:[\\/]*)
20644  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20645  ;;
20646  *)
20647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20648for as_dir in $PATH
20649do
20650  IFS=$as_save_IFS
20651  test -z "$as_dir" && as_dir=.
20652    for ac_exec_ext in '' $ac_executable_extensions; do
20653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20654    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20656    break 2
20657  fi
20658done
20659  done
20660IFS=$as_save_IFS
20661
20662  ;;
20663esac
20664fi
20665ZIP=$ac_cv_path_ZIP
20666if test -n "$ZIP"; then
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20668$as_echo "$ZIP" >&6; }
20669else
20670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20671$as_echo "no" >&6; }
20672fi
20673
20674
20675  test -n "$ZIP" && break
20676done
20677
20678    else
20679      # If it succeeded, then it was overridden by the user. We will use it
20680      # for the tool.
20681
20682      # First remove it from the list of overridden variables, so we can test
20683      # for unknown variables in the end.
20684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20685
20686      # Check if we try to supply an empty value
20687      if test "x$ZIP" = x; then
20688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20689$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20691$as_echo_n "checking for ZIP... " >&6; }
20692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20693$as_echo "disabled" >&6; }
20694      else
20695        # Check if the provided tool contains a complete path.
20696        tool_specified="$ZIP"
20697        tool_basename="${tool_specified##*/}"
20698        if test "x$tool_basename" = "x$tool_specified"; then
20699          # A command without a complete path is provided, search $PATH.
20700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20701$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20702          # Extract the first word of "$tool_basename", so it can be a program name with args.
20703set dummy $tool_basename; ac_word=$2
20704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20705$as_echo_n "checking for $ac_word... " >&6; }
20706if ${ac_cv_path_ZIP+:} false; then :
20707  $as_echo_n "(cached) " >&6
20708else
20709  case $ZIP in
20710  [\\/]* | ?:[\\/]*)
20711  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20712  ;;
20713  *)
20714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20715for as_dir in $PATH
20716do
20717  IFS=$as_save_IFS
20718  test -z "$as_dir" && as_dir=.
20719    for ac_exec_ext in '' $ac_executable_extensions; do
20720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20721    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20723    break 2
20724  fi
20725done
20726  done
20727IFS=$as_save_IFS
20728
20729  ;;
20730esac
20731fi
20732ZIP=$ac_cv_path_ZIP
20733if test -n "$ZIP"; then
20734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20735$as_echo "$ZIP" >&6; }
20736else
20737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20738$as_echo "no" >&6; }
20739fi
20740
20741
20742          if test "x$ZIP" = x; then
20743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20744          fi
20745        else
20746          # Otherwise we believe it is a complete path. Use it as it is.
20747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20748$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20750$as_echo_n "checking for ZIP... " >&6; }
20751          if test ! -x "$tool_specified"; then
20752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20753$as_echo "not found" >&6; }
20754            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20755          fi
20756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20757$as_echo "$tool_specified" >&6; }
20758        fi
20759      fi
20760    fi
20761
20762  fi
20763
20764
20765
20766  if test "x$ZIP" = x; then
20767    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20768  fi
20769
20770
20771
20772  # Non-required basic tools
20773
20774
20775
20776  # Publish this variable in the help.
20777
20778
20779  if [ -z "${LDD+x}" ]; then
20780    # The variable is not set by user, try to locate tool using the code snippet
20781    for ac_prog in ldd
20782do
20783  # Extract the first word of "$ac_prog", so it can be a program name with args.
20784set dummy $ac_prog; ac_word=$2
20785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20786$as_echo_n "checking for $ac_word... " >&6; }
20787if ${ac_cv_path_LDD+:} false; then :
20788  $as_echo_n "(cached) " >&6
20789else
20790  case $LDD in
20791  [\\/]* | ?:[\\/]*)
20792  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20793  ;;
20794  *)
20795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20796for as_dir in $PATH
20797do
20798  IFS=$as_save_IFS
20799  test -z "$as_dir" && as_dir=.
20800    for ac_exec_ext in '' $ac_executable_extensions; do
20801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20802    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20804    break 2
20805  fi
20806done
20807  done
20808IFS=$as_save_IFS
20809
20810  ;;
20811esac
20812fi
20813LDD=$ac_cv_path_LDD
20814if test -n "$LDD"; then
20815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20816$as_echo "$LDD" >&6; }
20817else
20818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20819$as_echo "no" >&6; }
20820fi
20821
20822
20823  test -n "$LDD" && break
20824done
20825
20826  else
20827    # The variable is set, but is it from the command line or the environment?
20828
20829    # Try to remove the string !LDD! from our list.
20830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20832      # If it failed, the variable was not from the command line. Ignore it,
20833      # but warn the user (except for BASH, which is always set by the calling BASH).
20834      if test "xLDD" != xBASH; then
20835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20836$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20837      fi
20838      # Try to locate tool using the code snippet
20839      for ac_prog in ldd
20840do
20841  # Extract the first word of "$ac_prog", so it can be a program name with args.
20842set dummy $ac_prog; ac_word=$2
20843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20844$as_echo_n "checking for $ac_word... " >&6; }
20845if ${ac_cv_path_LDD+:} false; then :
20846  $as_echo_n "(cached) " >&6
20847else
20848  case $LDD in
20849  [\\/]* | ?:[\\/]*)
20850  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20851  ;;
20852  *)
20853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20854for as_dir in $PATH
20855do
20856  IFS=$as_save_IFS
20857  test -z "$as_dir" && as_dir=.
20858    for ac_exec_ext in '' $ac_executable_extensions; do
20859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20860    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20862    break 2
20863  fi
20864done
20865  done
20866IFS=$as_save_IFS
20867
20868  ;;
20869esac
20870fi
20871LDD=$ac_cv_path_LDD
20872if test -n "$LDD"; then
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20874$as_echo "$LDD" >&6; }
20875else
20876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20877$as_echo "no" >&6; }
20878fi
20879
20880
20881  test -n "$LDD" && break
20882done
20883
20884    else
20885      # If it succeeded, then it was overridden by the user. We will use it
20886      # for the tool.
20887
20888      # First remove it from the list of overridden variables, so we can test
20889      # for unknown variables in the end.
20890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20891
20892      # Check if we try to supply an empty value
20893      if test "x$LDD" = x; then
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20895$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20897$as_echo_n "checking for LDD... " >&6; }
20898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20899$as_echo "disabled" >&6; }
20900      else
20901        # Check if the provided tool contains a complete path.
20902        tool_specified="$LDD"
20903        tool_basename="${tool_specified##*/}"
20904        if test "x$tool_basename" = "x$tool_specified"; then
20905          # A command without a complete path is provided, search $PATH.
20906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20907$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20908          # Extract the first word of "$tool_basename", so it can be a program name with args.
20909set dummy $tool_basename; ac_word=$2
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20911$as_echo_n "checking for $ac_word... " >&6; }
20912if ${ac_cv_path_LDD+:} false; then :
20913  $as_echo_n "(cached) " >&6
20914else
20915  case $LDD in
20916  [\\/]* | ?:[\\/]*)
20917  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20918  ;;
20919  *)
20920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20921for as_dir in $PATH
20922do
20923  IFS=$as_save_IFS
20924  test -z "$as_dir" && as_dir=.
20925    for ac_exec_ext in '' $ac_executable_extensions; do
20926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20927    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20929    break 2
20930  fi
20931done
20932  done
20933IFS=$as_save_IFS
20934
20935  ;;
20936esac
20937fi
20938LDD=$ac_cv_path_LDD
20939if test -n "$LDD"; then
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20941$as_echo "$LDD" >&6; }
20942else
20943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20944$as_echo "no" >&6; }
20945fi
20946
20947
20948          if test "x$LDD" = x; then
20949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20950          fi
20951        else
20952          # Otherwise we believe it is a complete path. Use it as it is.
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20954$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20956$as_echo_n "checking for LDD... " >&6; }
20957          if test ! -x "$tool_specified"; then
20958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20959$as_echo "not found" >&6; }
20960            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20961          fi
20962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20963$as_echo "$tool_specified" >&6; }
20964        fi
20965      fi
20966    fi
20967
20968  fi
20969
20970
20971  if test "x$LDD" = "x"; then
20972    # List shared lib dependencies is used for
20973    # debug output and checking for forbidden dependencies.
20974    # We can build without it.
20975    LDD="true"
20976  fi
20977
20978
20979  # Publish this variable in the help.
20980
20981
20982  if [ -z "${OTOOL+x}" ]; then
20983    # The variable is not set by user, try to locate tool using the code snippet
20984    for ac_prog in otool
20985do
20986  # Extract the first word of "$ac_prog", so it can be a program name with args.
20987set dummy $ac_prog; ac_word=$2
20988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20989$as_echo_n "checking for $ac_word... " >&6; }
20990if ${ac_cv_path_OTOOL+:} false; then :
20991  $as_echo_n "(cached) " >&6
20992else
20993  case $OTOOL in
20994  [\\/]* | ?:[\\/]*)
20995  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20996  ;;
20997  *)
20998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20999for as_dir in $PATH
21000do
21001  IFS=$as_save_IFS
21002  test -z "$as_dir" && as_dir=.
21003    for ac_exec_ext in '' $ac_executable_extensions; do
21004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21005    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21007    break 2
21008  fi
21009done
21010  done
21011IFS=$as_save_IFS
21012
21013  ;;
21014esac
21015fi
21016OTOOL=$ac_cv_path_OTOOL
21017if test -n "$OTOOL"; then
21018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21019$as_echo "$OTOOL" >&6; }
21020else
21021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21022$as_echo "no" >&6; }
21023fi
21024
21025
21026  test -n "$OTOOL" && break
21027done
21028
21029  else
21030    # The variable is set, but is it from the command line or the environment?
21031
21032    # Try to remove the string !OTOOL! from our list.
21033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21035      # If it failed, the variable was not from the command line. Ignore it,
21036      # but warn the user (except for BASH, which is always set by the calling BASH).
21037      if test "xOTOOL" != xBASH; then
21038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21039$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21040      fi
21041      # Try to locate tool using the code snippet
21042      for ac_prog in otool
21043do
21044  # Extract the first word of "$ac_prog", so it can be a program name with args.
21045set dummy $ac_prog; ac_word=$2
21046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21047$as_echo_n "checking for $ac_word... " >&6; }
21048if ${ac_cv_path_OTOOL+:} false; then :
21049  $as_echo_n "(cached) " >&6
21050else
21051  case $OTOOL in
21052  [\\/]* | ?:[\\/]*)
21053  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21054  ;;
21055  *)
21056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21057for as_dir in $PATH
21058do
21059  IFS=$as_save_IFS
21060  test -z "$as_dir" && as_dir=.
21061    for ac_exec_ext in '' $ac_executable_extensions; do
21062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21063    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21065    break 2
21066  fi
21067done
21068  done
21069IFS=$as_save_IFS
21070
21071  ;;
21072esac
21073fi
21074OTOOL=$ac_cv_path_OTOOL
21075if test -n "$OTOOL"; then
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21077$as_echo "$OTOOL" >&6; }
21078else
21079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21080$as_echo "no" >&6; }
21081fi
21082
21083
21084  test -n "$OTOOL" && break
21085done
21086
21087    else
21088      # If it succeeded, then it was overridden by the user. We will use it
21089      # for the tool.
21090
21091      # First remove it from the list of overridden variables, so we can test
21092      # for unknown variables in the end.
21093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21094
21095      # Check if we try to supply an empty value
21096      if test "x$OTOOL" = x; then
21097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21098$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21100$as_echo_n "checking for OTOOL... " >&6; }
21101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21102$as_echo "disabled" >&6; }
21103      else
21104        # Check if the provided tool contains a complete path.
21105        tool_specified="$OTOOL"
21106        tool_basename="${tool_specified##*/}"
21107        if test "x$tool_basename" = "x$tool_specified"; then
21108          # A command without a complete path is provided, search $PATH.
21109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21110$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21111          # Extract the first word of "$tool_basename", so it can be a program name with args.
21112set dummy $tool_basename; ac_word=$2
21113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21114$as_echo_n "checking for $ac_word... " >&6; }
21115if ${ac_cv_path_OTOOL+:} false; then :
21116  $as_echo_n "(cached) " >&6
21117else
21118  case $OTOOL in
21119  [\\/]* | ?:[\\/]*)
21120  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21121  ;;
21122  *)
21123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21124for as_dir in $PATH
21125do
21126  IFS=$as_save_IFS
21127  test -z "$as_dir" && as_dir=.
21128    for ac_exec_ext in '' $ac_executable_extensions; do
21129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21130    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21132    break 2
21133  fi
21134done
21135  done
21136IFS=$as_save_IFS
21137
21138  ;;
21139esac
21140fi
21141OTOOL=$ac_cv_path_OTOOL
21142if test -n "$OTOOL"; then
21143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21144$as_echo "$OTOOL" >&6; }
21145else
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21147$as_echo "no" >&6; }
21148fi
21149
21150
21151          if test "x$OTOOL" = x; then
21152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21153          fi
21154        else
21155          # Otherwise we believe it is a complete path. Use it as it is.
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21157$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21159$as_echo_n "checking for OTOOL... " >&6; }
21160          if test ! -x "$tool_specified"; then
21161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21162$as_echo "not found" >&6; }
21163            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21164          fi
21165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21166$as_echo "$tool_specified" >&6; }
21167        fi
21168      fi
21169    fi
21170
21171  fi
21172
21173
21174  if test "x$OTOOL" = "x"; then
21175    OTOOL="true"
21176  fi
21177
21178
21179  # Publish this variable in the help.
21180
21181
21182  if [ -z "${READELF+x}" ]; then
21183    # The variable is not set by user, try to locate tool using the code snippet
21184    for ac_prog in greadelf readelf
21185do
21186  # Extract the first word of "$ac_prog", so it can be a program name with args.
21187set dummy $ac_prog; ac_word=$2
21188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21189$as_echo_n "checking for $ac_word... " >&6; }
21190if ${ac_cv_path_READELF+:} false; then :
21191  $as_echo_n "(cached) " >&6
21192else
21193  case $READELF in
21194  [\\/]* | ?:[\\/]*)
21195  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21196  ;;
21197  *)
21198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21199for as_dir in $PATH
21200do
21201  IFS=$as_save_IFS
21202  test -z "$as_dir" && as_dir=.
21203    for ac_exec_ext in '' $ac_executable_extensions; do
21204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21205    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21207    break 2
21208  fi
21209done
21210  done
21211IFS=$as_save_IFS
21212
21213  ;;
21214esac
21215fi
21216READELF=$ac_cv_path_READELF
21217if test -n "$READELF"; then
21218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21219$as_echo "$READELF" >&6; }
21220else
21221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21222$as_echo "no" >&6; }
21223fi
21224
21225
21226  test -n "$READELF" && break
21227done
21228
21229  else
21230    # The variable is set, but is it from the command line or the environment?
21231
21232    # Try to remove the string !READELF! from our list.
21233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21235      # If it failed, the variable was not from the command line. Ignore it,
21236      # but warn the user (except for BASH, which is always set by the calling BASH).
21237      if test "xREADELF" != xBASH; then
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21239$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21240      fi
21241      # Try to locate tool using the code snippet
21242      for ac_prog in greadelf readelf
21243do
21244  # Extract the first word of "$ac_prog", so it can be a program name with args.
21245set dummy $ac_prog; ac_word=$2
21246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21247$as_echo_n "checking for $ac_word... " >&6; }
21248if ${ac_cv_path_READELF+:} false; then :
21249  $as_echo_n "(cached) " >&6
21250else
21251  case $READELF in
21252  [\\/]* | ?:[\\/]*)
21253  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21254  ;;
21255  *)
21256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21257for as_dir in $PATH
21258do
21259  IFS=$as_save_IFS
21260  test -z "$as_dir" && as_dir=.
21261    for ac_exec_ext in '' $ac_executable_extensions; do
21262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21263    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21265    break 2
21266  fi
21267done
21268  done
21269IFS=$as_save_IFS
21270
21271  ;;
21272esac
21273fi
21274READELF=$ac_cv_path_READELF
21275if test -n "$READELF"; then
21276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21277$as_echo "$READELF" >&6; }
21278else
21279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21280$as_echo "no" >&6; }
21281fi
21282
21283
21284  test -n "$READELF" && break
21285done
21286
21287    else
21288      # If it succeeded, then it was overridden by the user. We will use it
21289      # for the tool.
21290
21291      # First remove it from the list of overridden variables, so we can test
21292      # for unknown variables in the end.
21293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21294
21295      # Check if we try to supply an empty value
21296      if test "x$READELF" = x; then
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21298$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21300$as_echo_n "checking for READELF... " >&6; }
21301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21302$as_echo "disabled" >&6; }
21303      else
21304        # Check if the provided tool contains a complete path.
21305        tool_specified="$READELF"
21306        tool_basename="${tool_specified##*/}"
21307        if test "x$tool_basename" = "x$tool_specified"; then
21308          # A command without a complete path is provided, search $PATH.
21309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21310$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21311          # Extract the first word of "$tool_basename", so it can be a program name with args.
21312set dummy $tool_basename; ac_word=$2
21313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21314$as_echo_n "checking for $ac_word... " >&6; }
21315if ${ac_cv_path_READELF+:} false; then :
21316  $as_echo_n "(cached) " >&6
21317else
21318  case $READELF in
21319  [\\/]* | ?:[\\/]*)
21320  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21321  ;;
21322  *)
21323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21324for as_dir in $PATH
21325do
21326  IFS=$as_save_IFS
21327  test -z "$as_dir" && as_dir=.
21328    for ac_exec_ext in '' $ac_executable_extensions; do
21329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21330    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21332    break 2
21333  fi
21334done
21335  done
21336IFS=$as_save_IFS
21337
21338  ;;
21339esac
21340fi
21341READELF=$ac_cv_path_READELF
21342if test -n "$READELF"; then
21343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21344$as_echo "$READELF" >&6; }
21345else
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21347$as_echo "no" >&6; }
21348fi
21349
21350
21351          if test "x$READELF" = x; then
21352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21353          fi
21354        else
21355          # Otherwise we believe it is a complete path. Use it as it is.
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21357$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21359$as_echo_n "checking for READELF... " >&6; }
21360          if test ! -x "$tool_specified"; then
21361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21362$as_echo "not found" >&6; }
21363            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21364          fi
21365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21366$as_echo "$tool_specified" >&6; }
21367        fi
21368      fi
21369    fi
21370
21371  fi
21372
21373
21374
21375
21376  # Publish this variable in the help.
21377
21378
21379  if [ -z "${HG+x}" ]; then
21380    # The variable is not set by user, try to locate tool using the code snippet
21381    for ac_prog in hg
21382do
21383  # Extract the first word of "$ac_prog", so it can be a program name with args.
21384set dummy $ac_prog; ac_word=$2
21385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21386$as_echo_n "checking for $ac_word... " >&6; }
21387if ${ac_cv_path_HG+:} false; then :
21388  $as_echo_n "(cached) " >&6
21389else
21390  case $HG in
21391  [\\/]* | ?:[\\/]*)
21392  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21393  ;;
21394  *)
21395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21396for as_dir in $PATH
21397do
21398  IFS=$as_save_IFS
21399  test -z "$as_dir" && as_dir=.
21400    for ac_exec_ext in '' $ac_executable_extensions; do
21401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21402    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21404    break 2
21405  fi
21406done
21407  done
21408IFS=$as_save_IFS
21409
21410  ;;
21411esac
21412fi
21413HG=$ac_cv_path_HG
21414if test -n "$HG"; then
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21416$as_echo "$HG" >&6; }
21417else
21418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21419$as_echo "no" >&6; }
21420fi
21421
21422
21423  test -n "$HG" && break
21424done
21425
21426  else
21427    # The variable is set, but is it from the command line or the environment?
21428
21429    # Try to remove the string !HG! from our list.
21430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21432      # If it failed, the variable was not from the command line. Ignore it,
21433      # but warn the user (except for BASH, which is always set by the calling BASH).
21434      if test "xHG" != xBASH; then
21435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21436$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21437      fi
21438      # Try to locate tool using the code snippet
21439      for ac_prog in hg
21440do
21441  # Extract the first word of "$ac_prog", so it can be a program name with args.
21442set dummy $ac_prog; ac_word=$2
21443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21444$as_echo_n "checking for $ac_word... " >&6; }
21445if ${ac_cv_path_HG+:} false; then :
21446  $as_echo_n "(cached) " >&6
21447else
21448  case $HG in
21449  [\\/]* | ?:[\\/]*)
21450  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21451  ;;
21452  *)
21453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21454for as_dir in $PATH
21455do
21456  IFS=$as_save_IFS
21457  test -z "$as_dir" && as_dir=.
21458    for ac_exec_ext in '' $ac_executable_extensions; do
21459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21460    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21462    break 2
21463  fi
21464done
21465  done
21466IFS=$as_save_IFS
21467
21468  ;;
21469esac
21470fi
21471HG=$ac_cv_path_HG
21472if test -n "$HG"; then
21473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21474$as_echo "$HG" >&6; }
21475else
21476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21477$as_echo "no" >&6; }
21478fi
21479
21480
21481  test -n "$HG" && break
21482done
21483
21484    else
21485      # If it succeeded, then it was overridden by the user. We will use it
21486      # for the tool.
21487
21488      # First remove it from the list of overridden variables, so we can test
21489      # for unknown variables in the end.
21490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21491
21492      # Check if we try to supply an empty value
21493      if test "x$HG" = x; then
21494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21495$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21497$as_echo_n "checking for HG... " >&6; }
21498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21499$as_echo "disabled" >&6; }
21500      else
21501        # Check if the provided tool contains a complete path.
21502        tool_specified="$HG"
21503        tool_basename="${tool_specified##*/}"
21504        if test "x$tool_basename" = "x$tool_specified"; then
21505          # A command without a complete path is provided, search $PATH.
21506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21507$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21508          # Extract the first word of "$tool_basename", so it can be a program name with args.
21509set dummy $tool_basename; ac_word=$2
21510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21511$as_echo_n "checking for $ac_word... " >&6; }
21512if ${ac_cv_path_HG+:} false; then :
21513  $as_echo_n "(cached) " >&6
21514else
21515  case $HG in
21516  [\\/]* | ?:[\\/]*)
21517  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21518  ;;
21519  *)
21520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21521for as_dir in $PATH
21522do
21523  IFS=$as_save_IFS
21524  test -z "$as_dir" && as_dir=.
21525    for ac_exec_ext in '' $ac_executable_extensions; do
21526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21527    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21529    break 2
21530  fi
21531done
21532  done
21533IFS=$as_save_IFS
21534
21535  ;;
21536esac
21537fi
21538HG=$ac_cv_path_HG
21539if test -n "$HG"; then
21540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21541$as_echo "$HG" >&6; }
21542else
21543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21544$as_echo "no" >&6; }
21545fi
21546
21547
21548          if test "x$HG" = x; then
21549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21550          fi
21551        else
21552          # Otherwise we believe it is a complete path. Use it as it is.
21553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21554$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21556$as_echo_n "checking for HG... " >&6; }
21557          if test ! -x "$tool_specified"; then
21558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21559$as_echo "not found" >&6; }
21560            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21561          fi
21562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21563$as_echo "$tool_specified" >&6; }
21564        fi
21565      fi
21566    fi
21567
21568  fi
21569
21570
21571
21572
21573  # Publish this variable in the help.
21574
21575
21576  if [ -z "${STAT+x}" ]; then
21577    # The variable is not set by user, try to locate tool using the code snippet
21578    for ac_prog in stat
21579do
21580  # Extract the first word of "$ac_prog", so it can be a program name with args.
21581set dummy $ac_prog; ac_word=$2
21582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21583$as_echo_n "checking for $ac_word... " >&6; }
21584if ${ac_cv_path_STAT+:} false; then :
21585  $as_echo_n "(cached) " >&6
21586else
21587  case $STAT in
21588  [\\/]* | ?:[\\/]*)
21589  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21590  ;;
21591  *)
21592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21593for as_dir in $PATH
21594do
21595  IFS=$as_save_IFS
21596  test -z "$as_dir" && as_dir=.
21597    for ac_exec_ext in '' $ac_executable_extensions; do
21598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21599    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21601    break 2
21602  fi
21603done
21604  done
21605IFS=$as_save_IFS
21606
21607  ;;
21608esac
21609fi
21610STAT=$ac_cv_path_STAT
21611if test -n "$STAT"; then
21612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21613$as_echo "$STAT" >&6; }
21614else
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21616$as_echo "no" >&6; }
21617fi
21618
21619
21620  test -n "$STAT" && break
21621done
21622
21623  else
21624    # The variable is set, but is it from the command line or the environment?
21625
21626    # Try to remove the string !STAT! from our list.
21627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21629      # If it failed, the variable was not from the command line. Ignore it,
21630      # but warn the user (except for BASH, which is always set by the calling BASH).
21631      if test "xSTAT" != xBASH; then
21632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21633$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21634      fi
21635      # Try to locate tool using the code snippet
21636      for ac_prog in stat
21637do
21638  # Extract the first word of "$ac_prog", so it can be a program name with args.
21639set dummy $ac_prog; ac_word=$2
21640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21641$as_echo_n "checking for $ac_word... " >&6; }
21642if ${ac_cv_path_STAT+:} false; then :
21643  $as_echo_n "(cached) " >&6
21644else
21645  case $STAT in
21646  [\\/]* | ?:[\\/]*)
21647  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21648  ;;
21649  *)
21650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21651for as_dir in $PATH
21652do
21653  IFS=$as_save_IFS
21654  test -z "$as_dir" && as_dir=.
21655    for ac_exec_ext in '' $ac_executable_extensions; do
21656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21657    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21659    break 2
21660  fi
21661done
21662  done
21663IFS=$as_save_IFS
21664
21665  ;;
21666esac
21667fi
21668STAT=$ac_cv_path_STAT
21669if test -n "$STAT"; then
21670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21671$as_echo "$STAT" >&6; }
21672else
21673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21674$as_echo "no" >&6; }
21675fi
21676
21677
21678  test -n "$STAT" && break
21679done
21680
21681    else
21682      # If it succeeded, then it was overridden by the user. We will use it
21683      # for the tool.
21684
21685      # First remove it from the list of overridden variables, so we can test
21686      # for unknown variables in the end.
21687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21688
21689      # Check if we try to supply an empty value
21690      if test "x$STAT" = x; then
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21692$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21694$as_echo_n "checking for STAT... " >&6; }
21695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21696$as_echo "disabled" >&6; }
21697      else
21698        # Check if the provided tool contains a complete path.
21699        tool_specified="$STAT"
21700        tool_basename="${tool_specified##*/}"
21701        if test "x$tool_basename" = "x$tool_specified"; then
21702          # A command without a complete path is provided, search $PATH.
21703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21704$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21705          # Extract the first word of "$tool_basename", so it can be a program name with args.
21706set dummy $tool_basename; ac_word=$2
21707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21708$as_echo_n "checking for $ac_word... " >&6; }
21709if ${ac_cv_path_STAT+:} false; then :
21710  $as_echo_n "(cached) " >&6
21711else
21712  case $STAT in
21713  [\\/]* | ?:[\\/]*)
21714  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21715  ;;
21716  *)
21717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21718for as_dir in $PATH
21719do
21720  IFS=$as_save_IFS
21721  test -z "$as_dir" && as_dir=.
21722    for ac_exec_ext in '' $ac_executable_extensions; do
21723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21724    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21726    break 2
21727  fi
21728done
21729  done
21730IFS=$as_save_IFS
21731
21732  ;;
21733esac
21734fi
21735STAT=$ac_cv_path_STAT
21736if test -n "$STAT"; then
21737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21738$as_echo "$STAT" >&6; }
21739else
21740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21741$as_echo "no" >&6; }
21742fi
21743
21744
21745          if test "x$STAT" = x; then
21746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21747          fi
21748        else
21749          # Otherwise we believe it is a complete path. Use it as it is.
21750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21751$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21753$as_echo_n "checking for STAT... " >&6; }
21754          if test ! -x "$tool_specified"; then
21755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21756$as_echo "not found" >&6; }
21757            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21758          fi
21759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21760$as_echo "$tool_specified" >&6; }
21761        fi
21762      fi
21763    fi
21764
21765  fi
21766
21767
21768
21769
21770  # Publish this variable in the help.
21771
21772
21773  if [ -z "${TIME+x}" ]; then
21774    # The variable is not set by user, try to locate tool using the code snippet
21775    for ac_prog in time
21776do
21777  # Extract the first word of "$ac_prog", so it can be a program name with args.
21778set dummy $ac_prog; ac_word=$2
21779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21780$as_echo_n "checking for $ac_word... " >&6; }
21781if ${ac_cv_path_TIME+:} false; then :
21782  $as_echo_n "(cached) " >&6
21783else
21784  case $TIME in
21785  [\\/]* | ?:[\\/]*)
21786  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21787  ;;
21788  *)
21789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21790for as_dir in $PATH
21791do
21792  IFS=$as_save_IFS
21793  test -z "$as_dir" && as_dir=.
21794    for ac_exec_ext in '' $ac_executable_extensions; do
21795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21796    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21798    break 2
21799  fi
21800done
21801  done
21802IFS=$as_save_IFS
21803
21804  ;;
21805esac
21806fi
21807TIME=$ac_cv_path_TIME
21808if test -n "$TIME"; then
21809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21810$as_echo "$TIME" >&6; }
21811else
21812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21813$as_echo "no" >&6; }
21814fi
21815
21816
21817  test -n "$TIME" && break
21818done
21819
21820  else
21821    # The variable is set, but is it from the command line or the environment?
21822
21823    # Try to remove the string !TIME! from our list.
21824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21826      # If it failed, the variable was not from the command line. Ignore it,
21827      # but warn the user (except for BASH, which is always set by the calling BASH).
21828      if test "xTIME" != xBASH; then
21829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21830$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21831      fi
21832      # Try to locate tool using the code snippet
21833      for ac_prog in time
21834do
21835  # Extract the first word of "$ac_prog", so it can be a program name with args.
21836set dummy $ac_prog; ac_word=$2
21837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21838$as_echo_n "checking for $ac_word... " >&6; }
21839if ${ac_cv_path_TIME+:} false; then :
21840  $as_echo_n "(cached) " >&6
21841else
21842  case $TIME in
21843  [\\/]* | ?:[\\/]*)
21844  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21845  ;;
21846  *)
21847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21848for as_dir in $PATH
21849do
21850  IFS=$as_save_IFS
21851  test -z "$as_dir" && as_dir=.
21852    for ac_exec_ext in '' $ac_executable_extensions; do
21853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21854    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21856    break 2
21857  fi
21858done
21859  done
21860IFS=$as_save_IFS
21861
21862  ;;
21863esac
21864fi
21865TIME=$ac_cv_path_TIME
21866if test -n "$TIME"; then
21867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21868$as_echo "$TIME" >&6; }
21869else
21870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21871$as_echo "no" >&6; }
21872fi
21873
21874
21875  test -n "$TIME" && break
21876done
21877
21878    else
21879      # If it succeeded, then it was overridden by the user. We will use it
21880      # for the tool.
21881
21882      # First remove it from the list of overridden variables, so we can test
21883      # for unknown variables in the end.
21884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21885
21886      # Check if we try to supply an empty value
21887      if test "x$TIME" = x; then
21888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21889$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21891$as_echo_n "checking for TIME... " >&6; }
21892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21893$as_echo "disabled" >&6; }
21894      else
21895        # Check if the provided tool contains a complete path.
21896        tool_specified="$TIME"
21897        tool_basename="${tool_specified##*/}"
21898        if test "x$tool_basename" = "x$tool_specified"; then
21899          # A command without a complete path is provided, search $PATH.
21900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21901$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21902          # Extract the first word of "$tool_basename", so it can be a program name with args.
21903set dummy $tool_basename; ac_word=$2
21904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21905$as_echo_n "checking for $ac_word... " >&6; }
21906if ${ac_cv_path_TIME+:} false; then :
21907  $as_echo_n "(cached) " >&6
21908else
21909  case $TIME in
21910  [\\/]* | ?:[\\/]*)
21911  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21912  ;;
21913  *)
21914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21915for as_dir in $PATH
21916do
21917  IFS=$as_save_IFS
21918  test -z "$as_dir" && as_dir=.
21919    for ac_exec_ext in '' $ac_executable_extensions; do
21920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21921    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21923    break 2
21924  fi
21925done
21926  done
21927IFS=$as_save_IFS
21928
21929  ;;
21930esac
21931fi
21932TIME=$ac_cv_path_TIME
21933if test -n "$TIME"; then
21934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21935$as_echo "$TIME" >&6; }
21936else
21937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21938$as_echo "no" >&6; }
21939fi
21940
21941
21942          if test "x$TIME" = x; then
21943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21944          fi
21945        else
21946          # Otherwise we believe it is a complete path. Use it as it is.
21947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21948$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21950$as_echo_n "checking for TIME... " >&6; }
21951          if test ! -x "$tool_specified"; then
21952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21953$as_echo "not found" >&6; }
21954            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21955          fi
21956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21957$as_echo "$tool_specified" >&6; }
21958        fi
21959      fi
21960    fi
21961
21962  fi
21963
21964
21965
21966
21967  # Publish this variable in the help.
21968
21969
21970  if [ -z "${PATCH+x}" ]; then
21971    # The variable is not set by user, try to locate tool using the code snippet
21972    for ac_prog in gpatch patch
21973do
21974  # Extract the first word of "$ac_prog", so it can be a program name with args.
21975set dummy $ac_prog; ac_word=$2
21976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21977$as_echo_n "checking for $ac_word... " >&6; }
21978if ${ac_cv_path_PATCH+:} false; then :
21979  $as_echo_n "(cached) " >&6
21980else
21981  case $PATCH in
21982  [\\/]* | ?:[\\/]*)
21983  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21984  ;;
21985  *)
21986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21987for as_dir in $PATH
21988do
21989  IFS=$as_save_IFS
21990  test -z "$as_dir" && as_dir=.
21991    for ac_exec_ext in '' $ac_executable_extensions; do
21992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21993    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21995    break 2
21996  fi
21997done
21998  done
21999IFS=$as_save_IFS
22000
22001  ;;
22002esac
22003fi
22004PATCH=$ac_cv_path_PATCH
22005if test -n "$PATCH"; then
22006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22007$as_echo "$PATCH" >&6; }
22008else
22009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22010$as_echo "no" >&6; }
22011fi
22012
22013
22014  test -n "$PATCH" && break
22015done
22016
22017  else
22018    # The variable is set, but is it from the command line or the environment?
22019
22020    # Try to remove the string !PATCH! from our list.
22021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22023      # If it failed, the variable was not from the command line. Ignore it,
22024      # but warn the user (except for BASH, which is always set by the calling BASH).
22025      if test "xPATCH" != xBASH; then
22026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22027$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22028      fi
22029      # Try to locate tool using the code snippet
22030      for ac_prog in gpatch patch
22031do
22032  # Extract the first word of "$ac_prog", so it can be a program name with args.
22033set dummy $ac_prog; ac_word=$2
22034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22035$as_echo_n "checking for $ac_word... " >&6; }
22036if ${ac_cv_path_PATCH+:} false; then :
22037  $as_echo_n "(cached) " >&6
22038else
22039  case $PATCH in
22040  [\\/]* | ?:[\\/]*)
22041  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22042  ;;
22043  *)
22044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22045for as_dir in $PATH
22046do
22047  IFS=$as_save_IFS
22048  test -z "$as_dir" && as_dir=.
22049    for ac_exec_ext in '' $ac_executable_extensions; do
22050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22051    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22053    break 2
22054  fi
22055done
22056  done
22057IFS=$as_save_IFS
22058
22059  ;;
22060esac
22061fi
22062PATCH=$ac_cv_path_PATCH
22063if test -n "$PATCH"; then
22064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22065$as_echo "$PATCH" >&6; }
22066else
22067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22068$as_echo "no" >&6; }
22069fi
22070
22071
22072  test -n "$PATCH" && break
22073done
22074
22075    else
22076      # If it succeeded, then it was overridden by the user. We will use it
22077      # for the tool.
22078
22079      # First remove it from the list of overridden variables, so we can test
22080      # for unknown variables in the end.
22081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22082
22083      # Check if we try to supply an empty value
22084      if test "x$PATCH" = x; then
22085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22086$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22088$as_echo_n "checking for PATCH... " >&6; }
22089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22090$as_echo "disabled" >&6; }
22091      else
22092        # Check if the provided tool contains a complete path.
22093        tool_specified="$PATCH"
22094        tool_basename="${tool_specified##*/}"
22095        if test "x$tool_basename" = "x$tool_specified"; then
22096          # A command without a complete path is provided, search $PATH.
22097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22098$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22099          # Extract the first word of "$tool_basename", so it can be a program name with args.
22100set dummy $tool_basename; ac_word=$2
22101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22102$as_echo_n "checking for $ac_word... " >&6; }
22103if ${ac_cv_path_PATCH+:} false; then :
22104  $as_echo_n "(cached) " >&6
22105else
22106  case $PATCH in
22107  [\\/]* | ?:[\\/]*)
22108  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22109  ;;
22110  *)
22111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22112for as_dir in $PATH
22113do
22114  IFS=$as_save_IFS
22115  test -z "$as_dir" && as_dir=.
22116    for ac_exec_ext in '' $ac_executable_extensions; do
22117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22118    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22120    break 2
22121  fi
22122done
22123  done
22124IFS=$as_save_IFS
22125
22126  ;;
22127esac
22128fi
22129PATCH=$ac_cv_path_PATCH
22130if test -n "$PATCH"; then
22131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22132$as_echo "$PATCH" >&6; }
22133else
22134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22135$as_echo "no" >&6; }
22136fi
22137
22138
22139          if test "x$PATCH" = x; then
22140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22141          fi
22142        else
22143          # Otherwise we believe it is a complete path. Use it as it is.
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22145$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22147$as_echo_n "checking for PATCH... " >&6; }
22148          if test ! -x "$tool_specified"; then
22149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22150$as_echo "not found" >&6; }
22151            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22152          fi
22153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22154$as_echo "$tool_specified" >&6; }
22155        fi
22156      fi
22157    fi
22158
22159  fi
22160
22161
22162  # Check if it's GNU time
22163  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22164  if test "x$IS_GNU_TIME" != x; then
22165    IS_GNU_TIME=yes
22166  else
22167    IS_GNU_TIME=no
22168  fi
22169
22170
22171  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22172
22173
22174
22175  # Publish this variable in the help.
22176
22177
22178  if [ -z "${DSYMUTIL+x}" ]; then
22179    # The variable is not set by user, try to locate tool using the code snippet
22180    for ac_prog in dsymutil
22181do
22182  # Extract the first word of "$ac_prog", so it can be a program name with args.
22183set dummy $ac_prog; ac_word=$2
22184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22185$as_echo_n "checking for $ac_word... " >&6; }
22186if ${ac_cv_path_DSYMUTIL+:} false; then :
22187  $as_echo_n "(cached) " >&6
22188else
22189  case $DSYMUTIL in
22190  [\\/]* | ?:[\\/]*)
22191  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22192  ;;
22193  *)
22194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22195for as_dir in $PATH
22196do
22197  IFS=$as_save_IFS
22198  test -z "$as_dir" && as_dir=.
22199    for ac_exec_ext in '' $ac_executable_extensions; do
22200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22201    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22203    break 2
22204  fi
22205done
22206  done
22207IFS=$as_save_IFS
22208
22209  ;;
22210esac
22211fi
22212DSYMUTIL=$ac_cv_path_DSYMUTIL
22213if test -n "$DSYMUTIL"; then
22214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22215$as_echo "$DSYMUTIL" >&6; }
22216else
22217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22218$as_echo "no" >&6; }
22219fi
22220
22221
22222  test -n "$DSYMUTIL" && break
22223done
22224
22225  else
22226    # The variable is set, but is it from the command line or the environment?
22227
22228    # Try to remove the string !DSYMUTIL! from our list.
22229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22231      # If it failed, the variable was not from the command line. Ignore it,
22232      # but warn the user (except for BASH, which is always set by the calling BASH).
22233      if test "xDSYMUTIL" != xBASH; then
22234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22235$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22236      fi
22237      # Try to locate tool using the code snippet
22238      for ac_prog in dsymutil
22239do
22240  # Extract the first word of "$ac_prog", so it can be a program name with args.
22241set dummy $ac_prog; ac_word=$2
22242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22243$as_echo_n "checking for $ac_word... " >&6; }
22244if ${ac_cv_path_DSYMUTIL+:} false; then :
22245  $as_echo_n "(cached) " >&6
22246else
22247  case $DSYMUTIL in
22248  [\\/]* | ?:[\\/]*)
22249  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22250  ;;
22251  *)
22252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22253for as_dir in $PATH
22254do
22255  IFS=$as_save_IFS
22256  test -z "$as_dir" && as_dir=.
22257    for ac_exec_ext in '' $ac_executable_extensions; do
22258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22259    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22261    break 2
22262  fi
22263done
22264  done
22265IFS=$as_save_IFS
22266
22267  ;;
22268esac
22269fi
22270DSYMUTIL=$ac_cv_path_DSYMUTIL
22271if test -n "$DSYMUTIL"; then
22272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22273$as_echo "$DSYMUTIL" >&6; }
22274else
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22276$as_echo "no" >&6; }
22277fi
22278
22279
22280  test -n "$DSYMUTIL" && break
22281done
22282
22283    else
22284      # If it succeeded, then it was overridden by the user. We will use it
22285      # for the tool.
22286
22287      # First remove it from the list of overridden variables, so we can test
22288      # for unknown variables in the end.
22289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22290
22291      # Check if we try to supply an empty value
22292      if test "x$DSYMUTIL" = x; then
22293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22294$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22296$as_echo_n "checking for DSYMUTIL... " >&6; }
22297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22298$as_echo "disabled" >&6; }
22299      else
22300        # Check if the provided tool contains a complete path.
22301        tool_specified="$DSYMUTIL"
22302        tool_basename="${tool_specified##*/}"
22303        if test "x$tool_basename" = "x$tool_specified"; then
22304          # A command without a complete path is provided, search $PATH.
22305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22306$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22307          # Extract the first word of "$tool_basename", so it can be a program name with args.
22308set dummy $tool_basename; ac_word=$2
22309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22310$as_echo_n "checking for $ac_word... " >&6; }
22311if ${ac_cv_path_DSYMUTIL+:} false; then :
22312  $as_echo_n "(cached) " >&6
22313else
22314  case $DSYMUTIL in
22315  [\\/]* | ?:[\\/]*)
22316  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22317  ;;
22318  *)
22319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22320for as_dir in $PATH
22321do
22322  IFS=$as_save_IFS
22323  test -z "$as_dir" && as_dir=.
22324    for ac_exec_ext in '' $ac_executable_extensions; do
22325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22326    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22328    break 2
22329  fi
22330done
22331  done
22332IFS=$as_save_IFS
22333
22334  ;;
22335esac
22336fi
22337DSYMUTIL=$ac_cv_path_DSYMUTIL
22338if test -n "$DSYMUTIL"; then
22339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22340$as_echo "$DSYMUTIL" >&6; }
22341else
22342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343$as_echo "no" >&6; }
22344fi
22345
22346
22347          if test "x$DSYMUTIL" = x; then
22348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22349          fi
22350        else
22351          # Otherwise we believe it is a complete path. Use it as it is.
22352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22353$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22355$as_echo_n "checking for DSYMUTIL... " >&6; }
22356          if test ! -x "$tool_specified"; then
22357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22358$as_echo "not found" >&6; }
22359            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22360          fi
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22362$as_echo "$tool_specified" >&6; }
22363        fi
22364      fi
22365    fi
22366
22367  fi
22368
22369
22370
22371  if test "x$DSYMUTIL" = x; then
22372    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22373  fi
22374
22375
22376
22377
22378
22379  # Publish this variable in the help.
22380
22381
22382  if [ -z "${XATTR+x}" ]; then
22383    # The variable is not set by user, try to locate tool using the code snippet
22384    for ac_prog in xattr
22385do
22386  # Extract the first word of "$ac_prog", so it can be a program name with args.
22387set dummy $ac_prog; ac_word=$2
22388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22389$as_echo_n "checking for $ac_word... " >&6; }
22390if ${ac_cv_path_XATTR+:} false; then :
22391  $as_echo_n "(cached) " >&6
22392else
22393  case $XATTR in
22394  [\\/]* | ?:[\\/]*)
22395  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22396  ;;
22397  *)
22398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22399for as_dir in $PATH
22400do
22401  IFS=$as_save_IFS
22402  test -z "$as_dir" && as_dir=.
22403    for ac_exec_ext in '' $ac_executable_extensions; do
22404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22405    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22407    break 2
22408  fi
22409done
22410  done
22411IFS=$as_save_IFS
22412
22413  ;;
22414esac
22415fi
22416XATTR=$ac_cv_path_XATTR
22417if test -n "$XATTR"; then
22418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22419$as_echo "$XATTR" >&6; }
22420else
22421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22422$as_echo "no" >&6; }
22423fi
22424
22425
22426  test -n "$XATTR" && break
22427done
22428
22429  else
22430    # The variable is set, but is it from the command line or the environment?
22431
22432    # Try to remove the string !XATTR! from our list.
22433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22435      # If it failed, the variable was not from the command line. Ignore it,
22436      # but warn the user (except for BASH, which is always set by the calling BASH).
22437      if test "xXATTR" != xBASH; then
22438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22439$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22440      fi
22441      # Try to locate tool using the code snippet
22442      for ac_prog in xattr
22443do
22444  # Extract the first word of "$ac_prog", so it can be a program name with args.
22445set dummy $ac_prog; ac_word=$2
22446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22447$as_echo_n "checking for $ac_word... " >&6; }
22448if ${ac_cv_path_XATTR+:} false; then :
22449  $as_echo_n "(cached) " >&6
22450else
22451  case $XATTR in
22452  [\\/]* | ?:[\\/]*)
22453  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22454  ;;
22455  *)
22456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22457for as_dir in $PATH
22458do
22459  IFS=$as_save_IFS
22460  test -z "$as_dir" && as_dir=.
22461    for ac_exec_ext in '' $ac_executable_extensions; do
22462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22463    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22465    break 2
22466  fi
22467done
22468  done
22469IFS=$as_save_IFS
22470
22471  ;;
22472esac
22473fi
22474XATTR=$ac_cv_path_XATTR
22475if test -n "$XATTR"; then
22476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22477$as_echo "$XATTR" >&6; }
22478else
22479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22480$as_echo "no" >&6; }
22481fi
22482
22483
22484  test -n "$XATTR" && break
22485done
22486
22487    else
22488      # If it succeeded, then it was overridden by the user. We will use it
22489      # for the tool.
22490
22491      # First remove it from the list of overridden variables, so we can test
22492      # for unknown variables in the end.
22493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22494
22495      # Check if we try to supply an empty value
22496      if test "x$XATTR" = x; then
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22498$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22500$as_echo_n "checking for XATTR... " >&6; }
22501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22502$as_echo "disabled" >&6; }
22503      else
22504        # Check if the provided tool contains a complete path.
22505        tool_specified="$XATTR"
22506        tool_basename="${tool_specified##*/}"
22507        if test "x$tool_basename" = "x$tool_specified"; then
22508          # A command without a complete path is provided, search $PATH.
22509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22510$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22511          # Extract the first word of "$tool_basename", so it can be a program name with args.
22512set dummy $tool_basename; ac_word=$2
22513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22514$as_echo_n "checking for $ac_word... " >&6; }
22515if ${ac_cv_path_XATTR+:} false; then :
22516  $as_echo_n "(cached) " >&6
22517else
22518  case $XATTR in
22519  [\\/]* | ?:[\\/]*)
22520  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22521  ;;
22522  *)
22523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22524for as_dir in $PATH
22525do
22526  IFS=$as_save_IFS
22527  test -z "$as_dir" && as_dir=.
22528    for ac_exec_ext in '' $ac_executable_extensions; do
22529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22530    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22532    break 2
22533  fi
22534done
22535  done
22536IFS=$as_save_IFS
22537
22538  ;;
22539esac
22540fi
22541XATTR=$ac_cv_path_XATTR
22542if test -n "$XATTR"; then
22543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22544$as_echo "$XATTR" >&6; }
22545else
22546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22547$as_echo "no" >&6; }
22548fi
22549
22550
22551          if test "x$XATTR" = x; then
22552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22553          fi
22554        else
22555          # Otherwise we believe it is a complete path. Use it as it is.
22556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22557$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22559$as_echo_n "checking for XATTR... " >&6; }
22560          if test ! -x "$tool_specified"; then
22561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22562$as_echo "not found" >&6; }
22563            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22564          fi
22565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22566$as_echo "$tool_specified" >&6; }
22567        fi
22568      fi
22569    fi
22570
22571  fi
22572
22573
22574
22575  if test "x$XATTR" = x; then
22576    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22577  fi
22578
22579
22580
22581
22582  # Publish this variable in the help.
22583
22584
22585  if [ -z "${CODESIGN+x}" ]; then
22586    # The variable is not set by user, try to locate tool using the code snippet
22587    for ac_prog in codesign
22588do
22589  # Extract the first word of "$ac_prog", so it can be a program name with args.
22590set dummy $ac_prog; ac_word=$2
22591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22592$as_echo_n "checking for $ac_word... " >&6; }
22593if ${ac_cv_path_CODESIGN+:} false; then :
22594  $as_echo_n "(cached) " >&6
22595else
22596  case $CODESIGN in
22597  [\\/]* | ?:[\\/]*)
22598  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22599  ;;
22600  *)
22601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22602for as_dir in $PATH
22603do
22604  IFS=$as_save_IFS
22605  test -z "$as_dir" && as_dir=.
22606    for ac_exec_ext in '' $ac_executable_extensions; do
22607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22608    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22610    break 2
22611  fi
22612done
22613  done
22614IFS=$as_save_IFS
22615
22616  ;;
22617esac
22618fi
22619CODESIGN=$ac_cv_path_CODESIGN
22620if test -n "$CODESIGN"; then
22621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22622$as_echo "$CODESIGN" >&6; }
22623else
22624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22625$as_echo "no" >&6; }
22626fi
22627
22628
22629  test -n "$CODESIGN" && break
22630done
22631
22632  else
22633    # The variable is set, but is it from the command line or the environment?
22634
22635    # Try to remove the string !CODESIGN! from our list.
22636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22638      # If it failed, the variable was not from the command line. Ignore it,
22639      # but warn the user (except for BASH, which is always set by the calling BASH).
22640      if test "xCODESIGN" != xBASH; then
22641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22642$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22643      fi
22644      # Try to locate tool using the code snippet
22645      for ac_prog in codesign
22646do
22647  # Extract the first word of "$ac_prog", so it can be a program name with args.
22648set dummy $ac_prog; ac_word=$2
22649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22650$as_echo_n "checking for $ac_word... " >&6; }
22651if ${ac_cv_path_CODESIGN+:} false; then :
22652  $as_echo_n "(cached) " >&6
22653else
22654  case $CODESIGN in
22655  [\\/]* | ?:[\\/]*)
22656  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22657  ;;
22658  *)
22659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22660for as_dir in $PATH
22661do
22662  IFS=$as_save_IFS
22663  test -z "$as_dir" && as_dir=.
22664    for ac_exec_ext in '' $ac_executable_extensions; do
22665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22666    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22668    break 2
22669  fi
22670done
22671  done
22672IFS=$as_save_IFS
22673
22674  ;;
22675esac
22676fi
22677CODESIGN=$ac_cv_path_CODESIGN
22678if test -n "$CODESIGN"; then
22679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22680$as_echo "$CODESIGN" >&6; }
22681else
22682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22683$as_echo "no" >&6; }
22684fi
22685
22686
22687  test -n "$CODESIGN" && break
22688done
22689
22690    else
22691      # If it succeeded, then it was overridden by the user. We will use it
22692      # for the tool.
22693
22694      # First remove it from the list of overridden variables, so we can test
22695      # for unknown variables in the end.
22696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22697
22698      # Check if we try to supply an empty value
22699      if test "x$CODESIGN" = x; then
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22701$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22703$as_echo_n "checking for CODESIGN... " >&6; }
22704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22705$as_echo "disabled" >&6; }
22706      else
22707        # Check if the provided tool contains a complete path.
22708        tool_specified="$CODESIGN"
22709        tool_basename="${tool_specified##*/}"
22710        if test "x$tool_basename" = "x$tool_specified"; then
22711          # A command without a complete path is provided, search $PATH.
22712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22713$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22714          # Extract the first word of "$tool_basename", so it can be a program name with args.
22715set dummy $tool_basename; ac_word=$2
22716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22717$as_echo_n "checking for $ac_word... " >&6; }
22718if ${ac_cv_path_CODESIGN+:} false; then :
22719  $as_echo_n "(cached) " >&6
22720else
22721  case $CODESIGN in
22722  [\\/]* | ?:[\\/]*)
22723  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22724  ;;
22725  *)
22726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22727for as_dir in $PATH
22728do
22729  IFS=$as_save_IFS
22730  test -z "$as_dir" && as_dir=.
22731    for ac_exec_ext in '' $ac_executable_extensions; do
22732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22733    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22735    break 2
22736  fi
22737done
22738  done
22739IFS=$as_save_IFS
22740
22741  ;;
22742esac
22743fi
22744CODESIGN=$ac_cv_path_CODESIGN
22745if test -n "$CODESIGN"; then
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22747$as_echo "$CODESIGN" >&6; }
22748else
22749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22750$as_echo "no" >&6; }
22751fi
22752
22753
22754          if test "x$CODESIGN" = x; then
22755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22756          fi
22757        else
22758          # Otherwise we believe it is a complete path. Use it as it is.
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22760$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22762$as_echo_n "checking for CODESIGN... " >&6; }
22763          if test ! -x "$tool_specified"; then
22764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22765$as_echo "not found" >&6; }
22766            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22767          fi
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22769$as_echo "$tool_specified" >&6; }
22770        fi
22771      fi
22772    fi
22773
22774  fi
22775
22776
22777    if test "x$CODESIGN" != "x"; then
22778      # Verify that the openjdk_codesign certificate is present
22779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22780$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22781      rm -f codesign-testfile
22782      touch codesign-testfile
22783      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22784      rm -f codesign-testfile
22785      if test "x$CODESIGN" = x; then
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22787$as_echo "no" >&6; }
22788      else
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22790$as_echo "yes" >&6; }
22791      fi
22792    fi
22793
22794
22795
22796  # Publish this variable in the help.
22797
22798
22799  if [ -z "${SETFILE+x}" ]; then
22800    # The variable is not set by user, try to locate tool using the code snippet
22801    for ac_prog in SetFile
22802do
22803  # Extract the first word of "$ac_prog", so it can be a program name with args.
22804set dummy $ac_prog; ac_word=$2
22805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22806$as_echo_n "checking for $ac_word... " >&6; }
22807if ${ac_cv_path_SETFILE+:} false; then :
22808  $as_echo_n "(cached) " >&6
22809else
22810  case $SETFILE in
22811  [\\/]* | ?:[\\/]*)
22812  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22813  ;;
22814  *)
22815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22816for as_dir in $PATH
22817do
22818  IFS=$as_save_IFS
22819  test -z "$as_dir" && as_dir=.
22820    for ac_exec_ext in '' $ac_executable_extensions; do
22821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22822    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22824    break 2
22825  fi
22826done
22827  done
22828IFS=$as_save_IFS
22829
22830  ;;
22831esac
22832fi
22833SETFILE=$ac_cv_path_SETFILE
22834if test -n "$SETFILE"; then
22835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22836$as_echo "$SETFILE" >&6; }
22837else
22838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22839$as_echo "no" >&6; }
22840fi
22841
22842
22843  test -n "$SETFILE" && break
22844done
22845
22846  else
22847    # The variable is set, but is it from the command line or the environment?
22848
22849    # Try to remove the string !SETFILE! from our list.
22850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22852      # If it failed, the variable was not from the command line. Ignore it,
22853      # but warn the user (except for BASH, which is always set by the calling BASH).
22854      if test "xSETFILE" != xBASH; then
22855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22856$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22857      fi
22858      # Try to locate tool using the code snippet
22859      for ac_prog in SetFile
22860do
22861  # Extract the first word of "$ac_prog", so it can be a program name with args.
22862set dummy $ac_prog; ac_word=$2
22863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22864$as_echo_n "checking for $ac_word... " >&6; }
22865if ${ac_cv_path_SETFILE+:} false; then :
22866  $as_echo_n "(cached) " >&6
22867else
22868  case $SETFILE in
22869  [\\/]* | ?:[\\/]*)
22870  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22871  ;;
22872  *)
22873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22874for as_dir in $PATH
22875do
22876  IFS=$as_save_IFS
22877  test -z "$as_dir" && as_dir=.
22878    for ac_exec_ext in '' $ac_executable_extensions; do
22879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22880    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22882    break 2
22883  fi
22884done
22885  done
22886IFS=$as_save_IFS
22887
22888  ;;
22889esac
22890fi
22891SETFILE=$ac_cv_path_SETFILE
22892if test -n "$SETFILE"; then
22893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22894$as_echo "$SETFILE" >&6; }
22895else
22896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22897$as_echo "no" >&6; }
22898fi
22899
22900
22901  test -n "$SETFILE" && break
22902done
22903
22904    else
22905      # If it succeeded, then it was overridden by the user. We will use it
22906      # for the tool.
22907
22908      # First remove it from the list of overridden variables, so we can test
22909      # for unknown variables in the end.
22910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22911
22912      # Check if we try to supply an empty value
22913      if test "x$SETFILE" = x; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22915$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22917$as_echo_n "checking for SETFILE... " >&6; }
22918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22919$as_echo "disabled" >&6; }
22920      else
22921        # Check if the provided tool contains a complete path.
22922        tool_specified="$SETFILE"
22923        tool_basename="${tool_specified##*/}"
22924        if test "x$tool_basename" = "x$tool_specified"; then
22925          # A command without a complete path is provided, search $PATH.
22926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22927$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22928          # Extract the first word of "$tool_basename", so it can be a program name with args.
22929set dummy $tool_basename; ac_word=$2
22930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22931$as_echo_n "checking for $ac_word... " >&6; }
22932if ${ac_cv_path_SETFILE+:} false; then :
22933  $as_echo_n "(cached) " >&6
22934else
22935  case $SETFILE in
22936  [\\/]* | ?:[\\/]*)
22937  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22938  ;;
22939  *)
22940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22941for as_dir in $PATH
22942do
22943  IFS=$as_save_IFS
22944  test -z "$as_dir" && as_dir=.
22945    for ac_exec_ext in '' $ac_executable_extensions; do
22946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22947    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22949    break 2
22950  fi
22951done
22952  done
22953IFS=$as_save_IFS
22954
22955  ;;
22956esac
22957fi
22958SETFILE=$ac_cv_path_SETFILE
22959if test -n "$SETFILE"; then
22960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22961$as_echo "$SETFILE" >&6; }
22962else
22963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22964$as_echo "no" >&6; }
22965fi
22966
22967
22968          if test "x$SETFILE" = x; then
22969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22970          fi
22971        else
22972          # Otherwise we believe it is a complete path. Use it as it is.
22973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22974$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22976$as_echo_n "checking for SETFILE... " >&6; }
22977          if test ! -x "$tool_specified"; then
22978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22979$as_echo "not found" >&6; }
22980            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22981          fi
22982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22983$as_echo "$tool_specified" >&6; }
22984        fi
22985      fi
22986    fi
22987
22988  fi
22989
22990
22991
22992  if test "x$SETFILE" = x; then
22993    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22994  fi
22995
22996
22997  fi
22998
22999
23000  # Test if bash supports pipefail.
23001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23002$as_echo_n "checking if bash supports pipefail... " >&6; }
23003  if ${BASH} -c 'set -o pipefail'; then
23004    BASH_ARGS="$BASH_ARGS -o pipefail"
23005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23006$as_echo "yes" >&6; }
23007  else
23008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23009$as_echo "no" >&6; }
23010  fi
23011
23012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23013$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23014  if ${BASH} -e -c 'true'; then
23015    BASH_ARGS="$BASH_ARGS -e"
23016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23017$as_echo "yes" >&6; }
23018  else
23019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020$as_echo "no" >&6; }
23021  fi
23022
23023
23024
23025
23026# Check if pkg-config is available.
23027
23028
23029if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23030	if test -n "$ac_tool_prefix"; then
23031  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23032set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23034$as_echo_n "checking for $ac_word... " >&6; }
23035if ${ac_cv_path_PKG_CONFIG+:} false; then :
23036  $as_echo_n "(cached) " >&6
23037else
23038  case $PKG_CONFIG in
23039  [\\/]* | ?:[\\/]*)
23040  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23041  ;;
23042  *)
23043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23044for as_dir in $PATH
23045do
23046  IFS=$as_save_IFS
23047  test -z "$as_dir" && as_dir=.
23048    for ac_exec_ext in '' $ac_executable_extensions; do
23049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23050    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23052    break 2
23053  fi
23054done
23055  done
23056IFS=$as_save_IFS
23057
23058  ;;
23059esac
23060fi
23061PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23062if test -n "$PKG_CONFIG"; then
23063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23064$as_echo "$PKG_CONFIG" >&6; }
23065else
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067$as_echo "no" >&6; }
23068fi
23069
23070
23071fi
23072if test -z "$ac_cv_path_PKG_CONFIG"; then
23073  ac_pt_PKG_CONFIG=$PKG_CONFIG
23074  # Extract the first word of "pkg-config", so it can be a program name with args.
23075set dummy pkg-config; ac_word=$2
23076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23077$as_echo_n "checking for $ac_word... " >&6; }
23078if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23079  $as_echo_n "(cached) " >&6
23080else
23081  case $ac_pt_PKG_CONFIG in
23082  [\\/]* | ?:[\\/]*)
23083  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23084  ;;
23085  *)
23086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23087for as_dir in $PATH
23088do
23089  IFS=$as_save_IFS
23090  test -z "$as_dir" && as_dir=.
23091    for ac_exec_ext in '' $ac_executable_extensions; do
23092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23093    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23095    break 2
23096  fi
23097done
23098  done
23099IFS=$as_save_IFS
23100
23101  ;;
23102esac
23103fi
23104ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23105if test -n "$ac_pt_PKG_CONFIG"; then
23106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23107$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23108else
23109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23110$as_echo "no" >&6; }
23111fi
23112
23113  if test "x$ac_pt_PKG_CONFIG" = x; then
23114    PKG_CONFIG=""
23115  else
23116    case $cross_compiling:$ac_tool_warned in
23117yes:)
23118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23120ac_tool_warned=yes ;;
23121esac
23122    PKG_CONFIG=$ac_pt_PKG_CONFIG
23123  fi
23124else
23125  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23126fi
23127
23128fi
23129if test -n "$PKG_CONFIG"; then
23130	_pkg_min_version=0.9.0
23131	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23132$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23133	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23134		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23135$as_echo "yes" >&6; }
23136	else
23137		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23138$as_echo "no" >&6; }
23139		PKG_CONFIG=""
23140	fi
23141
23142fi
23143
23144# After basic tools have been setup, we can check build os specific details.
23145
23146  ###############################################################################
23147
23148  # Note that this is the build platform OS version!
23149
23150  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23151  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23152  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23153  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23154
23155
23156
23157
23158
23159# Misc basic settings
23160
23161
23162# Check whether --with-default-make-target was given.
23163if test "${with_default_make_target+set}" = set; then :
23164  withval=$with_default_make_target;
23165fi
23166
23167  if test "x$with_default_make_target" = "x" \
23168      || test "x$with_default_make_target" = "xyes"; then
23169    DEFAULT_MAKE_TARGET="exploded-image"
23170  elif test "x$with_default_make_target" = "xno"; then
23171    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23172  else
23173    DEFAULT_MAKE_TARGET="$with_default_make_target"
23174  fi
23175
23176
23177
23178
23179###############################################################################
23180#
23181# Determine OpenJDK variants, options and version numbers.
23182#
23183###############################################################################
23184
23185# We need build & target for this.
23186
23187  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23188  # We always build headless support.
23189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23190$as_echo_n "checking headful support... " >&6; }
23191  # Check whether --enable-headful was given.
23192if test "${enable_headful+set}" = set; then :
23193  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23194else
23195  SUPPORT_HEADFUL=yes
23196fi
23197
23198
23199  SUPPORT_HEADLESS=yes
23200  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23201
23202  if test "x$SUPPORT_HEADFUL" = xyes; then
23203    # We are building both headful and headless.
23204    headful_msg="include support for both headful and headless"
23205  fi
23206
23207  if test "x$SUPPORT_HEADFUL" = xno; then
23208    # Thus we are building headless only.
23209    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23210    headful_msg="headless only"
23211  fi
23212
23213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23214$as_echo "$headful_msg" >&6; }
23215
23216
23217
23218
23219
23220  # Choose cacerts source file
23221
23222# Check whether --with-cacerts-file was given.
23223if test "${with_cacerts_file+set}" = set; then :
23224  withval=$with_cacerts_file;
23225fi
23226
23227  if test "x$with_cacerts_file" != x; then
23228    CACERTS_FILE=$with_cacerts_file
23229  fi
23230
23231
23232  # Enable or disable unlimited crypto
23233  # Check whether --enable-unlimited-crypto was given.
23234if test "${enable_unlimited_crypto+set}" = set; then :
23235  enableval=$enable_unlimited_crypto;
23236else
23237  enable_unlimited_crypto=no
23238fi
23239
23240  if test "x$enable_unlimited_crypto" = "xyes"; then
23241    UNLIMITED_CRYPTO=true
23242  else
23243    UNLIMITED_CRYPTO=false
23244  fi
23245
23246
23247  # Compress jars
23248  COMPRESS_JARS=false
23249
23250
23251
23252  # Setup default copyright year. Mostly overridden when building close to a new year.
23253
23254# Check whether --with-copyright-year was given.
23255if test "${with_copyright_year+set}" = set; then :
23256  withval=$with_copyright_year;
23257fi
23258
23259  if test "x$with_copyright_year" = xyes; then
23260    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23261  elif test "x$with_copyright_year" != x; then
23262    COPYRIGHT_YEAR="$with_copyright_year"
23263  else
23264    COPYRIGHT_YEAR=`date +'%Y'`
23265  fi
23266
23267
23268
23269  # Control wether Hotspot runs Queens test after build.
23270  # Check whether --enable-hotspot-test-in-build was given.
23271if test "${enable_hotspot_test_in_build+set}" = set; then :
23272  enableval=$enable_hotspot_test_in_build;
23273else
23274  enable_hotspot_test_in_build=no
23275fi
23276
23277  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23278    TEST_IN_BUILD=true
23279  else
23280    TEST_IN_BUILD=false
23281  fi
23282
23283
23284
23285  # Warn user that old version arguments are deprecated.
23286
23287
23288# Check whether --with-milestone was given.
23289if test "${with_milestone+set}" = set; then :
23290  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23291$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23292fi
23293
23294
23295
23296
23297# Check whether --with-update-version was given.
23298if test "${with_update_version+set}" = set; then :
23299  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23300$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23301fi
23302
23303
23304
23305
23306# Check whether --with-user-release-suffix was given.
23307if test "${with_user_release_suffix+set}" = set; then :
23308  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
23309$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23310fi
23311
23312
23313
23314
23315# Check whether --with-build-number was given.
23316if test "${with_build_number+set}" = set; then :
23317  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23318$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23319fi
23320
23321
23322
23323  # Source the version numbers file
23324  . $AUTOCONF_DIR/version-numbers
23325
23326  # Some non-version number information is set in that file
23327
23328
23329
23330
23331
23332
23333
23334
23335  # Override version from arguments
23336
23337  # If --with-version-string is set, process it first. It is possible to
23338  # override parts with more specific flags, since these are processed later.
23339
23340# Check whether --with-version-string was given.
23341if test "${with_version_string+set}" = set; then :
23342  withval=$with_version_string;
23343fi
23344
23345  if test "x$with_version_string" = xyes; then
23346    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23347  elif test "x$with_version_string" != x; then
23348    # Additional [] needed to keep m4 from mangling shell constructs.
23349    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23350      VERSION_MAJOR=${BASH_REMATCH[1]}
23351      VERSION_MINOR=${BASH_REMATCH[3]}
23352      VERSION_SECURITY=${BASH_REMATCH[5]}
23353      VERSION_PATCH=${BASH_REMATCH[7]}
23354      VERSION_PRE=${BASH_REMATCH[9]}
23355      version_plus_separator=${BASH_REMATCH[11]}
23356      VERSION_BUILD=${BASH_REMATCH[12]}
23357      VERSION_OPT=${BASH_REMATCH[14]}
23358      # Unspecified numerical fields are interpreted as 0.
23359      if test "x$VERSION_MINOR" = x; then
23360        VERSION_MINOR=0
23361      fi
23362      if test "x$VERSION_SECURITY" = x; then
23363        VERSION_SECURITY=0
23364      fi
23365      if test "x$VERSION_PATCH" = x; then
23366        VERSION_PATCH=0
23367      fi
23368      if test "x$version_plus_separator" != x \
23369          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23370        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23371      fi
23372      # Stop the version part process from setting default values.
23373      # We still allow them to explicitely override though.
23374      NO_DEFAULT_VERSION_PARTS=true
23375    else
23376      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23377    fi
23378  fi
23379
23380
23381# Check whether --with-version-pre was given.
23382if test "${with_version_pre+set}" = set; then :
23383  withval=$with_version_pre; with_version_pre_present=true
23384else
23385  with_version_pre_present=false
23386fi
23387
23388
23389  if test "x$with_version_pre_present" = xtrue; then
23390    if test "x$with_version_pre" = xyes; then
23391      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23392    elif test "x$with_version_pre" = xno; then
23393      # Interpret --without-* as empty string instead of the literal "no"
23394      VERSION_PRE=
23395    else
23396      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23397       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23398      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23400$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23401      fi
23402    fi
23403  else
23404    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23405      # Default is to use "internal" as pre
23406      VERSION_PRE="internal"
23407    fi
23408  fi
23409
23410
23411# Check whether --with-version-opt was given.
23412if test "${with_version_opt+set}" = set; then :
23413  withval=$with_version_opt; with_version_opt_present=true
23414else
23415  with_version_opt_present=false
23416fi
23417
23418
23419  if test "x$with_version_opt_present" = xtrue; then
23420    if test "x$with_version_opt" = xyes; then
23421      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23422    elif test "x$with_version_opt" = xno; then
23423      # Interpret --without-* as empty string instead of the literal "no"
23424      VERSION_OPT=
23425    else
23426      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23427       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23428      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23430$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23431      fi
23432    fi
23433  else
23434    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23435      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23436      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23437      # Outer [ ] to quote m4.
23438       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23439      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23440    fi
23441  fi
23442
23443
23444# Check whether --with-version-build was given.
23445if test "${with_version_build+set}" = set; then :
23446  withval=$with_version_build; with_version_build_present=true
23447else
23448  with_version_build_present=false
23449fi
23450
23451
23452  if test "x$with_version_build_present" = xtrue; then
23453    if test "x$with_version_build" = xyes; then
23454      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23455    elif test "x$with_version_build" = xno; then
23456      # Interpret --without-* as empty string instead of the literal "no"
23457      VERSION_BUILD=
23458    elif test "x$with_version_build" = x; then
23459      VERSION_BUILD=
23460    else
23461
23462  # Additional [] needed to keep m4 from mangling shell constructs.
23463  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23464    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23465  fi
23466  # Extract the version number without leading zeros.
23467  cleaned_value=${BASH_REMATCH[1]}
23468  if test "x$cleaned_value" = x; then
23469    # Special case for zero
23470    cleaned_value=${BASH_REMATCH[2]}
23471  fi
23472
23473  if test $cleaned_value -gt 255; then
23474    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23475  fi
23476  if test "x$cleaned_value" != "x$with_version_build"; then
23477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23478$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23479  fi
23480  VERSION_BUILD=$cleaned_value
23481
23482    fi
23483  else
23484    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23485      # Default is to not have a build number.
23486      VERSION_BUILD=""
23487      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23488      VERSION_BUILD=0
23489    fi
23490  fi
23491
23492
23493# Check whether --with-version-major was given.
23494if test "${with_version_major+set}" = set; then :
23495  withval=$with_version_major; with_version_major_present=true
23496else
23497  with_version_major_present=false
23498fi
23499
23500
23501  if test "x$with_version_major_present" = xtrue; then
23502    if test "x$with_version_major" = xyes; then
23503      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23504    else
23505
23506  # Additional [] needed to keep m4 from mangling shell constructs.
23507  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23508    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23509  fi
23510  # Extract the version number without leading zeros.
23511  cleaned_value=${BASH_REMATCH[1]}
23512  if test "x$cleaned_value" = x; then
23513    # Special case for zero
23514    cleaned_value=${BASH_REMATCH[2]}
23515  fi
23516
23517  if test $cleaned_value -gt 255; then
23518    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23519  fi
23520  if test "x$cleaned_value" != "x$with_version_major"; then
23521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23522$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23523  fi
23524  VERSION_MAJOR=$cleaned_value
23525
23526    fi
23527  else
23528    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23529      # Default is to get value from version-numbers
23530      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23531    fi
23532  fi
23533
23534
23535# Check whether --with-version-minor was given.
23536if test "${with_version_minor+set}" = set; then :
23537  withval=$with_version_minor; with_version_minor_present=true
23538else
23539  with_version_minor_present=false
23540fi
23541
23542
23543  if test "x$with_version_minor_present" = xtrue; then
23544    if test "x$with_version_minor" = xyes; then
23545      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23546    elif test "x$with_version_minor" = xno; then
23547      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23548      VERSION_MINOR=0
23549    elif test "x$with_version_minor" = x; then
23550      VERSION_MINOR=0
23551    else
23552
23553  # Additional [] needed to keep m4 from mangling shell constructs.
23554  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23555    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23556  fi
23557  # Extract the version number without leading zeros.
23558  cleaned_value=${BASH_REMATCH[1]}
23559  if test "x$cleaned_value" = x; then
23560    # Special case for zero
23561    cleaned_value=${BASH_REMATCH[2]}
23562  fi
23563
23564  if test $cleaned_value -gt 255; then
23565    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23566  fi
23567  if test "x$cleaned_value" != "x$with_version_minor"; then
23568    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23569$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23570  fi
23571  VERSION_MINOR=$cleaned_value
23572
23573    fi
23574  else
23575    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23576      # Default is 0, if unspecified
23577      VERSION_MINOR=0
23578    fi
23579  fi
23580
23581
23582# Check whether --with-version-security was given.
23583if test "${with_version_security+set}" = set; then :
23584  withval=$with_version_security; with_version_security_present=true
23585else
23586  with_version_security_present=false
23587fi
23588
23589
23590  if test "x$with_version_security_present" = xtrue; then
23591    if test "x$with_version_security" = xyes; then
23592      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23593    elif test "x$with_version_security" = xno; then
23594      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23595      VERSION_SECURITY=0
23596    elif test "x$with_version_security" = x; then
23597      VERSION_SECURITY=0
23598    else
23599
23600  # Additional [] needed to keep m4 from mangling shell constructs.
23601  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23602    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23603  fi
23604  # Extract the version number without leading zeros.
23605  cleaned_value=${BASH_REMATCH[1]}
23606  if test "x$cleaned_value" = x; then
23607    # Special case for zero
23608    cleaned_value=${BASH_REMATCH[2]}
23609  fi
23610
23611  if test $cleaned_value -gt 255; then
23612    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23613  fi
23614  if test "x$cleaned_value" != "x$with_version_security"; then
23615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23616$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23617  fi
23618  VERSION_SECURITY=$cleaned_value
23619
23620    fi
23621  else
23622    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23623      # Default is 0, if unspecified
23624      VERSION_SECURITY=0
23625    fi
23626  fi
23627
23628
23629# Check whether --with-version-patch was given.
23630if test "${with_version_patch+set}" = set; then :
23631  withval=$with_version_patch; with_version_patch_present=true
23632else
23633  with_version_patch_present=false
23634fi
23635
23636
23637  if test "x$with_version_patch_present" = xtrue; then
23638    if test "x$with_version_patch" = xyes; then
23639      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23640    elif test "x$with_version_patch" = xno; then
23641      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23642      VERSION_PATCH=0
23643    elif test "x$with_version_patch" = x; then
23644      VERSION_PATCH=0
23645    else
23646
23647  # Additional [] needed to keep m4 from mangling shell constructs.
23648  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23649    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23650  fi
23651  # Extract the version number without leading zeros.
23652  cleaned_value=${BASH_REMATCH[1]}
23653  if test "x$cleaned_value" = x; then
23654    # Special case for zero
23655    cleaned_value=${BASH_REMATCH[2]}
23656  fi
23657
23658  if test $cleaned_value -gt 255; then
23659    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23660  fi
23661  if test "x$cleaned_value" != "x$with_version_patch"; then
23662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23663$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23664  fi
23665  VERSION_PATCH=$cleaned_value
23666
23667    fi
23668  else
23669    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23670      # Default is 0, if unspecified
23671      VERSION_PATCH=0
23672    fi
23673  fi
23674
23675  # Calculate derived version properties
23676
23677  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23678  if test "x$VERSION_PRE" = x; then
23679    VERSION_IS_GA=true
23680  else
23681    VERSION_IS_GA=false
23682  fi
23683
23684  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23685  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23686
23687  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23688  # Strip trailing zeroes from stripped_version_number
23689  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23690  VERSION_NUMBER=$stripped_version_number
23691
23692  # The complete version string, with additional build information
23693  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23694    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23695  else
23696    # If either build or opt is set, we need a + separator
23697    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23698  fi
23699
23700  # The short version string, just VERSION_NUMBER and PRE, if present.
23701  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23702
23703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23704$as_echo_n "checking for version string... " >&6; }
23705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23706$as_echo "$VERSION_STRING" >&6; }
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722###############################################################################
23723#
23724# Setup BootJDK, used to bootstrap the build.
23725#
23726###############################################################################
23727
23728
23729  BOOT_JDK_FOUND=no
23730
23731# Check whether --with-boot-jdk was given.
23732if test "${with_boot_jdk+set}" = set; then :
23733  withval=$with_boot_jdk;
23734fi
23735
23736
23737  # We look for the Boot JDK through various means, going from more certain to
23738  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23739  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23740  # must check if this is indeed valid; otherwise we'll continue looking.
23741
23742  # Test: Is bootjdk explicitely set by command line arguments?
23743
23744  if test "x$BOOT_JDK_FOUND" = xno; then
23745    # Now execute the test
23746
23747  if test "x$with_boot_jdk" != x; then
23748    BOOT_JDK=$with_boot_jdk
23749    BOOT_JDK_FOUND=maybe
23750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23751$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23752  fi
23753
23754
23755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23757      # Do we have a bin/java?
23758      if test ! -x "$BOOT_JDK/bin/java"; then
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23761        BOOT_JDK_FOUND=no
23762      else
23763        # Do we have a bin/javac?
23764        if test ! -x "$BOOT_JDK/bin/javac"; then
23765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23769          BOOT_JDK_FOUND=no
23770        else
23771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23773
23774          # Extra M4 quote needed to protect [] in grep expression.
23775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23776          if test "x$FOUND_CORRECT_VERSION" = x; then
23777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23781            BOOT_JDK_FOUND=no
23782          else
23783            # We're done! :-)
23784            BOOT_JDK_FOUND=yes
23785
23786  # Only process if variable expands to non-empty
23787
23788  if test "x$BOOT_JDK" != x; then
23789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23790
23791  # Input might be given as Windows format, start by converting to
23792  # unix format.
23793  path="$BOOT_JDK"
23794  new_path=`$CYGPATH -u "$path"`
23795
23796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23799  # "foo.exe" is OK but "foo" is an error.
23800  #
23801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23802  # It is also a way to make sure we got the proper file name for the real test later on.
23803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23804  if test "x$test_shortpath" = x; then
23805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23808  fi
23809
23810  # Call helper function which possibly converts this using DOS-style short mode.
23811  # If so, the updated path is stored in $new_path.
23812
23813  input_path="$new_path"
23814  # Check if we need to convert this using DOS-style short mode. If the path
23815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23816  # take no chances and rewrite it.
23817  # Note: m4 eats our [], so we need to use [ and ] instead.
23818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23819  if test "x$has_forbidden_chars" != x; then
23820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23824      # Going to short mode and back again did indeed matter. Since short mode is
23825      # case insensitive, let's make it lowercase to improve readability.
23826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23827      # Now convert it back to Unix-style (cygpath)
23828      input_path=`$CYGPATH -u "$shortmode_path"`
23829      new_path="$input_path"
23830    fi
23831  fi
23832
23833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23834  if test "x$test_cygdrive_prefix" = x; then
23835    # As a simple fix, exclude /usr/bin since it's not a real path.
23836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23838      # a path prefixed by /cygdrive for fixpath to work.
23839      new_path="$CYGWIN_ROOT_PATH$input_path"
23840    fi
23841  fi
23842
23843
23844  if test "x$path" != "x$new_path"; then
23845    BOOT_JDK="$new_path"
23846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23848  fi
23849
23850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23851
23852  path="$BOOT_JDK"
23853  has_colon=`$ECHO $path | $GREP ^.:`
23854  new_path="$path"
23855  if test "x$has_colon" = x; then
23856    # Not in mixed or Windows style, start by that.
23857    new_path=`cmd //c echo $path`
23858  fi
23859
23860
23861  input_path="$new_path"
23862  # Check if we need to convert this using DOS-style short mode. If the path
23863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23864  # take no chances and rewrite it.
23865  # Note: m4 eats our [], so we need to use [ and ] instead.
23866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23867  if test "x$has_forbidden_chars" != x; then
23868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23870  fi
23871
23872
23873  windows_path="$new_path"
23874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23875    unix_path=`$CYGPATH -u "$windows_path"`
23876    new_path="$unix_path"
23877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23879    new_path="$unix_path"
23880  fi
23881
23882  if test "x$path" != "x$new_path"; then
23883    BOOT_JDK="$new_path"
23884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23886  fi
23887
23888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23890
23891    else
23892      # We're on a unix platform. Hooray! :)
23893      path="$BOOT_JDK"
23894      has_space=`$ECHO "$path" | $GREP " "`
23895      if test "x$has_space" != x; then
23896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23899      fi
23900
23901      # Use eval to expand a potential ~
23902      eval path="$path"
23903      if test ! -f "$path" && test ! -d "$path"; then
23904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23905      fi
23906
23907      if test -d "$path"; then
23908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23909      else
23910        dir="`$DIRNAME "$path"`"
23911        base="`$BASENAME "$path"`"
23912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23913      fi
23914    fi
23915  fi
23916
23917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23918$as_echo_n "checking for Boot JDK... " >&6; }
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23920$as_echo "$BOOT_JDK" >&6; }
23921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23922$as_echo_n "checking Boot JDK version... " >&6; }
23923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23925$as_echo "$BOOT_JDK_VERSION" >&6; }
23926          fi # end check jdk version
23927        fi # end check javac
23928      fi # end check java
23929    fi # end check boot jdk found
23930  fi
23931
23932  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23933    # Having specified an argument which is incorrect will produce an instant failure;
23934    # we should not go on looking
23935    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23936  fi
23937
23938  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23939
23940  if test "x$BOOT_JDK_FOUND" = xno; then
23941    # Now execute the test
23942
23943  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23944    # First check at user selected default
23945
23946  if test "x$BOOT_JDK_FOUND" = xno; then
23947    # Now execute the test
23948
23949  if test -x /usr/libexec/java_home; then
23950    BOOT_JDK=`/usr/libexec/java_home `
23951    BOOT_JDK_FOUND=maybe
23952    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23953$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23954  fi
23955
23956
23957    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23958    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23959      # Do we have a bin/java?
23960      if test ! -x "$BOOT_JDK/bin/java"; then
23961        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23963        BOOT_JDK_FOUND=no
23964      else
23965        # Do we have a bin/javac?
23966        if test ! -x "$BOOT_JDK/bin/javac"; then
23967          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23969          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23970$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23971          BOOT_JDK_FOUND=no
23972        else
23973          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23974          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23975
23976          # Extra M4 quote needed to protect [] in grep expression.
23977          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23978          if test "x$FOUND_CORRECT_VERSION" = x; then
23979            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23981            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23982$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23983            BOOT_JDK_FOUND=no
23984          else
23985            # We're done! :-)
23986            BOOT_JDK_FOUND=yes
23987
23988  # Only process if variable expands to non-empty
23989
23990  if test "x$BOOT_JDK" != x; then
23991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992
23993  # Input might be given as Windows format, start by converting to
23994  # unix format.
23995  path="$BOOT_JDK"
23996  new_path=`$CYGPATH -u "$path"`
23997
23998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24001  # "foo.exe" is OK but "foo" is an error.
24002  #
24003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24004  # It is also a way to make sure we got the proper file name for the real test later on.
24005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24006  if test "x$test_shortpath" = x; then
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24009    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24010  fi
24011
24012  # Call helper function which possibly converts this using DOS-style short mode.
24013  # If so, the updated path is stored in $new_path.
24014
24015  input_path="$new_path"
24016  # Check if we need to convert this using DOS-style short mode. If the path
24017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24018  # take no chances and rewrite it.
24019  # Note: m4 eats our [], so we need to use [ and ] instead.
24020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24021  if test "x$has_forbidden_chars" != x; then
24022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24026      # Going to short mode and back again did indeed matter. Since short mode is
24027      # case insensitive, let's make it lowercase to improve readability.
24028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029      # Now convert it back to Unix-style (cygpath)
24030      input_path=`$CYGPATH -u "$shortmode_path"`
24031      new_path="$input_path"
24032    fi
24033  fi
24034
24035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24036  if test "x$test_cygdrive_prefix" = x; then
24037    # As a simple fix, exclude /usr/bin since it's not a real path.
24038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24040      # a path prefixed by /cygdrive for fixpath to work.
24041      new_path="$CYGWIN_ROOT_PATH$input_path"
24042    fi
24043  fi
24044
24045
24046  if test "x$path" != "x$new_path"; then
24047    BOOT_JDK="$new_path"
24048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24050  fi
24051
24052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053
24054  path="$BOOT_JDK"
24055  has_colon=`$ECHO $path | $GREP ^.:`
24056  new_path="$path"
24057  if test "x$has_colon" = x; then
24058    # Not in mixed or Windows style, start by that.
24059    new_path=`cmd //c echo $path`
24060  fi
24061
24062
24063  input_path="$new_path"
24064  # Check if we need to convert this using DOS-style short mode. If the path
24065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066  # take no chances and rewrite it.
24067  # Note: m4 eats our [], so we need to use [ and ] instead.
24068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24069  if test "x$has_forbidden_chars" != x; then
24070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24072  fi
24073
24074
24075  windows_path="$new_path"
24076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077    unix_path=`$CYGPATH -u "$windows_path"`
24078    new_path="$unix_path"
24079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24081    new_path="$unix_path"
24082  fi
24083
24084  if test "x$path" != "x$new_path"; then
24085    BOOT_JDK="$new_path"
24086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24088  fi
24089
24090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24092
24093    else
24094      # We're on a unix platform. Hooray! :)
24095      path="$BOOT_JDK"
24096      has_space=`$ECHO "$path" | $GREP " "`
24097      if test "x$has_space" != x; then
24098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24101      fi
24102
24103      # Use eval to expand a potential ~
24104      eval path="$path"
24105      if test ! -f "$path" && test ! -d "$path"; then
24106        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24107      fi
24108
24109      if test -d "$path"; then
24110        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24111      else
24112        dir="`$DIRNAME "$path"`"
24113        base="`$BASENAME "$path"`"
24114        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24115      fi
24116    fi
24117  fi
24118
24119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24120$as_echo_n "checking for Boot JDK... " >&6; }
24121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24122$as_echo "$BOOT_JDK" >&6; }
24123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24124$as_echo_n "checking Boot JDK version... " >&6; }
24125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24127$as_echo "$BOOT_JDK_VERSION" >&6; }
24128          fi # end check jdk version
24129        fi # end check javac
24130      fi # end check java
24131    fi # end check boot jdk found
24132  fi
24133
24134    # If that did not work out (e.g. too old), try explicit versions instead
24135
24136  if test "x$BOOT_JDK_FOUND" = xno; then
24137    # Now execute the test
24138
24139  if test -x /usr/libexec/java_home; then
24140    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24141    BOOT_JDK_FOUND=maybe
24142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24143$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24144  fi
24145
24146
24147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24149      # Do we have a bin/java?
24150      if test ! -x "$BOOT_JDK/bin/java"; then
24151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24153        BOOT_JDK_FOUND=no
24154      else
24155        # Do we have a bin/javac?
24156        if test ! -x "$BOOT_JDK/bin/javac"; then
24157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24161          BOOT_JDK_FOUND=no
24162        else
24163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24165
24166          # Extra M4 quote needed to protect [] in grep expression.
24167          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24168          if test "x$FOUND_CORRECT_VERSION" = x; then
24169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24173            BOOT_JDK_FOUND=no
24174          else
24175            # We're done! :-)
24176            BOOT_JDK_FOUND=yes
24177
24178  # Only process if variable expands to non-empty
24179
24180  if test "x$BOOT_JDK" != x; then
24181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182
24183  # Input might be given as Windows format, start by converting to
24184  # unix format.
24185  path="$BOOT_JDK"
24186  new_path=`$CYGPATH -u "$path"`
24187
24188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24191  # "foo.exe" is OK but "foo" is an error.
24192  #
24193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24194  # It is also a way to make sure we got the proper file name for the real test later on.
24195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24196  if test "x$test_shortpath" = x; then
24197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24200  fi
24201
24202  # Call helper function which possibly converts this using DOS-style short mode.
24203  # If so, the updated path is stored in $new_path.
24204
24205  input_path="$new_path"
24206  # Check if we need to convert this using DOS-style short mode. If the path
24207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24208  # take no chances and rewrite it.
24209  # Note: m4 eats our [], so we need to use [ and ] instead.
24210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24211  if test "x$has_forbidden_chars" != x; then
24212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24216      # Going to short mode and back again did indeed matter. Since short mode is
24217      # case insensitive, let's make it lowercase to improve readability.
24218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24219      # Now convert it back to Unix-style (cygpath)
24220      input_path=`$CYGPATH -u "$shortmode_path"`
24221      new_path="$input_path"
24222    fi
24223  fi
24224
24225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24226  if test "x$test_cygdrive_prefix" = x; then
24227    # As a simple fix, exclude /usr/bin since it's not a real path.
24228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24230      # a path prefixed by /cygdrive for fixpath to work.
24231      new_path="$CYGWIN_ROOT_PATH$input_path"
24232    fi
24233  fi
24234
24235
24236  if test "x$path" != "x$new_path"; then
24237    BOOT_JDK="$new_path"
24238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24240  fi
24241
24242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24243
24244  path="$BOOT_JDK"
24245  has_colon=`$ECHO $path | $GREP ^.:`
24246  new_path="$path"
24247  if test "x$has_colon" = x; then
24248    # Not in mixed or Windows style, start by that.
24249    new_path=`cmd //c echo $path`
24250  fi
24251
24252
24253  input_path="$new_path"
24254  # Check if we need to convert this using DOS-style short mode. If the path
24255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24256  # take no chances and rewrite it.
24257  # Note: m4 eats our [], so we need to use [ and ] instead.
24258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24259  if test "x$has_forbidden_chars" != x; then
24260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24262  fi
24263
24264
24265  windows_path="$new_path"
24266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24267    unix_path=`$CYGPATH -u "$windows_path"`
24268    new_path="$unix_path"
24269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24271    new_path="$unix_path"
24272  fi
24273
24274  if test "x$path" != "x$new_path"; then
24275    BOOT_JDK="$new_path"
24276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24278  fi
24279
24280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24282
24283    else
24284      # We're on a unix platform. Hooray! :)
24285      path="$BOOT_JDK"
24286      has_space=`$ECHO "$path" | $GREP " "`
24287      if test "x$has_space" != x; then
24288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24291      fi
24292
24293      # Use eval to expand a potential ~
24294      eval path="$path"
24295      if test ! -f "$path" && test ! -d "$path"; then
24296        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24297      fi
24298
24299      if test -d "$path"; then
24300        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24301      else
24302        dir="`$DIRNAME "$path"`"
24303        base="`$BASENAME "$path"`"
24304        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24305      fi
24306    fi
24307  fi
24308
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24310$as_echo_n "checking for Boot JDK... " >&6; }
24311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24312$as_echo "$BOOT_JDK" >&6; }
24313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24314$as_echo_n "checking Boot JDK version... " >&6; }
24315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24317$as_echo "$BOOT_JDK_VERSION" >&6; }
24318          fi # end check jdk version
24319        fi # end check javac
24320      fi # end check java
24321    fi # end check boot jdk found
24322  fi
24323
24324
24325  if test "x$BOOT_JDK_FOUND" = xno; then
24326    # Now execute the test
24327
24328  if test -x /usr/libexec/java_home; then
24329    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24330    BOOT_JDK_FOUND=maybe
24331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24332$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24333  fi
24334
24335
24336    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24337    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24338      # Do we have a bin/java?
24339      if test ! -x "$BOOT_JDK/bin/java"; then
24340        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24342        BOOT_JDK_FOUND=no
24343      else
24344        # Do we have a bin/javac?
24345        if test ! -x "$BOOT_JDK/bin/javac"; then
24346          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24348          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24349$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24350          BOOT_JDK_FOUND=no
24351        else
24352          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24353          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24354
24355          # Extra M4 quote needed to protect [] in grep expression.
24356          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24357          if test "x$FOUND_CORRECT_VERSION" = x; then
24358            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24360            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24361$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24362            BOOT_JDK_FOUND=no
24363          else
24364            # We're done! :-)
24365            BOOT_JDK_FOUND=yes
24366
24367  # Only process if variable expands to non-empty
24368
24369  if test "x$BOOT_JDK" != x; then
24370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24371
24372  # Input might be given as Windows format, start by converting to
24373  # unix format.
24374  path="$BOOT_JDK"
24375  new_path=`$CYGPATH -u "$path"`
24376
24377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24380  # "foo.exe" is OK but "foo" is an error.
24381  #
24382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24383  # It is also a way to make sure we got the proper file name for the real test later on.
24384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24385  if test "x$test_shortpath" = x; then
24386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24389  fi
24390
24391  # Call helper function which possibly converts this using DOS-style short mode.
24392  # If so, the updated path is stored in $new_path.
24393
24394  input_path="$new_path"
24395  # Check if we need to convert this using DOS-style short mode. If the path
24396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24397  # take no chances and rewrite it.
24398  # Note: m4 eats our [], so we need to use [ and ] instead.
24399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24400  if test "x$has_forbidden_chars" != x; then
24401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24405      # Going to short mode and back again did indeed matter. Since short mode is
24406      # case insensitive, let's make it lowercase to improve readability.
24407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24408      # Now convert it back to Unix-style (cygpath)
24409      input_path=`$CYGPATH -u "$shortmode_path"`
24410      new_path="$input_path"
24411    fi
24412  fi
24413
24414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24415  if test "x$test_cygdrive_prefix" = x; then
24416    # As a simple fix, exclude /usr/bin since it's not a real path.
24417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24419      # a path prefixed by /cygdrive for fixpath to work.
24420      new_path="$CYGWIN_ROOT_PATH$input_path"
24421    fi
24422  fi
24423
24424
24425  if test "x$path" != "x$new_path"; then
24426    BOOT_JDK="$new_path"
24427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24429  fi
24430
24431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24432
24433  path="$BOOT_JDK"
24434  has_colon=`$ECHO $path | $GREP ^.:`
24435  new_path="$path"
24436  if test "x$has_colon" = x; then
24437    # Not in mixed or Windows style, start by that.
24438    new_path=`cmd //c echo $path`
24439  fi
24440
24441
24442  input_path="$new_path"
24443  # Check if we need to convert this using DOS-style short mode. If the path
24444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24445  # take no chances and rewrite it.
24446  # Note: m4 eats our [], so we need to use [ and ] instead.
24447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24448  if test "x$has_forbidden_chars" != x; then
24449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24451  fi
24452
24453
24454  windows_path="$new_path"
24455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24456    unix_path=`$CYGPATH -u "$windows_path"`
24457    new_path="$unix_path"
24458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24460    new_path="$unix_path"
24461  fi
24462
24463  if test "x$path" != "x$new_path"; then
24464    BOOT_JDK="$new_path"
24465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24467  fi
24468
24469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24471
24472    else
24473      # We're on a unix platform. Hooray! :)
24474      path="$BOOT_JDK"
24475      has_space=`$ECHO "$path" | $GREP " "`
24476      if test "x$has_space" != x; then
24477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24480      fi
24481
24482      # Use eval to expand a potential ~
24483      eval path="$path"
24484      if test ! -f "$path" && test ! -d "$path"; then
24485        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24486      fi
24487
24488      if test -d "$path"; then
24489        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24490      else
24491        dir="`$DIRNAME "$path"`"
24492        base="`$BASENAME "$path"`"
24493        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24494      fi
24495    fi
24496  fi
24497
24498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24499$as_echo_n "checking for Boot JDK... " >&6; }
24500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24501$as_echo "$BOOT_JDK" >&6; }
24502            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24503$as_echo_n "checking Boot JDK version... " >&6; }
24504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24506$as_echo "$BOOT_JDK_VERSION" >&6; }
24507          fi # end check jdk version
24508        fi # end check javac
24509      fi # end check java
24510    fi # end check boot jdk found
24511  fi
24512
24513
24514  if test "x$BOOT_JDK_FOUND" = xno; then
24515    # Now execute the test
24516
24517  if test -x /usr/libexec/java_home; then
24518    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24519    BOOT_JDK_FOUND=maybe
24520    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24521$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24522  fi
24523
24524
24525    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24526    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24527      # Do we have a bin/java?
24528      if test ! -x "$BOOT_JDK/bin/java"; then
24529        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24531        BOOT_JDK_FOUND=no
24532      else
24533        # Do we have a bin/javac?
24534        if test ! -x "$BOOT_JDK/bin/javac"; then
24535          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24537          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24538$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24539          BOOT_JDK_FOUND=no
24540        else
24541          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24542          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24543
24544          # Extra M4 quote needed to protect [] in grep expression.
24545          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24546          if test "x$FOUND_CORRECT_VERSION" = x; then
24547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24549            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24550$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24551            BOOT_JDK_FOUND=no
24552          else
24553            # We're done! :-)
24554            BOOT_JDK_FOUND=yes
24555
24556  # Only process if variable expands to non-empty
24557
24558  if test "x$BOOT_JDK" != x; then
24559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24560
24561  # Input might be given as Windows format, start by converting to
24562  # unix format.
24563  path="$BOOT_JDK"
24564  new_path=`$CYGPATH -u "$path"`
24565
24566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24569  # "foo.exe" is OK but "foo" is an error.
24570  #
24571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24572  # It is also a way to make sure we got the proper file name for the real test later on.
24573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24574  if test "x$test_shortpath" = x; then
24575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24578  fi
24579
24580  # Call helper function which possibly converts this using DOS-style short mode.
24581  # If so, the updated path is stored in $new_path.
24582
24583  input_path="$new_path"
24584  # Check if we need to convert this using DOS-style short mode. If the path
24585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24586  # take no chances and rewrite it.
24587  # Note: m4 eats our [], so we need to use [ and ] instead.
24588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24589  if test "x$has_forbidden_chars" != x; then
24590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24594      # Going to short mode and back again did indeed matter. Since short mode is
24595      # case insensitive, let's make it lowercase to improve readability.
24596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24597      # Now convert it back to Unix-style (cygpath)
24598      input_path=`$CYGPATH -u "$shortmode_path"`
24599      new_path="$input_path"
24600    fi
24601  fi
24602
24603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24604  if test "x$test_cygdrive_prefix" = x; then
24605    # As a simple fix, exclude /usr/bin since it's not a real path.
24606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24608      # a path prefixed by /cygdrive for fixpath to work.
24609      new_path="$CYGWIN_ROOT_PATH$input_path"
24610    fi
24611  fi
24612
24613
24614  if test "x$path" != "x$new_path"; then
24615    BOOT_JDK="$new_path"
24616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24618  fi
24619
24620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24621
24622  path="$BOOT_JDK"
24623  has_colon=`$ECHO $path | $GREP ^.:`
24624  new_path="$path"
24625  if test "x$has_colon" = x; then
24626    # Not in mixed or Windows style, start by that.
24627    new_path=`cmd //c echo $path`
24628  fi
24629
24630
24631  input_path="$new_path"
24632  # Check if we need to convert this using DOS-style short mode. If the path
24633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24634  # take no chances and rewrite it.
24635  # Note: m4 eats our [], so we need to use [ and ] instead.
24636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24637  if test "x$has_forbidden_chars" != x; then
24638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24640  fi
24641
24642
24643  windows_path="$new_path"
24644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24645    unix_path=`$CYGPATH -u "$windows_path"`
24646    new_path="$unix_path"
24647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24649    new_path="$unix_path"
24650  fi
24651
24652  if test "x$path" != "x$new_path"; then
24653    BOOT_JDK="$new_path"
24654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24656  fi
24657
24658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24660
24661    else
24662      # We're on a unix platform. Hooray! :)
24663      path="$BOOT_JDK"
24664      has_space=`$ECHO "$path" | $GREP " "`
24665      if test "x$has_space" != x; then
24666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24668        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24669      fi
24670
24671      # Use eval to expand a potential ~
24672      eval path="$path"
24673      if test ! -f "$path" && test ! -d "$path"; then
24674        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24675      fi
24676
24677      if test -d "$path"; then
24678        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24679      else
24680        dir="`$DIRNAME "$path"`"
24681        base="`$BASENAME "$path"`"
24682        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24683      fi
24684    fi
24685  fi
24686
24687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24688$as_echo_n "checking for Boot JDK... " >&6; }
24689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24690$as_echo "$BOOT_JDK" >&6; }
24691            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24692$as_echo_n "checking Boot JDK version... " >&6; }
24693            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24695$as_echo "$BOOT_JDK_VERSION" >&6; }
24696          fi # end check jdk version
24697        fi # end check javac
24698      fi # end check java
24699    fi # end check boot jdk found
24700  fi
24701
24702  fi
24703
24704
24705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24707      # Do we have a bin/java?
24708      if test ! -x "$BOOT_JDK/bin/java"; then
24709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24711        BOOT_JDK_FOUND=no
24712      else
24713        # Do we have a bin/javac?
24714        if test ! -x "$BOOT_JDK/bin/javac"; then
24715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24719          BOOT_JDK_FOUND=no
24720        else
24721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24723
24724          # Extra M4 quote needed to protect [] in grep expression.
24725          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24726          if test "x$FOUND_CORRECT_VERSION" = x; then
24727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24731            BOOT_JDK_FOUND=no
24732          else
24733            # We're done! :-)
24734            BOOT_JDK_FOUND=yes
24735
24736  # Only process if variable expands to non-empty
24737
24738  if test "x$BOOT_JDK" != x; then
24739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24740
24741  # Input might be given as Windows format, start by converting to
24742  # unix format.
24743  path="$BOOT_JDK"
24744  new_path=`$CYGPATH -u "$path"`
24745
24746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24749  # "foo.exe" is OK but "foo" is an error.
24750  #
24751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24752  # It is also a way to make sure we got the proper file name for the real test later on.
24753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24754  if test "x$test_shortpath" = x; then
24755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24757    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24758  fi
24759
24760  # Call helper function which possibly converts this using DOS-style short mode.
24761  # If so, the updated path is stored in $new_path.
24762
24763  input_path="$new_path"
24764  # Check if we need to convert this using DOS-style short mode. If the path
24765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24766  # take no chances and rewrite it.
24767  # Note: m4 eats our [], so we need to use [ and ] instead.
24768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24769  if test "x$has_forbidden_chars" != x; then
24770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24774      # Going to short mode and back again did indeed matter. Since short mode is
24775      # case insensitive, let's make it lowercase to improve readability.
24776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24777      # Now convert it back to Unix-style (cygpath)
24778      input_path=`$CYGPATH -u "$shortmode_path"`
24779      new_path="$input_path"
24780    fi
24781  fi
24782
24783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24784  if test "x$test_cygdrive_prefix" = x; then
24785    # As a simple fix, exclude /usr/bin since it's not a real path.
24786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24788      # a path prefixed by /cygdrive for fixpath to work.
24789      new_path="$CYGWIN_ROOT_PATH$input_path"
24790    fi
24791  fi
24792
24793
24794  if test "x$path" != "x$new_path"; then
24795    BOOT_JDK="$new_path"
24796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24798  fi
24799
24800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24801
24802  path="$BOOT_JDK"
24803  has_colon=`$ECHO $path | $GREP ^.:`
24804  new_path="$path"
24805  if test "x$has_colon" = x; then
24806    # Not in mixed or Windows style, start by that.
24807    new_path=`cmd //c echo $path`
24808  fi
24809
24810
24811  input_path="$new_path"
24812  # Check if we need to convert this using DOS-style short mode. If the path
24813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24814  # take no chances and rewrite it.
24815  # Note: m4 eats our [], so we need to use [ and ] instead.
24816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24817  if test "x$has_forbidden_chars" != x; then
24818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24820  fi
24821
24822
24823  windows_path="$new_path"
24824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24825    unix_path=`$CYGPATH -u "$windows_path"`
24826    new_path="$unix_path"
24827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24829    new_path="$unix_path"
24830  fi
24831
24832  if test "x$path" != "x$new_path"; then
24833    BOOT_JDK="$new_path"
24834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24836  fi
24837
24838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24840
24841    else
24842      # We're on a unix platform. Hooray! :)
24843      path="$BOOT_JDK"
24844      has_space=`$ECHO "$path" | $GREP " "`
24845      if test "x$has_space" != x; then
24846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24849      fi
24850
24851      # Use eval to expand a potential ~
24852      eval path="$path"
24853      if test ! -f "$path" && test ! -d "$path"; then
24854        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24855      fi
24856
24857      if test -d "$path"; then
24858        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24859      else
24860        dir="`$DIRNAME "$path"`"
24861        base="`$BASENAME "$path"`"
24862        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24863      fi
24864    fi
24865  fi
24866
24867            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24868$as_echo_n "checking for Boot JDK... " >&6; }
24869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24870$as_echo "$BOOT_JDK" >&6; }
24871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24872$as_echo_n "checking Boot JDK version... " >&6; }
24873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24875$as_echo "$BOOT_JDK_VERSION" >&6; }
24876          fi # end check jdk version
24877        fi # end check javac
24878      fi # end check java
24879    fi # end check boot jdk found
24880  fi
24881
24882
24883  # Test: Is $JAVA_HOME set?
24884
24885  if test "x$BOOT_JDK_FOUND" = xno; then
24886    # Now execute the test
24887
24888  if test "x$JAVA_HOME" != x; then
24889    JAVA_HOME_PROCESSED="$JAVA_HOME"
24890
24891  # Only process if variable expands to non-empty
24892
24893  if test "x$JAVA_HOME_PROCESSED" != x; then
24894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24895
24896  # Input might be given as Windows format, start by converting to
24897  # unix format.
24898  path="$JAVA_HOME_PROCESSED"
24899  new_path=`$CYGPATH -u "$path"`
24900
24901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24904  # "foo.exe" is OK but "foo" is an error.
24905  #
24906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24907  # It is also a way to make sure we got the proper file name for the real test later on.
24908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24909  if test "x$test_shortpath" = x; then
24910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24911$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24912    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24913  fi
24914
24915  # Call helper function which possibly converts this using DOS-style short mode.
24916  # If so, the updated path is stored in $new_path.
24917
24918  input_path="$new_path"
24919  # Check if we need to convert this using DOS-style short mode. If the path
24920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24921  # take no chances and rewrite it.
24922  # Note: m4 eats our [], so we need to use [ and ] instead.
24923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24924  if test "x$has_forbidden_chars" != x; then
24925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24929      # Going to short mode and back again did indeed matter. Since short mode is
24930      # case insensitive, let's make it lowercase to improve readability.
24931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24932      # Now convert it back to Unix-style (cygpath)
24933      input_path=`$CYGPATH -u "$shortmode_path"`
24934      new_path="$input_path"
24935    fi
24936  fi
24937
24938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24939  if test "x$test_cygdrive_prefix" = x; then
24940    # As a simple fix, exclude /usr/bin since it's not a real path.
24941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24943      # a path prefixed by /cygdrive for fixpath to work.
24944      new_path="$CYGWIN_ROOT_PATH$input_path"
24945    fi
24946  fi
24947
24948
24949  if test "x$path" != "x$new_path"; then
24950    JAVA_HOME_PROCESSED="$new_path"
24951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24952$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24953  fi
24954
24955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24956
24957  path="$JAVA_HOME_PROCESSED"
24958  has_colon=`$ECHO $path | $GREP ^.:`
24959  new_path="$path"
24960  if test "x$has_colon" = x; then
24961    # Not in mixed or Windows style, start by that.
24962    new_path=`cmd //c echo $path`
24963  fi
24964
24965
24966  input_path="$new_path"
24967  # Check if we need to convert this using DOS-style short mode. If the path
24968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24969  # take no chances and rewrite it.
24970  # Note: m4 eats our [], so we need to use [ and ] instead.
24971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24972  if test "x$has_forbidden_chars" != x; then
24973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24975  fi
24976
24977
24978  windows_path="$new_path"
24979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24980    unix_path=`$CYGPATH -u "$windows_path"`
24981    new_path="$unix_path"
24982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24984    new_path="$unix_path"
24985  fi
24986
24987  if test "x$path" != "x$new_path"; then
24988    JAVA_HOME_PROCESSED="$new_path"
24989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24990$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24991  fi
24992
24993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24995
24996    else
24997      # We're on a unix platform. Hooray! :)
24998      path="$JAVA_HOME_PROCESSED"
24999      has_space=`$ECHO "$path" | $GREP " "`
25000      if test "x$has_space" != x; then
25001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25002$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25004      fi
25005
25006      # Use eval to expand a potential ~
25007      eval path="$path"
25008      if test ! -f "$path" && test ! -d "$path"; then
25009        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25010      fi
25011
25012      if test -d "$path"; then
25013        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25014      else
25015        dir="`$DIRNAME "$path"`"
25016        base="`$BASENAME "$path"`"
25017        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25018      fi
25019    fi
25020  fi
25021
25022    if test ! -d "$JAVA_HOME_PROCESSED"; then
25023      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25024$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25025    else
25026      # Aha, the user has set a JAVA_HOME
25027      # let us use that as the Boot JDK.
25028      BOOT_JDK="$JAVA_HOME_PROCESSED"
25029      BOOT_JDK_FOUND=maybe
25030      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25031$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25032    fi
25033  fi
25034
25035
25036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25038      # Do we have a bin/java?
25039      if test ! -x "$BOOT_JDK/bin/java"; then
25040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25042        BOOT_JDK_FOUND=no
25043      else
25044        # Do we have a bin/javac?
25045        if test ! -x "$BOOT_JDK/bin/javac"; then
25046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25050          BOOT_JDK_FOUND=no
25051        else
25052          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25053          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25054
25055          # Extra M4 quote needed to protect [] in grep expression.
25056          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25057          if test "x$FOUND_CORRECT_VERSION" = x; then
25058            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25060            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25061$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25062            BOOT_JDK_FOUND=no
25063          else
25064            # We're done! :-)
25065            BOOT_JDK_FOUND=yes
25066
25067  # Only process if variable expands to non-empty
25068
25069  if test "x$BOOT_JDK" != x; then
25070    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25071
25072  # Input might be given as Windows format, start by converting to
25073  # unix format.
25074  path="$BOOT_JDK"
25075  new_path=`$CYGPATH -u "$path"`
25076
25077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25080  # "foo.exe" is OK but "foo" is an error.
25081  #
25082  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25083  # It is also a way to make sure we got the proper file name for the real test later on.
25084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25085  if test "x$test_shortpath" = x; then
25086    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25088    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25089  fi
25090
25091  # Call helper function which possibly converts this using DOS-style short mode.
25092  # If so, the updated path is stored in $new_path.
25093
25094  input_path="$new_path"
25095  # Check if we need to convert this using DOS-style short mode. If the path
25096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25097  # take no chances and rewrite it.
25098  # Note: m4 eats our [], so we need to use [ and ] instead.
25099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25100  if test "x$has_forbidden_chars" != x; then
25101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25105      # Going to short mode and back again did indeed matter. Since short mode is
25106      # case insensitive, let's make it lowercase to improve readability.
25107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25108      # Now convert it back to Unix-style (cygpath)
25109      input_path=`$CYGPATH -u "$shortmode_path"`
25110      new_path="$input_path"
25111    fi
25112  fi
25113
25114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25115  if test "x$test_cygdrive_prefix" = x; then
25116    # As a simple fix, exclude /usr/bin since it's not a real path.
25117    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25119      # a path prefixed by /cygdrive for fixpath to work.
25120      new_path="$CYGWIN_ROOT_PATH$input_path"
25121    fi
25122  fi
25123
25124
25125  if test "x$path" != "x$new_path"; then
25126    BOOT_JDK="$new_path"
25127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25129  fi
25130
25131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25132
25133  path="$BOOT_JDK"
25134  has_colon=`$ECHO $path | $GREP ^.:`
25135  new_path="$path"
25136  if test "x$has_colon" = x; then
25137    # Not in mixed or Windows style, start by that.
25138    new_path=`cmd //c echo $path`
25139  fi
25140
25141
25142  input_path="$new_path"
25143  # Check if we need to convert this using DOS-style short mode. If the path
25144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25145  # take no chances and rewrite it.
25146  # Note: m4 eats our [], so we need to use [ and ] instead.
25147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25148  if test "x$has_forbidden_chars" != x; then
25149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25151  fi
25152
25153
25154  windows_path="$new_path"
25155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25156    unix_path=`$CYGPATH -u "$windows_path"`
25157    new_path="$unix_path"
25158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25160    new_path="$unix_path"
25161  fi
25162
25163  if test "x$path" != "x$new_path"; then
25164    BOOT_JDK="$new_path"
25165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25167  fi
25168
25169  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25170  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25171
25172    else
25173      # We're on a unix platform. Hooray! :)
25174      path="$BOOT_JDK"
25175      has_space=`$ECHO "$path" | $GREP " "`
25176      if test "x$has_space" != x; then
25177        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25179        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25180      fi
25181
25182      # Use eval to expand a potential ~
25183      eval path="$path"
25184      if test ! -f "$path" && test ! -d "$path"; then
25185        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25186      fi
25187
25188      if test -d "$path"; then
25189        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25190      else
25191        dir="`$DIRNAME "$path"`"
25192        base="`$BASENAME "$path"`"
25193        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25194      fi
25195    fi
25196  fi
25197
25198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25199$as_echo_n "checking for Boot JDK... " >&6; }
25200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25201$as_echo "$BOOT_JDK" >&6; }
25202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25203$as_echo_n "checking Boot JDK version... " >&6; }
25204            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25206$as_echo "$BOOT_JDK_VERSION" >&6; }
25207          fi # end check jdk version
25208        fi # end check javac
25209      fi # end check java
25210    fi # end check boot jdk found
25211  fi
25212
25213
25214  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25215
25216  if test "x$BOOT_JDK_FOUND" = xno; then
25217    # Now execute the test
25218
25219  # Extract the first word of "javac", so it can be a program name with args.
25220set dummy javac; ac_word=$2
25221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25222$as_echo_n "checking for $ac_word... " >&6; }
25223if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25224  $as_echo_n "(cached) " >&6
25225else
25226  case $JAVAC_CHECK in
25227  [\\/]* | ?:[\\/]*)
25228  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25229  ;;
25230  *)
25231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25232for as_dir in $PATH
25233do
25234  IFS=$as_save_IFS
25235  test -z "$as_dir" && as_dir=.
25236    for ac_exec_ext in '' $ac_executable_extensions; do
25237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25238    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25240    break 2
25241  fi
25242done
25243  done
25244IFS=$as_save_IFS
25245
25246  ;;
25247esac
25248fi
25249JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25250if test -n "$JAVAC_CHECK"; then
25251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25252$as_echo "$JAVAC_CHECK" >&6; }
25253else
25254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25255$as_echo "no" >&6; }
25256fi
25257
25258
25259  # Extract the first word of "java", so it can be a program name with args.
25260set dummy java; ac_word=$2
25261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25262$as_echo_n "checking for $ac_word... " >&6; }
25263if ${ac_cv_path_JAVA_CHECK+:} false; then :
25264  $as_echo_n "(cached) " >&6
25265else
25266  case $JAVA_CHECK in
25267  [\\/]* | ?:[\\/]*)
25268  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25269  ;;
25270  *)
25271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25272for as_dir in $PATH
25273do
25274  IFS=$as_save_IFS
25275  test -z "$as_dir" && as_dir=.
25276    for ac_exec_ext in '' $ac_executable_extensions; do
25277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25278    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25280    break 2
25281  fi
25282done
25283  done
25284IFS=$as_save_IFS
25285
25286  ;;
25287esac
25288fi
25289JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25290if test -n "$JAVA_CHECK"; then
25291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25292$as_echo "$JAVA_CHECK" >&6; }
25293else
25294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25295$as_echo "no" >&6; }
25296fi
25297
25298
25299  BINARY="$JAVAC_CHECK"
25300  if test "x$JAVAC_CHECK" = x; then
25301    BINARY="$JAVA_CHECK"
25302  fi
25303  if test "x$BINARY" != x; then
25304    # So there is a java(c) binary, it might be part of a JDK.
25305    # Lets find the JDK/JRE directory by following symbolic links.
25306    # Linux/GNU systems often have links from /usr/bin/java to
25307    # /etc/alternatives/java to the real JDK binary.
25308
25309  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25310    # Follow a chain of symbolic links. Use readlink
25311    # where it exists, else fall back to horribly
25312    # complicated shell code.
25313    if test "x$READLINK_TESTED" != yes; then
25314      # On MacOSX there is a readlink tool with a different
25315      # purpose than the GNU readlink tool. Check the found readlink.
25316      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25317      if test "x$ISGNU" = x; then
25318        # A readlink that we do not know how to use.
25319        # Are there other non-GNU readlinks out there?
25320        READLINK_TESTED=yes
25321        READLINK=
25322      fi
25323    fi
25324
25325    if test "x$READLINK" != x; then
25326      BINARY=`$READLINK -f $BINARY`
25327    else
25328      # Save the current directory for restoring afterwards
25329      STARTDIR=$PWD
25330      COUNTER=0
25331      sym_link_dir=`$DIRNAME $BINARY`
25332      sym_link_file=`$BASENAME $BINARY`
25333      cd $sym_link_dir
25334      # Use -P flag to resolve symlinks in directories.
25335      cd `$THEPWDCMD -P`
25336      sym_link_dir=`$THEPWDCMD -P`
25337      # Resolve file symlinks
25338      while test $COUNTER -lt 20; do
25339        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25340        if test "x$ISLINK" == x; then
25341          # This is not a symbolic link! We are done!
25342          break
25343        fi
25344        # Again resolve directory symlinks since the target of the just found
25345        # link could be in a different directory
25346        cd `$DIRNAME $ISLINK`
25347        sym_link_dir=`$THEPWDCMD -P`
25348        sym_link_file=`$BASENAME $ISLINK`
25349        let COUNTER=COUNTER+1
25350      done
25351      cd $STARTDIR
25352      BINARY=$sym_link_dir/$sym_link_file
25353    fi
25354  fi
25355
25356    BOOT_JDK=`dirname "$BINARY"`
25357    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25358    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25359      # Looks like we found ourselves an JDK
25360      BOOT_JDK_FOUND=maybe
25361      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25362$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25363    fi
25364  fi
25365
25366
25367    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25368    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25369      # Do we have a bin/java?
25370      if test ! -x "$BOOT_JDK/bin/java"; then
25371        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25373        BOOT_JDK_FOUND=no
25374      else
25375        # Do we have a bin/javac?
25376        if test ! -x "$BOOT_JDK/bin/javac"; then
25377          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25379          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25380$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25381          BOOT_JDK_FOUND=no
25382        else
25383          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25384          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25385
25386          # Extra M4 quote needed to protect [] in grep expression.
25387          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25388          if test "x$FOUND_CORRECT_VERSION" = x; then
25389            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25392$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25393            BOOT_JDK_FOUND=no
25394          else
25395            # We're done! :-)
25396            BOOT_JDK_FOUND=yes
25397
25398  # Only process if variable expands to non-empty
25399
25400  if test "x$BOOT_JDK" != x; then
25401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25402
25403  # Input might be given as Windows format, start by converting to
25404  # unix format.
25405  path="$BOOT_JDK"
25406  new_path=`$CYGPATH -u "$path"`
25407
25408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25411  # "foo.exe" is OK but "foo" is an error.
25412  #
25413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25414  # It is also a way to make sure we got the proper file name for the real test later on.
25415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25416  if test "x$test_shortpath" = x; then
25417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25420  fi
25421
25422  # Call helper function which possibly converts this using DOS-style short mode.
25423  # If so, the updated path is stored in $new_path.
25424
25425  input_path="$new_path"
25426  # Check if we need to convert this using DOS-style short mode. If the path
25427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25428  # take no chances and rewrite it.
25429  # Note: m4 eats our [], so we need to use [ and ] instead.
25430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25431  if test "x$has_forbidden_chars" != x; then
25432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25436      # Going to short mode and back again did indeed matter. Since short mode is
25437      # case insensitive, let's make it lowercase to improve readability.
25438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25439      # Now convert it back to Unix-style (cygpath)
25440      input_path=`$CYGPATH -u "$shortmode_path"`
25441      new_path="$input_path"
25442    fi
25443  fi
25444
25445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25446  if test "x$test_cygdrive_prefix" = x; then
25447    # As a simple fix, exclude /usr/bin since it's not a real path.
25448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25450      # a path prefixed by /cygdrive for fixpath to work.
25451      new_path="$CYGWIN_ROOT_PATH$input_path"
25452    fi
25453  fi
25454
25455
25456  if test "x$path" != "x$new_path"; then
25457    BOOT_JDK="$new_path"
25458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25460  fi
25461
25462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463
25464  path="$BOOT_JDK"
25465  has_colon=`$ECHO $path | $GREP ^.:`
25466  new_path="$path"
25467  if test "x$has_colon" = x; then
25468    # Not in mixed or Windows style, start by that.
25469    new_path=`cmd //c echo $path`
25470  fi
25471
25472
25473  input_path="$new_path"
25474  # Check if we need to convert this using DOS-style short mode. If the path
25475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25476  # take no chances and rewrite it.
25477  # Note: m4 eats our [], so we need to use [ and ] instead.
25478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25479  if test "x$has_forbidden_chars" != x; then
25480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25482  fi
25483
25484
25485  windows_path="$new_path"
25486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487    unix_path=`$CYGPATH -u "$windows_path"`
25488    new_path="$unix_path"
25489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491    new_path="$unix_path"
25492  fi
25493
25494  if test "x$path" != "x$new_path"; then
25495    BOOT_JDK="$new_path"
25496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25498  fi
25499
25500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25502
25503    else
25504      # We're on a unix platform. Hooray! :)
25505      path="$BOOT_JDK"
25506      has_space=`$ECHO "$path" | $GREP " "`
25507      if test "x$has_space" != x; then
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25511      fi
25512
25513      # Use eval to expand a potential ~
25514      eval path="$path"
25515      if test ! -f "$path" && test ! -d "$path"; then
25516        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25517      fi
25518
25519      if test -d "$path"; then
25520        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25521      else
25522        dir="`$DIRNAME "$path"`"
25523        base="`$BASENAME "$path"`"
25524        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25525      fi
25526    fi
25527  fi
25528
25529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25530$as_echo_n "checking for Boot JDK... " >&6; }
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25532$as_echo "$BOOT_JDK" >&6; }
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25534$as_echo_n "checking Boot JDK version... " >&6; }
25535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25537$as_echo "$BOOT_JDK_VERSION" >&6; }
25538          fi # end check jdk version
25539        fi # end check javac
25540      fi # end check java
25541    fi # end check boot jdk found
25542  fi
25543
25544
25545  # Test: Is there a JDK installed in default, well-known locations?
25546
25547  if test "x$BOOT_JDK_FOUND" = xno; then
25548    # Now execute the test
25549
25550  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25551
25552  if test "x$BOOT_JDK_FOUND" = xno; then
25553    # Now execute the test
25554
25555  if test "x$ProgramW6432" != x; then
25556    VIRTUAL_DIR="$ProgramW6432/Java"
25557
25558  windows_path="$VIRTUAL_DIR"
25559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25560    unix_path=`$CYGPATH -u "$windows_path"`
25561    VIRTUAL_DIR="$unix_path"
25562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25564    VIRTUAL_DIR="$unix_path"
25565  fi
25566
25567
25568  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25569  BOOT_JDK_SUFFIX=""
25570  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25571  if test "x$ALL_JDKS_FOUND" != x; then
25572    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25573
25574  if test "x$BOOT_JDK_FOUND" = xno; then
25575    # Now execute the test
25576
25577        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25578        if test -d "$BOOT_JDK"; then
25579          BOOT_JDK_FOUND=maybe
25580          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25581$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25582        fi
25583
25584
25585    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25586    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25587      # Do we have a bin/java?
25588      if test ! -x "$BOOT_JDK/bin/java"; then
25589        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25591        BOOT_JDK_FOUND=no
25592      else
25593        # Do we have a bin/javac?
25594        if test ! -x "$BOOT_JDK/bin/javac"; then
25595          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25597          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25598$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25599          BOOT_JDK_FOUND=no
25600        else
25601          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25602          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25603
25604          # Extra M4 quote needed to protect [] in grep expression.
25605          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25606          if test "x$FOUND_CORRECT_VERSION" = x; then
25607            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25609            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25610$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25611            BOOT_JDK_FOUND=no
25612          else
25613            # We're done! :-)
25614            BOOT_JDK_FOUND=yes
25615
25616  # Only process if variable expands to non-empty
25617
25618  if test "x$BOOT_JDK" != x; then
25619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25620
25621  # Input might be given as Windows format, start by converting to
25622  # unix format.
25623  path="$BOOT_JDK"
25624  new_path=`$CYGPATH -u "$path"`
25625
25626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25629  # "foo.exe" is OK but "foo" is an error.
25630  #
25631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25632  # It is also a way to make sure we got the proper file name for the real test later on.
25633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25634  if test "x$test_shortpath" = x; then
25635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25637    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25638  fi
25639
25640  # Call helper function which possibly converts this using DOS-style short mode.
25641  # If so, the updated path is stored in $new_path.
25642
25643  input_path="$new_path"
25644  # Check if we need to convert this using DOS-style short mode. If the path
25645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25646  # take no chances and rewrite it.
25647  # Note: m4 eats our [], so we need to use [ and ] instead.
25648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25649  if test "x$has_forbidden_chars" != x; then
25650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25654      # Going to short mode and back again did indeed matter. Since short mode is
25655      # case insensitive, let's make it lowercase to improve readability.
25656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25657      # Now convert it back to Unix-style (cygpath)
25658      input_path=`$CYGPATH -u "$shortmode_path"`
25659      new_path="$input_path"
25660    fi
25661  fi
25662
25663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25664  if test "x$test_cygdrive_prefix" = x; then
25665    # As a simple fix, exclude /usr/bin since it's not a real path.
25666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25668      # a path prefixed by /cygdrive for fixpath to work.
25669      new_path="$CYGWIN_ROOT_PATH$input_path"
25670    fi
25671  fi
25672
25673
25674  if test "x$path" != "x$new_path"; then
25675    BOOT_JDK="$new_path"
25676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25678  fi
25679
25680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25681
25682  path="$BOOT_JDK"
25683  has_colon=`$ECHO $path | $GREP ^.:`
25684  new_path="$path"
25685  if test "x$has_colon" = x; then
25686    # Not in mixed or Windows style, start by that.
25687    new_path=`cmd //c echo $path`
25688  fi
25689
25690
25691  input_path="$new_path"
25692  # Check if we need to convert this using DOS-style short mode. If the path
25693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25694  # take no chances and rewrite it.
25695  # Note: m4 eats our [], so we need to use [ and ] instead.
25696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25697  if test "x$has_forbidden_chars" != x; then
25698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25700  fi
25701
25702
25703  windows_path="$new_path"
25704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25705    unix_path=`$CYGPATH -u "$windows_path"`
25706    new_path="$unix_path"
25707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25709    new_path="$unix_path"
25710  fi
25711
25712  if test "x$path" != "x$new_path"; then
25713    BOOT_JDK="$new_path"
25714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25716  fi
25717
25718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25720
25721    else
25722      # We're on a unix platform. Hooray! :)
25723      path="$BOOT_JDK"
25724      has_space=`$ECHO "$path" | $GREP " "`
25725      if test "x$has_space" != x; then
25726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25729      fi
25730
25731      # Use eval to expand a potential ~
25732      eval path="$path"
25733      if test ! -f "$path" && test ! -d "$path"; then
25734        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25735      fi
25736
25737      if test -d "$path"; then
25738        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25739      else
25740        dir="`$DIRNAME "$path"`"
25741        base="`$BASENAME "$path"`"
25742        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25743      fi
25744    fi
25745  fi
25746
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25748$as_echo_n "checking for Boot JDK... " >&6; }
25749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25750$as_echo "$BOOT_JDK" >&6; }
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25752$as_echo_n "checking Boot JDK version... " >&6; }
25753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25755$as_echo "$BOOT_JDK_VERSION" >&6; }
25756          fi # end check jdk version
25757        fi # end check javac
25758      fi # end check java
25759    fi # end check boot jdk found
25760  fi
25761
25762    done
25763  fi
25764
25765  fi
25766
25767
25768    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25769    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25770      # Do we have a bin/java?
25771      if test ! -x "$BOOT_JDK/bin/java"; then
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25774        BOOT_JDK_FOUND=no
25775      else
25776        # Do we have a bin/javac?
25777        if test ! -x "$BOOT_JDK/bin/javac"; then
25778          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25780          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25781$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25782          BOOT_JDK_FOUND=no
25783        else
25784          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25785          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25786
25787          # Extra M4 quote needed to protect [] in grep expression.
25788          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25789          if test "x$FOUND_CORRECT_VERSION" = x; then
25790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25792            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25793$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25794            BOOT_JDK_FOUND=no
25795          else
25796            # We're done! :-)
25797            BOOT_JDK_FOUND=yes
25798
25799  # Only process if variable expands to non-empty
25800
25801  if test "x$BOOT_JDK" != x; then
25802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25803
25804  # Input might be given as Windows format, start by converting to
25805  # unix format.
25806  path="$BOOT_JDK"
25807  new_path=`$CYGPATH -u "$path"`
25808
25809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25812  # "foo.exe" is OK but "foo" is an error.
25813  #
25814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25815  # It is also a way to make sure we got the proper file name for the real test later on.
25816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25817  if test "x$test_shortpath" = x; then
25818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25821  fi
25822
25823  # Call helper function which possibly converts this using DOS-style short mode.
25824  # If so, the updated path is stored in $new_path.
25825
25826  input_path="$new_path"
25827  # Check if we need to convert this using DOS-style short mode. If the path
25828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25829  # take no chances and rewrite it.
25830  # Note: m4 eats our [], so we need to use [ and ] instead.
25831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25832  if test "x$has_forbidden_chars" != x; then
25833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25837      # Going to short mode and back again did indeed matter. Since short mode is
25838      # case insensitive, let's make it lowercase to improve readability.
25839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25840      # Now convert it back to Unix-style (cygpath)
25841      input_path=`$CYGPATH -u "$shortmode_path"`
25842      new_path="$input_path"
25843    fi
25844  fi
25845
25846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25847  if test "x$test_cygdrive_prefix" = x; then
25848    # As a simple fix, exclude /usr/bin since it's not a real path.
25849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25851      # a path prefixed by /cygdrive for fixpath to work.
25852      new_path="$CYGWIN_ROOT_PATH$input_path"
25853    fi
25854  fi
25855
25856
25857  if test "x$path" != "x$new_path"; then
25858    BOOT_JDK="$new_path"
25859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25861  fi
25862
25863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25864
25865  path="$BOOT_JDK"
25866  has_colon=`$ECHO $path | $GREP ^.:`
25867  new_path="$path"
25868  if test "x$has_colon" = x; then
25869    # Not in mixed or Windows style, start by that.
25870    new_path=`cmd //c echo $path`
25871  fi
25872
25873
25874  input_path="$new_path"
25875  # Check if we need to convert this using DOS-style short mode. If the path
25876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25877  # take no chances and rewrite it.
25878  # Note: m4 eats our [], so we need to use [ and ] instead.
25879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25880  if test "x$has_forbidden_chars" != x; then
25881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25883  fi
25884
25885
25886  windows_path="$new_path"
25887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25888    unix_path=`$CYGPATH -u "$windows_path"`
25889    new_path="$unix_path"
25890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25892    new_path="$unix_path"
25893  fi
25894
25895  if test "x$path" != "x$new_path"; then
25896    BOOT_JDK="$new_path"
25897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25899  fi
25900
25901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25903
25904    else
25905      # We're on a unix platform. Hooray! :)
25906      path="$BOOT_JDK"
25907      has_space=`$ECHO "$path" | $GREP " "`
25908      if test "x$has_space" != x; then
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25912      fi
25913
25914      # Use eval to expand a potential ~
25915      eval path="$path"
25916      if test ! -f "$path" && test ! -d "$path"; then
25917        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25918      fi
25919
25920      if test -d "$path"; then
25921        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25922      else
25923        dir="`$DIRNAME "$path"`"
25924        base="`$BASENAME "$path"`"
25925        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25926      fi
25927    fi
25928  fi
25929
25930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25931$as_echo_n "checking for Boot JDK... " >&6; }
25932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25933$as_echo "$BOOT_JDK" >&6; }
25934            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25935$as_echo_n "checking Boot JDK version... " >&6; }
25936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25938$as_echo "$BOOT_JDK_VERSION" >&6; }
25939          fi # end check jdk version
25940        fi # end check javac
25941      fi # end check java
25942    fi # end check boot jdk found
25943  fi
25944
25945
25946  if test "x$BOOT_JDK_FOUND" = xno; then
25947    # Now execute the test
25948
25949  if test "x$PROGRAMW6432" != x; then
25950    VIRTUAL_DIR="$PROGRAMW6432/Java"
25951
25952  windows_path="$VIRTUAL_DIR"
25953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25954    unix_path=`$CYGPATH -u "$windows_path"`
25955    VIRTUAL_DIR="$unix_path"
25956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25958    VIRTUAL_DIR="$unix_path"
25959  fi
25960
25961
25962  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25963  BOOT_JDK_SUFFIX=""
25964  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25965  if test "x$ALL_JDKS_FOUND" != x; then
25966    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25967
25968  if test "x$BOOT_JDK_FOUND" = xno; then
25969    # Now execute the test
25970
25971        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25972        if test -d "$BOOT_JDK"; then
25973          BOOT_JDK_FOUND=maybe
25974          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25975$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25976        fi
25977
25978
25979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25981      # Do we have a bin/java?
25982      if test ! -x "$BOOT_JDK/bin/java"; then
25983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25985        BOOT_JDK_FOUND=no
25986      else
25987        # Do we have a bin/javac?
25988        if test ! -x "$BOOT_JDK/bin/javac"; then
25989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25993          BOOT_JDK_FOUND=no
25994        else
25995          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25996          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25997
25998          # Extra M4 quote needed to protect [] in grep expression.
25999          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26000          if test "x$FOUND_CORRECT_VERSION" = x; then
26001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26003            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26005            BOOT_JDK_FOUND=no
26006          else
26007            # We're done! :-)
26008            BOOT_JDK_FOUND=yes
26009
26010  # Only process if variable expands to non-empty
26011
26012  if test "x$BOOT_JDK" != x; then
26013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26014
26015  # Input might be given as Windows format, start by converting to
26016  # unix format.
26017  path="$BOOT_JDK"
26018  new_path=`$CYGPATH -u "$path"`
26019
26020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26023  # "foo.exe" is OK but "foo" is an error.
26024  #
26025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26026  # It is also a way to make sure we got the proper file name for the real test later on.
26027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26028  if test "x$test_shortpath" = x; then
26029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26032  fi
26033
26034  # Call helper function which possibly converts this using DOS-style short mode.
26035  # If so, the updated path is stored in $new_path.
26036
26037  input_path="$new_path"
26038  # Check if we need to convert this using DOS-style short mode. If the path
26039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26040  # take no chances and rewrite it.
26041  # Note: m4 eats our [], so we need to use [ and ] instead.
26042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26043  if test "x$has_forbidden_chars" != x; then
26044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26048      # Going to short mode and back again did indeed matter. Since short mode is
26049      # case insensitive, let's make it lowercase to improve readability.
26050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26051      # Now convert it back to Unix-style (cygpath)
26052      input_path=`$CYGPATH -u "$shortmode_path"`
26053      new_path="$input_path"
26054    fi
26055  fi
26056
26057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26058  if test "x$test_cygdrive_prefix" = x; then
26059    # As a simple fix, exclude /usr/bin since it's not a real path.
26060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26062      # a path prefixed by /cygdrive for fixpath to work.
26063      new_path="$CYGWIN_ROOT_PATH$input_path"
26064    fi
26065  fi
26066
26067
26068  if test "x$path" != "x$new_path"; then
26069    BOOT_JDK="$new_path"
26070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26072  fi
26073
26074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26075
26076  path="$BOOT_JDK"
26077  has_colon=`$ECHO $path | $GREP ^.:`
26078  new_path="$path"
26079  if test "x$has_colon" = x; then
26080    # Not in mixed or Windows style, start by that.
26081    new_path=`cmd //c echo $path`
26082  fi
26083
26084
26085  input_path="$new_path"
26086  # Check if we need to convert this using DOS-style short mode. If the path
26087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26088  # take no chances and rewrite it.
26089  # Note: m4 eats our [], so we need to use [ and ] instead.
26090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26091  if test "x$has_forbidden_chars" != x; then
26092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26094  fi
26095
26096
26097  windows_path="$new_path"
26098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26099    unix_path=`$CYGPATH -u "$windows_path"`
26100    new_path="$unix_path"
26101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26103    new_path="$unix_path"
26104  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26114
26115    else
26116      # We're on a unix platform. Hooray! :)
26117      path="$BOOT_JDK"
26118      has_space=`$ECHO "$path" | $GREP " "`
26119      if test "x$has_space" != x; then
26120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26123      fi
26124
26125      # Use eval to expand a potential ~
26126      eval path="$path"
26127      if test ! -f "$path" && test ! -d "$path"; then
26128        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26129      fi
26130
26131      if test -d "$path"; then
26132        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26133      else
26134        dir="`$DIRNAME "$path"`"
26135        base="`$BASENAME "$path"`"
26136        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26137      fi
26138    fi
26139  fi
26140
26141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26142$as_echo_n "checking for Boot JDK... " >&6; }
26143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26144$as_echo "$BOOT_JDK" >&6; }
26145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26146$as_echo_n "checking Boot JDK version... " >&6; }
26147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26149$as_echo "$BOOT_JDK_VERSION" >&6; }
26150          fi # end check jdk version
26151        fi # end check javac
26152      fi # end check java
26153    fi # end check boot jdk found
26154  fi
26155
26156    done
26157  fi
26158
26159  fi
26160
26161
26162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26164      # Do we have a bin/java?
26165      if test ! -x "$BOOT_JDK/bin/java"; then
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26168        BOOT_JDK_FOUND=no
26169      else
26170        # Do we have a bin/javac?
26171        if test ! -x "$BOOT_JDK/bin/javac"; then
26172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26176          BOOT_JDK_FOUND=no
26177        else
26178          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26179          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26180
26181          # Extra M4 quote needed to protect [] in grep expression.
26182          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26183          if test "x$FOUND_CORRECT_VERSION" = x; then
26184            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26187$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26188            BOOT_JDK_FOUND=no
26189          else
26190            # We're done! :-)
26191            BOOT_JDK_FOUND=yes
26192
26193  # Only process if variable expands to non-empty
26194
26195  if test "x$BOOT_JDK" != x; then
26196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197
26198  # Input might be given as Windows format, start by converting to
26199  # unix format.
26200  path="$BOOT_JDK"
26201  new_path=`$CYGPATH -u "$path"`
26202
26203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26206  # "foo.exe" is OK but "foo" is an error.
26207  #
26208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26209  # It is also a way to make sure we got the proper file name for the real test later on.
26210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26211  if test "x$test_shortpath" = x; then
26212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26215  fi
26216
26217  # Call helper function which possibly converts this using DOS-style short mode.
26218  # If so, the updated path is stored in $new_path.
26219
26220  input_path="$new_path"
26221  # Check if we need to convert this using DOS-style short mode. If the path
26222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26223  # take no chances and rewrite it.
26224  # Note: m4 eats our [], so we need to use [ and ] instead.
26225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26226  if test "x$has_forbidden_chars" != x; then
26227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26231      # Going to short mode and back again did indeed matter. Since short mode is
26232      # case insensitive, let's make it lowercase to improve readability.
26233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26234      # Now convert it back to Unix-style (cygpath)
26235      input_path=`$CYGPATH -u "$shortmode_path"`
26236      new_path="$input_path"
26237    fi
26238  fi
26239
26240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26241  if test "x$test_cygdrive_prefix" = x; then
26242    # As a simple fix, exclude /usr/bin since it's not a real path.
26243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26245      # a path prefixed by /cygdrive for fixpath to work.
26246      new_path="$CYGWIN_ROOT_PATH$input_path"
26247    fi
26248  fi
26249
26250
26251  if test "x$path" != "x$new_path"; then
26252    BOOT_JDK="$new_path"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255  fi
26256
26257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258
26259  path="$BOOT_JDK"
26260  has_colon=`$ECHO $path | $GREP ^.:`
26261  new_path="$path"
26262  if test "x$has_colon" = x; then
26263    # Not in mixed or Windows style, start by that.
26264    new_path=`cmd //c echo $path`
26265  fi
26266
26267
26268  input_path="$new_path"
26269  # Check if we need to convert this using DOS-style short mode. If the path
26270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271  # take no chances and rewrite it.
26272  # Note: m4 eats our [], so we need to use [ and ] instead.
26273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26274  if test "x$has_forbidden_chars" != x; then
26275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26277  fi
26278
26279
26280  windows_path="$new_path"
26281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26282    unix_path=`$CYGPATH -u "$windows_path"`
26283    new_path="$unix_path"
26284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26286    new_path="$unix_path"
26287  fi
26288
26289  if test "x$path" != "x$new_path"; then
26290    BOOT_JDK="$new_path"
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26293  fi
26294
26295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26297
26298    else
26299      # We're on a unix platform. Hooray! :)
26300      path="$BOOT_JDK"
26301      has_space=`$ECHO "$path" | $GREP " "`
26302      if test "x$has_space" != x; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26306      fi
26307
26308      # Use eval to expand a potential ~
26309      eval path="$path"
26310      if test ! -f "$path" && test ! -d "$path"; then
26311        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26312      fi
26313
26314      if test -d "$path"; then
26315        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26316      else
26317        dir="`$DIRNAME "$path"`"
26318        base="`$BASENAME "$path"`"
26319        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26320      fi
26321    fi
26322  fi
26323
26324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26325$as_echo_n "checking for Boot JDK... " >&6; }
26326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26327$as_echo "$BOOT_JDK" >&6; }
26328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26329$as_echo_n "checking Boot JDK version... " >&6; }
26330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26332$as_echo "$BOOT_JDK_VERSION" >&6; }
26333          fi # end check jdk version
26334        fi # end check javac
26335      fi # end check java
26336    fi # end check boot jdk found
26337  fi
26338
26339
26340  if test "x$BOOT_JDK_FOUND" = xno; then
26341    # Now execute the test
26342
26343  if test "x$PROGRAMFILES" != x; then
26344    VIRTUAL_DIR="$PROGRAMFILES/Java"
26345
26346  windows_path="$VIRTUAL_DIR"
26347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26348    unix_path=`$CYGPATH -u "$windows_path"`
26349    VIRTUAL_DIR="$unix_path"
26350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26352    VIRTUAL_DIR="$unix_path"
26353  fi
26354
26355
26356  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26357  BOOT_JDK_SUFFIX=""
26358  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26359  if test "x$ALL_JDKS_FOUND" != x; then
26360    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26361
26362  if test "x$BOOT_JDK_FOUND" = xno; then
26363    # Now execute the test
26364
26365        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26366        if test -d "$BOOT_JDK"; then
26367          BOOT_JDK_FOUND=maybe
26368          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26369$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26370        fi
26371
26372
26373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26375      # Do we have a bin/java?
26376      if test ! -x "$BOOT_JDK/bin/java"; then
26377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26379        BOOT_JDK_FOUND=no
26380      else
26381        # Do we have a bin/javac?
26382        if test ! -x "$BOOT_JDK/bin/javac"; then
26383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26387          BOOT_JDK_FOUND=no
26388        else
26389          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26390          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26391
26392          # Extra M4 quote needed to protect [] in grep expression.
26393          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26394          if test "x$FOUND_CORRECT_VERSION" = x; then
26395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26397            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26398$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26399            BOOT_JDK_FOUND=no
26400          else
26401            # We're done! :-)
26402            BOOT_JDK_FOUND=yes
26403
26404  # Only process if variable expands to non-empty
26405
26406  if test "x$BOOT_JDK" != x; then
26407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26408
26409  # Input might be given as Windows format, start by converting to
26410  # unix format.
26411  path="$BOOT_JDK"
26412  new_path=`$CYGPATH -u "$path"`
26413
26414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26417  # "foo.exe" is OK but "foo" is an error.
26418  #
26419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26420  # It is also a way to make sure we got the proper file name for the real test later on.
26421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26422  if test "x$test_shortpath" = x; then
26423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26426  fi
26427
26428  # Call helper function which possibly converts this using DOS-style short mode.
26429  # If so, the updated path is stored in $new_path.
26430
26431  input_path="$new_path"
26432  # Check if we need to convert this using DOS-style short mode. If the path
26433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26434  # take no chances and rewrite it.
26435  # Note: m4 eats our [], so we need to use [ and ] instead.
26436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26437  if test "x$has_forbidden_chars" != x; then
26438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26442      # Going to short mode and back again did indeed matter. Since short mode is
26443      # case insensitive, let's make it lowercase to improve readability.
26444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26445      # Now convert it back to Unix-style (cygpath)
26446      input_path=`$CYGPATH -u "$shortmode_path"`
26447      new_path="$input_path"
26448    fi
26449  fi
26450
26451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26452  if test "x$test_cygdrive_prefix" = x; then
26453    # As a simple fix, exclude /usr/bin since it's not a real path.
26454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26456      # a path prefixed by /cygdrive for fixpath to work.
26457      new_path="$CYGWIN_ROOT_PATH$input_path"
26458    fi
26459  fi
26460
26461
26462  if test "x$path" != "x$new_path"; then
26463    BOOT_JDK="$new_path"
26464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26466  fi
26467
26468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26469
26470  path="$BOOT_JDK"
26471  has_colon=`$ECHO $path | $GREP ^.:`
26472  new_path="$path"
26473  if test "x$has_colon" = x; then
26474    # Not in mixed or Windows style, start by that.
26475    new_path=`cmd //c echo $path`
26476  fi
26477
26478
26479  input_path="$new_path"
26480  # Check if we need to convert this using DOS-style short mode. If the path
26481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26482  # take no chances and rewrite it.
26483  # Note: m4 eats our [], so we need to use [ and ] instead.
26484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26485  if test "x$has_forbidden_chars" != x; then
26486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26488  fi
26489
26490
26491  windows_path="$new_path"
26492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26493    unix_path=`$CYGPATH -u "$windows_path"`
26494    new_path="$unix_path"
26495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26497    new_path="$unix_path"
26498  fi
26499
26500  if test "x$path" != "x$new_path"; then
26501    BOOT_JDK="$new_path"
26502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26504  fi
26505
26506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26508
26509    else
26510      # We're on a unix platform. Hooray! :)
26511      path="$BOOT_JDK"
26512      has_space=`$ECHO "$path" | $GREP " "`
26513      if test "x$has_space" != x; then
26514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26517      fi
26518
26519      # Use eval to expand a potential ~
26520      eval path="$path"
26521      if test ! -f "$path" && test ! -d "$path"; then
26522        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26523      fi
26524
26525      if test -d "$path"; then
26526        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26527      else
26528        dir="`$DIRNAME "$path"`"
26529        base="`$BASENAME "$path"`"
26530        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26531      fi
26532    fi
26533  fi
26534
26535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26536$as_echo_n "checking for Boot JDK... " >&6; }
26537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26538$as_echo "$BOOT_JDK" >&6; }
26539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26540$as_echo_n "checking Boot JDK version... " >&6; }
26541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26543$as_echo "$BOOT_JDK_VERSION" >&6; }
26544          fi # end check jdk version
26545        fi # end check javac
26546      fi # end check java
26547    fi # end check boot jdk found
26548  fi
26549
26550    done
26551  fi
26552
26553  fi
26554
26555
26556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26558      # Do we have a bin/java?
26559      if test ! -x "$BOOT_JDK/bin/java"; then
26560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26562        BOOT_JDK_FOUND=no
26563      else
26564        # Do we have a bin/javac?
26565        if test ! -x "$BOOT_JDK/bin/javac"; then
26566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26570          BOOT_JDK_FOUND=no
26571        else
26572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26574
26575          # Extra M4 quote needed to protect [] in grep expression.
26576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26577          if test "x$FOUND_CORRECT_VERSION" = x; then
26578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26582            BOOT_JDK_FOUND=no
26583          else
26584            # We're done! :-)
26585            BOOT_JDK_FOUND=yes
26586
26587  # Only process if variable expands to non-empty
26588
26589  if test "x$BOOT_JDK" != x; then
26590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26591
26592  # Input might be given as Windows format, start by converting to
26593  # unix format.
26594  path="$BOOT_JDK"
26595  new_path=`$CYGPATH -u "$path"`
26596
26597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26600  # "foo.exe" is OK but "foo" is an error.
26601  #
26602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26603  # It is also a way to make sure we got the proper file name for the real test later on.
26604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26605  if test "x$test_shortpath" = x; then
26606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26609  fi
26610
26611  # Call helper function which possibly converts this using DOS-style short mode.
26612  # If so, the updated path is stored in $new_path.
26613
26614  input_path="$new_path"
26615  # Check if we need to convert this using DOS-style short mode. If the path
26616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26617  # take no chances and rewrite it.
26618  # Note: m4 eats our [], so we need to use [ and ] instead.
26619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26620  if test "x$has_forbidden_chars" != x; then
26621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26625      # Going to short mode and back again did indeed matter. Since short mode is
26626      # case insensitive, let's make it lowercase to improve readability.
26627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26628      # Now convert it back to Unix-style (cygpath)
26629      input_path=`$CYGPATH -u "$shortmode_path"`
26630      new_path="$input_path"
26631    fi
26632  fi
26633
26634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26635  if test "x$test_cygdrive_prefix" = x; then
26636    # As a simple fix, exclude /usr/bin since it's not a real path.
26637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26639      # a path prefixed by /cygdrive for fixpath to work.
26640      new_path="$CYGWIN_ROOT_PATH$input_path"
26641    fi
26642  fi
26643
26644
26645  if test "x$path" != "x$new_path"; then
26646    BOOT_JDK="$new_path"
26647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26649  fi
26650
26651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652
26653  path="$BOOT_JDK"
26654  has_colon=`$ECHO $path | $GREP ^.:`
26655  new_path="$path"
26656  if test "x$has_colon" = x; then
26657    # Not in mixed or Windows style, start by that.
26658    new_path=`cmd //c echo $path`
26659  fi
26660
26661
26662  input_path="$new_path"
26663  # Check if we need to convert this using DOS-style short mode. If the path
26664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26665  # take no chances and rewrite it.
26666  # Note: m4 eats our [], so we need to use [ and ] instead.
26667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26668  if test "x$has_forbidden_chars" != x; then
26669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26671  fi
26672
26673
26674  windows_path="$new_path"
26675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26676    unix_path=`$CYGPATH -u "$windows_path"`
26677    new_path="$unix_path"
26678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26680    new_path="$unix_path"
26681  fi
26682
26683  if test "x$path" != "x$new_path"; then
26684    BOOT_JDK="$new_path"
26685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26687  fi
26688
26689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26691
26692    else
26693      # We're on a unix platform. Hooray! :)
26694      path="$BOOT_JDK"
26695      has_space=`$ECHO "$path" | $GREP " "`
26696      if test "x$has_space" != x; then
26697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26700      fi
26701
26702      # Use eval to expand a potential ~
26703      eval path="$path"
26704      if test ! -f "$path" && test ! -d "$path"; then
26705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26706      fi
26707
26708      if test -d "$path"; then
26709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26710      else
26711        dir="`$DIRNAME "$path"`"
26712        base="`$BASENAME "$path"`"
26713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26714      fi
26715    fi
26716  fi
26717
26718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26719$as_echo_n "checking for Boot JDK... " >&6; }
26720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26721$as_echo "$BOOT_JDK" >&6; }
26722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26723$as_echo_n "checking Boot JDK version... " >&6; }
26724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26726$as_echo "$BOOT_JDK_VERSION" >&6; }
26727          fi # end check jdk version
26728        fi # end check javac
26729      fi # end check java
26730    fi # end check boot jdk found
26731  fi
26732
26733
26734  if test "x$BOOT_JDK_FOUND" = xno; then
26735    # Now execute the test
26736
26737  if test "x$ProgramFiles" != x; then
26738    VIRTUAL_DIR="$ProgramFiles/Java"
26739
26740  windows_path="$VIRTUAL_DIR"
26741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742    unix_path=`$CYGPATH -u "$windows_path"`
26743    VIRTUAL_DIR="$unix_path"
26744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26746    VIRTUAL_DIR="$unix_path"
26747  fi
26748
26749
26750  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26751  BOOT_JDK_SUFFIX=""
26752  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26753  if test "x$ALL_JDKS_FOUND" != x; then
26754    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26755
26756  if test "x$BOOT_JDK_FOUND" = xno; then
26757    # Now execute the test
26758
26759        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26760        if test -d "$BOOT_JDK"; then
26761          BOOT_JDK_FOUND=maybe
26762          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26763$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26764        fi
26765
26766
26767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26769      # Do we have a bin/java?
26770      if test ! -x "$BOOT_JDK/bin/java"; then
26771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26773        BOOT_JDK_FOUND=no
26774      else
26775        # Do we have a bin/javac?
26776        if test ! -x "$BOOT_JDK/bin/javac"; then
26777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26781          BOOT_JDK_FOUND=no
26782        else
26783          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26784          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26785
26786          # Extra M4 quote needed to protect [] in grep expression.
26787          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26788          if test "x$FOUND_CORRECT_VERSION" = x; then
26789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26792$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26793            BOOT_JDK_FOUND=no
26794          else
26795            # We're done! :-)
26796            BOOT_JDK_FOUND=yes
26797
26798  # Only process if variable expands to non-empty
26799
26800  if test "x$BOOT_JDK" != x; then
26801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26802
26803  # Input might be given as Windows format, start by converting to
26804  # unix format.
26805  path="$BOOT_JDK"
26806  new_path=`$CYGPATH -u "$path"`
26807
26808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26811  # "foo.exe" is OK but "foo" is an error.
26812  #
26813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26814  # It is also a way to make sure we got the proper file name for the real test later on.
26815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26816  if test "x$test_shortpath" = x; then
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26819    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26820  fi
26821
26822  # Call helper function which possibly converts this using DOS-style short mode.
26823  # If so, the updated path is stored in $new_path.
26824
26825  input_path="$new_path"
26826  # Check if we need to convert this using DOS-style short mode. If the path
26827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26828  # take no chances and rewrite it.
26829  # Note: m4 eats our [], so we need to use [ and ] instead.
26830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26831  if test "x$has_forbidden_chars" != x; then
26832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26836      # Going to short mode and back again did indeed matter. Since short mode is
26837      # case insensitive, let's make it lowercase to improve readability.
26838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26839      # Now convert it back to Unix-style (cygpath)
26840      input_path=`$CYGPATH -u "$shortmode_path"`
26841      new_path="$input_path"
26842    fi
26843  fi
26844
26845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26846  if test "x$test_cygdrive_prefix" = x; then
26847    # As a simple fix, exclude /usr/bin since it's not a real path.
26848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26850      # a path prefixed by /cygdrive for fixpath to work.
26851      new_path="$CYGWIN_ROOT_PATH$input_path"
26852    fi
26853  fi
26854
26855
26856  if test "x$path" != "x$new_path"; then
26857    BOOT_JDK="$new_path"
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26860  fi
26861
26862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26863
26864  path="$BOOT_JDK"
26865  has_colon=`$ECHO $path | $GREP ^.:`
26866  new_path="$path"
26867  if test "x$has_colon" = x; then
26868    # Not in mixed or Windows style, start by that.
26869    new_path=`cmd //c echo $path`
26870  fi
26871
26872
26873  input_path="$new_path"
26874  # Check if we need to convert this using DOS-style short mode. If the path
26875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26876  # take no chances and rewrite it.
26877  # Note: m4 eats our [], so we need to use [ and ] instead.
26878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26879  if test "x$has_forbidden_chars" != x; then
26880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26882  fi
26883
26884
26885  windows_path="$new_path"
26886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26887    unix_path=`$CYGPATH -u "$windows_path"`
26888    new_path="$unix_path"
26889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26891    new_path="$unix_path"
26892  fi
26893
26894  if test "x$path" != "x$new_path"; then
26895    BOOT_JDK="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26898  fi
26899
26900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26902
26903    else
26904      # We're on a unix platform. Hooray! :)
26905      path="$BOOT_JDK"
26906      has_space=`$ECHO "$path" | $GREP " "`
26907      if test "x$has_space" != x; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26911      fi
26912
26913      # Use eval to expand a potential ~
26914      eval path="$path"
26915      if test ! -f "$path" && test ! -d "$path"; then
26916        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26917      fi
26918
26919      if test -d "$path"; then
26920        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26921      else
26922        dir="`$DIRNAME "$path"`"
26923        base="`$BASENAME "$path"`"
26924        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26925      fi
26926    fi
26927  fi
26928
26929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26930$as_echo_n "checking for Boot JDK... " >&6; }
26931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26932$as_echo "$BOOT_JDK" >&6; }
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26934$as_echo_n "checking Boot JDK version... " >&6; }
26935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26937$as_echo "$BOOT_JDK_VERSION" >&6; }
26938          fi # end check jdk version
26939        fi # end check javac
26940      fi # end check java
26941    fi # end check boot jdk found
26942  fi
26943
26944    done
26945  fi
26946
26947  fi
26948
26949
26950    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26951    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26952      # Do we have a bin/java?
26953      if test ! -x "$BOOT_JDK/bin/java"; then
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26956        BOOT_JDK_FOUND=no
26957      else
26958        # Do we have a bin/javac?
26959        if test ! -x "$BOOT_JDK/bin/javac"; then
26960          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26962          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26963$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26964          BOOT_JDK_FOUND=no
26965        else
26966          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26967          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26968
26969          # Extra M4 quote needed to protect [] in grep expression.
26970          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26971          if test "x$FOUND_CORRECT_VERSION" = x; then
26972            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26974            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26975$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26976            BOOT_JDK_FOUND=no
26977          else
26978            # We're done! :-)
26979            BOOT_JDK_FOUND=yes
26980
26981  # Only process if variable expands to non-empty
26982
26983  if test "x$BOOT_JDK" != x; then
26984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26985
26986  # Input might be given as Windows format, start by converting to
26987  # unix format.
26988  path="$BOOT_JDK"
26989  new_path=`$CYGPATH -u "$path"`
26990
26991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26994  # "foo.exe" is OK but "foo" is an error.
26995  #
26996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26997  # It is also a way to make sure we got the proper file name for the real test later on.
26998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26999  if test "x$test_shortpath" = x; then
27000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27003  fi
27004
27005  # Call helper function which possibly converts this using DOS-style short mode.
27006  # If so, the updated path is stored in $new_path.
27007
27008  input_path="$new_path"
27009  # Check if we need to convert this using DOS-style short mode. If the path
27010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27011  # take no chances and rewrite it.
27012  # Note: m4 eats our [], so we need to use [ and ] instead.
27013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27014  if test "x$has_forbidden_chars" != x; then
27015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27019      # Going to short mode and back again did indeed matter. Since short mode is
27020      # case insensitive, let's make it lowercase to improve readability.
27021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27022      # Now convert it back to Unix-style (cygpath)
27023      input_path=`$CYGPATH -u "$shortmode_path"`
27024      new_path="$input_path"
27025    fi
27026  fi
27027
27028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27029  if test "x$test_cygdrive_prefix" = x; then
27030    # As a simple fix, exclude /usr/bin since it's not a real path.
27031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27033      # a path prefixed by /cygdrive for fixpath to work.
27034      new_path="$CYGWIN_ROOT_PATH$input_path"
27035    fi
27036  fi
27037
27038
27039  if test "x$path" != "x$new_path"; then
27040    BOOT_JDK="$new_path"
27041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27043  fi
27044
27045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27046
27047  path="$BOOT_JDK"
27048  has_colon=`$ECHO $path | $GREP ^.:`
27049  new_path="$path"
27050  if test "x$has_colon" = x; then
27051    # Not in mixed or Windows style, start by that.
27052    new_path=`cmd //c echo $path`
27053  fi
27054
27055
27056  input_path="$new_path"
27057  # Check if we need to convert this using DOS-style short mode. If the path
27058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27059  # take no chances and rewrite it.
27060  # Note: m4 eats our [], so we need to use [ and ] instead.
27061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27062  if test "x$has_forbidden_chars" != x; then
27063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27065  fi
27066
27067
27068  windows_path="$new_path"
27069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27070    unix_path=`$CYGPATH -u "$windows_path"`
27071    new_path="$unix_path"
27072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27074    new_path="$unix_path"
27075  fi
27076
27077  if test "x$path" != "x$new_path"; then
27078    BOOT_JDK="$new_path"
27079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27081  fi
27082
27083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27085
27086    else
27087      # We're on a unix platform. Hooray! :)
27088      path="$BOOT_JDK"
27089      has_space=`$ECHO "$path" | $GREP " "`
27090      if test "x$has_space" != x; then
27091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27093        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27094      fi
27095
27096      # Use eval to expand a potential ~
27097      eval path="$path"
27098      if test ! -f "$path" && test ! -d "$path"; then
27099        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27100      fi
27101
27102      if test -d "$path"; then
27103        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27104      else
27105        dir="`$DIRNAME "$path"`"
27106        base="`$BASENAME "$path"`"
27107        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27108      fi
27109    fi
27110  fi
27111
27112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27113$as_echo_n "checking for Boot JDK... " >&6; }
27114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27115$as_echo "$BOOT_JDK" >&6; }
27116            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27117$as_echo_n "checking Boot JDK version... " >&6; }
27118            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27120$as_echo "$BOOT_JDK_VERSION" >&6; }
27121          fi # end check jdk version
27122        fi # end check javac
27123      fi # end check java
27124    fi # end check boot jdk found
27125  fi
27126
27127
27128  if test "x$BOOT_JDK_FOUND" = xno; then
27129    # Now execute the test
27130
27131  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27132  BOOT_JDK_SUFFIX=""
27133  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27134  if test "x$ALL_JDKS_FOUND" != x; then
27135    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27136
27137  if test "x$BOOT_JDK_FOUND" = xno; then
27138    # Now execute the test
27139
27140        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27141        if test -d "$BOOT_JDK"; then
27142          BOOT_JDK_FOUND=maybe
27143          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27144$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27145        fi
27146
27147
27148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27150      # Do we have a bin/java?
27151      if test ! -x "$BOOT_JDK/bin/java"; then
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27154        BOOT_JDK_FOUND=no
27155      else
27156        # Do we have a bin/javac?
27157        if test ! -x "$BOOT_JDK/bin/javac"; then
27158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27162          BOOT_JDK_FOUND=no
27163        else
27164          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27165          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27166
27167          # Extra M4 quote needed to protect [] in grep expression.
27168          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27169          if test "x$FOUND_CORRECT_VERSION" = x; then
27170            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27172            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27173$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27174            BOOT_JDK_FOUND=no
27175          else
27176            # We're done! :-)
27177            BOOT_JDK_FOUND=yes
27178
27179  # Only process if variable expands to non-empty
27180
27181  if test "x$BOOT_JDK" != x; then
27182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27183
27184  # Input might be given as Windows format, start by converting to
27185  # unix format.
27186  path="$BOOT_JDK"
27187  new_path=`$CYGPATH -u "$path"`
27188
27189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27192  # "foo.exe" is OK but "foo" is an error.
27193  #
27194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27195  # It is also a way to make sure we got the proper file name for the real test later on.
27196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27197  if test "x$test_shortpath" = x; then
27198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27201  fi
27202
27203  # Call helper function which possibly converts this using DOS-style short mode.
27204  # If so, the updated path is stored in $new_path.
27205
27206  input_path="$new_path"
27207  # Check if we need to convert this using DOS-style short mode. If the path
27208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27209  # take no chances and rewrite it.
27210  # Note: m4 eats our [], so we need to use [ and ] instead.
27211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27212  if test "x$has_forbidden_chars" != x; then
27213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27217      # Going to short mode and back again did indeed matter. Since short mode is
27218      # case insensitive, let's make it lowercase to improve readability.
27219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27220      # Now convert it back to Unix-style (cygpath)
27221      input_path=`$CYGPATH -u "$shortmode_path"`
27222      new_path="$input_path"
27223    fi
27224  fi
27225
27226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27227  if test "x$test_cygdrive_prefix" = x; then
27228    # As a simple fix, exclude /usr/bin since it's not a real path.
27229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27231      # a path prefixed by /cygdrive for fixpath to work.
27232      new_path="$CYGWIN_ROOT_PATH$input_path"
27233    fi
27234  fi
27235
27236
27237  if test "x$path" != "x$new_path"; then
27238    BOOT_JDK="$new_path"
27239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27241  fi
27242
27243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27244
27245  path="$BOOT_JDK"
27246  has_colon=`$ECHO $path | $GREP ^.:`
27247  new_path="$path"
27248  if test "x$has_colon" = x; then
27249    # Not in mixed or Windows style, start by that.
27250    new_path=`cmd //c echo $path`
27251  fi
27252
27253
27254  input_path="$new_path"
27255  # Check if we need to convert this using DOS-style short mode. If the path
27256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27257  # take no chances and rewrite it.
27258  # Note: m4 eats our [], so we need to use [ and ] instead.
27259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27260  if test "x$has_forbidden_chars" != x; then
27261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27263  fi
27264
27265
27266  windows_path="$new_path"
27267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27268    unix_path=`$CYGPATH -u "$windows_path"`
27269    new_path="$unix_path"
27270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27272    new_path="$unix_path"
27273  fi
27274
27275  if test "x$path" != "x$new_path"; then
27276    BOOT_JDK="$new_path"
27277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27279  fi
27280
27281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27283
27284    else
27285      # We're on a unix platform. Hooray! :)
27286      path="$BOOT_JDK"
27287      has_space=`$ECHO "$path" | $GREP " "`
27288      if test "x$has_space" != x; then
27289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27292      fi
27293
27294      # Use eval to expand a potential ~
27295      eval path="$path"
27296      if test ! -f "$path" && test ! -d "$path"; then
27297        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27298      fi
27299
27300      if test -d "$path"; then
27301        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27302      else
27303        dir="`$DIRNAME "$path"`"
27304        base="`$BASENAME "$path"`"
27305        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27306      fi
27307    fi
27308  fi
27309
27310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27311$as_echo_n "checking for Boot JDK... " >&6; }
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27313$as_echo "$BOOT_JDK" >&6; }
27314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27315$as_echo_n "checking Boot JDK version... " >&6; }
27316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27318$as_echo "$BOOT_JDK_VERSION" >&6; }
27319          fi # end check jdk version
27320        fi # end check javac
27321      fi # end check java
27322    fi # end check boot jdk found
27323  fi
27324
27325    done
27326  fi
27327
27328
27329    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27330    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27331      # Do we have a bin/java?
27332      if test ! -x "$BOOT_JDK/bin/java"; then
27333        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27335        BOOT_JDK_FOUND=no
27336      else
27337        # Do we have a bin/javac?
27338        if test ! -x "$BOOT_JDK/bin/javac"; then
27339          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27341          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27342$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27343          BOOT_JDK_FOUND=no
27344        else
27345          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27346          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27347
27348          # Extra M4 quote needed to protect [] in grep expression.
27349          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27350          if test "x$FOUND_CORRECT_VERSION" = x; then
27351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27353            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27354$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27355            BOOT_JDK_FOUND=no
27356          else
27357            # We're done! :-)
27358            BOOT_JDK_FOUND=yes
27359
27360  # Only process if variable expands to non-empty
27361
27362  if test "x$BOOT_JDK" != x; then
27363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27364
27365  # Input might be given as Windows format, start by converting to
27366  # unix format.
27367  path="$BOOT_JDK"
27368  new_path=`$CYGPATH -u "$path"`
27369
27370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27373  # "foo.exe" is OK but "foo" is an error.
27374  #
27375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27376  # It is also a way to make sure we got the proper file name for the real test later on.
27377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27378  if test "x$test_shortpath" = x; then
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27381    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27382  fi
27383
27384  # Call helper function which possibly converts this using DOS-style short mode.
27385  # If so, the updated path is stored in $new_path.
27386
27387  input_path="$new_path"
27388  # Check if we need to convert this using DOS-style short mode. If the path
27389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27390  # take no chances and rewrite it.
27391  # Note: m4 eats our [], so we need to use [ and ] instead.
27392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27393  if test "x$has_forbidden_chars" != x; then
27394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27398      # Going to short mode and back again did indeed matter. Since short mode is
27399      # case insensitive, let's make it lowercase to improve readability.
27400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27401      # Now convert it back to Unix-style (cygpath)
27402      input_path=`$CYGPATH -u "$shortmode_path"`
27403      new_path="$input_path"
27404    fi
27405  fi
27406
27407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27408  if test "x$test_cygdrive_prefix" = x; then
27409    # As a simple fix, exclude /usr/bin since it's not a real path.
27410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27412      # a path prefixed by /cygdrive for fixpath to work.
27413      new_path="$CYGWIN_ROOT_PATH$input_path"
27414    fi
27415  fi
27416
27417
27418  if test "x$path" != "x$new_path"; then
27419    BOOT_JDK="$new_path"
27420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27421$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27422  fi
27423
27424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27425
27426  path="$BOOT_JDK"
27427  has_colon=`$ECHO $path | $GREP ^.:`
27428  new_path="$path"
27429  if test "x$has_colon" = x; then
27430    # Not in mixed or Windows style, start by that.
27431    new_path=`cmd //c echo $path`
27432  fi
27433
27434
27435  input_path="$new_path"
27436  # Check if we need to convert this using DOS-style short mode. If the path
27437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27438  # take no chances and rewrite it.
27439  # Note: m4 eats our [], so we need to use [ and ] instead.
27440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27441  if test "x$has_forbidden_chars" != x; then
27442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27444  fi
27445
27446
27447  windows_path="$new_path"
27448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27449    unix_path=`$CYGPATH -u "$windows_path"`
27450    new_path="$unix_path"
27451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27453    new_path="$unix_path"
27454  fi
27455
27456  if test "x$path" != "x$new_path"; then
27457    BOOT_JDK="$new_path"
27458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27460  fi
27461
27462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27464
27465    else
27466      # We're on a unix platform. Hooray! :)
27467      path="$BOOT_JDK"
27468      has_space=`$ECHO "$path" | $GREP " "`
27469      if test "x$has_space" != x; then
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27473      fi
27474
27475      # Use eval to expand a potential ~
27476      eval path="$path"
27477      if test ! -f "$path" && test ! -d "$path"; then
27478        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27479      fi
27480
27481      if test -d "$path"; then
27482        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27483      else
27484        dir="`$DIRNAME "$path"`"
27485        base="`$BASENAME "$path"`"
27486        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27487      fi
27488    fi
27489  fi
27490
27491            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27492$as_echo_n "checking for Boot JDK... " >&6; }
27493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27494$as_echo "$BOOT_JDK" >&6; }
27495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27496$as_echo_n "checking Boot JDK version... " >&6; }
27497            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27499$as_echo "$BOOT_JDK_VERSION" >&6; }
27500          fi # end check jdk version
27501        fi # end check javac
27502      fi # end check java
27503    fi # end check boot jdk found
27504  fi
27505
27506  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27507
27508  if test "x$BOOT_JDK_FOUND" = xno; then
27509    # Now execute the test
27510
27511  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27512  BOOT_JDK_SUFFIX="/Contents/Home"
27513  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27514  if test "x$ALL_JDKS_FOUND" != x; then
27515    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27516
27517  if test "x$BOOT_JDK_FOUND" = xno; then
27518    # Now execute the test
27519
27520        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27521        if test -d "$BOOT_JDK"; then
27522          BOOT_JDK_FOUND=maybe
27523          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27524$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27525        fi
27526
27527
27528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27530      # Do we have a bin/java?
27531      if test ! -x "$BOOT_JDK/bin/java"; then
27532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27534        BOOT_JDK_FOUND=no
27535      else
27536        # Do we have a bin/javac?
27537        if test ! -x "$BOOT_JDK/bin/javac"; then
27538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27542          BOOT_JDK_FOUND=no
27543        else
27544          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27545          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27546
27547          # Extra M4 quote needed to protect [] in grep expression.
27548          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27549          if test "x$FOUND_CORRECT_VERSION" = x; then
27550            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27553$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27554            BOOT_JDK_FOUND=no
27555          else
27556            # We're done! :-)
27557            BOOT_JDK_FOUND=yes
27558
27559  # Only process if variable expands to non-empty
27560
27561  if test "x$BOOT_JDK" != x; then
27562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27563
27564  # Input might be given as Windows format, start by converting to
27565  # unix format.
27566  path="$BOOT_JDK"
27567  new_path=`$CYGPATH -u "$path"`
27568
27569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27572  # "foo.exe" is OK but "foo" is an error.
27573  #
27574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27575  # It is also a way to make sure we got the proper file name for the real test later on.
27576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27577  if test "x$test_shortpath" = x; then
27578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27580    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27581  fi
27582
27583  # Call helper function which possibly converts this using DOS-style short mode.
27584  # If so, the updated path is stored in $new_path.
27585
27586  input_path="$new_path"
27587  # Check if we need to convert this using DOS-style short mode. If the path
27588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27589  # take no chances and rewrite it.
27590  # Note: m4 eats our [], so we need to use [ and ] instead.
27591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27592  if test "x$has_forbidden_chars" != x; then
27593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27597      # Going to short mode and back again did indeed matter. Since short mode is
27598      # case insensitive, let's make it lowercase to improve readability.
27599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27600      # Now convert it back to Unix-style (cygpath)
27601      input_path=`$CYGPATH -u "$shortmode_path"`
27602      new_path="$input_path"
27603    fi
27604  fi
27605
27606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27607  if test "x$test_cygdrive_prefix" = x; then
27608    # As a simple fix, exclude /usr/bin since it's not a real path.
27609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27611      # a path prefixed by /cygdrive for fixpath to work.
27612      new_path="$CYGWIN_ROOT_PATH$input_path"
27613    fi
27614  fi
27615
27616
27617  if test "x$path" != "x$new_path"; then
27618    BOOT_JDK="$new_path"
27619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27621  fi
27622
27623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27624
27625  path="$BOOT_JDK"
27626  has_colon=`$ECHO $path | $GREP ^.:`
27627  new_path="$path"
27628  if test "x$has_colon" = x; then
27629    # Not in mixed or Windows style, start by that.
27630    new_path=`cmd //c echo $path`
27631  fi
27632
27633
27634  input_path="$new_path"
27635  # Check if we need to convert this using DOS-style short mode. If the path
27636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27637  # take no chances and rewrite it.
27638  # Note: m4 eats our [], so we need to use [ and ] instead.
27639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27640  if test "x$has_forbidden_chars" != x; then
27641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27643  fi
27644
27645
27646  windows_path="$new_path"
27647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27648    unix_path=`$CYGPATH -u "$windows_path"`
27649    new_path="$unix_path"
27650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27652    new_path="$unix_path"
27653  fi
27654
27655  if test "x$path" != "x$new_path"; then
27656    BOOT_JDK="$new_path"
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27659  fi
27660
27661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27663
27664    else
27665      # We're on a unix platform. Hooray! :)
27666      path="$BOOT_JDK"
27667      has_space=`$ECHO "$path" | $GREP " "`
27668      if test "x$has_space" != x; then
27669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27672      fi
27673
27674      # Use eval to expand a potential ~
27675      eval path="$path"
27676      if test ! -f "$path" && test ! -d "$path"; then
27677        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27678      fi
27679
27680      if test -d "$path"; then
27681        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27682      else
27683        dir="`$DIRNAME "$path"`"
27684        base="`$BASENAME "$path"`"
27685        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27686      fi
27687    fi
27688  fi
27689
27690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27691$as_echo_n "checking for Boot JDK... " >&6; }
27692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27693$as_echo "$BOOT_JDK" >&6; }
27694            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27695$as_echo_n "checking Boot JDK version... " >&6; }
27696            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27698$as_echo "$BOOT_JDK_VERSION" >&6; }
27699          fi # end check jdk version
27700        fi # end check javac
27701      fi # end check java
27702    fi # end check boot jdk found
27703  fi
27704
27705    done
27706  fi
27707
27708
27709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27711      # Do we have a bin/java?
27712      if test ! -x "$BOOT_JDK/bin/java"; then
27713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27715        BOOT_JDK_FOUND=no
27716      else
27717        # Do we have a bin/javac?
27718        if test ! -x "$BOOT_JDK/bin/javac"; then
27719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27723          BOOT_JDK_FOUND=no
27724        else
27725          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27726          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27727
27728          # Extra M4 quote needed to protect [] in grep expression.
27729          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27730          if test "x$FOUND_CORRECT_VERSION" = x; then
27731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27733            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27734$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27735            BOOT_JDK_FOUND=no
27736          else
27737            # We're done! :-)
27738            BOOT_JDK_FOUND=yes
27739
27740  # Only process if variable expands to non-empty
27741
27742  if test "x$BOOT_JDK" != x; then
27743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27744
27745  # Input might be given as Windows format, start by converting to
27746  # unix format.
27747  path="$BOOT_JDK"
27748  new_path=`$CYGPATH -u "$path"`
27749
27750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27753  # "foo.exe" is OK but "foo" is an error.
27754  #
27755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27756  # It is also a way to make sure we got the proper file name for the real test later on.
27757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27758  if test "x$test_shortpath" = x; then
27759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27762  fi
27763
27764  # Call helper function which possibly converts this using DOS-style short mode.
27765  # If so, the updated path is stored in $new_path.
27766
27767  input_path="$new_path"
27768  # Check if we need to convert this using DOS-style short mode. If the path
27769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27770  # take no chances and rewrite it.
27771  # Note: m4 eats our [], so we need to use [ and ] instead.
27772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27773  if test "x$has_forbidden_chars" != x; then
27774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27778      # Going to short mode and back again did indeed matter. Since short mode is
27779      # case insensitive, let's make it lowercase to improve readability.
27780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27781      # Now convert it back to Unix-style (cygpath)
27782      input_path=`$CYGPATH -u "$shortmode_path"`
27783      new_path="$input_path"
27784    fi
27785  fi
27786
27787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27788  if test "x$test_cygdrive_prefix" = x; then
27789    # As a simple fix, exclude /usr/bin since it's not a real path.
27790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27792      # a path prefixed by /cygdrive for fixpath to work.
27793      new_path="$CYGWIN_ROOT_PATH$input_path"
27794    fi
27795  fi
27796
27797
27798  if test "x$path" != "x$new_path"; then
27799    BOOT_JDK="$new_path"
27800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27802  fi
27803
27804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27805
27806  path="$BOOT_JDK"
27807  has_colon=`$ECHO $path | $GREP ^.:`
27808  new_path="$path"
27809  if test "x$has_colon" = x; then
27810    # Not in mixed or Windows style, start by that.
27811    new_path=`cmd //c echo $path`
27812  fi
27813
27814
27815  input_path="$new_path"
27816  # Check if we need to convert this using DOS-style short mode. If the path
27817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27818  # take no chances and rewrite it.
27819  # Note: m4 eats our [], so we need to use [ and ] instead.
27820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27821  if test "x$has_forbidden_chars" != x; then
27822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27824  fi
27825
27826
27827  windows_path="$new_path"
27828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27829    unix_path=`$CYGPATH -u "$windows_path"`
27830    new_path="$unix_path"
27831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27833    new_path="$unix_path"
27834  fi
27835
27836  if test "x$path" != "x$new_path"; then
27837    BOOT_JDK="$new_path"
27838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27840  fi
27841
27842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27844
27845    else
27846      # We're on a unix platform. Hooray! :)
27847      path="$BOOT_JDK"
27848      has_space=`$ECHO "$path" | $GREP " "`
27849      if test "x$has_space" != x; then
27850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27853      fi
27854
27855      # Use eval to expand a potential ~
27856      eval path="$path"
27857      if test ! -f "$path" && test ! -d "$path"; then
27858        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27859      fi
27860
27861      if test -d "$path"; then
27862        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27863      else
27864        dir="`$DIRNAME "$path"`"
27865        base="`$BASENAME "$path"`"
27866        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27867      fi
27868    fi
27869  fi
27870
27871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27872$as_echo_n "checking for Boot JDK... " >&6; }
27873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27874$as_echo "$BOOT_JDK" >&6; }
27875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27876$as_echo_n "checking Boot JDK version... " >&6; }
27877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27879$as_echo "$BOOT_JDK_VERSION" >&6; }
27880          fi # end check jdk version
27881        fi # end check javac
27882      fi # end check java
27883    fi # end check boot jdk found
27884  fi
27885
27886
27887  if test "x$BOOT_JDK_FOUND" = xno; then
27888    # Now execute the test
27889
27890  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27891  BOOT_JDK_SUFFIX="/Contents/Home"
27892  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27893  if test "x$ALL_JDKS_FOUND" != x; then
27894    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27895
27896  if test "x$BOOT_JDK_FOUND" = xno; then
27897    # Now execute the test
27898
27899        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27900        if test -d "$BOOT_JDK"; then
27901          BOOT_JDK_FOUND=maybe
27902          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27903$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27904        fi
27905
27906
27907    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27908    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27909      # Do we have a bin/java?
27910      if test ! -x "$BOOT_JDK/bin/java"; then
27911        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27913        BOOT_JDK_FOUND=no
27914      else
27915        # Do we have a bin/javac?
27916        if test ! -x "$BOOT_JDK/bin/javac"; then
27917          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27919          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27920$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27921          BOOT_JDK_FOUND=no
27922        else
27923          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27924          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27925
27926          # Extra M4 quote needed to protect [] in grep expression.
27927          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27928          if test "x$FOUND_CORRECT_VERSION" = x; then
27929            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27931            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27932$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27933            BOOT_JDK_FOUND=no
27934          else
27935            # We're done! :-)
27936            BOOT_JDK_FOUND=yes
27937
27938  # Only process if variable expands to non-empty
27939
27940  if test "x$BOOT_JDK" != x; then
27941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27942
27943  # Input might be given as Windows format, start by converting to
27944  # unix format.
27945  path="$BOOT_JDK"
27946  new_path=`$CYGPATH -u "$path"`
27947
27948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27951  # "foo.exe" is OK but "foo" is an error.
27952  #
27953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27954  # It is also a way to make sure we got the proper file name for the real test later on.
27955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27956  if test "x$test_shortpath" = x; then
27957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27958$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27959    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27960  fi
27961
27962  # Call helper function which possibly converts this using DOS-style short mode.
27963  # If so, the updated path is stored in $new_path.
27964
27965  input_path="$new_path"
27966  # Check if we need to convert this using DOS-style short mode. If the path
27967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27968  # take no chances and rewrite it.
27969  # Note: m4 eats our [], so we need to use [ and ] instead.
27970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27971  if test "x$has_forbidden_chars" != x; then
27972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27976      # Going to short mode and back again did indeed matter. Since short mode is
27977      # case insensitive, let's make it lowercase to improve readability.
27978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27979      # Now convert it back to Unix-style (cygpath)
27980      input_path=`$CYGPATH -u "$shortmode_path"`
27981      new_path="$input_path"
27982    fi
27983  fi
27984
27985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27986  if test "x$test_cygdrive_prefix" = x; then
27987    # As a simple fix, exclude /usr/bin since it's not a real path.
27988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27990      # a path prefixed by /cygdrive for fixpath to work.
27991      new_path="$CYGWIN_ROOT_PATH$input_path"
27992    fi
27993  fi
27994
27995
27996  if test "x$path" != "x$new_path"; then
27997    BOOT_JDK="$new_path"
27998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28000  fi
28001
28002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28003
28004  path="$BOOT_JDK"
28005  has_colon=`$ECHO $path | $GREP ^.:`
28006  new_path="$path"
28007  if test "x$has_colon" = x; then
28008    # Not in mixed or Windows style, start by that.
28009    new_path=`cmd //c echo $path`
28010  fi
28011
28012
28013  input_path="$new_path"
28014  # Check if we need to convert this using DOS-style short mode. If the path
28015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28016  # take no chances and rewrite it.
28017  # Note: m4 eats our [], so we need to use [ and ] instead.
28018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28019  if test "x$has_forbidden_chars" != x; then
28020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28022  fi
28023
28024
28025  windows_path="$new_path"
28026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28027    unix_path=`$CYGPATH -u "$windows_path"`
28028    new_path="$unix_path"
28029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28031    new_path="$unix_path"
28032  fi
28033
28034  if test "x$path" != "x$new_path"; then
28035    BOOT_JDK="$new_path"
28036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28038  fi
28039
28040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28042
28043    else
28044      # We're on a unix platform. Hooray! :)
28045      path="$BOOT_JDK"
28046      has_space=`$ECHO "$path" | $GREP " "`
28047      if test "x$has_space" != x; then
28048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28050        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28051      fi
28052
28053      # Use eval to expand a potential ~
28054      eval path="$path"
28055      if test ! -f "$path" && test ! -d "$path"; then
28056        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28057      fi
28058
28059      if test -d "$path"; then
28060        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28061      else
28062        dir="`$DIRNAME "$path"`"
28063        base="`$BASENAME "$path"`"
28064        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28065      fi
28066    fi
28067  fi
28068
28069            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28070$as_echo_n "checking for Boot JDK... " >&6; }
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28072$as_echo "$BOOT_JDK" >&6; }
28073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28074$as_echo_n "checking Boot JDK version... " >&6; }
28075            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28077$as_echo "$BOOT_JDK_VERSION" >&6; }
28078          fi # end check jdk version
28079        fi # end check javac
28080      fi # end check java
28081    fi # end check boot jdk found
28082  fi
28083
28084    done
28085  fi
28086
28087
28088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28090      # Do we have a bin/java?
28091      if test ! -x "$BOOT_JDK/bin/java"; then
28092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28094        BOOT_JDK_FOUND=no
28095      else
28096        # Do we have a bin/javac?
28097        if test ! -x "$BOOT_JDK/bin/javac"; then
28098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28102          BOOT_JDK_FOUND=no
28103        else
28104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28106
28107          # Extra M4 quote needed to protect [] in grep expression.
28108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28109          if test "x$FOUND_CORRECT_VERSION" = x; then
28110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28114            BOOT_JDK_FOUND=no
28115          else
28116            # We're done! :-)
28117            BOOT_JDK_FOUND=yes
28118
28119  # Only process if variable expands to non-empty
28120
28121  if test "x$BOOT_JDK" != x; then
28122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28123
28124  # Input might be given as Windows format, start by converting to
28125  # unix format.
28126  path="$BOOT_JDK"
28127  new_path=`$CYGPATH -u "$path"`
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28141  fi
28142
28143  # Call helper function which possibly converts this using DOS-style short mode.
28144  # If so, the updated path is stored in $new_path.
28145
28146  input_path="$new_path"
28147  # Check if we need to convert this using DOS-style short mode. If the path
28148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28149  # take no chances and rewrite it.
28150  # Note: m4 eats our [], so we need to use [ and ] instead.
28151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28152  if test "x$has_forbidden_chars" != x; then
28153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28157      # Going to short mode and back again did indeed matter. Since short mode is
28158      # case insensitive, let's make it lowercase to improve readability.
28159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28160      # Now convert it back to Unix-style (cygpath)
28161      input_path=`$CYGPATH -u "$shortmode_path"`
28162      new_path="$input_path"
28163    fi
28164  fi
28165
28166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28167  if test "x$test_cygdrive_prefix" = x; then
28168    # As a simple fix, exclude /usr/bin since it's not a real path.
28169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28171      # a path prefixed by /cygdrive for fixpath to work.
28172      new_path="$CYGWIN_ROOT_PATH$input_path"
28173    fi
28174  fi
28175
28176
28177  if test "x$path" != "x$new_path"; then
28178    BOOT_JDK="$new_path"
28179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28181  fi
28182
28183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184
28185  path="$BOOT_JDK"
28186  has_colon=`$ECHO $path | $GREP ^.:`
28187  new_path="$path"
28188  if test "x$has_colon" = x; then
28189    # Not in mixed or Windows style, start by that.
28190    new_path=`cmd //c echo $path`
28191  fi
28192
28193
28194  input_path="$new_path"
28195  # Check if we need to convert this using DOS-style short mode. If the path
28196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28197  # take no chances and rewrite it.
28198  # Note: m4 eats our [], so we need to use [ and ] instead.
28199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28200  if test "x$has_forbidden_chars" != x; then
28201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28203  fi
28204
28205
28206  windows_path="$new_path"
28207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28208    unix_path=`$CYGPATH -u "$windows_path"`
28209    new_path="$unix_path"
28210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28212    new_path="$unix_path"
28213  fi
28214
28215  if test "x$path" != "x$new_path"; then
28216    BOOT_JDK="$new_path"
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28219  fi
28220
28221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28223
28224    else
28225      # We're on a unix platform. Hooray! :)
28226      path="$BOOT_JDK"
28227      has_space=`$ECHO "$path" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28232      fi
28233
28234      # Use eval to expand a potential ~
28235      eval path="$path"
28236      if test ! -f "$path" && test ! -d "$path"; then
28237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28238      fi
28239
28240      if test -d "$path"; then
28241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28242      else
28243        dir="`$DIRNAME "$path"`"
28244        base="`$BASENAME "$path"`"
28245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28246      fi
28247    fi
28248  fi
28249
28250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28251$as_echo_n "checking for Boot JDK... " >&6; }
28252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28253$as_echo "$BOOT_JDK" >&6; }
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28255$as_echo_n "checking Boot JDK version... " >&6; }
28256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28258$as_echo "$BOOT_JDK_VERSION" >&6; }
28259          fi # end check jdk version
28260        fi # end check javac
28261      fi # end check java
28262    fi # end check boot jdk found
28263  fi
28264
28265  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28266
28267  if test "x$BOOT_JDK_FOUND" = xno; then
28268    # Now execute the test
28269
28270  BOOT_JDK_PREFIX="/usr/lib/jvm"
28271  BOOT_JDK_SUFFIX=""
28272  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28273  if test "x$ALL_JDKS_FOUND" != x; then
28274    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28275
28276  if test "x$BOOT_JDK_FOUND" = xno; then
28277    # Now execute the test
28278
28279        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28280        if test -d "$BOOT_JDK"; then
28281          BOOT_JDK_FOUND=maybe
28282          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28283$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28284        fi
28285
28286
28287    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28288    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28289      # Do we have a bin/java?
28290      if test ! -x "$BOOT_JDK/bin/java"; then
28291        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28293        BOOT_JDK_FOUND=no
28294      else
28295        # Do we have a bin/javac?
28296        if test ! -x "$BOOT_JDK/bin/javac"; then
28297          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28299          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28300$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28301          BOOT_JDK_FOUND=no
28302        else
28303          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28304          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28305
28306          # Extra M4 quote needed to protect [] in grep expression.
28307          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28308          if test "x$FOUND_CORRECT_VERSION" = x; then
28309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28311            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28312$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28313            BOOT_JDK_FOUND=no
28314          else
28315            # We're done! :-)
28316            BOOT_JDK_FOUND=yes
28317
28318  # Only process if variable expands to non-empty
28319
28320  if test "x$BOOT_JDK" != x; then
28321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28322
28323  # Input might be given as Windows format, start by converting to
28324  # unix format.
28325  path="$BOOT_JDK"
28326  new_path=`$CYGPATH -u "$path"`
28327
28328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28331  # "foo.exe" is OK but "foo" is an error.
28332  #
28333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28334  # It is also a way to make sure we got the proper file name for the real test later on.
28335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28336  if test "x$test_shortpath" = x; then
28337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28340  fi
28341
28342  # Call helper function which possibly converts this using DOS-style short mode.
28343  # If so, the updated path is stored in $new_path.
28344
28345  input_path="$new_path"
28346  # Check if we need to convert this using DOS-style short mode. If the path
28347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28348  # take no chances and rewrite it.
28349  # Note: m4 eats our [], so we need to use [ and ] instead.
28350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28351  if test "x$has_forbidden_chars" != x; then
28352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28356      # Going to short mode and back again did indeed matter. Since short mode is
28357      # case insensitive, let's make it lowercase to improve readability.
28358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28359      # Now convert it back to Unix-style (cygpath)
28360      input_path=`$CYGPATH -u "$shortmode_path"`
28361      new_path="$input_path"
28362    fi
28363  fi
28364
28365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28366  if test "x$test_cygdrive_prefix" = x; then
28367    # As a simple fix, exclude /usr/bin since it's not a real path.
28368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28370      # a path prefixed by /cygdrive for fixpath to work.
28371      new_path="$CYGWIN_ROOT_PATH$input_path"
28372    fi
28373  fi
28374
28375
28376  if test "x$path" != "x$new_path"; then
28377    BOOT_JDK="$new_path"
28378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28380  fi
28381
28382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28383
28384  path="$BOOT_JDK"
28385  has_colon=`$ECHO $path | $GREP ^.:`
28386  new_path="$path"
28387  if test "x$has_colon" = x; then
28388    # Not in mixed or Windows style, start by that.
28389    new_path=`cmd //c echo $path`
28390  fi
28391
28392
28393  input_path="$new_path"
28394  # Check if we need to convert this using DOS-style short mode. If the path
28395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28396  # take no chances and rewrite it.
28397  # Note: m4 eats our [], so we need to use [ and ] instead.
28398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28399  if test "x$has_forbidden_chars" != x; then
28400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28402  fi
28403
28404
28405  windows_path="$new_path"
28406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28407    unix_path=`$CYGPATH -u "$windows_path"`
28408    new_path="$unix_path"
28409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28411    new_path="$unix_path"
28412  fi
28413
28414  if test "x$path" != "x$new_path"; then
28415    BOOT_JDK="$new_path"
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28418  fi
28419
28420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28422
28423    else
28424      # We're on a unix platform. Hooray! :)
28425      path="$BOOT_JDK"
28426      has_space=`$ECHO "$path" | $GREP " "`
28427      if test "x$has_space" != x; then
28428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28431      fi
28432
28433      # Use eval to expand a potential ~
28434      eval path="$path"
28435      if test ! -f "$path" && test ! -d "$path"; then
28436        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28437      fi
28438
28439      if test -d "$path"; then
28440        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28441      else
28442        dir="`$DIRNAME "$path"`"
28443        base="`$BASENAME "$path"`"
28444        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28445      fi
28446    fi
28447  fi
28448
28449            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28450$as_echo_n "checking for Boot JDK... " >&6; }
28451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28452$as_echo "$BOOT_JDK" >&6; }
28453            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28454$as_echo_n "checking Boot JDK version... " >&6; }
28455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28457$as_echo "$BOOT_JDK_VERSION" >&6; }
28458          fi # end check jdk version
28459        fi # end check javac
28460      fi # end check java
28461    fi # end check boot jdk found
28462  fi
28463
28464    done
28465  fi
28466
28467
28468    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28469    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28470      # Do we have a bin/java?
28471      if test ! -x "$BOOT_JDK/bin/java"; then
28472        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28474        BOOT_JDK_FOUND=no
28475      else
28476        # Do we have a bin/javac?
28477        if test ! -x "$BOOT_JDK/bin/javac"; then
28478          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28480          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28481$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28482          BOOT_JDK_FOUND=no
28483        else
28484          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28485          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28486
28487          # Extra M4 quote needed to protect [] in grep expression.
28488          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28489          if test "x$FOUND_CORRECT_VERSION" = x; then
28490            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28492            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28493$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28494            BOOT_JDK_FOUND=no
28495          else
28496            # We're done! :-)
28497            BOOT_JDK_FOUND=yes
28498
28499  # Only process if variable expands to non-empty
28500
28501  if test "x$BOOT_JDK" != x; then
28502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28503
28504  # Input might be given as Windows format, start by converting to
28505  # unix format.
28506  path="$BOOT_JDK"
28507  new_path=`$CYGPATH -u "$path"`
28508
28509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28512  # "foo.exe" is OK but "foo" is an error.
28513  #
28514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28515  # It is also a way to make sure we got the proper file name for the real test later on.
28516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28517  if test "x$test_shortpath" = x; then
28518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28520    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28521  fi
28522
28523  # Call helper function which possibly converts this using DOS-style short mode.
28524  # If so, the updated path is stored in $new_path.
28525
28526  input_path="$new_path"
28527  # Check if we need to convert this using DOS-style short mode. If the path
28528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28529  # take no chances and rewrite it.
28530  # Note: m4 eats our [], so we need to use [ and ] instead.
28531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28532  if test "x$has_forbidden_chars" != x; then
28533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28537      # Going to short mode and back again did indeed matter. Since short mode is
28538      # case insensitive, let's make it lowercase to improve readability.
28539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28540      # Now convert it back to Unix-style (cygpath)
28541      input_path=`$CYGPATH -u "$shortmode_path"`
28542      new_path="$input_path"
28543    fi
28544  fi
28545
28546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28547  if test "x$test_cygdrive_prefix" = x; then
28548    # As a simple fix, exclude /usr/bin since it's not a real path.
28549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28551      # a path prefixed by /cygdrive for fixpath to work.
28552      new_path="$CYGWIN_ROOT_PATH$input_path"
28553    fi
28554  fi
28555
28556
28557  if test "x$path" != "x$new_path"; then
28558    BOOT_JDK="$new_path"
28559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28561  fi
28562
28563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28564
28565  path="$BOOT_JDK"
28566  has_colon=`$ECHO $path | $GREP ^.:`
28567  new_path="$path"
28568  if test "x$has_colon" = x; then
28569    # Not in mixed or Windows style, start by that.
28570    new_path=`cmd //c echo $path`
28571  fi
28572
28573
28574  input_path="$new_path"
28575  # Check if we need to convert this using DOS-style short mode. If the path
28576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28577  # take no chances and rewrite it.
28578  # Note: m4 eats our [], so we need to use [ and ] instead.
28579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28580  if test "x$has_forbidden_chars" != x; then
28581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28583  fi
28584
28585
28586  windows_path="$new_path"
28587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28588    unix_path=`$CYGPATH -u "$windows_path"`
28589    new_path="$unix_path"
28590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28592    new_path="$unix_path"
28593  fi
28594
28595  if test "x$path" != "x$new_path"; then
28596    BOOT_JDK="$new_path"
28597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28599  fi
28600
28601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28603
28604    else
28605      # We're on a unix platform. Hooray! :)
28606      path="$BOOT_JDK"
28607      has_space=`$ECHO "$path" | $GREP " "`
28608      if test "x$has_space" != x; then
28609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28612      fi
28613
28614      # Use eval to expand a potential ~
28615      eval path="$path"
28616      if test ! -f "$path" && test ! -d "$path"; then
28617        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28618      fi
28619
28620      if test -d "$path"; then
28621        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28622      else
28623        dir="`$DIRNAME "$path"`"
28624        base="`$BASENAME "$path"`"
28625        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28626      fi
28627    fi
28628  fi
28629
28630            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28631$as_echo_n "checking for Boot JDK... " >&6; }
28632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28633$as_echo "$BOOT_JDK" >&6; }
28634            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28635$as_echo_n "checking Boot JDK version... " >&6; }
28636            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28638$as_echo "$BOOT_JDK_VERSION" >&6; }
28639          fi # end check jdk version
28640        fi # end check javac
28641      fi # end check java
28642    fi # end check boot jdk found
28643  fi
28644
28645  fi
28646
28647
28648    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28649    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28650      # Do we have a bin/java?
28651      if test ! -x "$BOOT_JDK/bin/java"; then
28652        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28654        BOOT_JDK_FOUND=no
28655      else
28656        # Do we have a bin/javac?
28657        if test ! -x "$BOOT_JDK/bin/javac"; then
28658          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28660          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28661$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28662          BOOT_JDK_FOUND=no
28663        else
28664          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28665          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28666
28667          # Extra M4 quote needed to protect [] in grep expression.
28668          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28669          if test "x$FOUND_CORRECT_VERSION" = x; then
28670            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28672            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28673$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28674            BOOT_JDK_FOUND=no
28675          else
28676            # We're done! :-)
28677            BOOT_JDK_FOUND=yes
28678
28679  # Only process if variable expands to non-empty
28680
28681  if test "x$BOOT_JDK" != x; then
28682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28683
28684  # Input might be given as Windows format, start by converting to
28685  # unix format.
28686  path="$BOOT_JDK"
28687  new_path=`$CYGPATH -u "$path"`
28688
28689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28692  # "foo.exe" is OK but "foo" is an error.
28693  #
28694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28695  # It is also a way to make sure we got the proper file name for the real test later on.
28696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28697  if test "x$test_shortpath" = x; then
28698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28701  fi
28702
28703  # Call helper function which possibly converts this using DOS-style short mode.
28704  # If so, the updated path is stored in $new_path.
28705
28706  input_path="$new_path"
28707  # Check if we need to convert this using DOS-style short mode. If the path
28708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28709  # take no chances and rewrite it.
28710  # Note: m4 eats our [], so we need to use [ and ] instead.
28711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28712  if test "x$has_forbidden_chars" != x; then
28713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28717      # Going to short mode and back again did indeed matter. Since short mode is
28718      # case insensitive, let's make it lowercase to improve readability.
28719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28720      # Now convert it back to Unix-style (cygpath)
28721      input_path=`$CYGPATH -u "$shortmode_path"`
28722      new_path="$input_path"
28723    fi
28724  fi
28725
28726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28727  if test "x$test_cygdrive_prefix" = x; then
28728    # As a simple fix, exclude /usr/bin since it's not a real path.
28729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28731      # a path prefixed by /cygdrive for fixpath to work.
28732      new_path="$CYGWIN_ROOT_PATH$input_path"
28733    fi
28734  fi
28735
28736
28737  if test "x$path" != "x$new_path"; then
28738    BOOT_JDK="$new_path"
28739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28741  fi
28742
28743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28744
28745  path="$BOOT_JDK"
28746  has_colon=`$ECHO $path | $GREP ^.:`
28747  new_path="$path"
28748  if test "x$has_colon" = x; then
28749    # Not in mixed or Windows style, start by that.
28750    new_path=`cmd //c echo $path`
28751  fi
28752
28753
28754  input_path="$new_path"
28755  # Check if we need to convert this using DOS-style short mode. If the path
28756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28757  # take no chances and rewrite it.
28758  # Note: m4 eats our [], so we need to use [ and ] instead.
28759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28760  if test "x$has_forbidden_chars" != x; then
28761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28763  fi
28764
28765
28766  windows_path="$new_path"
28767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28768    unix_path=`$CYGPATH -u "$windows_path"`
28769    new_path="$unix_path"
28770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28772    new_path="$unix_path"
28773  fi
28774
28775  if test "x$path" != "x$new_path"; then
28776    BOOT_JDK="$new_path"
28777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28779  fi
28780
28781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28783
28784    else
28785      # We're on a unix platform. Hooray! :)
28786      path="$BOOT_JDK"
28787      has_space=`$ECHO "$path" | $GREP " "`
28788      if test "x$has_space" != x; then
28789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28792      fi
28793
28794      # Use eval to expand a potential ~
28795      eval path="$path"
28796      if test ! -f "$path" && test ! -d "$path"; then
28797        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28798      fi
28799
28800      if test -d "$path"; then
28801        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28802      else
28803        dir="`$DIRNAME "$path"`"
28804        base="`$BASENAME "$path"`"
28805        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28806      fi
28807    fi
28808  fi
28809
28810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28811$as_echo_n "checking for Boot JDK... " >&6; }
28812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28813$as_echo "$BOOT_JDK" >&6; }
28814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28815$as_echo_n "checking Boot JDK version... " >&6; }
28816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28818$as_echo "$BOOT_JDK_VERSION" >&6; }
28819          fi # end check jdk version
28820        fi # end check javac
28821      fi # end check java
28822    fi # end check boot jdk found
28823  fi
28824
28825
28826  # If we haven't found anything yet, we've truly lost. Give up.
28827  if test "x$BOOT_JDK_FOUND" = xno; then
28828
28829  # Print a helpful message on how to acquire the necessary build dependency.
28830  # openjdk is the help tag: freetype, cups, alsa etc
28831  MISSING_DEPENDENCY=openjdk
28832
28833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28834    cygwin_help $MISSING_DEPENDENCY
28835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28836    msys_help $MISSING_DEPENDENCY
28837  else
28838    PKGHANDLER_COMMAND=
28839
28840    case $PKGHANDLER in
28841      apt-get)
28842        apt_help     $MISSING_DEPENDENCY ;;
28843      yum)
28844        yum_help     $MISSING_DEPENDENCY ;;
28845      port)
28846        port_help    $MISSING_DEPENDENCY ;;
28847      pkgutil)
28848        pkgutil_help $MISSING_DEPENDENCY ;;
28849      pkgadd)
28850        pkgadd_help  $MISSING_DEPENDENCY ;;
28851    esac
28852
28853    if test "x$PKGHANDLER_COMMAND" != x; then
28854      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28855    fi
28856  fi
28857
28858    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28859$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28860    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28861$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28862    as_fn_error $? "Cannot continue" "$LINENO" 5
28863  fi
28864
28865
28866
28867  # Setup tools from the Boot JDK.
28868
28869  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28870
28871  # Publish this variable in the help.
28872
28873
28874  if [ -z "${JAVA+x}" ]; then
28875    # The variable is not set by user, try to locate tool using the code snippet
28876
28877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28878$as_echo_n "checking for java in Boot JDK... " >&6; }
28879      JAVA=$BOOT_JDK/bin/java
28880      if test ! -x $JAVA; then
28881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28882$as_echo "not found" >&6; }
28883        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28884$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28885        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28886      fi
28887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28888$as_echo "ok" >&6; }
28889
28890
28891  else
28892    # The variable is set, but is it from the command line or the environment?
28893
28894    # Try to remove the string !JAVA! from our list.
28895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28897      # If it failed, the variable was not from the command line. Ignore it,
28898      # but warn the user (except for BASH, which is always set by the calling BASH).
28899      if test "xJAVA" != xBASH; then
28900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28901$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28902      fi
28903      # Try to locate tool using the code snippet
28904
28905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28906$as_echo_n "checking for java in Boot JDK... " >&6; }
28907      JAVA=$BOOT_JDK/bin/java
28908      if test ! -x $JAVA; then
28909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28910$as_echo "not found" >&6; }
28911        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28912$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28913        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28914      fi
28915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28916$as_echo "ok" >&6; }
28917
28918
28919    else
28920      # If it succeeded, then it was overridden by the user. We will use it
28921      # for the tool.
28922
28923      # First remove it from the list of overridden variables, so we can test
28924      # for unknown variables in the end.
28925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28926
28927      # Check if we try to supply an empty value
28928      if test "x$JAVA" = x; then
28929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28930$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28932$as_echo_n "checking for JAVA... " >&6; }
28933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28934$as_echo "disabled" >&6; }
28935      else
28936        # Check if the provided tool contains a complete path.
28937        tool_specified="$JAVA"
28938        tool_basename="${tool_specified##*/}"
28939        if test "x$tool_basename" = "x$tool_specified"; then
28940          # A command without a complete path is provided, search $PATH.
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28942$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28943          # Extract the first word of "$tool_basename", so it can be a program name with args.
28944set dummy $tool_basename; ac_word=$2
28945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28946$as_echo_n "checking for $ac_word... " >&6; }
28947if ${ac_cv_path_JAVA+:} false; then :
28948  $as_echo_n "(cached) " >&6
28949else
28950  case $JAVA in
28951  [\\/]* | ?:[\\/]*)
28952  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28953  ;;
28954  *)
28955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28956for as_dir in $PATH
28957do
28958  IFS=$as_save_IFS
28959  test -z "$as_dir" && as_dir=.
28960    for ac_exec_ext in '' $ac_executable_extensions; do
28961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28962    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28964    break 2
28965  fi
28966done
28967  done
28968IFS=$as_save_IFS
28969
28970  ;;
28971esac
28972fi
28973JAVA=$ac_cv_path_JAVA
28974if test -n "$JAVA"; then
28975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28976$as_echo "$JAVA" >&6; }
28977else
28978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28979$as_echo "no" >&6; }
28980fi
28981
28982
28983          if test "x$JAVA" = x; then
28984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28985          fi
28986        else
28987          # Otherwise we believe it is a complete path. Use it as it is.
28988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28989$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28991$as_echo_n "checking for JAVA... " >&6; }
28992          if test ! -x "$tool_specified"; then
28993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28994$as_echo "not found" >&6; }
28995            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28996          fi
28997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28998$as_echo "$tool_specified" >&6; }
28999        fi
29000      fi
29001    fi
29002
29003  fi
29004
29005
29006
29007  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29008
29009  # Publish this variable in the help.
29010
29011
29012  if [ -z "${JAVAC+x}" ]; then
29013    # The variable is not set by user, try to locate tool using the code snippet
29014
29015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29016$as_echo_n "checking for javac in Boot JDK... " >&6; }
29017      JAVAC=$BOOT_JDK/bin/javac
29018      if test ! -x $JAVAC; then
29019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29020$as_echo "not found" >&6; }
29021        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29022$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29023        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29024      fi
29025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29026$as_echo "ok" >&6; }
29027
29028
29029  else
29030    # The variable is set, but is it from the command line or the environment?
29031
29032    # Try to remove the string !JAVAC! from our list.
29033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29035      # If it failed, the variable was not from the command line. Ignore it,
29036      # but warn the user (except for BASH, which is always set by the calling BASH).
29037      if test "xJAVAC" != xBASH; then
29038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29039$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29040      fi
29041      # Try to locate tool using the code snippet
29042
29043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29044$as_echo_n "checking for javac in Boot JDK... " >&6; }
29045      JAVAC=$BOOT_JDK/bin/javac
29046      if test ! -x $JAVAC; then
29047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29048$as_echo "not found" >&6; }
29049        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29050$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29051        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29052      fi
29053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29054$as_echo "ok" >&6; }
29055
29056
29057    else
29058      # If it succeeded, then it was overridden by the user. We will use it
29059      # for the tool.
29060
29061      # First remove it from the list of overridden variables, so we can test
29062      # for unknown variables in the end.
29063      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29064
29065      # Check if we try to supply an empty value
29066      if test "x$JAVAC" = x; then
29067        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29068$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29070$as_echo_n "checking for JAVAC... " >&6; }
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29072$as_echo "disabled" >&6; }
29073      else
29074        # Check if the provided tool contains a complete path.
29075        tool_specified="$JAVAC"
29076        tool_basename="${tool_specified##*/}"
29077        if test "x$tool_basename" = "x$tool_specified"; then
29078          # A command without a complete path is provided, search $PATH.
29079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29080$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29081          # Extract the first word of "$tool_basename", so it can be a program name with args.
29082set dummy $tool_basename; ac_word=$2
29083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29084$as_echo_n "checking for $ac_word... " >&6; }
29085if ${ac_cv_path_JAVAC+:} false; then :
29086  $as_echo_n "(cached) " >&6
29087else
29088  case $JAVAC in
29089  [\\/]* | ?:[\\/]*)
29090  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29091  ;;
29092  *)
29093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29094for as_dir in $PATH
29095do
29096  IFS=$as_save_IFS
29097  test -z "$as_dir" && as_dir=.
29098    for ac_exec_ext in '' $ac_executable_extensions; do
29099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29100    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29102    break 2
29103  fi
29104done
29105  done
29106IFS=$as_save_IFS
29107
29108  ;;
29109esac
29110fi
29111JAVAC=$ac_cv_path_JAVAC
29112if test -n "$JAVAC"; then
29113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29114$as_echo "$JAVAC" >&6; }
29115else
29116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29117$as_echo "no" >&6; }
29118fi
29119
29120
29121          if test "x$JAVAC" = x; then
29122            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29123          fi
29124        else
29125          # Otherwise we believe it is a complete path. Use it as it is.
29126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29127$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29128          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29129$as_echo_n "checking for JAVAC... " >&6; }
29130          if test ! -x "$tool_specified"; then
29131            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29132$as_echo "not found" >&6; }
29133            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29134          fi
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29136$as_echo "$tool_specified" >&6; }
29137        fi
29138      fi
29139    fi
29140
29141  fi
29142
29143
29144
29145  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29146
29147  # Publish this variable in the help.
29148
29149
29150  if [ -z "${JAVAH+x}" ]; then
29151    # The variable is not set by user, try to locate tool using the code snippet
29152
29153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29154$as_echo_n "checking for javah in Boot JDK... " >&6; }
29155      JAVAH=$BOOT_JDK/bin/javah
29156      if test ! -x $JAVAH; then
29157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29158$as_echo "not found" >&6; }
29159        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29160$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29161        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29162      fi
29163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29164$as_echo "ok" >&6; }
29165
29166
29167  else
29168    # The variable is set, but is it from the command line or the environment?
29169
29170    # Try to remove the string !JAVAH! from our list.
29171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29173      # If it failed, the variable was not from the command line. Ignore it,
29174      # but warn the user (except for BASH, which is always set by the calling BASH).
29175      if test "xJAVAH" != xBASH; then
29176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29177$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29178      fi
29179      # Try to locate tool using the code snippet
29180
29181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29182$as_echo_n "checking for javah in Boot JDK... " >&6; }
29183      JAVAH=$BOOT_JDK/bin/javah
29184      if test ! -x $JAVAH; then
29185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29186$as_echo "not found" >&6; }
29187        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29188$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29189        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29190      fi
29191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29192$as_echo "ok" >&6; }
29193
29194
29195    else
29196      # If it succeeded, then it was overridden by the user. We will use it
29197      # for the tool.
29198
29199      # First remove it from the list of overridden variables, so we can test
29200      # for unknown variables in the end.
29201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29202
29203      # Check if we try to supply an empty value
29204      if test "x$JAVAH" = x; then
29205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29206$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29208$as_echo_n "checking for JAVAH... " >&6; }
29209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29210$as_echo "disabled" >&6; }
29211      else
29212        # Check if the provided tool contains a complete path.
29213        tool_specified="$JAVAH"
29214        tool_basename="${tool_specified##*/}"
29215        if test "x$tool_basename" = "x$tool_specified"; then
29216          # A command without a complete path is provided, search $PATH.
29217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29218$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29219          # Extract the first word of "$tool_basename", so it can be a program name with args.
29220set dummy $tool_basename; ac_word=$2
29221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29222$as_echo_n "checking for $ac_word... " >&6; }
29223if ${ac_cv_path_JAVAH+:} false; then :
29224  $as_echo_n "(cached) " >&6
29225else
29226  case $JAVAH in
29227  [\\/]* | ?:[\\/]*)
29228  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29229  ;;
29230  *)
29231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29232for as_dir in $PATH
29233do
29234  IFS=$as_save_IFS
29235  test -z "$as_dir" && as_dir=.
29236    for ac_exec_ext in '' $ac_executable_extensions; do
29237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29238    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29240    break 2
29241  fi
29242done
29243  done
29244IFS=$as_save_IFS
29245
29246  ;;
29247esac
29248fi
29249JAVAH=$ac_cv_path_JAVAH
29250if test -n "$JAVAH"; then
29251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29252$as_echo "$JAVAH" >&6; }
29253else
29254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29255$as_echo "no" >&6; }
29256fi
29257
29258
29259          if test "x$JAVAH" = x; then
29260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29261          fi
29262        else
29263          # Otherwise we believe it is a complete path. Use it as it is.
29264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29265$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29267$as_echo_n "checking for JAVAH... " >&6; }
29268          if test ! -x "$tool_specified"; then
29269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29270$as_echo "not found" >&6; }
29271            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29272          fi
29273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29274$as_echo "$tool_specified" >&6; }
29275        fi
29276      fi
29277    fi
29278
29279  fi
29280
29281
29282
29283  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29284
29285  # Publish this variable in the help.
29286
29287
29288  if [ -z "${JAR+x}" ]; then
29289    # The variable is not set by user, try to locate tool using the code snippet
29290
29291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29292$as_echo_n "checking for jar in Boot JDK... " >&6; }
29293      JAR=$BOOT_JDK/bin/jar
29294      if test ! -x $JAR; then
29295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29296$as_echo "not found" >&6; }
29297        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29298$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29299        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29300      fi
29301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29302$as_echo "ok" >&6; }
29303
29304
29305  else
29306    # The variable is set, but is it from the command line or the environment?
29307
29308    # Try to remove the string !JAR! from our list.
29309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29311      # If it failed, the variable was not from the command line. Ignore it,
29312      # but warn the user (except for BASH, which is always set by the calling BASH).
29313      if test "xJAR" != xBASH; then
29314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29315$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29316      fi
29317      # Try to locate tool using the code snippet
29318
29319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29320$as_echo_n "checking for jar in Boot JDK... " >&6; }
29321      JAR=$BOOT_JDK/bin/jar
29322      if test ! -x $JAR; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29324$as_echo "not found" >&6; }
29325        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29326$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29327        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29328      fi
29329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29330$as_echo "ok" >&6; }
29331
29332
29333    else
29334      # If it succeeded, then it was overridden by the user. We will use it
29335      # for the tool.
29336
29337      # First remove it from the list of overridden variables, so we can test
29338      # for unknown variables in the end.
29339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29340
29341      # Check if we try to supply an empty value
29342      if test "x$JAR" = x; then
29343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29344$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29346$as_echo_n "checking for JAR... " >&6; }
29347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29348$as_echo "disabled" >&6; }
29349      else
29350        # Check if the provided tool contains a complete path.
29351        tool_specified="$JAR"
29352        tool_basename="${tool_specified##*/}"
29353        if test "x$tool_basename" = "x$tool_specified"; then
29354          # A command without a complete path is provided, search $PATH.
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29356$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29357          # Extract the first word of "$tool_basename", so it can be a program name with args.
29358set dummy $tool_basename; ac_word=$2
29359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29360$as_echo_n "checking for $ac_word... " >&6; }
29361if ${ac_cv_path_JAR+:} false; then :
29362  $as_echo_n "(cached) " >&6
29363else
29364  case $JAR in
29365  [\\/]* | ?:[\\/]*)
29366  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29367  ;;
29368  *)
29369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29370for as_dir in $PATH
29371do
29372  IFS=$as_save_IFS
29373  test -z "$as_dir" && as_dir=.
29374    for ac_exec_ext in '' $ac_executable_extensions; do
29375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29376    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29378    break 2
29379  fi
29380done
29381  done
29382IFS=$as_save_IFS
29383
29384  ;;
29385esac
29386fi
29387JAR=$ac_cv_path_JAR
29388if test -n "$JAR"; then
29389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29390$as_echo "$JAR" >&6; }
29391else
29392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29393$as_echo "no" >&6; }
29394fi
29395
29396
29397          if test "x$JAR" = x; then
29398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29399          fi
29400        else
29401          # Otherwise we believe it is a complete path. Use it as it is.
29402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29403$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29405$as_echo_n "checking for JAR... " >&6; }
29406          if test ! -x "$tool_specified"; then
29407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29408$as_echo "not found" >&6; }
29409            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29410          fi
29411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29412$as_echo "$tool_specified" >&6; }
29413        fi
29414      fi
29415    fi
29416
29417  fi
29418
29419
29420
29421  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29422
29423  # Publish this variable in the help.
29424
29425
29426  if [ -z "${JARSIGNER+x}" ]; then
29427    # The variable is not set by user, try to locate tool using the code snippet
29428
29429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29430$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29431      JARSIGNER=$BOOT_JDK/bin/jarsigner
29432      if test ! -x $JARSIGNER; then
29433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29434$as_echo "not found" >&6; }
29435        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29436$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29437        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29438      fi
29439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29440$as_echo "ok" >&6; }
29441
29442
29443  else
29444    # The variable is set, but is it from the command line or the environment?
29445
29446    # Try to remove the string !JARSIGNER! from our list.
29447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29449      # If it failed, the variable was not from the command line. Ignore it,
29450      # but warn the user (except for BASH, which is always set by the calling BASH).
29451      if test "xJARSIGNER" != xBASH; then
29452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29453$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29454      fi
29455      # Try to locate tool using the code snippet
29456
29457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29458$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29459      JARSIGNER=$BOOT_JDK/bin/jarsigner
29460      if test ! -x $JARSIGNER; then
29461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29462$as_echo "not found" >&6; }
29463        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29464$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29465        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29466      fi
29467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29468$as_echo "ok" >&6; }
29469
29470
29471    else
29472      # If it succeeded, then it was overridden by the user. We will use it
29473      # for the tool.
29474
29475      # First remove it from the list of overridden variables, so we can test
29476      # for unknown variables in the end.
29477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29478
29479      # Check if we try to supply an empty value
29480      if test "x$JARSIGNER" = x; then
29481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29482$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29484$as_echo_n "checking for JARSIGNER... " >&6; }
29485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29486$as_echo "disabled" >&6; }
29487      else
29488        # Check if the provided tool contains a complete path.
29489        tool_specified="$JARSIGNER"
29490        tool_basename="${tool_specified##*/}"
29491        if test "x$tool_basename" = "x$tool_specified"; then
29492          # A command without a complete path is provided, search $PATH.
29493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29494$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29495          # Extract the first word of "$tool_basename", so it can be a program name with args.
29496set dummy $tool_basename; ac_word=$2
29497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29498$as_echo_n "checking for $ac_word... " >&6; }
29499if ${ac_cv_path_JARSIGNER+:} false; then :
29500  $as_echo_n "(cached) " >&6
29501else
29502  case $JARSIGNER in
29503  [\\/]* | ?:[\\/]*)
29504  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29505  ;;
29506  *)
29507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29508for as_dir in $PATH
29509do
29510  IFS=$as_save_IFS
29511  test -z "$as_dir" && as_dir=.
29512    for ac_exec_ext in '' $ac_executable_extensions; do
29513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29514    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29516    break 2
29517  fi
29518done
29519  done
29520IFS=$as_save_IFS
29521
29522  ;;
29523esac
29524fi
29525JARSIGNER=$ac_cv_path_JARSIGNER
29526if test -n "$JARSIGNER"; then
29527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29528$as_echo "$JARSIGNER" >&6; }
29529else
29530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29531$as_echo "no" >&6; }
29532fi
29533
29534
29535          if test "x$JARSIGNER" = x; then
29536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29537          fi
29538        else
29539          # Otherwise we believe it is a complete path. Use it as it is.
29540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29541$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29543$as_echo_n "checking for JARSIGNER... " >&6; }
29544          if test ! -x "$tool_specified"; then
29545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29546$as_echo "not found" >&6; }
29547            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29548          fi
29549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29550$as_echo "$tool_specified" >&6; }
29551        fi
29552      fi
29553    fi
29554
29555  fi
29556
29557
29558
29559  # Finally, set some other options...
29560
29561  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29562  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29563
29564
29565
29566  # Check if the boot jdk is 32 or 64 bit
29567  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29568    BOOT_JDK_BITS="64"
29569  else
29570    BOOT_JDK_BITS="32"
29571  fi
29572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29573$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29575$as_echo "$BOOT_JDK_BITS" >&6; }
29576
29577
29578
29579###############################################################################
29580#
29581# Configure the sources to use. We can add or override individual directories.
29582#
29583###############################################################################
29584
29585
29586  # Where are the sources.
29587  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29588  CORBA_TOPDIR="$SRC_ROOT/corba"
29589  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29590  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29591  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29592  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29593  JDK_TOPDIR="$SRC_ROOT/jdk"
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603  # This feature is no longer supported.
29604
29605
29606
29607# Check whether --with-add-source-root was given.
29608if test "${with_add_source_root+set}" = set; then :
29609  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29610$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29611fi
29612
29613
29614
29615
29616# Check whether --with-override-source-root was given.
29617if test "${with_override_source_root+set}" = set; then :
29618  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29619$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29620fi
29621
29622
29623
29624
29625# Check whether --with-adds-and-overrides was given.
29626if test "${with_adds_and_overrides+set}" = set; then :
29627  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29628$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29629fi
29630
29631
29632
29633
29634# Check whether --with-override-langtools was given.
29635if test "${with_override_langtools+set}" = set; then :
29636  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29637$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29638fi
29639
29640
29641
29642
29643# Check whether --with-override-corba was given.
29644if test "${with_override_corba+set}" = set; then :
29645  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29646$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29647fi
29648
29649
29650
29651
29652# Check whether --with-override-jaxp was given.
29653if test "${with_override_jaxp+set}" = set; then :
29654  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29655$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29656fi
29657
29658
29659
29660
29661# Check whether --with-override-jaxws was given.
29662if test "${with_override_jaxws+set}" = set; then :
29663  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29664$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29665fi
29666
29667
29668
29669
29670# Check whether --with-override-hotspot was given.
29671if test "${with_override_hotspot+set}" = set; then :
29672  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29673$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29674fi
29675
29676
29677
29678
29679# Check whether --with-override-nashorn was given.
29680if test "${with_override_nashorn+set}" = set; then :
29681  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29682$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29683fi
29684
29685
29686
29687
29688# Check whether --with-override-jdk was given.
29689if test "${with_override_jdk+set}" = set; then :
29690  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29691$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29692fi
29693
29694
29695
29696
29697  BUILD_OUTPUT="$OUTPUT_ROOT"
29698
29699
29700  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29701  BUILD_HOTSPOT=true
29702
29703
29704
29705# Check whether --with-import-hotspot was given.
29706if test "${with_import_hotspot+set}" = set; then :
29707  withval=$with_import_hotspot;
29708fi
29709
29710  if test "x$with_import_hotspot" != x; then
29711    CURDIR="$PWD"
29712    cd "$with_import_hotspot"
29713    HOTSPOT_DIST="`pwd`"
29714    cd "$CURDIR"
29715    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29716      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29717    fi
29718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29719$as_echo_n "checking if hotspot should be imported... " >&6; }
29720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29721$as_echo "yes from $HOTSPOT_DIST" >&6; }
29722    BUILD_HOTSPOT=false
29723  fi
29724
29725  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29726
29727
29728###############################################################################
29729#
29730# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29731# native code.
29732#
29733###############################################################################
29734
29735# See if we are doing a complete static build or not
29736
29737  # Check whether --enable-static-build was given.
29738if test "${enable_static_build+set}" = set; then :
29739  enableval=$enable_static_build;
29740fi
29741
29742  STATIC_BUILD=false
29743  if test "x$enable_static_build" = "xyes"; then
29744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29745$as_echo_n "checking if static build is enabled... " >&6; }
29746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29747$as_echo "yes" >&6; }
29748    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29749      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29750    fi
29751    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29752    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29753    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29754    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29755    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29756    STATIC_BUILD=true
29757  elif test "x$enable_static_build" = "xno"; then
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29759$as_echo_n "checking if static build is enabled... " >&6; }
29760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29761$as_echo "no" >&6; }
29762  elif test "x$enable_static_build" != "x"; then
29763    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29764  fi
29765
29766
29767
29768
29769# First determine the toolchain type (compiler family)
29770
29771
29772# Check whether --with-toolchain-type was given.
29773if test "${with_toolchain_type+set}" = set; then :
29774  withval=$with_toolchain_type;
29775fi
29776
29777
29778  # Use indirect variable referencing
29779  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29780  VALID_TOOLCHAINS=${!toolchain_var_name}
29781
29782  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29783    if test -n "$XCODEBUILD"; then
29784      # On Mac OS X, default toolchain to clang after Xcode 5
29785      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29786      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29787      if test $? -ne 0; then
29788        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29789      fi
29790      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29791          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29792          $CUT -f 1 -d .`
29793      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29794$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29795      if test $XCODE_MAJOR_VERSION -ge 5; then
29796          DEFAULT_TOOLCHAIN="clang"
29797      else
29798          DEFAULT_TOOLCHAIN="gcc"
29799      fi
29800    else
29801      # If Xcode is not installed, but the command line tools are
29802      # then we can't run xcodebuild. On these systems we should
29803      # default to clang
29804      DEFAULT_TOOLCHAIN="clang"
29805    fi
29806  else
29807    # First toolchain type in the list is the default
29808    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29809  fi
29810
29811  if test "x$with_toolchain_type" = xlist; then
29812    # List all toolchains
29813    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29814$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29815    for toolchain in $VALID_TOOLCHAINS; do
29816      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29817      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29818      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29819    done
29820
29821    exit 0
29822  elif test "x$with_toolchain_type" != x; then
29823    # User override; check that it is valid
29824    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29825      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29826$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29827      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29828$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29829      as_fn_error $? "Cannot continue." "$LINENO" 5
29830    fi
29831    TOOLCHAIN_TYPE=$with_toolchain_type
29832  else
29833    # No flag given, use default
29834    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29835  fi
29836
29837
29838  TOOLCHAIN_CC_BINARY_clang="clang"
29839  TOOLCHAIN_CC_BINARY_gcc="gcc"
29840  TOOLCHAIN_CC_BINARY_microsoft="cl"
29841  TOOLCHAIN_CC_BINARY_solstudio="cc"
29842  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29843
29844  TOOLCHAIN_CXX_BINARY_clang="clang++"
29845  TOOLCHAIN_CXX_BINARY_gcc="g++"
29846  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29847  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29848  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29849
29850  # Use indirect variable referencing
29851  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29852  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29853  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29854  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29855  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29856  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29857
29858
29859  # Define filename patterns
29860  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29861    LIBRARY_PREFIX=
29862    SHARED_LIBRARY_SUFFIX='.dll'
29863    STATIC_LIBRARY_SUFFIX='.lib'
29864    SHARED_LIBRARY='$1.dll'
29865    STATIC_LIBRARY='$1.lib'
29866    OBJ_SUFFIX='.obj'
29867    EXE_SUFFIX='.exe'
29868  else
29869    LIBRARY_PREFIX=lib
29870    SHARED_LIBRARY_SUFFIX='.so'
29871    STATIC_LIBRARY_SUFFIX='.a'
29872    SHARED_LIBRARY='lib$1.so'
29873    STATIC_LIBRARY='lib$1.a'
29874    OBJ_SUFFIX='.o'
29875    EXE_SUFFIX=''
29876    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29877      # For full static builds, we're overloading the SHARED_LIBRARY
29878      # variables in order to limit the amount of changes required.
29879      # It would be better to remove SHARED and just use LIBRARY and
29880      # LIBRARY_SUFFIX for libraries that can be built either
29881      # shared or static and use STATIC_* for libraries that are
29882      # always built statically.
29883      if test "x$STATIC_BUILD" = xtrue; then
29884        SHARED_LIBRARY='lib$1.a'
29885        SHARED_LIBRARY_SUFFIX='.a'
29886      else
29887        SHARED_LIBRARY='lib$1.dylib'
29888        SHARED_LIBRARY_SUFFIX='.dylib'
29889      fi
29890    fi
29891  fi
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29903    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29904$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29905  else
29906    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29907$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29908  fi
29909
29910
29911# User supplied flags should be used when configure detects compilers
29912
29913  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29914    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29915$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29916  fi
29917
29918  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29920$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29921  fi
29922
29923  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29924    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29925$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29926  fi
29927
29928
29929# Check whether --with-extra-cflags was given.
29930if test "${with_extra_cflags+set}" = set; then :
29931  withval=$with_extra_cflags;
29932fi
29933
29934
29935
29936# Check whether --with-extra-cxxflags was given.
29937if test "${with_extra_cxxflags+set}" = set; then :
29938  withval=$with_extra_cxxflags;
29939fi
29940
29941
29942
29943# Check whether --with-extra-ldflags was given.
29944if test "${with_extra_ldflags+set}" = set; then :
29945  withval=$with_extra_ldflags;
29946fi
29947
29948
29949  EXTRA_CFLAGS="$with_extra_cflags"
29950  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29951  EXTRA_LDFLAGS="$with_extra_ldflags"
29952
29953  # Hotspot needs these set in their legacy form
29954  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29955  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29956  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29957
29958
29959
29960
29961
29962  # The global CFLAGS and LDLAGS variables are used by configure tests and
29963  # should include the extra parameters
29964  CFLAGS="$EXTRA_CFLAGS"
29965  CXXFLAGS="$EXTRA_CXXFLAGS"
29966  LDFLAGS="$EXTRA_LDFLAGS"
29967  CPPFLAGS=""
29968
29969# The sysroot cflags are needed for configure to be able to run the compilers
29970
29971  if test "x$SYSROOT" != "x"; then
29972    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29973      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29974        # Solaris Studio does not have a concept of sysroot. Instead we must
29975        # make sure the default include and lib dirs are appended to each
29976        # compile and link command line. Must also add -I-xbuiltin to enable
29977        # inlining of system functions and intrinsics.
29978        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
29979        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29980            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29981            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29982      fi
29983    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29984      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29985      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29986    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29987      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29988      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29989    fi
29990    # Propagate the sysroot args to hotspot
29991    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29992    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29993    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29994    # The global CFLAGS and LDFLAGS variables need these for configure to function
29995    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29996    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29997    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29998    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29999  fi
30000
30001  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30002    # We also need -iframework<path>/System/Library/Frameworks
30003    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30004    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30005    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30006    # set this here so it doesn't have to be peppered throughout the forest
30007    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30008    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30009  fi
30010
30011
30012
30013
30014
30015# Then detect the actual binaries needed
30016
30017  # FIXME: Is this needed?
30018  ac_ext=cpp
30019ac_cpp='$CXXCPP $CPPFLAGS'
30020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30023
30024
30025  # Store the CFLAGS etc passed to the configure script.
30026  ORG_CFLAGS="$CFLAGS"
30027  ORG_CXXFLAGS="$CXXFLAGS"
30028
30029  # autoconf magic only relies on PATH, so update it if tools dir is specified
30030  OLD_PATH="$PATH"
30031
30032  # On Windows, we need to detect the visual studio installation first.
30033  # This will change the PATH, but we need to keep that new PATH even
30034  # after toolchain detection is done, since the compiler (on x86) uses
30035  # it for DLL resolution in runtime.
30036  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30037      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30038
30039  # Store path to cygwin link.exe to help excluding it when searching for
30040  # VS linker. This must be done before changing the PATH when looking for VS.
30041  # Extract the first word of "link", so it can be a program name with args.
30042set dummy link; ac_word=$2
30043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30044$as_echo_n "checking for $ac_word... " >&6; }
30045if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30046  $as_echo_n "(cached) " >&6
30047else
30048  case $CYGWIN_LINK in
30049  [\\/]* | ?:[\\/]*)
30050  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30051  ;;
30052  *)
30053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30054for as_dir in $PATH
30055do
30056  IFS=$as_save_IFS
30057  test -z "$as_dir" && as_dir=.
30058    for ac_exec_ext in '' $ac_executable_extensions; do
30059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30060    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30062    break 2
30063  fi
30064done
30065  done
30066IFS=$as_save_IFS
30067
30068  ;;
30069esac
30070fi
30071CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30072if test -n "$CYGWIN_LINK"; then
30073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30074$as_echo "$CYGWIN_LINK" >&6; }
30075else
30076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30077$as_echo "no" >&6; }
30078fi
30079
30080
30081  if test "x$CYGWIN_LINK" != x; then
30082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30083$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30084    "$CYGWIN_LINK" --version > /dev/null
30085    if test $? -eq 0 ; then
30086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30087$as_echo "yes" >&6; }
30088    else
30089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30090$as_echo "no" >&6; }
30091      # This might be the VS linker. Don't exclude it later on.
30092      CYGWIN_LINK=""
30093    fi
30094  fi
30095
30096  # First-hand choice is to locate and run the vsvars bat file.
30097
30098
30099# Check whether --with-toolchain-version was given.
30100if test "${with_toolchain_version+set}" = set; then :
30101  withval=$with_toolchain_version;
30102fi
30103
30104
30105  if test "x$with_toolchain_version" = xlist; then
30106    # List all toolchains
30107    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30108$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30109    for version in $VALID_VS_VERSIONS; do
30110      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30111      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30112    done
30113
30114    exit 0
30115  elif test "x$DEVKIT_VS_VERSION" != x; then
30116    VS_VERSION=$DEVKIT_VS_VERSION
30117    TOOLCHAIN_VERSION=$VS_VERSION
30118    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30119    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30120    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30121    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30122    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30123    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30124
30125    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30126    # can still be exported as INCLUDE for compiler invocations without
30127    # SYSROOT_CFLAGS
30128    OLDIFS="$IFS"
30129    IFS=";"
30130    for i in $DEVKIT_VS_INCLUDE; do
30131      ipath=$i
30132
30133  unix_path="$ipath"
30134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30135    windows_path=`$CYGPATH -m "$unix_path"`
30136    ipath="$windows_path"
30137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30138    windows_path=`cmd //c echo $unix_path`
30139    ipath="$windows_path"
30140  fi
30141
30142      VS_INCLUDE="$VS_INCLUDE;$ipath"
30143    done
30144    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30145    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30146    for i in $DEVKIT_VS_LIB; do
30147      libpath=$i
30148
30149  unix_path="$libpath"
30150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30151    windows_path=`$CYGPATH -m "$unix_path"`
30152    libpath="$windows_path"
30153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30154    windows_path=`cmd //c echo $unix_path`
30155    libpath="$windows_path"
30156  fi
30157
30158      VS_LIB="$VS_LIB;$libpath"
30159    done
30160    IFS="$OLDIFS"
30161
30162    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30163$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30164
30165  elif test "x$with_toolchain_version" != x; then
30166    # User override; check that it is valid
30167    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30168      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30169$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30170      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30171$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30172      as_fn_error $? "Cannot continue." "$LINENO" 5
30173    fi
30174    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30175  else
30176    # No flag given, use default
30177    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30178  fi
30179
30180  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30181
30182  VS_VERSION="$VS_VERSION"
30183  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30184  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30185  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30186  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30187
30188  # When using --with-tools-dir, assume it points to the correct and default
30189  # version of Visual Studio or that --with-toolchain-version was also set.
30190  if test "x$with_tools_dir" != x; then
30191
30192  if test "x$VS_ENV_CMD" = x; then
30193    VS_VERSION="${VS_VERSION}"
30194    VS_BASE="$with_tools_dir/../.."
30195    METHOD="--with-tools-dir"
30196
30197    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30198      VCVARSFILE="vc/bin/vcvars32.bat"
30199    else
30200      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30201    fi
30202
30203
30204  windows_path="$VS_BASE"
30205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30206    unix_path=`$CYGPATH -u "$windows_path"`
30207    VS_BASE="$unix_path"
30208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30210    VS_BASE="$unix_path"
30211  fi
30212
30213    if test -d "$VS_BASE"; then
30214      if test -f "$VS_BASE/$VCVARSFILE"; then
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30216$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30217        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30218        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30219        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30220        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30221      else
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30223$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30224        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30225$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30226      fi
30227    fi
30228  fi
30229
30230
30231  if test "x$VS_ENV_CMD" = x; then
30232    VS_VERSION="${VS_VERSION}"
30233    VS_BASE="$with_tools_dir/../../.."
30234    METHOD="--with-tools-dir"
30235
30236    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30237      VCVARSFILE="vc/bin/vcvars32.bat"
30238    else
30239      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30240    fi
30241
30242
30243  windows_path="$VS_BASE"
30244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30245    unix_path=`$CYGPATH -u "$windows_path"`
30246    VS_BASE="$unix_path"
30247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30249    VS_BASE="$unix_path"
30250  fi
30251
30252    if test -d "$VS_BASE"; then
30253      if test -f "$VS_BASE/$VCVARSFILE"; then
30254        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30255$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30256        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30257        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30258        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30259        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30260      else
30261        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30262$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30263        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30264$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30265      fi
30266    fi
30267  fi
30268
30269    if test "x$VS_ENV_CMD" = x; then
30270      # Having specified an argument which is incorrect will produce an instant failure;
30271      # we should not go on looking
30272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30273$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30274      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30275$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30276      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30277$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30278      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30279    fi
30280  fi
30281
30282  VS_ENV_CMD=""
30283  VS_ENV_ARGS=""
30284
30285  if test "x$VS_COMNTOOLS" != x; then
30286
30287  if test "x$VS_ENV_CMD" = x; then
30288    VS_VERSION="${VS_VERSION}"
30289    VS_BASE="$VS_COMNTOOLS/../.."
30290    METHOD="$VS_COMNTOOLS_VAR variable"
30291
30292    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30293      VCVARSFILE="vc/bin/vcvars32.bat"
30294    else
30295      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30296    fi
30297
30298
30299  windows_path="$VS_BASE"
30300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30301    unix_path=`$CYGPATH -u "$windows_path"`
30302    VS_BASE="$unix_path"
30303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30305    VS_BASE="$unix_path"
30306  fi
30307
30308    if test -d "$VS_BASE"; then
30309      if test -f "$VS_BASE/$VCVARSFILE"; then
30310        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30311$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30312        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30313        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30314        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30315        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30316      else
30317        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30318$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30320$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30321      fi
30322    fi
30323  fi
30324
30325  fi
30326  if test "x$PROGRAMFILES" != x; then
30327
30328  if test "x$VS_ENV_CMD" = x; then
30329    VS_VERSION="${VS_VERSION}"
30330    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30331    METHOD="well-known name"
30332
30333    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30334      VCVARSFILE="vc/bin/vcvars32.bat"
30335    else
30336      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30337    fi
30338
30339
30340  windows_path="$VS_BASE"
30341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30342    unix_path=`$CYGPATH -u "$windows_path"`
30343    VS_BASE="$unix_path"
30344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30346    VS_BASE="$unix_path"
30347  fi
30348
30349    if test -d "$VS_BASE"; then
30350      if test -f "$VS_BASE/$VCVARSFILE"; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30352$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30353        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30354        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30355        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30356        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30357      else
30358        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30359$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30360        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30361$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30362      fi
30363    fi
30364  fi
30365
30366  fi
30367  # Work around the insanely named ProgramFiles(x86) env variable
30368  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30369  if test "x$PROGRAMFILES_X86" != x; then
30370
30371  if test "x$VS_ENV_CMD" = x; then
30372    VS_VERSION="${VS_VERSION}"
30373    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30374    METHOD="well-known name"
30375
30376    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30377      VCVARSFILE="vc/bin/vcvars32.bat"
30378    else
30379      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30380    fi
30381
30382
30383  windows_path="$VS_BASE"
30384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30385    unix_path=`$CYGPATH -u "$windows_path"`
30386    VS_BASE="$unix_path"
30387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30389    VS_BASE="$unix_path"
30390  fi
30391
30392    if test -d "$VS_BASE"; then
30393      if test -f "$VS_BASE/$VCVARSFILE"; then
30394        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30395$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30396        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30397        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30398        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30399        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30400      else
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30402$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30403        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30404$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30405      fi
30406    fi
30407  fi
30408
30409  fi
30410
30411  if test "x$VS_ENV_CMD" = x; then
30412    VS_VERSION="${VS_VERSION}"
30413    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30414    METHOD="well-known name"
30415
30416    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30417      VCVARSFILE="vc/bin/vcvars32.bat"
30418    else
30419      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30420    fi
30421
30422
30423  windows_path="$VS_BASE"
30424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30425    unix_path=`$CYGPATH -u "$windows_path"`
30426    VS_BASE="$unix_path"
30427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30429    VS_BASE="$unix_path"
30430  fi
30431
30432    if test -d "$VS_BASE"; then
30433      if test -f "$VS_BASE/$VCVARSFILE"; then
30434        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30435$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30436        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30437        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30438        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30439        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30440      else
30441        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30442$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30443        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30444$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30445      fi
30446    fi
30447  fi
30448
30449
30450  if test "x$VS_ENV_CMD" = x; then
30451    VS_VERSION="${VS_VERSION}"
30452    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30453    METHOD="well-known name"
30454
30455    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30456      VCVARSFILE="vc/bin/vcvars32.bat"
30457    else
30458      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30459    fi
30460
30461
30462  windows_path="$VS_BASE"
30463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30464    unix_path=`$CYGPATH -u "$windows_path"`
30465    VS_BASE="$unix_path"
30466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30468    VS_BASE="$unix_path"
30469  fi
30470
30471    if test -d "$VS_BASE"; then
30472      if test -f "$VS_BASE/$VCVARSFILE"; then
30473        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30474$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30475        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30476        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30477        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30478        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30479      else
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30481$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30482        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30483$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30484      fi
30485    fi
30486  fi
30487
30488
30489  if test "x$SDK_INSTALL_DIR" != x; then
30490    if test "x$ProgramW6432" != x; then
30491
30492  if test "x$VS_ENV_CMD" = x; then
30493    VS_VERSION="${VS_VERSION}"
30494    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30495    METHOD="well-known name"
30496
30497  windows_path="$WIN_SDK_BASE"
30498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30499    unix_path=`$CYGPATH -u "$windows_path"`
30500    WIN_SDK_BASE="$unix_path"
30501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30503    WIN_SDK_BASE="$unix_path"
30504  fi
30505
30506    if test -d "$WIN_SDK_BASE"; then
30507      # There have been cases of partial or broken SDK installations. A missing
30508      # lib dir is not going to work.
30509      if test ! -d "$WIN_SDK_BASE/lib"; then
30510        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30511$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30512        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30513$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30514      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30516$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30517        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30518        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30519          VS_ENV_ARGS="/x86"
30520        else
30521          VS_ENV_ARGS="/x64"
30522        fi
30523        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30524        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30525        # TODO: improve detection for other versions of SDK
30526        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30527      else
30528        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30529$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30530        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30531$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30532      fi
30533    fi
30534  fi
30535
30536    fi
30537    if test "x$PROGRAMW6432" != x; then
30538
30539  if test "x$VS_ENV_CMD" = x; then
30540    VS_VERSION="${VS_VERSION}"
30541    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30542    METHOD="well-known name"
30543
30544  windows_path="$WIN_SDK_BASE"
30545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30546    unix_path=`$CYGPATH -u "$windows_path"`
30547    WIN_SDK_BASE="$unix_path"
30548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30550    WIN_SDK_BASE="$unix_path"
30551  fi
30552
30553    if test -d "$WIN_SDK_BASE"; then
30554      # There have been cases of partial or broken SDK installations. A missing
30555      # lib dir is not going to work.
30556      if test ! -d "$WIN_SDK_BASE/lib"; then
30557        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30558$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30559        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30560$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30561      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30563$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30564        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30565        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30566          VS_ENV_ARGS="/x86"
30567        else
30568          VS_ENV_ARGS="/x64"
30569        fi
30570        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30571        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30572        # TODO: improve detection for other versions of SDK
30573        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30574      else
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30576$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30577        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30578$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30579      fi
30580    fi
30581  fi
30582
30583    fi
30584    if test "x$PROGRAMFILES" != x; then
30585
30586  if test "x$VS_ENV_CMD" = x; then
30587    VS_VERSION="${VS_VERSION}"
30588    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30589    METHOD="well-known name"
30590
30591  windows_path="$WIN_SDK_BASE"
30592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30593    unix_path=`$CYGPATH -u "$windows_path"`
30594    WIN_SDK_BASE="$unix_path"
30595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30597    WIN_SDK_BASE="$unix_path"
30598  fi
30599
30600    if test -d "$WIN_SDK_BASE"; then
30601      # There have been cases of partial or broken SDK installations. A missing
30602      # lib dir is not going to work.
30603      if test ! -d "$WIN_SDK_BASE/lib"; then
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30605$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30606        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30607$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30608      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30610$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30611        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30612        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30613          VS_ENV_ARGS="/x86"
30614        else
30615          VS_ENV_ARGS="/x64"
30616        fi
30617        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30618        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30619        # TODO: improve detection for other versions of SDK
30620        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30621      else
30622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30623$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30624        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30625$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30626      fi
30627    fi
30628  fi
30629
30630    fi
30631
30632  if test "x$VS_ENV_CMD" = x; then
30633    VS_VERSION="${VS_VERSION}"
30634    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30635    METHOD="well-known name"
30636
30637  windows_path="$WIN_SDK_BASE"
30638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30639    unix_path=`$CYGPATH -u "$windows_path"`
30640    WIN_SDK_BASE="$unix_path"
30641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30643    WIN_SDK_BASE="$unix_path"
30644  fi
30645
30646    if test -d "$WIN_SDK_BASE"; then
30647      # There have been cases of partial or broken SDK installations. A missing
30648      # lib dir is not going to work.
30649      if test ! -d "$WIN_SDK_BASE/lib"; then
30650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30651$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30652        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30653$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30654      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30656$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30657        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30658        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30659          VS_ENV_ARGS="/x86"
30660        else
30661          VS_ENV_ARGS="/x64"
30662        fi
30663        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30664        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30665        # TODO: improve detection for other versions of SDK
30666        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30667      else
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30669$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30671$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30672      fi
30673    fi
30674  fi
30675
30676
30677  if test "x$VS_ENV_CMD" = x; then
30678    VS_VERSION="${VS_VERSION}"
30679    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30680    METHOD="well-known name"
30681
30682  windows_path="$WIN_SDK_BASE"
30683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30684    unix_path=`$CYGPATH -u "$windows_path"`
30685    WIN_SDK_BASE="$unix_path"
30686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30688    WIN_SDK_BASE="$unix_path"
30689  fi
30690
30691    if test -d "$WIN_SDK_BASE"; then
30692      # There have been cases of partial or broken SDK installations. A missing
30693      # lib dir is not going to work.
30694      if test ! -d "$WIN_SDK_BASE/lib"; then
30695        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30696$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30697        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30698$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30699      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30701$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30702        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30703        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30704          VS_ENV_ARGS="/x86"
30705        else
30706          VS_ENV_ARGS="/x64"
30707        fi
30708        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30709        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30710        # TODO: improve detection for other versions of SDK
30711        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30712      else
30713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30714$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30715        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30716$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30717      fi
30718    fi
30719  fi
30720
30721  fi
30722
30723    if test "x$VS_ENV_CMD" != x; then
30724      TOOLCHAIN_VERSION=$VS_VERSION
30725      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30726      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30727      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30728      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30729      # The rest of the variables are already evaled while probing
30730      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30731$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30732      break
30733    fi
30734  done
30735
30736
30737  # If we have a devkit, skip all of the below.
30738  if test "x$DEVKIT_VS_VERSION" = x; then
30739    if test "x$VS_ENV_CMD" != x; then
30740      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30741
30742  # Only process if variable expands to non-empty
30743
30744  if test "x$VS_ENV_CMD" != x; then
30745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30746
30747  # First separate the path from the arguments. This will split at the first
30748  # space.
30749  complete="$VS_ENV_CMD"
30750  path="${complete%% *}"
30751  tmp="$complete EOL"
30752  arguments="${tmp#* }"
30753
30754  # Input might be given as Windows format, start by converting to
30755  # unix format.
30756  new_path=`$CYGPATH -u "$path"`
30757
30758  # Now try to locate executable using which
30759  new_path=`$WHICH "$new_path" 2> /dev/null`
30760  # bat and cmd files are not always considered executable in cygwin causing which
30761  # to not find them
30762  if test "x$new_path" = x \
30763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30765    new_path=`$CYGPATH -u "$path"`
30766  fi
30767  if test "x$new_path" = x; then
30768    # Oops. Which didn't find the executable.
30769    # The splitting of arguments from the executable at a space might have been incorrect,
30770    # since paths with space are more likely in Windows. Give it another try with the whole
30771    # argument.
30772    path="$complete"
30773    arguments="EOL"
30774    new_path=`$CYGPATH -u "$path"`
30775    new_path=`$WHICH "$new_path" 2> /dev/null`
30776    # bat and cmd files are not always considered executable in cygwin causing which
30777    # to not find them
30778    if test "x$new_path" = x \
30779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30781      new_path=`$CYGPATH -u "$path"`
30782    fi
30783    if test "x$new_path" = x; then
30784      # It's still not found. Now this is an unrecoverable error.
30785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30786$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30787      has_space=`$ECHO "$complete" | $GREP " "`
30788      if test "x$has_space" != x; then
30789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30791      fi
30792      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30793    fi
30794  fi
30795
30796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30799  # "foo.exe" is OK but "foo" is an error.
30800  #
30801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30802  # It is also a way to make sure we got the proper file name for the real test later on.
30803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30804  if test "x$test_shortpath" = x; then
30805    # Short path failed, file does not exist as specified.
30806    # Try adding .exe or .cmd
30807    if test -f "${new_path}.exe"; then
30808      input_to_shortpath="${new_path}.exe"
30809    elif test -f "${new_path}.cmd"; then
30810      input_to_shortpath="${new_path}.cmd"
30811    else
30812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30813$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30816      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30817    fi
30818  else
30819    input_to_shortpath="$new_path"
30820  fi
30821
30822  # Call helper function which possibly converts this using DOS-style short mode.
30823  # If so, the updated path is stored in $new_path.
30824  new_path="$input_to_shortpath"
30825
30826  input_path="$input_to_shortpath"
30827  # Check if we need to convert this using DOS-style short mode. If the path
30828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30829  # take no chances and rewrite it.
30830  # Note: m4 eats our [], so we need to use [ and ] instead.
30831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30832  if test "x$has_forbidden_chars" != x; then
30833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30837      # Going to short mode and back again did indeed matter. Since short mode is
30838      # case insensitive, let's make it lowercase to improve readability.
30839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30840      # Now convert it back to Unix-style (cygpath)
30841      input_path=`$CYGPATH -u "$shortmode_path"`
30842      new_path="$input_path"
30843    fi
30844  fi
30845
30846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30847  if test "x$test_cygdrive_prefix" = x; then
30848    # As a simple fix, exclude /usr/bin since it's not a real path.
30849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30851      # a path prefixed by /cygdrive for fixpath to work.
30852      new_path="$CYGWIN_ROOT_PATH$input_path"
30853    fi
30854  fi
30855
30856  # remove trailing .exe if any
30857  new_path="${new_path/%.exe/}"
30858
30859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30860
30861  # First separate the path from the arguments. This will split at the first
30862  # space.
30863  complete="$VS_ENV_CMD"
30864  path="${complete%% *}"
30865  tmp="$complete EOL"
30866  arguments="${tmp#* }"
30867
30868  # Input might be given as Windows format, start by converting to
30869  # unix format.
30870  new_path="$path"
30871
30872  windows_path="$new_path"
30873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30874    unix_path=`$CYGPATH -u "$windows_path"`
30875    new_path="$unix_path"
30876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30878    new_path="$unix_path"
30879  fi
30880
30881
30882  # Now try to locate executable using which
30883  new_path=`$WHICH "$new_path" 2> /dev/null`
30884
30885  if test "x$new_path" = x; then
30886    # Oops. Which didn't find the executable.
30887    # The splitting of arguments from the executable at a space might have been incorrect,
30888    # since paths with space are more likely in Windows. Give it another try with the whole
30889    # argument.
30890    path="$complete"
30891    arguments="EOL"
30892    new_path="$path"
30893
30894  windows_path="$new_path"
30895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30896    unix_path=`$CYGPATH -u "$windows_path"`
30897    new_path="$unix_path"
30898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30900    new_path="$unix_path"
30901  fi
30902
30903
30904    new_path=`$WHICH "$new_path" 2> /dev/null`
30905    # bat and cmd files are not always considered executable in MSYS causing which
30906    # to not find them
30907    if test "x$new_path" = x \
30908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30910      new_path="$path"
30911
30912  windows_path="$new_path"
30913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30914    unix_path=`$CYGPATH -u "$windows_path"`
30915    new_path="$unix_path"
30916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30918    new_path="$unix_path"
30919  fi
30920
30921    fi
30922
30923    if test "x$new_path" = x; then
30924      # It's still not found. Now this is an unrecoverable error.
30925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30926$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30927      has_space=`$ECHO "$complete" | $GREP " "`
30928      if test "x$has_space" != x; then
30929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30931      fi
30932      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30933    fi
30934  fi
30935
30936  # Now new_path has a complete unix path to the binary
30937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30938    # Keep paths in /bin as-is, but remove trailing .exe if any
30939    new_path="${new_path/%.exe/}"
30940    # Do not save /bin paths to all_fixpath_prefixes!
30941  else
30942    # Not in mixed or Windows style, start by that.
30943    new_path=`cmd //c echo $new_path`
30944
30945  input_path="$new_path"
30946  # Check if we need to convert this using DOS-style short mode. If the path
30947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30948  # take no chances and rewrite it.
30949  # Note: m4 eats our [], so we need to use [ and ] instead.
30950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30951  if test "x$has_forbidden_chars" != x; then
30952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30954  fi
30955
30956    # Output is in $new_path
30957
30958  windows_path="$new_path"
30959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30960    unix_path=`$CYGPATH -u "$windows_path"`
30961    new_path="$unix_path"
30962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30964    new_path="$unix_path"
30965  fi
30966
30967    # remove trailing .exe if any
30968    new_path="${new_path/%.exe/}"
30969
30970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30972  fi
30973
30974    else
30975      # We're on a unix platform. Hooray! :)
30976      # First separate the path from the arguments. This will split at the first
30977      # space.
30978      complete="$VS_ENV_CMD"
30979      path="${complete%% *}"
30980      tmp="$complete EOL"
30981      arguments="${tmp#* }"
30982
30983      # Cannot rely on the command "which" here since it doesn't always work.
30984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30985      if test -z "$is_absolute_path"; then
30986        # Path to executable is not absolute. Find it.
30987        IFS_save="$IFS"
30988        IFS=:
30989        for p in $PATH; do
30990          if test -f "$p/$path" && test -x "$p/$path"; then
30991            new_path="$p/$path"
30992            break
30993          fi
30994        done
30995        IFS="$IFS_save"
30996      else
30997        # This is an absolute path, we can use it without further modifications.
30998        new_path="$path"
30999      fi
31000
31001      if test "x$new_path" = x; then
31002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31003$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31004        has_space=`$ECHO "$complete" | $GREP " "`
31005        if test "x$has_space" != x; then
31006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31008        fi
31009        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31010      fi
31011    fi
31012
31013    # Now join together the path and the arguments once again
31014    if test "x$arguments" != xEOL; then
31015      new_complete="$new_path ${arguments% *}"
31016    else
31017      new_complete="$new_path"
31018    fi
31019
31020    if test "x$complete" != "x$new_complete"; then
31021      VS_ENV_CMD="$new_complete"
31022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31023$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31024    fi
31025  fi
31026
31027
31028      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31029      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31030$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31031
31032      # We need to create a couple of temporary files.
31033      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31034      $MKDIR -p $VS_ENV_TMP_DIR
31035
31036      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31037      # Instead create a shell script which will set the relevant variables when run.
31038      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31039
31040  unix_path="$WINPATH_VS_ENV_CMD"
31041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31042    windows_path=`$CYGPATH -m "$unix_path"`
31043    WINPATH_VS_ENV_CMD="$windows_path"
31044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31045    windows_path=`cmd //c echo $unix_path`
31046    WINPATH_VS_ENV_CMD="$windows_path"
31047  fi
31048
31049      WINPATH_BASH="$BASH"
31050
31051  unix_path="$WINPATH_BASH"
31052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31053    windows_path=`$CYGPATH -m "$unix_path"`
31054    WINPATH_BASH="$windows_path"
31055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31056    windows_path=`cmd //c echo $unix_path`
31057    WINPATH_BASH="$windows_path"
31058  fi
31059
31060
31061      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31062      # script (executable by bash) that will setup the important variables.
31063      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31064      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31065      # This will end up something like:
31066      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31067      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31068      # These will end up something like:
31069      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31070      # The trailing space for everyone except PATH is no typo, but is needed due
31071      # to trailing \ in the Windows paths. These will be stripped later.
31072      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31073          >> $EXTRACT_VC_ENV_BAT_FILE
31074      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31075          >> $EXTRACT_VC_ENV_BAT_FILE
31076      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31077          >> $EXTRACT_VC_ENV_BAT_FILE
31078      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31079          >> $EXTRACT_VC_ENV_BAT_FILE
31080      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31081          >> $EXTRACT_VC_ENV_BAT_FILE
31082      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31083          >> $EXTRACT_VC_ENV_BAT_FILE
31084
31085      # Now execute the newly created bat file.
31086      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31087      # Change directory so we don't need to mess with Windows paths in redirects.
31088      cd $VS_ENV_TMP_DIR
31089      cmd /c extract-vs-env.bat | $CAT
31090      cd $CURDIR
31091
31092      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31093        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31094$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31096$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31097        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31098$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31099        as_fn_error $? "Cannot continue" "$LINENO" 5
31100      fi
31101
31102      # Now set all paths and other env variables. This will allow the rest of
31103      # the configure script to find and run the compiler in the proper way.
31104      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31105$as_echo "$as_me: Setting extracted environment variables" >&6;}
31106      . $VS_ENV_TMP_DIR/set-vs-env.sh
31107      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31108      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31109    else
31110      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31111      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31112$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31113    fi
31114  fi
31115
31116  # At this point, we should have correct variables in the environment, or we can't continue.
31117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31118$as_echo_n "checking for Visual Studio variables... " >&6; }
31119
31120  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31121      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31122    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31124$as_echo "present but broken" >&6; }
31125      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31126    else
31127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31128$as_echo "ok" >&6; }
31129      # Remove any trailing "\" ";" and " " from the variables.
31130      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31131      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31132      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31133      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31134      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31135      # Remove any paths containing # (typically F#) as that messes up make. This
31136      # is needed if visual studio was installed with F# support.
31137      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31138
31139
31140
31141
31142
31143      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31144      OLDIFS="$IFS"
31145      IFS=";"
31146      for i in $VS_INCLUDE; do
31147        ipath=$i
31148        # Only process non-empty elements
31149        if test "x$ipath" != x; then
31150          IFS="$OLDIFS"
31151          # Check that directory exists before calling fixup_path
31152          testpath=$ipath
31153
31154  windows_path="$testpath"
31155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31156    unix_path=`$CYGPATH -u "$windows_path"`
31157    testpath="$unix_path"
31158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31160    testpath="$unix_path"
31161  fi
31162
31163          if test -d "$testpath"; then
31164
31165  # Only process if variable expands to non-empty
31166
31167  if test "x$ipath" != x; then
31168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31169
31170  # Input might be given as Windows format, start by converting to
31171  # unix format.
31172  path="$ipath"
31173  new_path=`$CYGPATH -u "$path"`
31174
31175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31178  # "foo.exe" is OK but "foo" is an error.
31179  #
31180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31181  # It is also a way to make sure we got the proper file name for the real test later on.
31182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31183  if test "x$test_shortpath" = x; then
31184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31185$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31186    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31187  fi
31188
31189  # Call helper function which possibly converts this using DOS-style short mode.
31190  # If so, the updated path is stored in $new_path.
31191
31192  input_path="$new_path"
31193  # Check if we need to convert this using DOS-style short mode. If the path
31194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31195  # take no chances and rewrite it.
31196  # Note: m4 eats our [], so we need to use [ and ] instead.
31197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31198  if test "x$has_forbidden_chars" != x; then
31199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31203      # Going to short mode and back again did indeed matter. Since short mode is
31204      # case insensitive, let's make it lowercase to improve readability.
31205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31206      # Now convert it back to Unix-style (cygpath)
31207      input_path=`$CYGPATH -u "$shortmode_path"`
31208      new_path="$input_path"
31209    fi
31210  fi
31211
31212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31213  if test "x$test_cygdrive_prefix" = x; then
31214    # As a simple fix, exclude /usr/bin since it's not a real path.
31215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31217      # a path prefixed by /cygdrive for fixpath to work.
31218      new_path="$CYGWIN_ROOT_PATH$input_path"
31219    fi
31220  fi
31221
31222
31223  if test "x$path" != "x$new_path"; then
31224    ipath="$new_path"
31225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31226$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31227  fi
31228
31229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31230
31231  path="$ipath"
31232  has_colon=`$ECHO $path | $GREP ^.:`
31233  new_path="$path"
31234  if test "x$has_colon" = x; then
31235    # Not in mixed or Windows style, start by that.
31236    new_path=`cmd //c echo $path`
31237  fi
31238
31239
31240  input_path="$new_path"
31241  # Check if we need to convert this using DOS-style short mode. If the path
31242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31243  # take no chances and rewrite it.
31244  # Note: m4 eats our [], so we need to use [ and ] instead.
31245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31246  if test "x$has_forbidden_chars" != x; then
31247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31249  fi
31250
31251
31252  windows_path="$new_path"
31253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31254    unix_path=`$CYGPATH -u "$windows_path"`
31255    new_path="$unix_path"
31256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31258    new_path="$unix_path"
31259  fi
31260
31261  if test "x$path" != "x$new_path"; then
31262    ipath="$new_path"
31263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31264$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31265  fi
31266
31267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31269
31270    else
31271      # We're on a unix platform. Hooray! :)
31272      path="$ipath"
31273      has_space=`$ECHO "$path" | $GREP " "`
31274      if test "x$has_space" != x; then
31275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31276$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31278      fi
31279
31280      # Use eval to expand a potential ~
31281      eval path="$path"
31282      if test ! -f "$path" && test ! -d "$path"; then
31283        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31284      fi
31285
31286      if test -d "$path"; then
31287        ipath="`cd "$path"; $THEPWDCMD -L`"
31288      else
31289        dir="`$DIRNAME "$path"`"
31290        base="`$BASENAME "$path"`"
31291        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31292      fi
31293    fi
31294  fi
31295
31296            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31297          fi
31298          IFS=";"
31299        fi
31300      done
31301      # Convert VS_LIB into SYSROOT_LDFLAGS
31302      for i in $VS_LIB; do
31303        libpath=$i
31304        # Only process non-empty elements
31305        if test "x$libpath" != x; then
31306          IFS="$OLDIFS"
31307          # Check that directory exists before calling fixup_path
31308          testpath=$libpath
31309
31310  windows_path="$testpath"
31311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31312    unix_path=`$CYGPATH -u "$windows_path"`
31313    testpath="$unix_path"
31314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31316    testpath="$unix_path"
31317  fi
31318
31319          if test -d "$testpath"; then
31320
31321  # Only process if variable expands to non-empty
31322
31323  if test "x$libpath" != x; then
31324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31325
31326  # Input might be given as Windows format, start by converting to
31327  # unix format.
31328  path="$libpath"
31329  new_path=`$CYGPATH -u "$path"`
31330
31331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31334  # "foo.exe" is OK but "foo" is an error.
31335  #
31336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31337  # It is also a way to make sure we got the proper file name for the real test later on.
31338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31339  if test "x$test_shortpath" = x; then
31340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31341$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31342    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31343  fi
31344
31345  # Call helper function which possibly converts this using DOS-style short mode.
31346  # If so, the updated path is stored in $new_path.
31347
31348  input_path="$new_path"
31349  # Check if we need to convert this using DOS-style short mode. If the path
31350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31351  # take no chances and rewrite it.
31352  # Note: m4 eats our [], so we need to use [ and ] instead.
31353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31354  if test "x$has_forbidden_chars" != x; then
31355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31359      # Going to short mode and back again did indeed matter. Since short mode is
31360      # case insensitive, let's make it lowercase to improve readability.
31361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31362      # Now convert it back to Unix-style (cygpath)
31363      input_path=`$CYGPATH -u "$shortmode_path"`
31364      new_path="$input_path"
31365    fi
31366  fi
31367
31368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31369  if test "x$test_cygdrive_prefix" = x; then
31370    # As a simple fix, exclude /usr/bin since it's not a real path.
31371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31373      # a path prefixed by /cygdrive for fixpath to work.
31374      new_path="$CYGWIN_ROOT_PATH$input_path"
31375    fi
31376  fi
31377
31378
31379  if test "x$path" != "x$new_path"; then
31380    libpath="$new_path"
31381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31382$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31383  fi
31384
31385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31386
31387  path="$libpath"
31388  has_colon=`$ECHO $path | $GREP ^.:`
31389  new_path="$path"
31390  if test "x$has_colon" = x; then
31391    # Not in mixed or Windows style, start by that.
31392    new_path=`cmd //c echo $path`
31393  fi
31394
31395
31396  input_path="$new_path"
31397  # Check if we need to convert this using DOS-style short mode. If the path
31398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31399  # take no chances and rewrite it.
31400  # Note: m4 eats our [], so we need to use [ and ] instead.
31401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31402  if test "x$has_forbidden_chars" != x; then
31403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31405  fi
31406
31407
31408  windows_path="$new_path"
31409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31410    unix_path=`$CYGPATH -u "$windows_path"`
31411    new_path="$unix_path"
31412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31414    new_path="$unix_path"
31415  fi
31416
31417  if test "x$path" != "x$new_path"; then
31418    libpath="$new_path"
31419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31420$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31421  fi
31422
31423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31425
31426    else
31427      # We're on a unix platform. Hooray! :)
31428      path="$libpath"
31429      has_space=`$ECHO "$path" | $GREP " "`
31430      if test "x$has_space" != x; then
31431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31432$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31434      fi
31435
31436      # Use eval to expand a potential ~
31437      eval path="$path"
31438      if test ! -f "$path" && test ! -d "$path"; then
31439        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31440      fi
31441
31442      if test -d "$path"; then
31443        libpath="`cd "$path"; $THEPWDCMD -L`"
31444      else
31445        dir="`$DIRNAME "$path"`"
31446        base="`$BASENAME "$path"`"
31447        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31448      fi
31449    fi
31450  fi
31451
31452            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31453          fi
31454          IFS=";"
31455        fi
31456      done
31457      IFS="$OLDIFS"
31458    fi
31459  else
31460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31461$as_echo "not found" >&6; }
31462
31463    if test "x$VS_ENV_CMD" = x; then
31464      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31465$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31466      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31467$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31468    else
31469      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31470$as_echo "$as_me: Running the extraction script failed." >&6;}
31471    fi
31472    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31473$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31474    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31475$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31476    as_fn_error $? "Cannot continue" "$LINENO" 5
31477  fi
31478
31479    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31480    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31481    PATH="$VS_PATH"
31482    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31483    export INCLUDE="$VS_INCLUDE"
31484    export LIB="$VS_LIB"
31485  else
31486    # Currently we do not define this for other toolchains. This might change as the need arise.
31487    TOOLCHAIN_VERSION=
31488  fi
31489
31490
31491  # For solaris we really need solaris tools, and not the GNU equivalent.
31492  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31493  # so add that to path before starting to probe.
31494  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31495  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31496    PATH="/usr/ccs/bin:$PATH"
31497  fi
31498
31499  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31500  # override all other locations.
31501  if test "x$TOOLCHAIN_PATH" != x; then
31502    PATH=$TOOLCHAIN_PATH:$PATH
31503  fi
31504
31505
31506  #
31507  # Setup the compilers (CC and CXX)
31508  #
31509
31510  COMPILER_NAME=C
31511  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31512
31513  if test "x$CC" != x; then
31514    # User has supplied compiler name already, always let that override.
31515    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31516$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31517    if test "x`basename $CC`" = "x$CC"; then
31518      # A command without a complete path is provided, search $PATH.
31519
31520      for ac_prog in $CC
31521do
31522  # Extract the first word of "$ac_prog", so it can be a program name with args.
31523set dummy $ac_prog; ac_word=$2
31524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31525$as_echo_n "checking for $ac_word... " >&6; }
31526if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31527  $as_echo_n "(cached) " >&6
31528else
31529  case $POTENTIAL_CC in
31530  [\\/]* | ?:[\\/]*)
31531  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31532  ;;
31533  *)
31534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31535for as_dir in $PATH
31536do
31537  IFS=$as_save_IFS
31538  test -z "$as_dir" && as_dir=.
31539    for ac_exec_ext in '' $ac_executable_extensions; do
31540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31541    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31543    break 2
31544  fi
31545done
31546  done
31547IFS=$as_save_IFS
31548
31549  ;;
31550esac
31551fi
31552POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31553if test -n "$POTENTIAL_CC"; then
31554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31555$as_echo "$POTENTIAL_CC" >&6; }
31556else
31557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31558$as_echo "no" >&6; }
31559fi
31560
31561
31562  test -n "$POTENTIAL_CC" && break
31563done
31564
31565      if test "x$POTENTIAL_CC" != x; then
31566        CC=$POTENTIAL_CC
31567      else
31568        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31569      fi
31570    else
31571      # Otherwise it might already be a complete path
31572      if test ! -x "$CC"; then
31573        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31574      fi
31575    fi
31576  else
31577    # No user supplied value. Locate compiler ourselves.
31578
31579    # If we are cross compiling, assume cross compilation tools follows the
31580    # cross compilation standard where they are prefixed with the autoconf
31581    # standard name for the target. For example the binary
31582    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31583    # If we are not cross compiling, then the default compiler name will be
31584    # used.
31585
31586    CC=
31587    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31588    # before checking the rest of the PATH.
31589    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31590    # step, this should not be necessary.
31591    if test -n "$TOOLCHAIN_PATH"; then
31592      PATH_save="$PATH"
31593      PATH="$TOOLCHAIN_PATH"
31594      for ac_prog in $SEARCH_LIST
31595do
31596  # Extract the first word of "$ac_prog", so it can be a program name with args.
31597set dummy $ac_prog; ac_word=$2
31598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31599$as_echo_n "checking for $ac_word... " >&6; }
31600if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31601  $as_echo_n "(cached) " >&6
31602else
31603  case $TOOLCHAIN_PATH_CC in
31604  [\\/]* | ?:[\\/]*)
31605  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31606  ;;
31607  *)
31608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31609for as_dir in $PATH
31610do
31611  IFS=$as_save_IFS
31612  test -z "$as_dir" && as_dir=.
31613    for ac_exec_ext in '' $ac_executable_extensions; do
31614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31615    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31617    break 2
31618  fi
31619done
31620  done
31621IFS=$as_save_IFS
31622
31623  ;;
31624esac
31625fi
31626TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31627if test -n "$TOOLCHAIN_PATH_CC"; then
31628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31629$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31630else
31631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31632$as_echo "no" >&6; }
31633fi
31634
31635
31636  test -n "$TOOLCHAIN_PATH_CC" && break
31637done
31638
31639      CC=$TOOLCHAIN_PATH_CC
31640      PATH="$PATH_save"
31641    fi
31642
31643    # AC_PATH_PROGS can't be run multiple times with the same variable,
31644    # so create a new name for this run.
31645    if test "x$CC" = x; then
31646      for ac_prog in $SEARCH_LIST
31647do
31648  # Extract the first word of "$ac_prog", so it can be a program name with args.
31649set dummy $ac_prog; ac_word=$2
31650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31651$as_echo_n "checking for $ac_word... " >&6; }
31652if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31653  $as_echo_n "(cached) " >&6
31654else
31655  case $POTENTIAL_CC in
31656  [\\/]* | ?:[\\/]*)
31657  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31658  ;;
31659  *)
31660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31661for as_dir in $PATH
31662do
31663  IFS=$as_save_IFS
31664  test -z "$as_dir" && as_dir=.
31665    for ac_exec_ext in '' $ac_executable_extensions; do
31666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31667    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31669    break 2
31670  fi
31671done
31672  done
31673IFS=$as_save_IFS
31674
31675  ;;
31676esac
31677fi
31678POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31679if test -n "$POTENTIAL_CC"; then
31680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31681$as_echo "$POTENTIAL_CC" >&6; }
31682else
31683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31684$as_echo "no" >&6; }
31685fi
31686
31687
31688  test -n "$POTENTIAL_CC" && break
31689done
31690
31691      CC=$POTENTIAL_CC
31692    fi
31693
31694    if test "x$CC" = x; then
31695
31696  # Print a helpful message on how to acquire the necessary build dependency.
31697  # devkit is the help tag: freetype, cups, alsa etc
31698  MISSING_DEPENDENCY=devkit
31699
31700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31701    cygwin_help $MISSING_DEPENDENCY
31702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703    msys_help $MISSING_DEPENDENCY
31704  else
31705    PKGHANDLER_COMMAND=
31706
31707    case $PKGHANDLER in
31708      apt-get)
31709        apt_help     $MISSING_DEPENDENCY ;;
31710      yum)
31711        yum_help     $MISSING_DEPENDENCY ;;
31712      port)
31713        port_help    $MISSING_DEPENDENCY ;;
31714      pkgutil)
31715        pkgutil_help $MISSING_DEPENDENCY ;;
31716      pkgadd)
31717        pkgadd_help  $MISSING_DEPENDENCY ;;
31718    esac
31719
31720    if test "x$PKGHANDLER_COMMAND" != x; then
31721      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31722    fi
31723  fi
31724
31725      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31726    fi
31727  fi
31728
31729  # Now we have a compiler binary in CC. Make sure it's okay.
31730
31731  # Only process if variable expands to non-empty
31732
31733  if test "x$CC" != x; then
31734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31735
31736  # First separate the path from the arguments. This will split at the first
31737  # space.
31738  complete="$CC"
31739  path="${complete%% *}"
31740  tmp="$complete EOL"
31741  arguments="${tmp#* }"
31742
31743  # Input might be given as Windows format, start by converting to
31744  # unix format.
31745  new_path=`$CYGPATH -u "$path"`
31746
31747  # Now try to locate executable using which
31748  new_path=`$WHICH "$new_path" 2> /dev/null`
31749  # bat and cmd files are not always considered executable in cygwin causing which
31750  # to not find them
31751  if test "x$new_path" = x \
31752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31754    new_path=`$CYGPATH -u "$path"`
31755  fi
31756  if test "x$new_path" = x; then
31757    # Oops. Which didn't find the executable.
31758    # The splitting of arguments from the executable at a space might have been incorrect,
31759    # since paths with space are more likely in Windows. Give it another try with the whole
31760    # argument.
31761    path="$complete"
31762    arguments="EOL"
31763    new_path=`$CYGPATH -u "$path"`
31764    new_path=`$WHICH "$new_path" 2> /dev/null`
31765    # bat and cmd files are not always considered executable in cygwin causing which
31766    # to not find them
31767    if test "x$new_path" = x \
31768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31770      new_path=`$CYGPATH -u "$path"`
31771    fi
31772    if test "x$new_path" = x; then
31773      # It's still not found. Now this is an unrecoverable error.
31774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31775$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31776      has_space=`$ECHO "$complete" | $GREP " "`
31777      if test "x$has_space" != x; then
31778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31780      fi
31781      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31782    fi
31783  fi
31784
31785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31788  # "foo.exe" is OK but "foo" is an error.
31789  #
31790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31791  # It is also a way to make sure we got the proper file name for the real test later on.
31792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31793  if test "x$test_shortpath" = x; then
31794    # Short path failed, file does not exist as specified.
31795    # Try adding .exe or .cmd
31796    if test -f "${new_path}.exe"; then
31797      input_to_shortpath="${new_path}.exe"
31798    elif test -f "${new_path}.cmd"; then
31799      input_to_shortpath="${new_path}.cmd"
31800    else
31801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31802$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31805      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31806    fi
31807  else
31808    input_to_shortpath="$new_path"
31809  fi
31810
31811  # Call helper function which possibly converts this using DOS-style short mode.
31812  # If so, the updated path is stored in $new_path.
31813  new_path="$input_to_shortpath"
31814
31815  input_path="$input_to_shortpath"
31816  # Check if we need to convert this using DOS-style short mode. If the path
31817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31818  # take no chances and rewrite it.
31819  # Note: m4 eats our [], so we need to use [ and ] instead.
31820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31821  if test "x$has_forbidden_chars" != x; then
31822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31826      # Going to short mode and back again did indeed matter. Since short mode is
31827      # case insensitive, let's make it lowercase to improve readability.
31828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31829      # Now convert it back to Unix-style (cygpath)
31830      input_path=`$CYGPATH -u "$shortmode_path"`
31831      new_path="$input_path"
31832    fi
31833  fi
31834
31835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31836  if test "x$test_cygdrive_prefix" = x; then
31837    # As a simple fix, exclude /usr/bin since it's not a real path.
31838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31840      # a path prefixed by /cygdrive for fixpath to work.
31841      new_path="$CYGWIN_ROOT_PATH$input_path"
31842    fi
31843  fi
31844
31845  # remove trailing .exe if any
31846  new_path="${new_path/%.exe/}"
31847
31848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31849
31850  # First separate the path from the arguments. This will split at the first
31851  # space.
31852  complete="$CC"
31853  path="${complete%% *}"
31854  tmp="$complete EOL"
31855  arguments="${tmp#* }"
31856
31857  # Input might be given as Windows format, start by converting to
31858  # unix format.
31859  new_path="$path"
31860
31861  windows_path="$new_path"
31862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31863    unix_path=`$CYGPATH -u "$windows_path"`
31864    new_path="$unix_path"
31865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31867    new_path="$unix_path"
31868  fi
31869
31870
31871  # Now try to locate executable using which
31872  new_path=`$WHICH "$new_path" 2> /dev/null`
31873
31874  if test "x$new_path" = x; then
31875    # Oops. Which didn't find the executable.
31876    # The splitting of arguments from the executable at a space might have been incorrect,
31877    # since paths with space are more likely in Windows. Give it another try with the whole
31878    # argument.
31879    path="$complete"
31880    arguments="EOL"
31881    new_path="$path"
31882
31883  windows_path="$new_path"
31884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31885    unix_path=`$CYGPATH -u "$windows_path"`
31886    new_path="$unix_path"
31887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31889    new_path="$unix_path"
31890  fi
31891
31892
31893    new_path=`$WHICH "$new_path" 2> /dev/null`
31894    # bat and cmd files are not always considered executable in MSYS causing which
31895    # to not find them
31896    if test "x$new_path" = x \
31897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31899      new_path="$path"
31900
31901  windows_path="$new_path"
31902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31903    unix_path=`$CYGPATH -u "$windows_path"`
31904    new_path="$unix_path"
31905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31907    new_path="$unix_path"
31908  fi
31909
31910    fi
31911
31912    if test "x$new_path" = x; then
31913      # It's still not found. Now this is an unrecoverable error.
31914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31915$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31916      has_space=`$ECHO "$complete" | $GREP " "`
31917      if test "x$has_space" != x; then
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31920      fi
31921      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31922    fi
31923  fi
31924
31925  # Now new_path has a complete unix path to the binary
31926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31927    # Keep paths in /bin as-is, but remove trailing .exe if any
31928    new_path="${new_path/%.exe/}"
31929    # Do not save /bin paths to all_fixpath_prefixes!
31930  else
31931    # Not in mixed or Windows style, start by that.
31932    new_path=`cmd //c echo $new_path`
31933
31934  input_path="$new_path"
31935  # Check if we need to convert this using DOS-style short mode. If the path
31936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31937  # take no chances and rewrite it.
31938  # Note: m4 eats our [], so we need to use [ and ] instead.
31939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31940  if test "x$has_forbidden_chars" != x; then
31941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31943  fi
31944
31945    # Output is in $new_path
31946
31947  windows_path="$new_path"
31948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31949    unix_path=`$CYGPATH -u "$windows_path"`
31950    new_path="$unix_path"
31951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31953    new_path="$unix_path"
31954  fi
31955
31956    # remove trailing .exe if any
31957    new_path="${new_path/%.exe/}"
31958
31959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31961  fi
31962
31963    else
31964      # We're on a unix platform. Hooray! :)
31965      # First separate the path from the arguments. This will split at the first
31966      # space.
31967      complete="$CC"
31968      path="${complete%% *}"
31969      tmp="$complete EOL"
31970      arguments="${tmp#* }"
31971
31972      # Cannot rely on the command "which" here since it doesn't always work.
31973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31974      if test -z "$is_absolute_path"; then
31975        # Path to executable is not absolute. Find it.
31976        IFS_save="$IFS"
31977        IFS=:
31978        for p in $PATH; do
31979          if test -f "$p/$path" && test -x "$p/$path"; then
31980            new_path="$p/$path"
31981            break
31982          fi
31983        done
31984        IFS="$IFS_save"
31985      else
31986        # This is an absolute path, we can use it without further modifications.
31987        new_path="$path"
31988      fi
31989
31990      if test "x$new_path" = x; then
31991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31992$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31993        has_space=`$ECHO "$complete" | $GREP " "`
31994        if test "x$has_space" != x; then
31995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31997        fi
31998        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31999      fi
32000    fi
32001
32002    # Now join together the path and the arguments once again
32003    if test "x$arguments" != xEOL; then
32004      new_complete="$new_path ${arguments% *}"
32005    else
32006      new_complete="$new_path"
32007    fi
32008
32009    if test "x$complete" != "x$new_complete"; then
32010      CC="$new_complete"
32011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32012$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32013    fi
32014  fi
32015
32016  TEST_COMPILER="$CC"
32017
32018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32019$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32020  SYMLINK_ORIGINAL="$TEST_COMPILER"
32021
32022  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32023    # Follow a chain of symbolic links. Use readlink
32024    # where it exists, else fall back to horribly
32025    # complicated shell code.
32026    if test "x$READLINK_TESTED" != yes; then
32027      # On MacOSX there is a readlink tool with a different
32028      # purpose than the GNU readlink tool. Check the found readlink.
32029      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32030      if test "x$ISGNU" = x; then
32031        # A readlink that we do not know how to use.
32032        # Are there other non-GNU readlinks out there?
32033        READLINK_TESTED=yes
32034        READLINK=
32035      fi
32036    fi
32037
32038    if test "x$READLINK" != x; then
32039      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32040    else
32041      # Save the current directory for restoring afterwards
32042      STARTDIR=$PWD
32043      COUNTER=0
32044      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32045      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32046      cd $sym_link_dir
32047      # Use -P flag to resolve symlinks in directories.
32048      cd `$THEPWDCMD -P`
32049      sym_link_dir=`$THEPWDCMD -P`
32050      # Resolve file symlinks
32051      while test $COUNTER -lt 20; do
32052        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32053        if test "x$ISLINK" == x; then
32054          # This is not a symbolic link! We are done!
32055          break
32056        fi
32057        # Again resolve directory symlinks since the target of the just found
32058        # link could be in a different directory
32059        cd `$DIRNAME $ISLINK`
32060        sym_link_dir=`$THEPWDCMD -P`
32061        sym_link_file=`$BASENAME $ISLINK`
32062        let COUNTER=COUNTER+1
32063      done
32064      cd $STARTDIR
32065      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32066    fi
32067  fi
32068
32069  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32071$as_echo "no symlink" >&6; }
32072  else
32073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32074$as_echo "$SYMLINK_ORIGINAL" >&6; }
32075
32076    # We can't handle ccache by gcc wrappers, since we need to know if we're
32077    # using ccache. Instead ccache usage must be controlled by a configure option.
32078    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32079    if test "x$COMPILER_BASENAME" = "xccache"; then
32080      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32081$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32082      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32083    fi
32084  fi
32085
32086
32087  COMPILER=$CC
32088  COMPILER_NAME=$COMPILER_NAME
32089
32090  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32091    # cc -V output typically looks like
32092    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32093    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32094    # Check that this is likely to be the Solaris Studio cc.
32095    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32096    if test $? -ne 0; then
32097      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32098      { $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
32099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32101$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32102      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32103$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32104      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32105    fi
32106    # Remove usage instructions (if present), and
32107    # collapse compiler output into a single line
32108    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32109        $SED -e 's/ *[Uu]sage:.*//'`
32110    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32111        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32112  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32113    # xlc -qversion output typically looks like
32114    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32115    #     Version: 11.01.0000.0015
32116    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32117    # Check that this is likely to be the IBM XL C compiler.
32118    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32119    if test $? -ne 0; then
32120      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32121      { $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
32122$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32123      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32124$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32125      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32126$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32127      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32128    fi
32129    # Collapse compiler output into a single line
32130    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32131    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32132        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32133  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32134    # There is no specific version flag, but all output starts with a version string.
32135    # First line typically looks something like:
32136    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32137    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32138    # Check that this is likely to be Microsoft CL.EXE.
32139    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32140    if test $? -ne 0; then
32141      { $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
32142$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32143      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32144$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32145      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32146    fi
32147    # Collapse compiler output into a single line
32148    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32150        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32151  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32152    # gcc --version output typically looks like
32153    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32154    #     Copyright (C) 2013 Free Software Foundation, Inc.
32155    #     This is free software; see the source for copying conditions.  There is NO
32156    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32157    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32158    # Check that this is likely to be GCC.
32159    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32160    if test $? -ne 0; then
32161      { $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
32162$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32163      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32164$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32165      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32166    fi
32167    # Remove Copyright and legalese from version string, and
32168    # collapse into a single line
32169    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32170        $SED -e 's/ *Copyright .*//'`
32171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32172        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32173  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32174    # clang --version output typically looks like
32175    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32176    #    clang version 3.3 (tags/RELEASE_33/final)
32177    # or
32178    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32179    #    Target: x86_64-pc-linux-gnu
32180    #    Thread model: posix
32181    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32182    # Check that this is likely to be clang
32183    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32184    if test $? -ne 0; then
32185      { $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
32186$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32187      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32188$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32189      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32190    fi
32191    # Collapse compiler output into a single line
32192    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32193    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32194        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32195  else
32196      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32197  fi
32198  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32199  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32200  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32201  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32202
32203  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32204$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32205
32206
32207  # Now that we have resolved CC ourself, let autoconf have its go at it
32208  ac_ext=c
32209ac_cpp='$CPP $CPPFLAGS'
32210ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32211ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32212ac_compiler_gnu=$ac_cv_c_compiler_gnu
32213if test -n "$ac_tool_prefix"; then
32214  for ac_prog in $CC
32215  do
32216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32219$as_echo_n "checking for $ac_word... " >&6; }
32220if ${ac_cv_prog_CC+:} false; then :
32221  $as_echo_n "(cached) " >&6
32222else
32223  if test -n "$CC"; then
32224  ac_cv_prog_CC="$CC" # Let the user override the test.
32225else
32226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32227for as_dir in $PATH
32228do
32229  IFS=$as_save_IFS
32230  test -z "$as_dir" && as_dir=.
32231    for ac_exec_ext in '' $ac_executable_extensions; do
32232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32233    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32235    break 2
32236  fi
32237done
32238  done
32239IFS=$as_save_IFS
32240
32241fi
32242fi
32243CC=$ac_cv_prog_CC
32244if test -n "$CC"; then
32245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32246$as_echo "$CC" >&6; }
32247else
32248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32249$as_echo "no" >&6; }
32250fi
32251
32252
32253    test -n "$CC" && break
32254  done
32255fi
32256if test -z "$CC"; then
32257  ac_ct_CC=$CC
32258  for ac_prog in $CC
32259do
32260  # Extract the first word of "$ac_prog", so it can be a program name with args.
32261set dummy $ac_prog; ac_word=$2
32262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32263$as_echo_n "checking for $ac_word... " >&6; }
32264if ${ac_cv_prog_ac_ct_CC+:} false; then :
32265  $as_echo_n "(cached) " >&6
32266else
32267  if test -n "$ac_ct_CC"; then
32268  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32269else
32270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32271for as_dir in $PATH
32272do
32273  IFS=$as_save_IFS
32274  test -z "$as_dir" && as_dir=.
32275    for ac_exec_ext in '' $ac_executable_extensions; do
32276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32277    ac_cv_prog_ac_ct_CC="$ac_prog"
32278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32279    break 2
32280  fi
32281done
32282  done
32283IFS=$as_save_IFS
32284
32285fi
32286fi
32287ac_ct_CC=$ac_cv_prog_ac_ct_CC
32288if test -n "$ac_ct_CC"; then
32289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32290$as_echo "$ac_ct_CC" >&6; }
32291else
32292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32293$as_echo "no" >&6; }
32294fi
32295
32296
32297  test -n "$ac_ct_CC" && break
32298done
32299
32300  if test "x$ac_ct_CC" = x; then
32301    CC=""
32302  else
32303    case $cross_compiling:$ac_tool_warned in
32304yes:)
32305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32307ac_tool_warned=yes ;;
32308esac
32309    CC=$ac_ct_CC
32310  fi
32311fi
32312
32313
32314test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32316as_fn_error $? "no acceptable C compiler found in \$PATH
32317See \`config.log' for more details" "$LINENO" 5; }
32318
32319# Provide some information about the compiler.
32320$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32321set X $ac_compile
32322ac_compiler=$2
32323for ac_option in --version -v -V -qversion; do
32324  { { ac_try="$ac_compiler $ac_option >&5"
32325case "(($ac_try" in
32326  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32327  *) ac_try_echo=$ac_try;;
32328esac
32329eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32330$as_echo "$ac_try_echo"; } >&5
32331  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32332  ac_status=$?
32333  if test -s conftest.err; then
32334    sed '10a\
32335... rest of stderr output deleted ...
32336         10q' conftest.err >conftest.er1
32337    cat conftest.er1 >&5
32338  fi
32339  rm -f conftest.er1 conftest.err
32340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32341  test $ac_status = 0; }
32342done
32343
32344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32345/* end confdefs.h.  */
32346
32347int
32348main ()
32349{
32350
32351  ;
32352  return 0;
32353}
32354_ACEOF
32355ac_clean_files_save=$ac_clean_files
32356ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32357# Try to create an executable without -o first, disregard a.out.
32358# It will help us diagnose broken compilers, and finding out an intuition
32359# of exeext.
32360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32361$as_echo_n "checking whether the C compiler works... " >&6; }
32362ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32363
32364# The possible output files:
32365ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32366
32367ac_rmfiles=
32368for ac_file in $ac_files
32369do
32370  case $ac_file in
32371    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32372    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32373  esac
32374done
32375rm -f $ac_rmfiles
32376
32377if { { ac_try="$ac_link_default"
32378case "(($ac_try" in
32379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32380  *) ac_try_echo=$ac_try;;
32381esac
32382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32383$as_echo "$ac_try_echo"; } >&5
32384  (eval "$ac_link_default") 2>&5
32385  ac_status=$?
32386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32387  test $ac_status = 0; }; then :
32388  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32389# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32390# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32391# so that the user can short-circuit this test for compilers unknown to
32392# Autoconf.
32393for ac_file in $ac_files ''
32394do
32395  test -f "$ac_file" || continue
32396  case $ac_file in
32397    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32398	;;
32399    [ab].out )
32400	# We found the default executable, but exeext='' is most
32401	# certainly right.
32402	break;;
32403    *.* )
32404	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32405	then :; else
32406	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32407	fi
32408	# We set ac_cv_exeext here because the later test for it is not
32409	# safe: cross compilers may not add the suffix if given an `-o'
32410	# argument, so we may need to know it at that point already.
32411	# Even if this section looks crufty: it has the advantage of
32412	# actually working.
32413	break;;
32414    * )
32415	break;;
32416  esac
32417done
32418test "$ac_cv_exeext" = no && ac_cv_exeext=
32419
32420else
32421  ac_file=''
32422fi
32423if test -z "$ac_file"; then :
32424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32425$as_echo "no" >&6; }
32426$as_echo "$as_me: failed program was:" >&5
32427sed 's/^/| /' conftest.$ac_ext >&5
32428
32429{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32431as_fn_error 77 "C compiler cannot create executables
32432See \`config.log' for more details" "$LINENO" 5; }
32433else
32434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32435$as_echo "yes" >&6; }
32436fi
32437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32438$as_echo_n "checking for C compiler default output file name... " >&6; }
32439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32440$as_echo "$ac_file" >&6; }
32441ac_exeext=$ac_cv_exeext
32442
32443rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32444ac_clean_files=$ac_clean_files_save
32445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32446$as_echo_n "checking for suffix of executables... " >&6; }
32447if { { ac_try="$ac_link"
32448case "(($ac_try" in
32449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32450  *) ac_try_echo=$ac_try;;
32451esac
32452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32453$as_echo "$ac_try_echo"; } >&5
32454  (eval "$ac_link") 2>&5
32455  ac_status=$?
32456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32457  test $ac_status = 0; }; then :
32458  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32459# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32460# work properly (i.e., refer to `conftest.exe'), while it won't with
32461# `rm'.
32462for ac_file in conftest.exe conftest conftest.*; do
32463  test -f "$ac_file" || continue
32464  case $ac_file in
32465    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32466    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32467	  break;;
32468    * ) break;;
32469  esac
32470done
32471else
32472  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32474as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32475See \`config.log' for more details" "$LINENO" 5; }
32476fi
32477rm -f conftest conftest$ac_cv_exeext
32478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32479$as_echo "$ac_cv_exeext" >&6; }
32480
32481rm -f conftest.$ac_ext
32482EXEEXT=$ac_cv_exeext
32483ac_exeext=$EXEEXT
32484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32485/* end confdefs.h.  */
32486#include <stdio.h>
32487int
32488main ()
32489{
32490FILE *f = fopen ("conftest.out", "w");
32491 return ferror (f) || fclose (f) != 0;
32492
32493  ;
32494  return 0;
32495}
32496_ACEOF
32497ac_clean_files="$ac_clean_files conftest.out"
32498# Check that the compiler produces executables we can run.  If not, either
32499# the compiler is broken, or we cross compile.
32500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32501$as_echo_n "checking whether we are cross compiling... " >&6; }
32502if test "$cross_compiling" != yes; then
32503  { { ac_try="$ac_link"
32504case "(($ac_try" in
32505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32506  *) ac_try_echo=$ac_try;;
32507esac
32508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32509$as_echo "$ac_try_echo"; } >&5
32510  (eval "$ac_link") 2>&5
32511  ac_status=$?
32512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32513  test $ac_status = 0; }
32514  if { ac_try='./conftest$ac_cv_exeext'
32515  { { case "(($ac_try" in
32516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32517  *) ac_try_echo=$ac_try;;
32518esac
32519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32520$as_echo "$ac_try_echo"; } >&5
32521  (eval "$ac_try") 2>&5
32522  ac_status=$?
32523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32524  test $ac_status = 0; }; }; then
32525    cross_compiling=no
32526  else
32527    if test "$cross_compiling" = maybe; then
32528	cross_compiling=yes
32529    else
32530	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32532as_fn_error $? "cannot run C compiled programs.
32533If you meant to cross compile, use \`--host'.
32534See \`config.log' for more details" "$LINENO" 5; }
32535    fi
32536  fi
32537fi
32538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32539$as_echo "$cross_compiling" >&6; }
32540
32541rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32542ac_clean_files=$ac_clean_files_save
32543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32544$as_echo_n "checking for suffix of object files... " >&6; }
32545if ${ac_cv_objext+:} false; then :
32546  $as_echo_n "(cached) " >&6
32547else
32548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32549/* end confdefs.h.  */
32550
32551int
32552main ()
32553{
32554
32555  ;
32556  return 0;
32557}
32558_ACEOF
32559rm -f conftest.o conftest.obj
32560if { { ac_try="$ac_compile"
32561case "(($ac_try" in
32562  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32563  *) ac_try_echo=$ac_try;;
32564esac
32565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32566$as_echo "$ac_try_echo"; } >&5
32567  (eval "$ac_compile") 2>&5
32568  ac_status=$?
32569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32570  test $ac_status = 0; }; then :
32571  for ac_file in conftest.o conftest.obj conftest.*; do
32572  test -f "$ac_file" || continue;
32573  case $ac_file in
32574    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32575    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32576       break;;
32577  esac
32578done
32579else
32580  $as_echo "$as_me: failed program was:" >&5
32581sed 's/^/| /' conftest.$ac_ext >&5
32582
32583{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32585as_fn_error $? "cannot compute suffix of object files: cannot compile
32586See \`config.log' for more details" "$LINENO" 5; }
32587fi
32588rm -f conftest.$ac_cv_objext conftest.$ac_ext
32589fi
32590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32591$as_echo "$ac_cv_objext" >&6; }
32592OBJEXT=$ac_cv_objext
32593ac_objext=$OBJEXT
32594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32595$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32596if ${ac_cv_c_compiler_gnu+:} false; then :
32597  $as_echo_n "(cached) " >&6
32598else
32599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32600/* end confdefs.h.  */
32601
32602int
32603main ()
32604{
32605#ifndef __GNUC__
32606       choke me
32607#endif
32608
32609  ;
32610  return 0;
32611}
32612_ACEOF
32613if ac_fn_c_try_compile "$LINENO"; then :
32614  ac_compiler_gnu=yes
32615else
32616  ac_compiler_gnu=no
32617fi
32618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32619ac_cv_c_compiler_gnu=$ac_compiler_gnu
32620
32621fi
32622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32623$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32624if test $ac_compiler_gnu = yes; then
32625  GCC=yes
32626else
32627  GCC=
32628fi
32629ac_test_CFLAGS=${CFLAGS+set}
32630ac_save_CFLAGS=$CFLAGS
32631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32632$as_echo_n "checking whether $CC accepts -g... " >&6; }
32633if ${ac_cv_prog_cc_g+:} false; then :
32634  $as_echo_n "(cached) " >&6
32635else
32636  ac_save_c_werror_flag=$ac_c_werror_flag
32637   ac_c_werror_flag=yes
32638   ac_cv_prog_cc_g=no
32639   CFLAGS="-g"
32640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32641/* end confdefs.h.  */
32642
32643int
32644main ()
32645{
32646
32647  ;
32648  return 0;
32649}
32650_ACEOF
32651if ac_fn_c_try_compile "$LINENO"; then :
32652  ac_cv_prog_cc_g=yes
32653else
32654  CFLAGS=""
32655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32656/* end confdefs.h.  */
32657
32658int
32659main ()
32660{
32661
32662  ;
32663  return 0;
32664}
32665_ACEOF
32666if ac_fn_c_try_compile "$LINENO"; then :
32667
32668else
32669  ac_c_werror_flag=$ac_save_c_werror_flag
32670	 CFLAGS="-g"
32671	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32672/* end confdefs.h.  */
32673
32674int
32675main ()
32676{
32677
32678  ;
32679  return 0;
32680}
32681_ACEOF
32682if ac_fn_c_try_compile "$LINENO"; then :
32683  ac_cv_prog_cc_g=yes
32684fi
32685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32686fi
32687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32688fi
32689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32690   ac_c_werror_flag=$ac_save_c_werror_flag
32691fi
32692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32693$as_echo "$ac_cv_prog_cc_g" >&6; }
32694if test "$ac_test_CFLAGS" = set; then
32695  CFLAGS=$ac_save_CFLAGS
32696elif test $ac_cv_prog_cc_g = yes; then
32697  if test "$GCC" = yes; then
32698    CFLAGS="-g -O2"
32699  else
32700    CFLAGS="-g"
32701  fi
32702else
32703  if test "$GCC" = yes; then
32704    CFLAGS="-O2"
32705  else
32706    CFLAGS=
32707  fi
32708fi
32709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32710$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32711if ${ac_cv_prog_cc_c89+:} false; then :
32712  $as_echo_n "(cached) " >&6
32713else
32714  ac_cv_prog_cc_c89=no
32715ac_save_CC=$CC
32716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32717/* end confdefs.h.  */
32718#include <stdarg.h>
32719#include <stdio.h>
32720struct stat;
32721/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32722struct buf { int x; };
32723FILE * (*rcsopen) (struct buf *, struct stat *, int);
32724static char *e (p, i)
32725     char **p;
32726     int i;
32727{
32728  return p[i];
32729}
32730static char *f (char * (*g) (char **, int), char **p, ...)
32731{
32732  char *s;
32733  va_list v;
32734  va_start (v,p);
32735  s = g (p, va_arg (v,int));
32736  va_end (v);
32737  return s;
32738}
32739
32740/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32741   function prototypes and stuff, but not '\xHH' hex character constants.
32742   These don't provoke an error unfortunately, instead are silently treated
32743   as 'x'.  The following induces an error, until -std is added to get
32744   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32745   array size at least.  It's necessary to write '\x00'==0 to get something
32746   that's true only with -std.  */
32747int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32748
32749/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32750   inside strings and character constants.  */
32751#define FOO(x) 'x'
32752int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32753
32754int test (int i, double x);
32755struct s1 {int (*f) (int a);};
32756struct s2 {int (*f) (double a);};
32757int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32758int argc;
32759char **argv;
32760int
32761main ()
32762{
32763return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32764  ;
32765  return 0;
32766}
32767_ACEOF
32768for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32769	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32770do
32771  CC="$ac_save_CC $ac_arg"
32772  if ac_fn_c_try_compile "$LINENO"; then :
32773  ac_cv_prog_cc_c89=$ac_arg
32774fi
32775rm -f core conftest.err conftest.$ac_objext
32776  test "x$ac_cv_prog_cc_c89" != "xno" && break
32777done
32778rm -f conftest.$ac_ext
32779CC=$ac_save_CC
32780
32781fi
32782# AC_CACHE_VAL
32783case "x$ac_cv_prog_cc_c89" in
32784  x)
32785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32786$as_echo "none needed" >&6; } ;;
32787  xno)
32788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32789$as_echo "unsupported" >&6; } ;;
32790  *)
32791    CC="$CC $ac_cv_prog_cc_c89"
32792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32793$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32794esac
32795if test "x$ac_cv_prog_cc_c89" != xno; then :
32796
32797fi
32798
32799ac_ext=cpp
32800ac_cpp='$CXXCPP $CPPFLAGS'
32801ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32802ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32803ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32804
32805
32806
32807  COMPILER_NAME=C++
32808  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32809
32810  if test "x$CXX" != x; then
32811    # User has supplied compiler name already, always let that override.
32812    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32813$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32814    if test "x`basename $CXX`" = "x$CXX"; then
32815      # A command without a complete path is provided, search $PATH.
32816
32817      for ac_prog in $CXX
32818do
32819  # Extract the first word of "$ac_prog", so it can be a program name with args.
32820set dummy $ac_prog; ac_word=$2
32821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32822$as_echo_n "checking for $ac_word... " >&6; }
32823if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32824  $as_echo_n "(cached) " >&6
32825else
32826  case $POTENTIAL_CXX in
32827  [\\/]* | ?:[\\/]*)
32828  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32829  ;;
32830  *)
32831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32832for as_dir in $PATH
32833do
32834  IFS=$as_save_IFS
32835  test -z "$as_dir" && as_dir=.
32836    for ac_exec_ext in '' $ac_executable_extensions; do
32837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32838    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32840    break 2
32841  fi
32842done
32843  done
32844IFS=$as_save_IFS
32845
32846  ;;
32847esac
32848fi
32849POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32850if test -n "$POTENTIAL_CXX"; then
32851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32852$as_echo "$POTENTIAL_CXX" >&6; }
32853else
32854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32855$as_echo "no" >&6; }
32856fi
32857
32858
32859  test -n "$POTENTIAL_CXX" && break
32860done
32861
32862      if test "x$POTENTIAL_CXX" != x; then
32863        CXX=$POTENTIAL_CXX
32864      else
32865        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32866      fi
32867    else
32868      # Otherwise it might already be a complete path
32869      if test ! -x "$CXX"; then
32870        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32871      fi
32872    fi
32873  else
32874    # No user supplied value. Locate compiler ourselves.
32875
32876    # If we are cross compiling, assume cross compilation tools follows the
32877    # cross compilation standard where they are prefixed with the autoconf
32878    # standard name for the target. For example the binary
32879    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32880    # If we are not cross compiling, then the default compiler name will be
32881    # used.
32882
32883    CXX=
32884    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32885    # before checking the rest of the PATH.
32886    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32887    # step, this should not be necessary.
32888    if test -n "$TOOLCHAIN_PATH"; then
32889      PATH_save="$PATH"
32890      PATH="$TOOLCHAIN_PATH"
32891      for ac_prog in $SEARCH_LIST
32892do
32893  # Extract the first word of "$ac_prog", so it can be a program name with args.
32894set dummy $ac_prog; ac_word=$2
32895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32896$as_echo_n "checking for $ac_word... " >&6; }
32897if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32898  $as_echo_n "(cached) " >&6
32899else
32900  case $TOOLCHAIN_PATH_CXX in
32901  [\\/]* | ?:[\\/]*)
32902  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32903  ;;
32904  *)
32905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32906for as_dir in $PATH
32907do
32908  IFS=$as_save_IFS
32909  test -z "$as_dir" && as_dir=.
32910    for ac_exec_ext in '' $ac_executable_extensions; do
32911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32912    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32914    break 2
32915  fi
32916done
32917  done
32918IFS=$as_save_IFS
32919
32920  ;;
32921esac
32922fi
32923TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32924if test -n "$TOOLCHAIN_PATH_CXX"; then
32925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32926$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32927else
32928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32929$as_echo "no" >&6; }
32930fi
32931
32932
32933  test -n "$TOOLCHAIN_PATH_CXX" && break
32934done
32935
32936      CXX=$TOOLCHAIN_PATH_CXX
32937      PATH="$PATH_save"
32938    fi
32939
32940    # AC_PATH_PROGS can't be run multiple times with the same variable,
32941    # so create a new name for this run.
32942    if test "x$CXX" = x; then
32943      for ac_prog in $SEARCH_LIST
32944do
32945  # Extract the first word of "$ac_prog", so it can be a program name with args.
32946set dummy $ac_prog; ac_word=$2
32947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32948$as_echo_n "checking for $ac_word... " >&6; }
32949if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32950  $as_echo_n "(cached) " >&6
32951else
32952  case $POTENTIAL_CXX in
32953  [\\/]* | ?:[\\/]*)
32954  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32955  ;;
32956  *)
32957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32958for as_dir in $PATH
32959do
32960  IFS=$as_save_IFS
32961  test -z "$as_dir" && as_dir=.
32962    for ac_exec_ext in '' $ac_executable_extensions; do
32963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32964    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32966    break 2
32967  fi
32968done
32969  done
32970IFS=$as_save_IFS
32971
32972  ;;
32973esac
32974fi
32975POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32976if test -n "$POTENTIAL_CXX"; then
32977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32978$as_echo "$POTENTIAL_CXX" >&6; }
32979else
32980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32981$as_echo "no" >&6; }
32982fi
32983
32984
32985  test -n "$POTENTIAL_CXX" && break
32986done
32987
32988      CXX=$POTENTIAL_CXX
32989    fi
32990
32991    if test "x$CXX" = x; then
32992
32993  # Print a helpful message on how to acquire the necessary build dependency.
32994  # devkit is the help tag: freetype, cups, alsa etc
32995  MISSING_DEPENDENCY=devkit
32996
32997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32998    cygwin_help $MISSING_DEPENDENCY
32999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33000    msys_help $MISSING_DEPENDENCY
33001  else
33002    PKGHANDLER_COMMAND=
33003
33004    case $PKGHANDLER in
33005      apt-get)
33006        apt_help     $MISSING_DEPENDENCY ;;
33007      yum)
33008        yum_help     $MISSING_DEPENDENCY ;;
33009      port)
33010        port_help    $MISSING_DEPENDENCY ;;
33011      pkgutil)
33012        pkgutil_help $MISSING_DEPENDENCY ;;
33013      pkgadd)
33014        pkgadd_help  $MISSING_DEPENDENCY ;;
33015    esac
33016
33017    if test "x$PKGHANDLER_COMMAND" != x; then
33018      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33019    fi
33020  fi
33021
33022      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33023    fi
33024  fi
33025
33026  # Now we have a compiler binary in CXX. Make sure it's okay.
33027
33028  # Only process if variable expands to non-empty
33029
33030  if test "x$CXX" != x; then
33031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33032
33033  # First separate the path from the arguments. This will split at the first
33034  # space.
33035  complete="$CXX"
33036  path="${complete%% *}"
33037  tmp="$complete EOL"
33038  arguments="${tmp#* }"
33039
33040  # Input might be given as Windows format, start by converting to
33041  # unix format.
33042  new_path=`$CYGPATH -u "$path"`
33043
33044  # Now try to locate executable using which
33045  new_path=`$WHICH "$new_path" 2> /dev/null`
33046  # bat and cmd files are not always considered executable in cygwin causing which
33047  # to not find them
33048  if test "x$new_path" = x \
33049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33051    new_path=`$CYGPATH -u "$path"`
33052  fi
33053  if test "x$new_path" = x; then
33054    # Oops. Which didn't find the executable.
33055    # The splitting of arguments from the executable at a space might have been incorrect,
33056    # since paths with space are more likely in Windows. Give it another try with the whole
33057    # argument.
33058    path="$complete"
33059    arguments="EOL"
33060    new_path=`$CYGPATH -u "$path"`
33061    new_path=`$WHICH "$new_path" 2> /dev/null`
33062    # bat and cmd files are not always considered executable in cygwin causing which
33063    # to not find them
33064    if test "x$new_path" = x \
33065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33067      new_path=`$CYGPATH -u "$path"`
33068    fi
33069    if test "x$new_path" = x; then
33070      # It's still not found. Now this is an unrecoverable error.
33071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33072$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33073      has_space=`$ECHO "$complete" | $GREP " "`
33074      if test "x$has_space" != x; then
33075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33077      fi
33078      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33079    fi
33080  fi
33081
33082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33085  # "foo.exe" is OK but "foo" is an error.
33086  #
33087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33088  # It is also a way to make sure we got the proper file name for the real test later on.
33089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33090  if test "x$test_shortpath" = x; then
33091    # Short path failed, file does not exist as specified.
33092    # Try adding .exe or .cmd
33093    if test -f "${new_path}.exe"; then
33094      input_to_shortpath="${new_path}.exe"
33095    elif test -f "${new_path}.cmd"; then
33096      input_to_shortpath="${new_path}.cmd"
33097    else
33098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33099$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33102      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33103    fi
33104  else
33105    input_to_shortpath="$new_path"
33106  fi
33107
33108  # Call helper function which possibly converts this using DOS-style short mode.
33109  # If so, the updated path is stored in $new_path.
33110  new_path="$input_to_shortpath"
33111
33112  input_path="$input_to_shortpath"
33113  # Check if we need to convert this using DOS-style short mode. If the path
33114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33115  # take no chances and rewrite it.
33116  # Note: m4 eats our [], so we need to use [ and ] instead.
33117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33118  if test "x$has_forbidden_chars" != x; then
33119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33123      # Going to short mode and back again did indeed matter. Since short mode is
33124      # case insensitive, let's make it lowercase to improve readability.
33125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33126      # Now convert it back to Unix-style (cygpath)
33127      input_path=`$CYGPATH -u "$shortmode_path"`
33128      new_path="$input_path"
33129    fi
33130  fi
33131
33132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33133  if test "x$test_cygdrive_prefix" = x; then
33134    # As a simple fix, exclude /usr/bin since it's not a real path.
33135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33137      # a path prefixed by /cygdrive for fixpath to work.
33138      new_path="$CYGWIN_ROOT_PATH$input_path"
33139    fi
33140  fi
33141
33142  # remove trailing .exe if any
33143  new_path="${new_path/%.exe/}"
33144
33145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33146
33147  # First separate the path from the arguments. This will split at the first
33148  # space.
33149  complete="$CXX"
33150  path="${complete%% *}"
33151  tmp="$complete EOL"
33152  arguments="${tmp#* }"
33153
33154  # Input might be given as Windows format, start by converting to
33155  # unix format.
33156  new_path="$path"
33157
33158  windows_path="$new_path"
33159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33160    unix_path=`$CYGPATH -u "$windows_path"`
33161    new_path="$unix_path"
33162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33164    new_path="$unix_path"
33165  fi
33166
33167
33168  # Now try to locate executable using which
33169  new_path=`$WHICH "$new_path" 2> /dev/null`
33170
33171  if test "x$new_path" = x; then
33172    # Oops. Which didn't find the executable.
33173    # The splitting of arguments from the executable at a space might have been incorrect,
33174    # since paths with space are more likely in Windows. Give it another try with the whole
33175    # argument.
33176    path="$complete"
33177    arguments="EOL"
33178    new_path="$path"
33179
33180  windows_path="$new_path"
33181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33182    unix_path=`$CYGPATH -u "$windows_path"`
33183    new_path="$unix_path"
33184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33186    new_path="$unix_path"
33187  fi
33188
33189
33190    new_path=`$WHICH "$new_path" 2> /dev/null`
33191    # bat and cmd files are not always considered executable in MSYS causing which
33192    # to not find them
33193    if test "x$new_path" = x \
33194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33196      new_path="$path"
33197
33198  windows_path="$new_path"
33199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33200    unix_path=`$CYGPATH -u "$windows_path"`
33201    new_path="$unix_path"
33202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33204    new_path="$unix_path"
33205  fi
33206
33207    fi
33208
33209    if test "x$new_path" = x; then
33210      # It's still not found. Now this is an unrecoverable error.
33211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33212$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33213      has_space=`$ECHO "$complete" | $GREP " "`
33214      if test "x$has_space" != x; then
33215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33217      fi
33218      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33219    fi
33220  fi
33221
33222  # Now new_path has a complete unix path to the binary
33223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33224    # Keep paths in /bin as-is, but remove trailing .exe if any
33225    new_path="${new_path/%.exe/}"
33226    # Do not save /bin paths to all_fixpath_prefixes!
33227  else
33228    # Not in mixed or Windows style, start by that.
33229    new_path=`cmd //c echo $new_path`
33230
33231  input_path="$new_path"
33232  # Check if we need to convert this using DOS-style short mode. If the path
33233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33234  # take no chances and rewrite it.
33235  # Note: m4 eats our [], so we need to use [ and ] instead.
33236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33237  if test "x$has_forbidden_chars" != x; then
33238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33240  fi
33241
33242    # Output is in $new_path
33243
33244  windows_path="$new_path"
33245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33246    unix_path=`$CYGPATH -u "$windows_path"`
33247    new_path="$unix_path"
33248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33250    new_path="$unix_path"
33251  fi
33252
33253    # remove trailing .exe if any
33254    new_path="${new_path/%.exe/}"
33255
33256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33258  fi
33259
33260    else
33261      # We're on a unix platform. Hooray! :)
33262      # First separate the path from the arguments. This will split at the first
33263      # space.
33264      complete="$CXX"
33265      path="${complete%% *}"
33266      tmp="$complete EOL"
33267      arguments="${tmp#* }"
33268
33269      # Cannot rely on the command "which" here since it doesn't always work.
33270      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33271      if test -z "$is_absolute_path"; then
33272        # Path to executable is not absolute. Find it.
33273        IFS_save="$IFS"
33274        IFS=:
33275        for p in $PATH; do
33276          if test -f "$p/$path" && test -x "$p/$path"; then
33277            new_path="$p/$path"
33278            break
33279          fi
33280        done
33281        IFS="$IFS_save"
33282      else
33283        # This is an absolute path, we can use it without further modifications.
33284        new_path="$path"
33285      fi
33286
33287      if test "x$new_path" = x; then
33288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33289$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33290        has_space=`$ECHO "$complete" | $GREP " "`
33291        if test "x$has_space" != x; then
33292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33294        fi
33295        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33296      fi
33297    fi
33298
33299    # Now join together the path and the arguments once again
33300    if test "x$arguments" != xEOL; then
33301      new_complete="$new_path ${arguments% *}"
33302    else
33303      new_complete="$new_path"
33304    fi
33305
33306    if test "x$complete" != "x$new_complete"; then
33307      CXX="$new_complete"
33308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33309$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33310    fi
33311  fi
33312
33313  TEST_COMPILER="$CXX"
33314
33315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33316$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33317  SYMLINK_ORIGINAL="$TEST_COMPILER"
33318
33319  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33320    # Follow a chain of symbolic links. Use readlink
33321    # where it exists, else fall back to horribly
33322    # complicated shell code.
33323    if test "x$READLINK_TESTED" != yes; then
33324      # On MacOSX there is a readlink tool with a different
33325      # purpose than the GNU readlink tool. Check the found readlink.
33326      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33327      if test "x$ISGNU" = x; then
33328        # A readlink that we do not know how to use.
33329        # Are there other non-GNU readlinks out there?
33330        READLINK_TESTED=yes
33331        READLINK=
33332      fi
33333    fi
33334
33335    if test "x$READLINK" != x; then
33336      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33337    else
33338      # Save the current directory for restoring afterwards
33339      STARTDIR=$PWD
33340      COUNTER=0
33341      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33342      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33343      cd $sym_link_dir
33344      # Use -P flag to resolve symlinks in directories.
33345      cd `$THEPWDCMD -P`
33346      sym_link_dir=`$THEPWDCMD -P`
33347      # Resolve file symlinks
33348      while test $COUNTER -lt 20; do
33349        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33350        if test "x$ISLINK" == x; then
33351          # This is not a symbolic link! We are done!
33352          break
33353        fi
33354        # Again resolve directory symlinks since the target of the just found
33355        # link could be in a different directory
33356        cd `$DIRNAME $ISLINK`
33357        sym_link_dir=`$THEPWDCMD -P`
33358        sym_link_file=`$BASENAME $ISLINK`
33359        let COUNTER=COUNTER+1
33360      done
33361      cd $STARTDIR
33362      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33363    fi
33364  fi
33365
33366  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33368$as_echo "no symlink" >&6; }
33369  else
33370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33371$as_echo "$SYMLINK_ORIGINAL" >&6; }
33372
33373    # We can't handle ccache by gcc wrappers, since we need to know if we're
33374    # using ccache. Instead ccache usage must be controlled by a configure option.
33375    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33376    if test "x$COMPILER_BASENAME" = "xccache"; then
33377      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33378$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33379      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33380    fi
33381  fi
33382
33383
33384  COMPILER=$CXX
33385  COMPILER_NAME=$COMPILER_NAME
33386
33387  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33388    # cc -V output typically looks like
33389    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33390    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33391    # Check that this is likely to be the Solaris Studio cc.
33392    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33393    if test $? -ne 0; then
33394      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33395      { $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
33396$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33397      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33398$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33399      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33400$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33401      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33402    fi
33403    # Remove usage instructions (if present), and
33404    # collapse compiler output into a single line
33405    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33406        $SED -e 's/ *[Uu]sage:.*//'`
33407    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33408        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33409  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33410    # xlc -qversion output typically looks like
33411    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33412    #     Version: 11.01.0000.0015
33413    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33414    # Check that this is likely to be the IBM XL C compiler.
33415    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33416    if test $? -ne 0; then
33417      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33418      { $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
33419$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33420      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33421$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33422      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33423$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33424      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33425    fi
33426    # Collapse compiler output into a single line
33427    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33428    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33429        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33430  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33431    # There is no specific version flag, but all output starts with a version string.
33432    # First line typically looks something like:
33433    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33434    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33435    # Check that this is likely to be Microsoft CL.EXE.
33436    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33437    if test $? -ne 0; then
33438      { $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
33439$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33440      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33441$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33442      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33443    fi
33444    # Collapse compiler output into a single line
33445    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33446    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33447        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33448  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33449    # gcc --version output typically looks like
33450    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33451    #     Copyright (C) 2013 Free Software Foundation, Inc.
33452    #     This is free software; see the source for copying conditions.  There is NO
33453    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33454    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33455    # Check that this is likely to be GCC.
33456    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33457    if test $? -ne 0; then
33458      { $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
33459$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33460      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33461$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33462      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33463    fi
33464    # Remove Copyright and legalese from version string, and
33465    # collapse into a single line
33466    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33467        $SED -e 's/ *Copyright .*//'`
33468    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33469        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33470  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33471    # clang --version output typically looks like
33472    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33473    #    clang version 3.3 (tags/RELEASE_33/final)
33474    # or
33475    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33476    #    Target: x86_64-pc-linux-gnu
33477    #    Thread model: posix
33478    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33479    # Check that this is likely to be clang
33480    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33481    if test $? -ne 0; then
33482      { $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
33483$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33484      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33485$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33486      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33487    fi
33488    # Collapse compiler output into a single line
33489    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33490    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33491        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33492  else
33493      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33494  fi
33495  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33496  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33497  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33498  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33499
33500  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33501$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33502
33503
33504  # Now that we have resolved CXX ourself, let autoconf have its go at it
33505  ac_ext=cpp
33506ac_cpp='$CXXCPP $CPPFLAGS'
33507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33510if test -z "$CXX"; then
33511  if test -n "$CCC"; then
33512    CXX=$CCC
33513  else
33514    if test -n "$ac_tool_prefix"; then
33515  for ac_prog in $CXX
33516  do
33517    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33518set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33520$as_echo_n "checking for $ac_word... " >&6; }
33521if ${ac_cv_prog_CXX+:} false; then :
33522  $as_echo_n "(cached) " >&6
33523else
33524  if test -n "$CXX"; then
33525  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33526else
33527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33528for as_dir in $PATH
33529do
33530  IFS=$as_save_IFS
33531  test -z "$as_dir" && as_dir=.
33532    for ac_exec_ext in '' $ac_executable_extensions; do
33533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33534    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33536    break 2
33537  fi
33538done
33539  done
33540IFS=$as_save_IFS
33541
33542fi
33543fi
33544CXX=$ac_cv_prog_CXX
33545if test -n "$CXX"; then
33546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33547$as_echo "$CXX" >&6; }
33548else
33549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33550$as_echo "no" >&6; }
33551fi
33552
33553
33554    test -n "$CXX" && break
33555  done
33556fi
33557if test -z "$CXX"; then
33558  ac_ct_CXX=$CXX
33559  for ac_prog in $CXX
33560do
33561  # Extract the first word of "$ac_prog", so it can be a program name with args.
33562set dummy $ac_prog; ac_word=$2
33563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33564$as_echo_n "checking for $ac_word... " >&6; }
33565if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33566  $as_echo_n "(cached) " >&6
33567else
33568  if test -n "$ac_ct_CXX"; then
33569  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33570else
33571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33572for as_dir in $PATH
33573do
33574  IFS=$as_save_IFS
33575  test -z "$as_dir" && as_dir=.
33576    for ac_exec_ext in '' $ac_executable_extensions; do
33577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33578    ac_cv_prog_ac_ct_CXX="$ac_prog"
33579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33580    break 2
33581  fi
33582done
33583  done
33584IFS=$as_save_IFS
33585
33586fi
33587fi
33588ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33589if test -n "$ac_ct_CXX"; then
33590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33591$as_echo "$ac_ct_CXX" >&6; }
33592else
33593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33594$as_echo "no" >&6; }
33595fi
33596
33597
33598  test -n "$ac_ct_CXX" && break
33599done
33600
33601  if test "x$ac_ct_CXX" = x; then
33602    CXX="g++"
33603  else
33604    case $cross_compiling:$ac_tool_warned in
33605yes:)
33606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33608ac_tool_warned=yes ;;
33609esac
33610    CXX=$ac_ct_CXX
33611  fi
33612fi
33613
33614  fi
33615fi
33616# Provide some information about the compiler.
33617$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33618set X $ac_compile
33619ac_compiler=$2
33620for ac_option in --version -v -V -qversion; do
33621  { { ac_try="$ac_compiler $ac_option >&5"
33622case "(($ac_try" in
33623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33624  *) ac_try_echo=$ac_try;;
33625esac
33626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33627$as_echo "$ac_try_echo"; } >&5
33628  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33629  ac_status=$?
33630  if test -s conftest.err; then
33631    sed '10a\
33632... rest of stderr output deleted ...
33633         10q' conftest.err >conftest.er1
33634    cat conftest.er1 >&5
33635  fi
33636  rm -f conftest.er1 conftest.err
33637  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33638  test $ac_status = 0; }
33639done
33640
33641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33642$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33643if ${ac_cv_cxx_compiler_gnu+:} false; then :
33644  $as_echo_n "(cached) " >&6
33645else
33646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33647/* end confdefs.h.  */
33648
33649int
33650main ()
33651{
33652#ifndef __GNUC__
33653       choke me
33654#endif
33655
33656  ;
33657  return 0;
33658}
33659_ACEOF
33660if ac_fn_cxx_try_compile "$LINENO"; then :
33661  ac_compiler_gnu=yes
33662else
33663  ac_compiler_gnu=no
33664fi
33665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33666ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33667
33668fi
33669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33670$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33671if test $ac_compiler_gnu = yes; then
33672  GXX=yes
33673else
33674  GXX=
33675fi
33676ac_test_CXXFLAGS=${CXXFLAGS+set}
33677ac_save_CXXFLAGS=$CXXFLAGS
33678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33679$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33680if ${ac_cv_prog_cxx_g+:} false; then :
33681  $as_echo_n "(cached) " >&6
33682else
33683  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33684   ac_cxx_werror_flag=yes
33685   ac_cv_prog_cxx_g=no
33686   CXXFLAGS="-g"
33687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33688/* end confdefs.h.  */
33689
33690int
33691main ()
33692{
33693
33694  ;
33695  return 0;
33696}
33697_ACEOF
33698if ac_fn_cxx_try_compile "$LINENO"; then :
33699  ac_cv_prog_cxx_g=yes
33700else
33701  CXXFLAGS=""
33702      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33703/* end confdefs.h.  */
33704
33705int
33706main ()
33707{
33708
33709  ;
33710  return 0;
33711}
33712_ACEOF
33713if ac_fn_cxx_try_compile "$LINENO"; then :
33714
33715else
33716  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33717	 CXXFLAGS="-g"
33718	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33719/* end confdefs.h.  */
33720
33721int
33722main ()
33723{
33724
33725  ;
33726  return 0;
33727}
33728_ACEOF
33729if ac_fn_cxx_try_compile "$LINENO"; then :
33730  ac_cv_prog_cxx_g=yes
33731fi
33732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33733fi
33734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33735fi
33736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33737   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33738fi
33739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33740$as_echo "$ac_cv_prog_cxx_g" >&6; }
33741if test "$ac_test_CXXFLAGS" = set; then
33742  CXXFLAGS=$ac_save_CXXFLAGS
33743elif test $ac_cv_prog_cxx_g = yes; then
33744  if test "$GXX" = yes; then
33745    CXXFLAGS="-g -O2"
33746  else
33747    CXXFLAGS="-g"
33748  fi
33749else
33750  if test "$GXX" = yes; then
33751    CXXFLAGS="-O2"
33752  else
33753    CXXFLAGS=
33754  fi
33755fi
33756ac_ext=cpp
33757ac_cpp='$CXXCPP $CPPFLAGS'
33758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33761
33762
33763  #
33764  # Setup the preprocessor (CPP and CXXCPP)
33765  #
33766  ac_ext=c
33767ac_cpp='$CPP $CPPFLAGS'
33768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33770ac_compiler_gnu=$ac_cv_c_compiler_gnu
33771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33772$as_echo_n "checking how to run the C preprocessor... " >&6; }
33773# On Suns, sometimes $CPP names a directory.
33774if test -n "$CPP" && test -d "$CPP"; then
33775  CPP=
33776fi
33777if test -z "$CPP"; then
33778  if ${ac_cv_prog_CPP+:} false; then :
33779  $as_echo_n "(cached) " >&6
33780else
33781      # Double quotes because CPP needs to be expanded
33782    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33783    do
33784      ac_preproc_ok=false
33785for ac_c_preproc_warn_flag in '' yes
33786do
33787  # Use a header file that comes with gcc, so configuring glibc
33788  # with a fresh cross-compiler works.
33789  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33790  # <limits.h> exists even on freestanding compilers.
33791  # On the NeXT, cc -E runs the code through the compiler's parser,
33792  # not just through cpp. "Syntax error" is here to catch this case.
33793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33794/* end confdefs.h.  */
33795#ifdef __STDC__
33796# include <limits.h>
33797#else
33798# include <assert.h>
33799#endif
33800		     Syntax error
33801_ACEOF
33802if ac_fn_c_try_cpp "$LINENO"; then :
33803
33804else
33805  # Broken: fails on valid input.
33806continue
33807fi
33808rm -f conftest.err conftest.i conftest.$ac_ext
33809
33810  # OK, works on sane cases.  Now check whether nonexistent headers
33811  # can be detected and how.
33812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33813/* end confdefs.h.  */
33814#include <ac_nonexistent.h>
33815_ACEOF
33816if ac_fn_c_try_cpp "$LINENO"; then :
33817  # Broken: success on invalid input.
33818continue
33819else
33820  # Passes both tests.
33821ac_preproc_ok=:
33822break
33823fi
33824rm -f conftest.err conftest.i conftest.$ac_ext
33825
33826done
33827# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33828rm -f conftest.i conftest.err conftest.$ac_ext
33829if $ac_preproc_ok; then :
33830  break
33831fi
33832
33833    done
33834    ac_cv_prog_CPP=$CPP
33835
33836fi
33837  CPP=$ac_cv_prog_CPP
33838else
33839  ac_cv_prog_CPP=$CPP
33840fi
33841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33842$as_echo "$CPP" >&6; }
33843ac_preproc_ok=false
33844for ac_c_preproc_warn_flag in '' yes
33845do
33846  # Use a header file that comes with gcc, so configuring glibc
33847  # with a fresh cross-compiler works.
33848  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33849  # <limits.h> exists even on freestanding compilers.
33850  # On the NeXT, cc -E runs the code through the compiler's parser,
33851  # not just through cpp. "Syntax error" is here to catch this case.
33852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33853/* end confdefs.h.  */
33854#ifdef __STDC__
33855# include <limits.h>
33856#else
33857# include <assert.h>
33858#endif
33859		     Syntax error
33860_ACEOF
33861if ac_fn_c_try_cpp "$LINENO"; then :
33862
33863else
33864  # Broken: fails on valid input.
33865continue
33866fi
33867rm -f conftest.err conftest.i conftest.$ac_ext
33868
33869  # OK, works on sane cases.  Now check whether nonexistent headers
33870  # can be detected and how.
33871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33872/* end confdefs.h.  */
33873#include <ac_nonexistent.h>
33874_ACEOF
33875if ac_fn_c_try_cpp "$LINENO"; then :
33876  # Broken: success on invalid input.
33877continue
33878else
33879  # Passes both tests.
33880ac_preproc_ok=:
33881break
33882fi
33883rm -f conftest.err conftest.i conftest.$ac_ext
33884
33885done
33886# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33887rm -f conftest.i conftest.err conftest.$ac_ext
33888if $ac_preproc_ok; then :
33889
33890else
33891  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33893as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
33894See \`config.log' for more details" "$LINENO" 5; }
33895fi
33896
33897ac_ext=cpp
33898ac_cpp='$CXXCPP $CPPFLAGS'
33899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33902
33903
33904  # Only process if variable expands to non-empty
33905
33906  if test "x$CPP" != x; then
33907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33908
33909  # First separate the path from the arguments. This will split at the first
33910  # space.
33911  complete="$CPP"
33912  path="${complete%% *}"
33913  tmp="$complete EOL"
33914  arguments="${tmp#* }"
33915
33916  # Input might be given as Windows format, start by converting to
33917  # unix format.
33918  new_path=`$CYGPATH -u "$path"`
33919
33920  # Now try to locate executable using which
33921  new_path=`$WHICH "$new_path" 2> /dev/null`
33922  # bat and cmd files are not always considered executable in cygwin causing which
33923  # to not find them
33924  if test "x$new_path" = x \
33925      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33926      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33927    new_path=`$CYGPATH -u "$path"`
33928  fi
33929  if test "x$new_path" = x; then
33930    # Oops. Which didn't find the executable.
33931    # The splitting of arguments from the executable at a space might have been incorrect,
33932    # since paths with space are more likely in Windows. Give it another try with the whole
33933    # argument.
33934    path="$complete"
33935    arguments="EOL"
33936    new_path=`$CYGPATH -u "$path"`
33937    new_path=`$WHICH "$new_path" 2> /dev/null`
33938    # bat and cmd files are not always considered executable in cygwin causing which
33939    # to not find them
33940    if test "x$new_path" = x \
33941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33943      new_path=`$CYGPATH -u "$path"`
33944    fi
33945    if test "x$new_path" = x; then
33946      # It's still not found. Now this is an unrecoverable error.
33947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33948$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33949      has_space=`$ECHO "$complete" | $GREP " "`
33950      if test "x$has_space" != x; then
33951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33953      fi
33954      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33955    fi
33956  fi
33957
33958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33961  # "foo.exe" is OK but "foo" is an error.
33962  #
33963  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33964  # It is also a way to make sure we got the proper file name for the real test later on.
33965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33966  if test "x$test_shortpath" = x; then
33967    # Short path failed, file does not exist as specified.
33968    # Try adding .exe or .cmd
33969    if test -f "${new_path}.exe"; then
33970      input_to_shortpath="${new_path}.exe"
33971    elif test -f "${new_path}.cmd"; then
33972      input_to_shortpath="${new_path}.cmd"
33973    else
33974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
33975$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
33976      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33977$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33978      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33979    fi
33980  else
33981    input_to_shortpath="$new_path"
33982  fi
33983
33984  # Call helper function which possibly converts this using DOS-style short mode.
33985  # If so, the updated path is stored in $new_path.
33986  new_path="$input_to_shortpath"
33987
33988  input_path="$input_to_shortpath"
33989  # Check if we need to convert this using DOS-style short mode. If the path
33990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33991  # take no chances and rewrite it.
33992  # Note: m4 eats our [], so we need to use [ and ] instead.
33993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33994  if test "x$has_forbidden_chars" != x; then
33995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33999      # Going to short mode and back again did indeed matter. Since short mode is
34000      # case insensitive, let's make it lowercase to improve readability.
34001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34002      # Now convert it back to Unix-style (cygpath)
34003      input_path=`$CYGPATH -u "$shortmode_path"`
34004      new_path="$input_path"
34005    fi
34006  fi
34007
34008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34009  if test "x$test_cygdrive_prefix" = x; then
34010    # As a simple fix, exclude /usr/bin since it's not a real path.
34011    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34013      # a path prefixed by /cygdrive for fixpath to work.
34014      new_path="$CYGWIN_ROOT_PATH$input_path"
34015    fi
34016  fi
34017
34018  # remove trailing .exe if any
34019  new_path="${new_path/%.exe/}"
34020
34021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34022
34023  # First separate the path from the arguments. This will split at the first
34024  # space.
34025  complete="$CPP"
34026  path="${complete%% *}"
34027  tmp="$complete EOL"
34028  arguments="${tmp#* }"
34029
34030  # Input might be given as Windows format, start by converting to
34031  # unix format.
34032  new_path="$path"
34033
34034  windows_path="$new_path"
34035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34036    unix_path=`$CYGPATH -u "$windows_path"`
34037    new_path="$unix_path"
34038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34040    new_path="$unix_path"
34041  fi
34042
34043
34044  # Now try to locate executable using which
34045  new_path=`$WHICH "$new_path" 2> /dev/null`
34046
34047  if test "x$new_path" = x; then
34048    # Oops. Which didn't find the executable.
34049    # The splitting of arguments from the executable at a space might have been incorrect,
34050    # since paths with space are more likely in Windows. Give it another try with the whole
34051    # argument.
34052    path="$complete"
34053    arguments="EOL"
34054    new_path="$path"
34055
34056  windows_path="$new_path"
34057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34058    unix_path=`$CYGPATH -u "$windows_path"`
34059    new_path="$unix_path"
34060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34062    new_path="$unix_path"
34063  fi
34064
34065
34066    new_path=`$WHICH "$new_path" 2> /dev/null`
34067    # bat and cmd files are not always considered executable in MSYS causing which
34068    # to not find them
34069    if test "x$new_path" = x \
34070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34072      new_path="$path"
34073
34074  windows_path="$new_path"
34075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34076    unix_path=`$CYGPATH -u "$windows_path"`
34077    new_path="$unix_path"
34078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34080    new_path="$unix_path"
34081  fi
34082
34083    fi
34084
34085    if test "x$new_path" = x; then
34086      # It's still not found. Now this is an unrecoverable error.
34087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34088$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34089      has_space=`$ECHO "$complete" | $GREP " "`
34090      if test "x$has_space" != x; then
34091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34093      fi
34094      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34095    fi
34096  fi
34097
34098  # Now new_path has a complete unix path to the binary
34099  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34100    # Keep paths in /bin as-is, but remove trailing .exe if any
34101    new_path="${new_path/%.exe/}"
34102    # Do not save /bin paths to all_fixpath_prefixes!
34103  else
34104    # Not in mixed or Windows style, start by that.
34105    new_path=`cmd //c echo $new_path`
34106
34107  input_path="$new_path"
34108  # Check if we need to convert this using DOS-style short mode. If the path
34109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34110  # take no chances and rewrite it.
34111  # Note: m4 eats our [], so we need to use [ and ] instead.
34112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34113  if test "x$has_forbidden_chars" != x; then
34114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34116  fi
34117
34118    # Output is in $new_path
34119
34120  windows_path="$new_path"
34121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34122    unix_path=`$CYGPATH -u "$windows_path"`
34123    new_path="$unix_path"
34124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34126    new_path="$unix_path"
34127  fi
34128
34129    # remove trailing .exe if any
34130    new_path="${new_path/%.exe/}"
34131
34132    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34133    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34134  fi
34135
34136    else
34137      # We're on a unix platform. Hooray! :)
34138      # First separate the path from the arguments. This will split at the first
34139      # space.
34140      complete="$CPP"
34141      path="${complete%% *}"
34142      tmp="$complete EOL"
34143      arguments="${tmp#* }"
34144
34145      # Cannot rely on the command "which" here since it doesn't always work.
34146      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34147      if test -z "$is_absolute_path"; then
34148        # Path to executable is not absolute. Find it.
34149        IFS_save="$IFS"
34150        IFS=:
34151        for p in $PATH; do
34152          if test -f "$p/$path" && test -x "$p/$path"; then
34153            new_path="$p/$path"
34154            break
34155          fi
34156        done
34157        IFS="$IFS_save"
34158      else
34159        # This is an absolute path, we can use it without further modifications.
34160        new_path="$path"
34161      fi
34162
34163      if test "x$new_path" = x; then
34164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34165$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34166        has_space=`$ECHO "$complete" | $GREP " "`
34167        if test "x$has_space" != x; then
34168          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34169$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34170        fi
34171        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34172      fi
34173    fi
34174
34175    # Now join together the path and the arguments once again
34176    if test "x$arguments" != xEOL; then
34177      new_complete="$new_path ${arguments% *}"
34178    else
34179      new_complete="$new_path"
34180    fi
34181
34182    if test "x$complete" != "x$new_complete"; then
34183      CPP="$new_complete"
34184      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34185$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34186    fi
34187  fi
34188
34189  ac_ext=cpp
34190ac_cpp='$CXXCPP $CPPFLAGS'
34191ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34192ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34193ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34195$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34196if test -z "$CXXCPP"; then
34197  if ${ac_cv_prog_CXXCPP+:} false; then :
34198  $as_echo_n "(cached) " >&6
34199else
34200      # Double quotes because CXXCPP needs to be expanded
34201    for CXXCPP in "$CXX -E" "/lib/cpp"
34202    do
34203      ac_preproc_ok=false
34204for ac_cxx_preproc_warn_flag in '' yes
34205do
34206  # Use a header file that comes with gcc, so configuring glibc
34207  # with a fresh cross-compiler works.
34208  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34209  # <limits.h> exists even on freestanding compilers.
34210  # On the NeXT, cc -E runs the code through the compiler's parser,
34211  # not just through cpp. "Syntax error" is here to catch this case.
34212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34213/* end confdefs.h.  */
34214#ifdef __STDC__
34215# include <limits.h>
34216#else
34217# include <assert.h>
34218#endif
34219		     Syntax error
34220_ACEOF
34221if ac_fn_cxx_try_cpp "$LINENO"; then :
34222
34223else
34224  # Broken: fails on valid input.
34225continue
34226fi
34227rm -f conftest.err conftest.i conftest.$ac_ext
34228
34229  # OK, works on sane cases.  Now check whether nonexistent headers
34230  # can be detected and how.
34231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34232/* end confdefs.h.  */
34233#include <ac_nonexistent.h>
34234_ACEOF
34235if ac_fn_cxx_try_cpp "$LINENO"; then :
34236  # Broken: success on invalid input.
34237continue
34238else
34239  # Passes both tests.
34240ac_preproc_ok=:
34241break
34242fi
34243rm -f conftest.err conftest.i conftest.$ac_ext
34244
34245done
34246# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34247rm -f conftest.i conftest.err conftest.$ac_ext
34248if $ac_preproc_ok; then :
34249  break
34250fi
34251
34252    done
34253    ac_cv_prog_CXXCPP=$CXXCPP
34254
34255fi
34256  CXXCPP=$ac_cv_prog_CXXCPP
34257else
34258  ac_cv_prog_CXXCPP=$CXXCPP
34259fi
34260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34261$as_echo "$CXXCPP" >&6; }
34262ac_preproc_ok=false
34263for ac_cxx_preproc_warn_flag in '' yes
34264do
34265  # Use a header file that comes with gcc, so configuring glibc
34266  # with a fresh cross-compiler works.
34267  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34268  # <limits.h> exists even on freestanding compilers.
34269  # On the NeXT, cc -E runs the code through the compiler's parser,
34270  # not just through cpp. "Syntax error" is here to catch this case.
34271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34272/* end confdefs.h.  */
34273#ifdef __STDC__
34274# include <limits.h>
34275#else
34276# include <assert.h>
34277#endif
34278		     Syntax error
34279_ACEOF
34280if ac_fn_cxx_try_cpp "$LINENO"; then :
34281
34282else
34283  # Broken: fails on valid input.
34284continue
34285fi
34286rm -f conftest.err conftest.i conftest.$ac_ext
34287
34288  # OK, works on sane cases.  Now check whether nonexistent headers
34289  # can be detected and how.
34290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34291/* end confdefs.h.  */
34292#include <ac_nonexistent.h>
34293_ACEOF
34294if ac_fn_cxx_try_cpp "$LINENO"; then :
34295  # Broken: success on invalid input.
34296continue
34297else
34298  # Passes both tests.
34299ac_preproc_ok=:
34300break
34301fi
34302rm -f conftest.err conftest.i conftest.$ac_ext
34303
34304done
34305# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34306rm -f conftest.i conftest.err conftest.$ac_ext
34307if $ac_preproc_ok; then :
34308
34309else
34310  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34312as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34313See \`config.log' for more details" "$LINENO" 5; }
34314fi
34315
34316ac_ext=cpp
34317ac_cpp='$CXXCPP $CPPFLAGS'
34318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34321
34322
34323  # Only process if variable expands to non-empty
34324
34325  if test "x$CXXCPP" != x; then
34326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34327
34328  # First separate the path from the arguments. This will split at the first
34329  # space.
34330  complete="$CXXCPP"
34331  path="${complete%% *}"
34332  tmp="$complete EOL"
34333  arguments="${tmp#* }"
34334
34335  # Input might be given as Windows format, start by converting to
34336  # unix format.
34337  new_path=`$CYGPATH -u "$path"`
34338
34339  # Now try to locate executable using which
34340  new_path=`$WHICH "$new_path" 2> /dev/null`
34341  # bat and cmd files are not always considered executable in cygwin causing which
34342  # to not find them
34343  if test "x$new_path" = x \
34344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34346    new_path=`$CYGPATH -u "$path"`
34347  fi
34348  if test "x$new_path" = x; then
34349    # Oops. Which didn't find the executable.
34350    # The splitting of arguments from the executable at a space might have been incorrect,
34351    # since paths with space are more likely in Windows. Give it another try with the whole
34352    # argument.
34353    path="$complete"
34354    arguments="EOL"
34355    new_path=`$CYGPATH -u "$path"`
34356    new_path=`$WHICH "$new_path" 2> /dev/null`
34357    # bat and cmd files are not always considered executable in cygwin causing which
34358    # to not find them
34359    if test "x$new_path" = x \
34360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34362      new_path=`$CYGPATH -u "$path"`
34363    fi
34364    if test "x$new_path" = x; then
34365      # It's still not found. Now this is an unrecoverable error.
34366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34367$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34368      has_space=`$ECHO "$complete" | $GREP " "`
34369      if test "x$has_space" != x; then
34370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34372      fi
34373      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34374    fi
34375  fi
34376
34377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34380  # "foo.exe" is OK but "foo" is an error.
34381  #
34382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34383  # It is also a way to make sure we got the proper file name for the real test later on.
34384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34385  if test "x$test_shortpath" = x; then
34386    # Short path failed, file does not exist as specified.
34387    # Try adding .exe or .cmd
34388    if test -f "${new_path}.exe"; then
34389      input_to_shortpath="${new_path}.exe"
34390    elif test -f "${new_path}.cmd"; then
34391      input_to_shortpath="${new_path}.cmd"
34392    else
34393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34394$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34397      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34398    fi
34399  else
34400    input_to_shortpath="$new_path"
34401  fi
34402
34403  # Call helper function which possibly converts this using DOS-style short mode.
34404  # If so, the updated path is stored in $new_path.
34405  new_path="$input_to_shortpath"
34406
34407  input_path="$input_to_shortpath"
34408  # Check if we need to convert this using DOS-style short mode. If the path
34409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34410  # take no chances and rewrite it.
34411  # Note: m4 eats our [], so we need to use [ and ] instead.
34412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34413  if test "x$has_forbidden_chars" != x; then
34414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34418      # Going to short mode and back again did indeed matter. Since short mode is
34419      # case insensitive, let's make it lowercase to improve readability.
34420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34421      # Now convert it back to Unix-style (cygpath)
34422      input_path=`$CYGPATH -u "$shortmode_path"`
34423      new_path="$input_path"
34424    fi
34425  fi
34426
34427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34428  if test "x$test_cygdrive_prefix" = x; then
34429    # As a simple fix, exclude /usr/bin since it's not a real path.
34430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34432      # a path prefixed by /cygdrive for fixpath to work.
34433      new_path="$CYGWIN_ROOT_PATH$input_path"
34434    fi
34435  fi
34436
34437  # remove trailing .exe if any
34438  new_path="${new_path/%.exe/}"
34439
34440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34441
34442  # First separate the path from the arguments. This will split at the first
34443  # space.
34444  complete="$CXXCPP"
34445  path="${complete%% *}"
34446  tmp="$complete EOL"
34447  arguments="${tmp#* }"
34448
34449  # Input might be given as Windows format, start by converting to
34450  # unix format.
34451  new_path="$path"
34452
34453  windows_path="$new_path"
34454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34455    unix_path=`$CYGPATH -u "$windows_path"`
34456    new_path="$unix_path"
34457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34459    new_path="$unix_path"
34460  fi
34461
34462
34463  # Now try to locate executable using which
34464  new_path=`$WHICH "$new_path" 2> /dev/null`
34465
34466  if test "x$new_path" = x; then
34467    # Oops. Which didn't find the executable.
34468    # The splitting of arguments from the executable at a space might have been incorrect,
34469    # since paths with space are more likely in Windows. Give it another try with the whole
34470    # argument.
34471    path="$complete"
34472    arguments="EOL"
34473    new_path="$path"
34474
34475  windows_path="$new_path"
34476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34477    unix_path=`$CYGPATH -u "$windows_path"`
34478    new_path="$unix_path"
34479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34481    new_path="$unix_path"
34482  fi
34483
34484
34485    new_path=`$WHICH "$new_path" 2> /dev/null`
34486    # bat and cmd files are not always considered executable in MSYS causing which
34487    # to not find them
34488    if test "x$new_path" = x \
34489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34491      new_path="$path"
34492
34493  windows_path="$new_path"
34494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34495    unix_path=`$CYGPATH -u "$windows_path"`
34496    new_path="$unix_path"
34497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34499    new_path="$unix_path"
34500  fi
34501
34502    fi
34503
34504    if test "x$new_path" = x; then
34505      # It's still not found. Now this is an unrecoverable error.
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34507$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34508      has_space=`$ECHO "$complete" | $GREP " "`
34509      if test "x$has_space" != x; then
34510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34512      fi
34513      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34514    fi
34515  fi
34516
34517  # Now new_path has a complete unix path to the binary
34518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34519    # Keep paths in /bin as-is, but remove trailing .exe if any
34520    new_path="${new_path/%.exe/}"
34521    # Do not save /bin paths to all_fixpath_prefixes!
34522  else
34523    # Not in mixed or Windows style, start by that.
34524    new_path=`cmd //c echo $new_path`
34525
34526  input_path="$new_path"
34527  # Check if we need to convert this using DOS-style short mode. If the path
34528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34529  # take no chances and rewrite it.
34530  # Note: m4 eats our [], so we need to use [ and ] instead.
34531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34532  if test "x$has_forbidden_chars" != x; then
34533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34535  fi
34536
34537    # Output is in $new_path
34538
34539  windows_path="$new_path"
34540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34541    unix_path=`$CYGPATH -u "$windows_path"`
34542    new_path="$unix_path"
34543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34545    new_path="$unix_path"
34546  fi
34547
34548    # remove trailing .exe if any
34549    new_path="${new_path/%.exe/}"
34550
34551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34553  fi
34554
34555    else
34556      # We're on a unix platform. Hooray! :)
34557      # First separate the path from the arguments. This will split at the first
34558      # space.
34559      complete="$CXXCPP"
34560      path="${complete%% *}"
34561      tmp="$complete EOL"
34562      arguments="${tmp#* }"
34563
34564      # Cannot rely on the command "which" here since it doesn't always work.
34565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34566      if test -z "$is_absolute_path"; then
34567        # Path to executable is not absolute. Find it.
34568        IFS_save="$IFS"
34569        IFS=:
34570        for p in $PATH; do
34571          if test -f "$p/$path" && test -x "$p/$path"; then
34572            new_path="$p/$path"
34573            break
34574          fi
34575        done
34576        IFS="$IFS_save"
34577      else
34578        # This is an absolute path, we can use it without further modifications.
34579        new_path="$path"
34580      fi
34581
34582      if test "x$new_path" = x; then
34583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34584$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34585        has_space=`$ECHO "$complete" | $GREP " "`
34586        if test "x$has_space" != x; then
34587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34589        fi
34590        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34591      fi
34592    fi
34593
34594    # Now join together the path and the arguments once again
34595    if test "x$arguments" != xEOL; then
34596      new_complete="$new_path ${arguments% *}"
34597    else
34598      new_complete="$new_path"
34599    fi
34600
34601    if test "x$complete" != "x$new_complete"; then
34602      CXXCPP="$new_complete"
34603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34604$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34605    fi
34606  fi
34607
34608
34609  #
34610  # Setup the linker (LD)
34611  #
34612  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34613    # In the Microsoft toolchain we have a separate LD command "link".
34614    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34615    # a cygwin program for something completely different.
34616    # Extract the first word of "link", so it can be a program name with args.
34617set dummy link; ac_word=$2
34618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34619$as_echo_n "checking for $ac_word... " >&6; }
34620if ${ac_cv_prog_LD+:} false; then :
34621  $as_echo_n "(cached) " >&6
34622else
34623  if test -n "$LD"; then
34624  ac_cv_prog_LD="$LD" # Let the user override the test.
34625else
34626  ac_prog_rejected=no
34627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34628for as_dir in $PATH
34629do
34630  IFS=$as_save_IFS
34631  test -z "$as_dir" && as_dir=.
34632    for ac_exec_ext in '' $ac_executable_extensions; do
34633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34634    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34635       ac_prog_rejected=yes
34636       continue
34637     fi
34638    ac_cv_prog_LD="link"
34639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34640    break 2
34641  fi
34642done
34643  done
34644IFS=$as_save_IFS
34645
34646if test $ac_prog_rejected = yes; then
34647  # We found a bogon in the path, so make sure we never use it.
34648  set dummy $ac_cv_prog_LD
34649  shift
34650  if test $# != 0; then
34651    # We chose a different compiler from the bogus one.
34652    # However, it has the same basename, so the bogon will be chosen
34653    # first if we set LD to just the basename; use the full file name.
34654    shift
34655    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34656  fi
34657fi
34658fi
34659fi
34660LD=$ac_cv_prog_LD
34661if test -n "$LD"; then
34662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34663$as_echo "$LD" >&6; }
34664else
34665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34666$as_echo "no" >&6; }
34667fi
34668
34669
34670
34671  # Only process if variable expands to non-empty
34672
34673  if test "x$LD" != 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="$LD"
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 LD, which resolves as \"$complete\", is not found." >&5
34715$as_echo "$as_me: The path of LD, 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 LD" "$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 LD, which resolves as \"$new_path\", is invalid." >&5
34742$as_echo "$as_me: The path of LD, 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 LD" "$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="$LD"
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 LD, which resolves as \"$complete\", is not found." >&5
34855$as_echo "$as_me: The path of LD, 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 LD" "$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="$LD"
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 LD, which resolves as \"$complete\", is not found." >&5
34932$as_echo "$as_me: The path of LD, 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 LD" "$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      LD="$new_complete"
34951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
34952$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
34953    fi
34954  fi
34955
34956    # Verify that we indeed succeeded with this trick.
34957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
34958$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
34959    "$LD" --version > /dev/null
34960    if test $? -eq 0 ; then
34961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34962$as_echo "no" >&6; }
34963      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
34964    else
34965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34966$as_echo "yes" >&6; }
34967    fi
34968    LDCXX="$LD"
34969  else
34970    # All other toolchains use the compiler to link.
34971    LD="$CC"
34972    LDCXX="$CXX"
34973  fi
34974
34975  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
34976
34977
34978  #
34979  # Setup the assembler (AS)
34980  #
34981  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34982    # FIXME: should this really be solaris, or solstudio?
34983
34984
34985  # Publish this variable in the help.
34986
34987
34988  if [ -z "${AS+x}" ]; then
34989    # The variable is not set by user, try to locate tool using the code snippet
34990    for ac_prog in as
34991do
34992  # Extract the first word of "$ac_prog", so it can be a program name with args.
34993set dummy $ac_prog; ac_word=$2
34994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34995$as_echo_n "checking for $ac_word... " >&6; }
34996if ${ac_cv_path_AS+:} false; then :
34997  $as_echo_n "(cached) " >&6
34998else
34999  case $AS in
35000  [\\/]* | ?:[\\/]*)
35001  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35002  ;;
35003  *)
35004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35005for as_dir in $PATH
35006do
35007  IFS=$as_save_IFS
35008  test -z "$as_dir" && as_dir=.
35009    for ac_exec_ext in '' $ac_executable_extensions; do
35010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35011    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35013    break 2
35014  fi
35015done
35016  done
35017IFS=$as_save_IFS
35018
35019  ;;
35020esac
35021fi
35022AS=$ac_cv_path_AS
35023if test -n "$AS"; then
35024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35025$as_echo "$AS" >&6; }
35026else
35027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35028$as_echo "no" >&6; }
35029fi
35030
35031
35032  test -n "$AS" && break
35033done
35034
35035  else
35036    # The variable is set, but is it from the command line or the environment?
35037
35038    # Try to remove the string !AS! from our list.
35039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35041      # If it failed, the variable was not from the command line. Ignore it,
35042      # but warn the user (except for BASH, which is always set by the calling BASH).
35043      if test "xAS" != xBASH; then
35044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35045$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35046      fi
35047      # Try to locate tool using the code snippet
35048      for ac_prog in as
35049do
35050  # Extract the first word of "$ac_prog", so it can be a program name with args.
35051set dummy $ac_prog; ac_word=$2
35052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35053$as_echo_n "checking for $ac_word... " >&6; }
35054if ${ac_cv_path_AS+:} false; then :
35055  $as_echo_n "(cached) " >&6
35056else
35057  case $AS in
35058  [\\/]* | ?:[\\/]*)
35059  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35060  ;;
35061  *)
35062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35063for as_dir in $PATH
35064do
35065  IFS=$as_save_IFS
35066  test -z "$as_dir" && as_dir=.
35067    for ac_exec_ext in '' $ac_executable_extensions; do
35068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35069    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35071    break 2
35072  fi
35073done
35074  done
35075IFS=$as_save_IFS
35076
35077  ;;
35078esac
35079fi
35080AS=$ac_cv_path_AS
35081if test -n "$AS"; then
35082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35083$as_echo "$AS" >&6; }
35084else
35085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35086$as_echo "no" >&6; }
35087fi
35088
35089
35090  test -n "$AS" && break
35091done
35092
35093    else
35094      # If it succeeded, then it was overridden by the user. We will use it
35095      # for the tool.
35096
35097      # First remove it from the list of overridden variables, so we can test
35098      # for unknown variables in the end.
35099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35100
35101      # Check if we try to supply an empty value
35102      if test "x$AS" = x; then
35103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35104$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35106$as_echo_n "checking for AS... " >&6; }
35107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35108$as_echo "disabled" >&6; }
35109      else
35110        # Check if the provided tool contains a complete path.
35111        tool_specified="$AS"
35112        tool_basename="${tool_specified##*/}"
35113        if test "x$tool_basename" = "x$tool_specified"; then
35114          # A command without a complete path is provided, search $PATH.
35115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35116$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35117          # Extract the first word of "$tool_basename", so it can be a program name with args.
35118set dummy $tool_basename; ac_word=$2
35119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35120$as_echo_n "checking for $ac_word... " >&6; }
35121if ${ac_cv_path_AS+:} false; then :
35122  $as_echo_n "(cached) " >&6
35123else
35124  case $AS in
35125  [\\/]* | ?:[\\/]*)
35126  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35127  ;;
35128  *)
35129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35130for as_dir in $PATH
35131do
35132  IFS=$as_save_IFS
35133  test -z "$as_dir" && as_dir=.
35134    for ac_exec_ext in '' $ac_executable_extensions; do
35135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35136    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35138    break 2
35139  fi
35140done
35141  done
35142IFS=$as_save_IFS
35143
35144  ;;
35145esac
35146fi
35147AS=$ac_cv_path_AS
35148if test -n "$AS"; then
35149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35150$as_echo "$AS" >&6; }
35151else
35152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35153$as_echo "no" >&6; }
35154fi
35155
35156
35157          if test "x$AS" = x; then
35158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35159          fi
35160        else
35161          # Otherwise we believe it is a complete path. Use it as it is.
35162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35163$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35165$as_echo_n "checking for AS... " >&6; }
35166          if test ! -x "$tool_specified"; then
35167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35168$as_echo "not found" >&6; }
35169            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35170          fi
35171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35172$as_echo "$tool_specified" >&6; }
35173        fi
35174      fi
35175    fi
35176
35177  fi
35178
35179
35180
35181  # Only process if variable expands to non-empty
35182
35183  if test "x$AS" != x; then
35184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35185
35186  # First separate the path from the arguments. This will split at the first
35187  # space.
35188  complete="$AS"
35189  path="${complete%% *}"
35190  tmp="$complete EOL"
35191  arguments="${tmp#* }"
35192
35193  # Input might be given as Windows format, start by converting to
35194  # unix format.
35195  new_path=`$CYGPATH -u "$path"`
35196
35197  # Now try to locate executable using which
35198  new_path=`$WHICH "$new_path" 2> /dev/null`
35199  # bat and cmd files are not always considered executable in cygwin causing which
35200  # to not find them
35201  if test "x$new_path" = x \
35202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35204    new_path=`$CYGPATH -u "$path"`
35205  fi
35206  if test "x$new_path" = x; then
35207    # Oops. Which didn't find the executable.
35208    # The splitting of arguments from the executable at a space might have been incorrect,
35209    # since paths with space are more likely in Windows. Give it another try with the whole
35210    # argument.
35211    path="$complete"
35212    arguments="EOL"
35213    new_path=`$CYGPATH -u "$path"`
35214    new_path=`$WHICH "$new_path" 2> /dev/null`
35215    # bat and cmd files are not always considered executable in cygwin causing which
35216    # to not find them
35217    if test "x$new_path" = x \
35218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35220      new_path=`$CYGPATH -u "$path"`
35221    fi
35222    if test "x$new_path" = x; then
35223      # It's still not found. Now this is an unrecoverable error.
35224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35225$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35226      has_space=`$ECHO "$complete" | $GREP " "`
35227      if test "x$has_space" != x; then
35228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35230      fi
35231      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35232    fi
35233  fi
35234
35235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35238  # "foo.exe" is OK but "foo" is an error.
35239  #
35240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35241  # It is also a way to make sure we got the proper file name for the real test later on.
35242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35243  if test "x$test_shortpath" = x; then
35244    # Short path failed, file does not exist as specified.
35245    # Try adding .exe or .cmd
35246    if test -f "${new_path}.exe"; then
35247      input_to_shortpath="${new_path}.exe"
35248    elif test -f "${new_path}.cmd"; then
35249      input_to_shortpath="${new_path}.cmd"
35250    else
35251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35252$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35255      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35256    fi
35257  else
35258    input_to_shortpath="$new_path"
35259  fi
35260
35261  # Call helper function which possibly converts this using DOS-style short mode.
35262  # If so, the updated path is stored in $new_path.
35263  new_path="$input_to_shortpath"
35264
35265  input_path="$input_to_shortpath"
35266  # Check if we need to convert this using DOS-style short mode. If the path
35267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35268  # take no chances and rewrite it.
35269  # Note: m4 eats our [], so we need to use [ and ] instead.
35270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35271  if test "x$has_forbidden_chars" != x; then
35272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35276      # Going to short mode and back again did indeed matter. Since short mode is
35277      # case insensitive, let's make it lowercase to improve readability.
35278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35279      # Now convert it back to Unix-style (cygpath)
35280      input_path=`$CYGPATH -u "$shortmode_path"`
35281      new_path="$input_path"
35282    fi
35283  fi
35284
35285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35286  if test "x$test_cygdrive_prefix" = x; then
35287    # As a simple fix, exclude /usr/bin since it's not a real path.
35288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35290      # a path prefixed by /cygdrive for fixpath to work.
35291      new_path="$CYGWIN_ROOT_PATH$input_path"
35292    fi
35293  fi
35294
35295  # remove trailing .exe if any
35296  new_path="${new_path/%.exe/}"
35297
35298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35299
35300  # First separate the path from the arguments. This will split at the first
35301  # space.
35302  complete="$AS"
35303  path="${complete%% *}"
35304  tmp="$complete EOL"
35305  arguments="${tmp#* }"
35306
35307  # Input might be given as Windows format, start by converting to
35308  # unix format.
35309  new_path="$path"
35310
35311  windows_path="$new_path"
35312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35313    unix_path=`$CYGPATH -u "$windows_path"`
35314    new_path="$unix_path"
35315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35317    new_path="$unix_path"
35318  fi
35319
35320
35321  # Now try to locate executable using which
35322  new_path=`$WHICH "$new_path" 2> /dev/null`
35323
35324  if test "x$new_path" = x; then
35325    # Oops. Which didn't find the executable.
35326    # The splitting of arguments from the executable at a space might have been incorrect,
35327    # since paths with space are more likely in Windows. Give it another try with the whole
35328    # argument.
35329    path="$complete"
35330    arguments="EOL"
35331    new_path="$path"
35332
35333  windows_path="$new_path"
35334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35335    unix_path=`$CYGPATH -u "$windows_path"`
35336    new_path="$unix_path"
35337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35339    new_path="$unix_path"
35340  fi
35341
35342
35343    new_path=`$WHICH "$new_path" 2> /dev/null`
35344    # bat and cmd files are not always considered executable in MSYS causing which
35345    # to not find them
35346    if test "x$new_path" = x \
35347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35349      new_path="$path"
35350
35351  windows_path="$new_path"
35352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35353    unix_path=`$CYGPATH -u "$windows_path"`
35354    new_path="$unix_path"
35355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35357    new_path="$unix_path"
35358  fi
35359
35360    fi
35361
35362    if test "x$new_path" = x; then
35363      # It's still not found. Now this is an unrecoverable error.
35364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35365$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35366      has_space=`$ECHO "$complete" | $GREP " "`
35367      if test "x$has_space" != x; then
35368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35370      fi
35371      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35372    fi
35373  fi
35374
35375  # Now new_path has a complete unix path to the binary
35376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35377    # Keep paths in /bin as-is, but remove trailing .exe if any
35378    new_path="${new_path/%.exe/}"
35379    # Do not save /bin paths to all_fixpath_prefixes!
35380  else
35381    # Not in mixed or Windows style, start by that.
35382    new_path=`cmd //c echo $new_path`
35383
35384  input_path="$new_path"
35385  # Check if we need to convert this using DOS-style short mode. If the path
35386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35387  # take no chances and rewrite it.
35388  # Note: m4 eats our [], so we need to use [ and ] instead.
35389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35390  if test "x$has_forbidden_chars" != x; then
35391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35393  fi
35394
35395    # Output is in $new_path
35396
35397  windows_path="$new_path"
35398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35399    unix_path=`$CYGPATH -u "$windows_path"`
35400    new_path="$unix_path"
35401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35403    new_path="$unix_path"
35404  fi
35405
35406    # remove trailing .exe if any
35407    new_path="${new_path/%.exe/}"
35408
35409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35411  fi
35412
35413    else
35414      # We're on a unix platform. Hooray! :)
35415      # First separate the path from the arguments. This will split at the first
35416      # space.
35417      complete="$AS"
35418      path="${complete%% *}"
35419      tmp="$complete EOL"
35420      arguments="${tmp#* }"
35421
35422      # Cannot rely on the command "which" here since it doesn't always work.
35423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35424      if test -z "$is_absolute_path"; then
35425        # Path to executable is not absolute. Find it.
35426        IFS_save="$IFS"
35427        IFS=:
35428        for p in $PATH; do
35429          if test -f "$p/$path" && test -x "$p/$path"; then
35430            new_path="$p/$path"
35431            break
35432          fi
35433        done
35434        IFS="$IFS_save"
35435      else
35436        # This is an absolute path, we can use it without further modifications.
35437        new_path="$path"
35438      fi
35439
35440      if test "x$new_path" = x; then
35441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35442$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35443        has_space=`$ECHO "$complete" | $GREP " "`
35444        if test "x$has_space" != x; then
35445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35447        fi
35448        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35449      fi
35450    fi
35451
35452    # Now join together the path and the arguments once again
35453    if test "x$arguments" != xEOL; then
35454      new_complete="$new_path ${arguments% *}"
35455    else
35456      new_complete="$new_path"
35457    fi
35458
35459    if test "x$complete" != "x$new_complete"; then
35460      AS="$new_complete"
35461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35462$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35463    fi
35464  fi
35465
35466  else
35467    # FIXME: is this correct for microsoft?
35468    AS="$CC -c"
35469  fi
35470
35471
35472  #
35473  # Setup the archiver (AR)
35474  #
35475  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35476    # The corresponding ar tool is lib.exe (used to create static libraries)
35477    # Extract the first word of "lib", so it can be a program name with args.
35478set dummy lib; ac_word=$2
35479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35480$as_echo_n "checking for $ac_word... " >&6; }
35481if ${ac_cv_prog_AR+:} false; then :
35482  $as_echo_n "(cached) " >&6
35483else
35484  if test -n "$AR"; then
35485  ac_cv_prog_AR="$AR" # Let the user override the test.
35486else
35487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35488for as_dir in $PATH
35489do
35490  IFS=$as_save_IFS
35491  test -z "$as_dir" && as_dir=.
35492    for ac_exec_ext in '' $ac_executable_extensions; do
35493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35494    ac_cv_prog_AR="lib"
35495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35496    break 2
35497  fi
35498done
35499  done
35500IFS=$as_save_IFS
35501
35502fi
35503fi
35504AR=$ac_cv_prog_AR
35505if test -n "$AR"; then
35506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35507$as_echo "$AR" >&6; }
35508else
35509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35510$as_echo "no" >&6; }
35511fi
35512
35513
35514  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35515
35516
35517  # Publish this variable in the help.
35518
35519
35520  if [ -z "${AR+x}" ]; then
35521    # The variable is not set by user, try to locate tool using the code snippet
35522    if test -n "$ac_tool_prefix"; then
35523  for ac_prog in ar gcc-ar
35524  do
35525    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35528$as_echo_n "checking for $ac_word... " >&6; }
35529if ${ac_cv_prog_AR+:} false; then :
35530  $as_echo_n "(cached) " >&6
35531else
35532  if test -n "$AR"; then
35533  ac_cv_prog_AR="$AR" # Let the user override the test.
35534else
35535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35536for as_dir in $PATH
35537do
35538  IFS=$as_save_IFS
35539  test -z "$as_dir" && as_dir=.
35540    for ac_exec_ext in '' $ac_executable_extensions; do
35541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35542    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35544    break 2
35545  fi
35546done
35547  done
35548IFS=$as_save_IFS
35549
35550fi
35551fi
35552AR=$ac_cv_prog_AR
35553if test -n "$AR"; then
35554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35555$as_echo "$AR" >&6; }
35556else
35557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35558$as_echo "no" >&6; }
35559fi
35560
35561
35562    test -n "$AR" && break
35563  done
35564fi
35565if test -z "$AR"; then
35566  ac_ct_AR=$AR
35567  for ac_prog in ar gcc-ar
35568do
35569  # Extract the first word of "$ac_prog", so it can be a program name with args.
35570set dummy $ac_prog; ac_word=$2
35571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35572$as_echo_n "checking for $ac_word... " >&6; }
35573if ${ac_cv_prog_ac_ct_AR+:} false; then :
35574  $as_echo_n "(cached) " >&6
35575else
35576  if test -n "$ac_ct_AR"; then
35577  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35578else
35579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35580for as_dir in $PATH
35581do
35582  IFS=$as_save_IFS
35583  test -z "$as_dir" && as_dir=.
35584    for ac_exec_ext in '' $ac_executable_extensions; do
35585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35586    ac_cv_prog_ac_ct_AR="$ac_prog"
35587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35588    break 2
35589  fi
35590done
35591  done
35592IFS=$as_save_IFS
35593
35594fi
35595fi
35596ac_ct_AR=$ac_cv_prog_ac_ct_AR
35597if test -n "$ac_ct_AR"; then
35598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35599$as_echo "$ac_ct_AR" >&6; }
35600else
35601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35602$as_echo "no" >&6; }
35603fi
35604
35605
35606  test -n "$ac_ct_AR" && break
35607done
35608
35609  if test "x$ac_ct_AR" = x; then
35610    AR=""
35611  else
35612    case $cross_compiling:$ac_tool_warned in
35613yes:)
35614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35616ac_tool_warned=yes ;;
35617esac
35618    AR=$ac_ct_AR
35619  fi
35620fi
35621
35622  else
35623    # The variable is set, but is it from the command line or the environment?
35624
35625    # Try to remove the string !AR! from our list.
35626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35628      # If it failed, the variable was not from the command line. Ignore it,
35629      # but warn the user (except for BASH, which is always set by the calling BASH).
35630      if test "xAR" != xBASH; then
35631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35632$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35633      fi
35634      # Try to locate tool using the code snippet
35635      if test -n "$ac_tool_prefix"; then
35636  for ac_prog in ar gcc-ar
35637  do
35638    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35639set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35641$as_echo_n "checking for $ac_word... " >&6; }
35642if ${ac_cv_prog_AR+:} false; then :
35643  $as_echo_n "(cached) " >&6
35644else
35645  if test -n "$AR"; then
35646  ac_cv_prog_AR="$AR" # Let the user override the test.
35647else
35648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35649for as_dir in $PATH
35650do
35651  IFS=$as_save_IFS
35652  test -z "$as_dir" && as_dir=.
35653    for ac_exec_ext in '' $ac_executable_extensions; do
35654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35655    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35657    break 2
35658  fi
35659done
35660  done
35661IFS=$as_save_IFS
35662
35663fi
35664fi
35665AR=$ac_cv_prog_AR
35666if test -n "$AR"; then
35667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35668$as_echo "$AR" >&6; }
35669else
35670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35671$as_echo "no" >&6; }
35672fi
35673
35674
35675    test -n "$AR" && break
35676  done
35677fi
35678if test -z "$AR"; then
35679  ac_ct_AR=$AR
35680  for ac_prog in ar gcc-ar
35681do
35682  # Extract the first word of "$ac_prog", so it can be a program name with args.
35683set dummy $ac_prog; ac_word=$2
35684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35685$as_echo_n "checking for $ac_word... " >&6; }
35686if ${ac_cv_prog_ac_ct_AR+:} false; then :
35687  $as_echo_n "(cached) " >&6
35688else
35689  if test -n "$ac_ct_AR"; then
35690  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35691else
35692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35693for as_dir in $PATH
35694do
35695  IFS=$as_save_IFS
35696  test -z "$as_dir" && as_dir=.
35697    for ac_exec_ext in '' $ac_executable_extensions; do
35698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35699    ac_cv_prog_ac_ct_AR="$ac_prog"
35700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35701    break 2
35702  fi
35703done
35704  done
35705IFS=$as_save_IFS
35706
35707fi
35708fi
35709ac_ct_AR=$ac_cv_prog_ac_ct_AR
35710if test -n "$ac_ct_AR"; then
35711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35712$as_echo "$ac_ct_AR" >&6; }
35713else
35714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35715$as_echo "no" >&6; }
35716fi
35717
35718
35719  test -n "$ac_ct_AR" && break
35720done
35721
35722  if test "x$ac_ct_AR" = x; then
35723    AR=""
35724  else
35725    case $cross_compiling:$ac_tool_warned in
35726yes:)
35727{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35729ac_tool_warned=yes ;;
35730esac
35731    AR=$ac_ct_AR
35732  fi
35733fi
35734
35735    else
35736      # If it succeeded, then it was overridden by the user. We will use it
35737      # for the tool.
35738
35739      # First remove it from the list of overridden variables, so we can test
35740      # for unknown variables in the end.
35741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35742
35743      # Check if we try to supply an empty value
35744      if test "x$AR" = x; then
35745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35746$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35748$as_echo_n "checking for AR... " >&6; }
35749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35750$as_echo "disabled" >&6; }
35751      else
35752        # Check if the provided tool contains a complete path.
35753        tool_specified="$AR"
35754        tool_basename="${tool_specified##*/}"
35755        if test "x$tool_basename" = "x$tool_specified"; then
35756          # A command without a complete path is provided, search $PATH.
35757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35758$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35759          # Extract the first word of "$tool_basename", so it can be a program name with args.
35760set dummy $tool_basename; ac_word=$2
35761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35762$as_echo_n "checking for $ac_word... " >&6; }
35763if ${ac_cv_path_AR+:} false; then :
35764  $as_echo_n "(cached) " >&6
35765else
35766  case $AR in
35767  [\\/]* | ?:[\\/]*)
35768  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35769  ;;
35770  *)
35771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35772for as_dir in $PATH
35773do
35774  IFS=$as_save_IFS
35775  test -z "$as_dir" && as_dir=.
35776    for ac_exec_ext in '' $ac_executable_extensions; do
35777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35778    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35780    break 2
35781  fi
35782done
35783  done
35784IFS=$as_save_IFS
35785
35786  ;;
35787esac
35788fi
35789AR=$ac_cv_path_AR
35790if test -n "$AR"; then
35791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35792$as_echo "$AR" >&6; }
35793else
35794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35795$as_echo "no" >&6; }
35796fi
35797
35798
35799          if test "x$AR" = x; then
35800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35801          fi
35802        else
35803          # Otherwise we believe it is a complete path. Use it as it is.
35804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35805$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35807$as_echo_n "checking for AR... " >&6; }
35808          if test ! -x "$tool_specified"; then
35809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35810$as_echo "not found" >&6; }
35811            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35812          fi
35813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35814$as_echo "$tool_specified" >&6; }
35815        fi
35816      fi
35817    fi
35818
35819  fi
35820
35821
35822  else
35823
35824
35825  # Publish this variable in the help.
35826
35827
35828  if [ -z "${AR+x}" ]; then
35829    # The variable is not set by user, try to locate tool using the code snippet
35830    if test -n "$ac_tool_prefix"; then
35831  for ac_prog in ar
35832  do
35833    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35834set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35836$as_echo_n "checking for $ac_word... " >&6; }
35837if ${ac_cv_prog_AR+:} false; then :
35838  $as_echo_n "(cached) " >&6
35839else
35840  if test -n "$AR"; then
35841  ac_cv_prog_AR="$AR" # Let the user override the test.
35842else
35843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35844for as_dir in $PATH
35845do
35846  IFS=$as_save_IFS
35847  test -z "$as_dir" && as_dir=.
35848    for ac_exec_ext in '' $ac_executable_extensions; do
35849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35850    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35852    break 2
35853  fi
35854done
35855  done
35856IFS=$as_save_IFS
35857
35858fi
35859fi
35860AR=$ac_cv_prog_AR
35861if test -n "$AR"; then
35862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35863$as_echo "$AR" >&6; }
35864else
35865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35866$as_echo "no" >&6; }
35867fi
35868
35869
35870    test -n "$AR" && break
35871  done
35872fi
35873if test -z "$AR"; then
35874  ac_ct_AR=$AR
35875  for ac_prog in ar
35876do
35877  # Extract the first word of "$ac_prog", so it can be a program name with args.
35878set dummy $ac_prog; ac_word=$2
35879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35880$as_echo_n "checking for $ac_word... " >&6; }
35881if ${ac_cv_prog_ac_ct_AR+:} false; then :
35882  $as_echo_n "(cached) " >&6
35883else
35884  if test -n "$ac_ct_AR"; then
35885  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35886else
35887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35888for as_dir in $PATH
35889do
35890  IFS=$as_save_IFS
35891  test -z "$as_dir" && as_dir=.
35892    for ac_exec_ext in '' $ac_executable_extensions; do
35893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35894    ac_cv_prog_ac_ct_AR="$ac_prog"
35895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35896    break 2
35897  fi
35898done
35899  done
35900IFS=$as_save_IFS
35901
35902fi
35903fi
35904ac_ct_AR=$ac_cv_prog_ac_ct_AR
35905if test -n "$ac_ct_AR"; then
35906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35907$as_echo "$ac_ct_AR" >&6; }
35908else
35909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35910$as_echo "no" >&6; }
35911fi
35912
35913
35914  test -n "$ac_ct_AR" && break
35915done
35916
35917  if test "x$ac_ct_AR" = x; then
35918    AR=""
35919  else
35920    case $cross_compiling:$ac_tool_warned in
35921yes:)
35922{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35923$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35924ac_tool_warned=yes ;;
35925esac
35926    AR=$ac_ct_AR
35927  fi
35928fi
35929
35930  else
35931    # The variable is set, but is it from the command line or the environment?
35932
35933    # Try to remove the string !AR! from our list.
35934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35936      # If it failed, the variable was not from the command line. Ignore it,
35937      # but warn the user (except for BASH, which is always set by the calling BASH).
35938      if test "xAR" != xBASH; then
35939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35940$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35941      fi
35942      # Try to locate tool using the code snippet
35943      if test -n "$ac_tool_prefix"; then
35944  for ac_prog in ar
35945  do
35946    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35947set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35949$as_echo_n "checking for $ac_word... " >&6; }
35950if ${ac_cv_prog_AR+:} false; then :
35951  $as_echo_n "(cached) " >&6
35952else
35953  if test -n "$AR"; then
35954  ac_cv_prog_AR="$AR" # Let the user override the test.
35955else
35956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35957for as_dir in $PATH
35958do
35959  IFS=$as_save_IFS
35960  test -z "$as_dir" && as_dir=.
35961    for ac_exec_ext in '' $ac_executable_extensions; do
35962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35963    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35965    break 2
35966  fi
35967done
35968  done
35969IFS=$as_save_IFS
35970
35971fi
35972fi
35973AR=$ac_cv_prog_AR
35974if test -n "$AR"; then
35975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35976$as_echo "$AR" >&6; }
35977else
35978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35979$as_echo "no" >&6; }
35980fi
35981
35982
35983    test -n "$AR" && break
35984  done
35985fi
35986if test -z "$AR"; then
35987  ac_ct_AR=$AR
35988  for ac_prog in ar
35989do
35990  # Extract the first word of "$ac_prog", so it can be a program name with args.
35991set dummy $ac_prog; ac_word=$2
35992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35993$as_echo_n "checking for $ac_word... " >&6; }
35994if ${ac_cv_prog_ac_ct_AR+:} false; then :
35995  $as_echo_n "(cached) " >&6
35996else
35997  if test -n "$ac_ct_AR"; then
35998  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35999else
36000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36001for as_dir in $PATH
36002do
36003  IFS=$as_save_IFS
36004  test -z "$as_dir" && as_dir=.
36005    for ac_exec_ext in '' $ac_executable_extensions; do
36006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36007    ac_cv_prog_ac_ct_AR="$ac_prog"
36008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36009    break 2
36010  fi
36011done
36012  done
36013IFS=$as_save_IFS
36014
36015fi
36016fi
36017ac_ct_AR=$ac_cv_prog_ac_ct_AR
36018if test -n "$ac_ct_AR"; then
36019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36020$as_echo "$ac_ct_AR" >&6; }
36021else
36022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36023$as_echo "no" >&6; }
36024fi
36025
36026
36027  test -n "$ac_ct_AR" && break
36028done
36029
36030  if test "x$ac_ct_AR" = x; then
36031    AR=""
36032  else
36033    case $cross_compiling:$ac_tool_warned in
36034yes:)
36035{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36036$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36037ac_tool_warned=yes ;;
36038esac
36039    AR=$ac_ct_AR
36040  fi
36041fi
36042
36043    else
36044      # If it succeeded, then it was overridden by the user. We will use it
36045      # for the tool.
36046
36047      # First remove it from the list of overridden variables, so we can test
36048      # for unknown variables in the end.
36049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36050
36051      # Check if we try to supply an empty value
36052      if test "x$AR" = x; then
36053        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36054$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36056$as_echo_n "checking for AR... " >&6; }
36057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36058$as_echo "disabled" >&6; }
36059      else
36060        # Check if the provided tool contains a complete path.
36061        tool_specified="$AR"
36062        tool_basename="${tool_specified##*/}"
36063        if test "x$tool_basename" = "x$tool_specified"; then
36064          # A command without a complete path is provided, search $PATH.
36065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36066$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36067          # Extract the first word of "$tool_basename", so it can be a program name with args.
36068set dummy $tool_basename; ac_word=$2
36069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36070$as_echo_n "checking for $ac_word... " >&6; }
36071if ${ac_cv_path_AR+:} false; then :
36072  $as_echo_n "(cached) " >&6
36073else
36074  case $AR in
36075  [\\/]* | ?:[\\/]*)
36076  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36077  ;;
36078  *)
36079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36080for as_dir in $PATH
36081do
36082  IFS=$as_save_IFS
36083  test -z "$as_dir" && as_dir=.
36084    for ac_exec_ext in '' $ac_executable_extensions; do
36085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36086    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36088    break 2
36089  fi
36090done
36091  done
36092IFS=$as_save_IFS
36093
36094  ;;
36095esac
36096fi
36097AR=$ac_cv_path_AR
36098if test -n "$AR"; then
36099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36100$as_echo "$AR" >&6; }
36101else
36102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36103$as_echo "no" >&6; }
36104fi
36105
36106
36107          if test "x$AR" = x; then
36108            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36109          fi
36110        else
36111          # Otherwise we believe it is a complete path. Use it as it is.
36112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36113$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36114          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36115$as_echo_n "checking for AR... " >&6; }
36116          if test ! -x "$tool_specified"; then
36117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36118$as_echo "not found" >&6; }
36119            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36120          fi
36121          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36122$as_echo "$tool_specified" >&6; }
36123        fi
36124      fi
36125    fi
36126
36127  fi
36128
36129
36130  fi
36131
36132  # Only process if variable expands to non-empty
36133
36134  if test "x$AR" != x; then
36135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36136
36137  # First separate the path from the arguments. This will split at the first
36138  # space.
36139  complete="$AR"
36140  path="${complete%% *}"
36141  tmp="$complete EOL"
36142  arguments="${tmp#* }"
36143
36144  # Input might be given as Windows format, start by converting to
36145  # unix format.
36146  new_path=`$CYGPATH -u "$path"`
36147
36148  # Now try to locate executable using which
36149  new_path=`$WHICH "$new_path" 2> /dev/null`
36150  # bat and cmd files are not always considered executable in cygwin causing which
36151  # to not find them
36152  if test "x$new_path" = x \
36153      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36154      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36155    new_path=`$CYGPATH -u "$path"`
36156  fi
36157  if test "x$new_path" = x; then
36158    # Oops. Which didn't find the executable.
36159    # The splitting of arguments from the executable at a space might have been incorrect,
36160    # since paths with space are more likely in Windows. Give it another try with the whole
36161    # argument.
36162    path="$complete"
36163    arguments="EOL"
36164    new_path=`$CYGPATH -u "$path"`
36165    new_path=`$WHICH "$new_path" 2> /dev/null`
36166    # bat and cmd files are not always considered executable in cygwin causing which
36167    # to not find them
36168    if test "x$new_path" = x \
36169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36171      new_path=`$CYGPATH -u "$path"`
36172    fi
36173    if test "x$new_path" = x; then
36174      # It's still not found. Now this is an unrecoverable error.
36175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36176$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36177      has_space=`$ECHO "$complete" | $GREP " "`
36178      if test "x$has_space" != x; then
36179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36181      fi
36182      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36183    fi
36184  fi
36185
36186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36189  # "foo.exe" is OK but "foo" is an error.
36190  #
36191  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36192  # It is also a way to make sure we got the proper file name for the real test later on.
36193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36194  if test "x$test_shortpath" = x; then
36195    # Short path failed, file does not exist as specified.
36196    # Try adding .exe or .cmd
36197    if test -f "${new_path}.exe"; then
36198      input_to_shortpath="${new_path}.exe"
36199    elif test -f "${new_path}.cmd"; then
36200      input_to_shortpath="${new_path}.cmd"
36201    else
36202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36203$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36206      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36207    fi
36208  else
36209    input_to_shortpath="$new_path"
36210  fi
36211
36212  # Call helper function which possibly converts this using DOS-style short mode.
36213  # If so, the updated path is stored in $new_path.
36214  new_path="$input_to_shortpath"
36215
36216  input_path="$input_to_shortpath"
36217  # Check if we need to convert this using DOS-style short mode. If the path
36218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36219  # take no chances and rewrite it.
36220  # Note: m4 eats our [], so we need to use [ and ] instead.
36221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36222  if test "x$has_forbidden_chars" != x; then
36223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36227      # Going to short mode and back again did indeed matter. Since short mode is
36228      # case insensitive, let's make it lowercase to improve readability.
36229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36230      # Now convert it back to Unix-style (cygpath)
36231      input_path=`$CYGPATH -u "$shortmode_path"`
36232      new_path="$input_path"
36233    fi
36234  fi
36235
36236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36237  if test "x$test_cygdrive_prefix" = x; then
36238    # As a simple fix, exclude /usr/bin since it's not a real path.
36239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36241      # a path prefixed by /cygdrive for fixpath to work.
36242      new_path="$CYGWIN_ROOT_PATH$input_path"
36243    fi
36244  fi
36245
36246  # remove trailing .exe if any
36247  new_path="${new_path/%.exe/}"
36248
36249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36250
36251  # First separate the path from the arguments. This will split at the first
36252  # space.
36253  complete="$AR"
36254  path="${complete%% *}"
36255  tmp="$complete EOL"
36256  arguments="${tmp#* }"
36257
36258  # Input might be given as Windows format, start by converting to
36259  # unix format.
36260  new_path="$path"
36261
36262  windows_path="$new_path"
36263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36264    unix_path=`$CYGPATH -u "$windows_path"`
36265    new_path="$unix_path"
36266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36268    new_path="$unix_path"
36269  fi
36270
36271
36272  # Now try to locate executable using which
36273  new_path=`$WHICH "$new_path" 2> /dev/null`
36274
36275  if test "x$new_path" = x; then
36276    # Oops. Which didn't find the executable.
36277    # The splitting of arguments from the executable at a space might have been incorrect,
36278    # since paths with space are more likely in Windows. Give it another try with the whole
36279    # argument.
36280    path="$complete"
36281    arguments="EOL"
36282    new_path="$path"
36283
36284  windows_path="$new_path"
36285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36286    unix_path=`$CYGPATH -u "$windows_path"`
36287    new_path="$unix_path"
36288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36290    new_path="$unix_path"
36291  fi
36292
36293
36294    new_path=`$WHICH "$new_path" 2> /dev/null`
36295    # bat and cmd files are not always considered executable in MSYS causing which
36296    # to not find them
36297    if test "x$new_path" = x \
36298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36300      new_path="$path"
36301
36302  windows_path="$new_path"
36303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36304    unix_path=`$CYGPATH -u "$windows_path"`
36305    new_path="$unix_path"
36306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36308    new_path="$unix_path"
36309  fi
36310
36311    fi
36312
36313    if test "x$new_path" = x; then
36314      # It's still not found. Now this is an unrecoverable error.
36315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36316$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36317      has_space=`$ECHO "$complete" | $GREP " "`
36318      if test "x$has_space" != x; then
36319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36321      fi
36322      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36323    fi
36324  fi
36325
36326  # Now new_path has a complete unix path to the binary
36327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36328    # Keep paths in /bin as-is, but remove trailing .exe if any
36329    new_path="${new_path/%.exe/}"
36330    # Do not save /bin paths to all_fixpath_prefixes!
36331  else
36332    # Not in mixed or Windows style, start by that.
36333    new_path=`cmd //c echo $new_path`
36334
36335  input_path="$new_path"
36336  # Check if we need to convert this using DOS-style short mode. If the path
36337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36338  # take no chances and rewrite it.
36339  # Note: m4 eats our [], so we need to use [ and ] instead.
36340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36341  if test "x$has_forbidden_chars" != x; then
36342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36344  fi
36345
36346    # Output is in $new_path
36347
36348  windows_path="$new_path"
36349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36350    unix_path=`$CYGPATH -u "$windows_path"`
36351    new_path="$unix_path"
36352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36354    new_path="$unix_path"
36355  fi
36356
36357    # remove trailing .exe if any
36358    new_path="${new_path/%.exe/}"
36359
36360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36362  fi
36363
36364    else
36365      # We're on a unix platform. Hooray! :)
36366      # First separate the path from the arguments. This will split at the first
36367      # space.
36368      complete="$AR"
36369      path="${complete%% *}"
36370      tmp="$complete EOL"
36371      arguments="${tmp#* }"
36372
36373      # Cannot rely on the command "which" here since it doesn't always work.
36374      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36375      if test -z "$is_absolute_path"; then
36376        # Path to executable is not absolute. Find it.
36377        IFS_save="$IFS"
36378        IFS=:
36379        for p in $PATH; do
36380          if test -f "$p/$path" && test -x "$p/$path"; then
36381            new_path="$p/$path"
36382            break
36383          fi
36384        done
36385        IFS="$IFS_save"
36386      else
36387        # This is an absolute path, we can use it without further modifications.
36388        new_path="$path"
36389      fi
36390
36391      if test "x$new_path" = x; then
36392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36393$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36394        has_space=`$ECHO "$complete" | $GREP " "`
36395        if test "x$has_space" != x; then
36396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36398        fi
36399        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36400      fi
36401    fi
36402
36403    # Now join together the path and the arguments once again
36404    if test "x$arguments" != xEOL; then
36405      new_complete="$new_path ${arguments% *}"
36406    else
36407      new_complete="$new_path"
36408    fi
36409
36410    if test "x$complete" != "x$new_complete"; then
36411      AR="$new_complete"
36412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36413$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36414    fi
36415  fi
36416
36417
36418
36419  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36420
36421
36422  # Publish this variable in the help.
36423
36424
36425  if [ -z "${LIPO+x}" ]; then
36426    # The variable is not set by user, try to locate tool using the code snippet
36427    for ac_prog in lipo
36428do
36429  # Extract the first word of "$ac_prog", so it can be a program name with args.
36430set dummy $ac_prog; ac_word=$2
36431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36432$as_echo_n "checking for $ac_word... " >&6; }
36433if ${ac_cv_path_LIPO+:} false; then :
36434  $as_echo_n "(cached) " >&6
36435else
36436  case $LIPO in
36437  [\\/]* | ?:[\\/]*)
36438  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36439  ;;
36440  *)
36441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36442for as_dir in $PATH
36443do
36444  IFS=$as_save_IFS
36445  test -z "$as_dir" && as_dir=.
36446    for ac_exec_ext in '' $ac_executable_extensions; do
36447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36448    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36450    break 2
36451  fi
36452done
36453  done
36454IFS=$as_save_IFS
36455
36456  ;;
36457esac
36458fi
36459LIPO=$ac_cv_path_LIPO
36460if test -n "$LIPO"; then
36461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36462$as_echo "$LIPO" >&6; }
36463else
36464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36465$as_echo "no" >&6; }
36466fi
36467
36468
36469  test -n "$LIPO" && break
36470done
36471
36472  else
36473    # The variable is set, but is it from the command line or the environment?
36474
36475    # Try to remove the string !LIPO! from our list.
36476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36478      # If it failed, the variable was not from the command line. Ignore it,
36479      # but warn the user (except for BASH, which is always set by the calling BASH).
36480      if test "xLIPO" != xBASH; then
36481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36482$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36483      fi
36484      # Try to locate tool using the code snippet
36485      for ac_prog in lipo
36486do
36487  # Extract the first word of "$ac_prog", so it can be a program name with args.
36488set dummy $ac_prog; ac_word=$2
36489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36490$as_echo_n "checking for $ac_word... " >&6; }
36491if ${ac_cv_path_LIPO+:} false; then :
36492  $as_echo_n "(cached) " >&6
36493else
36494  case $LIPO in
36495  [\\/]* | ?:[\\/]*)
36496  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36497  ;;
36498  *)
36499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36500for as_dir in $PATH
36501do
36502  IFS=$as_save_IFS
36503  test -z "$as_dir" && as_dir=.
36504    for ac_exec_ext in '' $ac_executable_extensions; do
36505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36506    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36508    break 2
36509  fi
36510done
36511  done
36512IFS=$as_save_IFS
36513
36514  ;;
36515esac
36516fi
36517LIPO=$ac_cv_path_LIPO
36518if test -n "$LIPO"; then
36519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36520$as_echo "$LIPO" >&6; }
36521else
36522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36523$as_echo "no" >&6; }
36524fi
36525
36526
36527  test -n "$LIPO" && break
36528done
36529
36530    else
36531      # If it succeeded, then it was overridden by the user. We will use it
36532      # for the tool.
36533
36534      # First remove it from the list of overridden variables, so we can test
36535      # for unknown variables in the end.
36536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36537
36538      # Check if we try to supply an empty value
36539      if test "x$LIPO" = x; then
36540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36541$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36543$as_echo_n "checking for LIPO... " >&6; }
36544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36545$as_echo "disabled" >&6; }
36546      else
36547        # Check if the provided tool contains a complete path.
36548        tool_specified="$LIPO"
36549        tool_basename="${tool_specified##*/}"
36550        if test "x$tool_basename" = "x$tool_specified"; then
36551          # A command without a complete path is provided, search $PATH.
36552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36553$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36554          # Extract the first word of "$tool_basename", so it can be a program name with args.
36555set dummy $tool_basename; ac_word=$2
36556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36557$as_echo_n "checking for $ac_word... " >&6; }
36558if ${ac_cv_path_LIPO+:} false; then :
36559  $as_echo_n "(cached) " >&6
36560else
36561  case $LIPO in
36562  [\\/]* | ?:[\\/]*)
36563  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36564  ;;
36565  *)
36566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36567for as_dir in $PATH
36568do
36569  IFS=$as_save_IFS
36570  test -z "$as_dir" && as_dir=.
36571    for ac_exec_ext in '' $ac_executable_extensions; do
36572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36573    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36575    break 2
36576  fi
36577done
36578  done
36579IFS=$as_save_IFS
36580
36581  ;;
36582esac
36583fi
36584LIPO=$ac_cv_path_LIPO
36585if test -n "$LIPO"; then
36586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36587$as_echo "$LIPO" >&6; }
36588else
36589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36590$as_echo "no" >&6; }
36591fi
36592
36593
36594          if test "x$LIPO" = x; then
36595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36596          fi
36597        else
36598          # Otherwise we believe it is a complete path. Use it as it is.
36599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36600$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36602$as_echo_n "checking for LIPO... " >&6; }
36603          if test ! -x "$tool_specified"; then
36604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36605$as_echo "not found" >&6; }
36606            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36607          fi
36608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36609$as_echo "$tool_specified" >&6; }
36610        fi
36611      fi
36612    fi
36613
36614  fi
36615
36616
36617
36618  # Only process if variable expands to non-empty
36619
36620  if test "x$LIPO" != x; then
36621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36622
36623  # First separate the path from the arguments. This will split at the first
36624  # space.
36625  complete="$LIPO"
36626  path="${complete%% *}"
36627  tmp="$complete EOL"
36628  arguments="${tmp#* }"
36629
36630  # Input might be given as Windows format, start by converting to
36631  # unix format.
36632  new_path=`$CYGPATH -u "$path"`
36633
36634  # Now try to locate executable using which
36635  new_path=`$WHICH "$new_path" 2> /dev/null`
36636  # bat and cmd files are not always considered executable in cygwin causing which
36637  # to not find them
36638  if test "x$new_path" = x \
36639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36641    new_path=`$CYGPATH -u "$path"`
36642  fi
36643  if test "x$new_path" = x; then
36644    # Oops. Which didn't find the executable.
36645    # The splitting of arguments from the executable at a space might have been incorrect,
36646    # since paths with space are more likely in Windows. Give it another try with the whole
36647    # argument.
36648    path="$complete"
36649    arguments="EOL"
36650    new_path=`$CYGPATH -u "$path"`
36651    new_path=`$WHICH "$new_path" 2> /dev/null`
36652    # bat and cmd files are not always considered executable in cygwin causing which
36653    # to not find them
36654    if test "x$new_path" = x \
36655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36657      new_path=`$CYGPATH -u "$path"`
36658    fi
36659    if test "x$new_path" = x; then
36660      # It's still not found. Now this is an unrecoverable error.
36661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36662$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36663      has_space=`$ECHO "$complete" | $GREP " "`
36664      if test "x$has_space" != x; then
36665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36667      fi
36668      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36669    fi
36670  fi
36671
36672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36675  # "foo.exe" is OK but "foo" is an error.
36676  #
36677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36678  # It is also a way to make sure we got the proper file name for the real test later on.
36679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36680  if test "x$test_shortpath" = x; then
36681    # Short path failed, file does not exist as specified.
36682    # Try adding .exe or .cmd
36683    if test -f "${new_path}.exe"; then
36684      input_to_shortpath="${new_path}.exe"
36685    elif test -f "${new_path}.cmd"; then
36686      input_to_shortpath="${new_path}.cmd"
36687    else
36688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36689$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36692      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36693    fi
36694  else
36695    input_to_shortpath="$new_path"
36696  fi
36697
36698  # Call helper function which possibly converts this using DOS-style short mode.
36699  # If so, the updated path is stored in $new_path.
36700  new_path="$input_to_shortpath"
36701
36702  input_path="$input_to_shortpath"
36703  # Check if we need to convert this using DOS-style short mode. If the path
36704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36705  # take no chances and rewrite it.
36706  # Note: m4 eats our [], so we need to use [ and ] instead.
36707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36708  if test "x$has_forbidden_chars" != x; then
36709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36713      # Going to short mode and back again did indeed matter. Since short mode is
36714      # case insensitive, let's make it lowercase to improve readability.
36715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36716      # Now convert it back to Unix-style (cygpath)
36717      input_path=`$CYGPATH -u "$shortmode_path"`
36718      new_path="$input_path"
36719    fi
36720  fi
36721
36722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36723  if test "x$test_cygdrive_prefix" = x; then
36724    # As a simple fix, exclude /usr/bin since it's not a real path.
36725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36727      # a path prefixed by /cygdrive for fixpath to work.
36728      new_path="$CYGWIN_ROOT_PATH$input_path"
36729    fi
36730  fi
36731
36732  # remove trailing .exe if any
36733  new_path="${new_path/%.exe/}"
36734
36735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36736
36737  # First separate the path from the arguments. This will split at the first
36738  # space.
36739  complete="$LIPO"
36740  path="${complete%% *}"
36741  tmp="$complete EOL"
36742  arguments="${tmp#* }"
36743
36744  # Input might be given as Windows format, start by converting to
36745  # unix format.
36746  new_path="$path"
36747
36748  windows_path="$new_path"
36749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36750    unix_path=`$CYGPATH -u "$windows_path"`
36751    new_path="$unix_path"
36752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36754    new_path="$unix_path"
36755  fi
36756
36757
36758  # Now try to locate executable using which
36759  new_path=`$WHICH "$new_path" 2> /dev/null`
36760
36761  if test "x$new_path" = x; then
36762    # Oops. Which didn't find the executable.
36763    # The splitting of arguments from the executable at a space might have been incorrect,
36764    # since paths with space are more likely in Windows. Give it another try with the whole
36765    # argument.
36766    path="$complete"
36767    arguments="EOL"
36768    new_path="$path"
36769
36770  windows_path="$new_path"
36771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36772    unix_path=`$CYGPATH -u "$windows_path"`
36773    new_path="$unix_path"
36774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36776    new_path="$unix_path"
36777  fi
36778
36779
36780    new_path=`$WHICH "$new_path" 2> /dev/null`
36781    # bat and cmd files are not always considered executable in MSYS causing which
36782    # to not find them
36783    if test "x$new_path" = x \
36784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36786      new_path="$path"
36787
36788  windows_path="$new_path"
36789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36790    unix_path=`$CYGPATH -u "$windows_path"`
36791    new_path="$unix_path"
36792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36794    new_path="$unix_path"
36795  fi
36796
36797    fi
36798
36799    if test "x$new_path" = x; then
36800      # It's still not found. Now this is an unrecoverable error.
36801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36802$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36803      has_space=`$ECHO "$complete" | $GREP " "`
36804      if test "x$has_space" != x; then
36805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36807      fi
36808      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36809    fi
36810  fi
36811
36812  # Now new_path has a complete unix path to the binary
36813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36814    # Keep paths in /bin as-is, but remove trailing .exe if any
36815    new_path="${new_path/%.exe/}"
36816    # Do not save /bin paths to all_fixpath_prefixes!
36817  else
36818    # Not in mixed or Windows style, start by that.
36819    new_path=`cmd //c echo $new_path`
36820
36821  input_path="$new_path"
36822  # Check if we need to convert this using DOS-style short mode. If the path
36823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36824  # take no chances and rewrite it.
36825  # Note: m4 eats our [], so we need to use [ and ] instead.
36826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36827  if test "x$has_forbidden_chars" != x; then
36828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36830  fi
36831
36832    # Output is in $new_path
36833
36834  windows_path="$new_path"
36835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36836    unix_path=`$CYGPATH -u "$windows_path"`
36837    new_path="$unix_path"
36838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36840    new_path="$unix_path"
36841  fi
36842
36843    # remove trailing .exe if any
36844    new_path="${new_path/%.exe/}"
36845
36846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36848  fi
36849
36850    else
36851      # We're on a unix platform. Hooray! :)
36852      # First separate the path from the arguments. This will split at the first
36853      # space.
36854      complete="$LIPO"
36855      path="${complete%% *}"
36856      tmp="$complete EOL"
36857      arguments="${tmp#* }"
36858
36859      # Cannot rely on the command "which" here since it doesn't always work.
36860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36861      if test -z "$is_absolute_path"; then
36862        # Path to executable is not absolute. Find it.
36863        IFS_save="$IFS"
36864        IFS=:
36865        for p in $PATH; do
36866          if test -f "$p/$path" && test -x "$p/$path"; then
36867            new_path="$p/$path"
36868            break
36869          fi
36870        done
36871        IFS="$IFS_save"
36872      else
36873        # This is an absolute path, we can use it without further modifications.
36874        new_path="$path"
36875      fi
36876
36877      if test "x$new_path" = x; then
36878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36879$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36880        has_space=`$ECHO "$complete" | $GREP " "`
36881        if test "x$has_space" != x; then
36882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36884        fi
36885        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36886      fi
36887    fi
36888
36889    # Now join together the path and the arguments once again
36890    if test "x$arguments" != xEOL; then
36891      new_complete="$new_path ${arguments% *}"
36892    else
36893      new_complete="$new_path"
36894    fi
36895
36896    if test "x$complete" != "x$new_complete"; then
36897      LIPO="$new_complete"
36898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36899$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36900    fi
36901  fi
36902
36903  fi
36904
36905  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36906    # Extract the first word of "mt", so it can be a program name with args.
36907set dummy mt; ac_word=$2
36908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36909$as_echo_n "checking for $ac_word... " >&6; }
36910if ${ac_cv_prog_MT+:} false; then :
36911  $as_echo_n "(cached) " >&6
36912else
36913  if test -n "$MT"; then
36914  ac_cv_prog_MT="$MT" # Let the user override the test.
36915else
36916  ac_prog_rejected=no
36917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36918for as_dir in $PATH
36919do
36920  IFS=$as_save_IFS
36921  test -z "$as_dir" && as_dir=.
36922    for ac_exec_ext in '' $ac_executable_extensions; do
36923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36924    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36925       ac_prog_rejected=yes
36926       continue
36927     fi
36928    ac_cv_prog_MT="mt"
36929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36930    break 2
36931  fi
36932done
36933  done
36934IFS=$as_save_IFS
36935
36936if test $ac_prog_rejected = yes; then
36937  # We found a bogon in the path, so make sure we never use it.
36938  set dummy $ac_cv_prog_MT
36939  shift
36940  if test $# != 0; then
36941    # We chose a different compiler from the bogus one.
36942    # However, it has the same basename, so the bogon will be chosen
36943    # first if we set MT to just the basename; use the full file name.
36944    shift
36945    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36946  fi
36947fi
36948fi
36949fi
36950MT=$ac_cv_prog_MT
36951if test -n "$MT"; then
36952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36953$as_echo "$MT" >&6; }
36954else
36955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36956$as_echo "no" >&6; }
36957fi
36958
36959
36960
36961  # Only process if variable expands to non-empty
36962
36963  if test "x$MT" != x; then
36964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36965
36966  # First separate the path from the arguments. This will split at the first
36967  # space.
36968  complete="$MT"
36969  path="${complete%% *}"
36970  tmp="$complete EOL"
36971  arguments="${tmp#* }"
36972
36973  # Input might be given as Windows format, start by converting to
36974  # unix format.
36975  new_path=`$CYGPATH -u "$path"`
36976
36977  # Now try to locate executable using which
36978  new_path=`$WHICH "$new_path" 2> /dev/null`
36979  # bat and cmd files are not always considered executable in cygwin causing which
36980  # to not find them
36981  if test "x$new_path" = x \
36982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36984    new_path=`$CYGPATH -u "$path"`
36985  fi
36986  if test "x$new_path" = x; then
36987    # Oops. Which didn't find the executable.
36988    # The splitting of arguments from the executable at a space might have been incorrect,
36989    # since paths with space are more likely in Windows. Give it another try with the whole
36990    # argument.
36991    path="$complete"
36992    arguments="EOL"
36993    new_path=`$CYGPATH -u "$path"`
36994    new_path=`$WHICH "$new_path" 2> /dev/null`
36995    # bat and cmd files are not always considered executable in cygwin causing which
36996    # to not find them
36997    if test "x$new_path" = x \
36998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37000      new_path=`$CYGPATH -u "$path"`
37001    fi
37002    if test "x$new_path" = x; then
37003      # It's still not found. Now this is an unrecoverable error.
37004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37005$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37006      has_space=`$ECHO "$complete" | $GREP " "`
37007      if test "x$has_space" != x; then
37008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37010      fi
37011      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37012    fi
37013  fi
37014
37015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37018  # "foo.exe" is OK but "foo" is an error.
37019  #
37020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37021  # It is also a way to make sure we got the proper file name for the real test later on.
37022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37023  if test "x$test_shortpath" = x; then
37024    # Short path failed, file does not exist as specified.
37025    # Try adding .exe or .cmd
37026    if test -f "${new_path}.exe"; then
37027      input_to_shortpath="${new_path}.exe"
37028    elif test -f "${new_path}.cmd"; then
37029      input_to_shortpath="${new_path}.cmd"
37030    else
37031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37032$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37035      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37036    fi
37037  else
37038    input_to_shortpath="$new_path"
37039  fi
37040
37041  # Call helper function which possibly converts this using DOS-style short mode.
37042  # If so, the updated path is stored in $new_path.
37043  new_path="$input_to_shortpath"
37044
37045  input_path="$input_to_shortpath"
37046  # Check if we need to convert this using DOS-style short mode. If the path
37047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37048  # take no chances and rewrite it.
37049  # Note: m4 eats our [], so we need to use [ and ] instead.
37050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37051  if test "x$has_forbidden_chars" != x; then
37052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37056      # Going to short mode and back again did indeed matter. Since short mode is
37057      # case insensitive, let's make it lowercase to improve readability.
37058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37059      # Now convert it back to Unix-style (cygpath)
37060      input_path=`$CYGPATH -u "$shortmode_path"`
37061      new_path="$input_path"
37062    fi
37063  fi
37064
37065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37066  if test "x$test_cygdrive_prefix" = x; then
37067    # As a simple fix, exclude /usr/bin since it's not a real path.
37068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37070      # a path prefixed by /cygdrive for fixpath to work.
37071      new_path="$CYGWIN_ROOT_PATH$input_path"
37072    fi
37073  fi
37074
37075  # remove trailing .exe if any
37076  new_path="${new_path/%.exe/}"
37077
37078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37079
37080  # First separate the path from the arguments. This will split at the first
37081  # space.
37082  complete="$MT"
37083  path="${complete%% *}"
37084  tmp="$complete EOL"
37085  arguments="${tmp#* }"
37086
37087  # Input might be given as Windows format, start by converting to
37088  # unix format.
37089  new_path="$path"
37090
37091  windows_path="$new_path"
37092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37093    unix_path=`$CYGPATH -u "$windows_path"`
37094    new_path="$unix_path"
37095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37097    new_path="$unix_path"
37098  fi
37099
37100
37101  # Now try to locate executable using which
37102  new_path=`$WHICH "$new_path" 2> /dev/null`
37103
37104  if test "x$new_path" = x; then
37105    # Oops. Which didn't find the executable.
37106    # The splitting of arguments from the executable at a space might have been incorrect,
37107    # since paths with space are more likely in Windows. Give it another try with the whole
37108    # argument.
37109    path="$complete"
37110    arguments="EOL"
37111    new_path="$path"
37112
37113  windows_path="$new_path"
37114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37115    unix_path=`$CYGPATH -u "$windows_path"`
37116    new_path="$unix_path"
37117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37119    new_path="$unix_path"
37120  fi
37121
37122
37123    new_path=`$WHICH "$new_path" 2> /dev/null`
37124    # bat and cmd files are not always considered executable in MSYS causing which
37125    # to not find them
37126    if test "x$new_path" = x \
37127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37129      new_path="$path"
37130
37131  windows_path="$new_path"
37132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37133    unix_path=`$CYGPATH -u "$windows_path"`
37134    new_path="$unix_path"
37135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37137    new_path="$unix_path"
37138  fi
37139
37140    fi
37141
37142    if test "x$new_path" = x; then
37143      # It's still not found. Now this is an unrecoverable error.
37144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37145$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37146      has_space=`$ECHO "$complete" | $GREP " "`
37147      if test "x$has_space" != x; then
37148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37150      fi
37151      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37152    fi
37153  fi
37154
37155  # Now new_path has a complete unix path to the binary
37156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37157    # Keep paths in /bin as-is, but remove trailing .exe if any
37158    new_path="${new_path/%.exe/}"
37159    # Do not save /bin paths to all_fixpath_prefixes!
37160  else
37161    # Not in mixed or Windows style, start by that.
37162    new_path=`cmd //c echo $new_path`
37163
37164  input_path="$new_path"
37165  # Check if we need to convert this using DOS-style short mode. If the path
37166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37167  # take no chances and rewrite it.
37168  # Note: m4 eats our [], so we need to use [ and ] instead.
37169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37170  if test "x$has_forbidden_chars" != x; then
37171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37173  fi
37174
37175    # Output is in $new_path
37176
37177  windows_path="$new_path"
37178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37179    unix_path=`$CYGPATH -u "$windows_path"`
37180    new_path="$unix_path"
37181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37183    new_path="$unix_path"
37184  fi
37185
37186    # remove trailing .exe if any
37187    new_path="${new_path/%.exe/}"
37188
37189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37191  fi
37192
37193    else
37194      # We're on a unix platform. Hooray! :)
37195      # First separate the path from the arguments. This will split at the first
37196      # space.
37197      complete="$MT"
37198      path="${complete%% *}"
37199      tmp="$complete EOL"
37200      arguments="${tmp#* }"
37201
37202      # Cannot rely on the command "which" here since it doesn't always work.
37203      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37204      if test -z "$is_absolute_path"; then
37205        # Path to executable is not absolute. Find it.
37206        IFS_save="$IFS"
37207        IFS=:
37208        for p in $PATH; do
37209          if test -f "$p/$path" && test -x "$p/$path"; then
37210            new_path="$p/$path"
37211            break
37212          fi
37213        done
37214        IFS="$IFS_save"
37215      else
37216        # This is an absolute path, we can use it without further modifications.
37217        new_path="$path"
37218      fi
37219
37220      if test "x$new_path" = x; then
37221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37222$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37223        has_space=`$ECHO "$complete" | $GREP " "`
37224        if test "x$has_space" != x; then
37225          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37227        fi
37228        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37229      fi
37230    fi
37231
37232    # Now join together the path and the arguments once again
37233    if test "x$arguments" != xEOL; then
37234      new_complete="$new_path ${arguments% *}"
37235    else
37236      new_complete="$new_path"
37237    fi
37238
37239    if test "x$complete" != "x$new_complete"; then
37240      MT="$new_complete"
37241      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37242$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37243    fi
37244  fi
37245
37246    # Setup the resource compiler (RC)
37247    # Extract the first word of "rc", so it can be a program name with args.
37248set dummy rc; ac_word=$2
37249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37250$as_echo_n "checking for $ac_word... " >&6; }
37251if ${ac_cv_prog_RC+:} false; then :
37252  $as_echo_n "(cached) " >&6
37253else
37254  if test -n "$RC"; then
37255  ac_cv_prog_RC="$RC" # Let the user override the test.
37256else
37257  ac_prog_rejected=no
37258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37259for as_dir in $PATH
37260do
37261  IFS=$as_save_IFS
37262  test -z "$as_dir" && as_dir=.
37263    for ac_exec_ext in '' $ac_executable_extensions; do
37264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37265    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37266       ac_prog_rejected=yes
37267       continue
37268     fi
37269    ac_cv_prog_RC="rc"
37270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37271    break 2
37272  fi
37273done
37274  done
37275IFS=$as_save_IFS
37276
37277if test $ac_prog_rejected = yes; then
37278  # We found a bogon in the path, so make sure we never use it.
37279  set dummy $ac_cv_prog_RC
37280  shift
37281  if test $# != 0; then
37282    # We chose a different compiler from the bogus one.
37283    # However, it has the same basename, so the bogon will be chosen
37284    # first if we set RC to just the basename; use the full file name.
37285    shift
37286    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37287  fi
37288fi
37289fi
37290fi
37291RC=$ac_cv_prog_RC
37292if test -n "$RC"; then
37293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37294$as_echo "$RC" >&6; }
37295else
37296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37297$as_echo "no" >&6; }
37298fi
37299
37300
37301
37302  # Only process if variable expands to non-empty
37303
37304  if test "x$RC" != x; then
37305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37306
37307  # First separate the path from the arguments. This will split at the first
37308  # space.
37309  complete="$RC"
37310  path="${complete%% *}"
37311  tmp="$complete EOL"
37312  arguments="${tmp#* }"
37313
37314  # Input might be given as Windows format, start by converting to
37315  # unix format.
37316  new_path=`$CYGPATH -u "$path"`
37317
37318  # Now try to locate executable using which
37319  new_path=`$WHICH "$new_path" 2> /dev/null`
37320  # bat and cmd files are not always considered executable in cygwin causing which
37321  # to not find them
37322  if test "x$new_path" = x \
37323      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37324      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37325    new_path=`$CYGPATH -u "$path"`
37326  fi
37327  if test "x$new_path" = x; then
37328    # Oops. Which didn't find the executable.
37329    # The splitting of arguments from the executable at a space might have been incorrect,
37330    # since paths with space are more likely in Windows. Give it another try with the whole
37331    # argument.
37332    path="$complete"
37333    arguments="EOL"
37334    new_path=`$CYGPATH -u "$path"`
37335    new_path=`$WHICH "$new_path" 2> /dev/null`
37336    # bat and cmd files are not always considered executable in cygwin causing which
37337    # to not find them
37338    if test "x$new_path" = x \
37339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37341      new_path=`$CYGPATH -u "$path"`
37342    fi
37343    if test "x$new_path" = x; then
37344      # It's still not found. Now this is an unrecoverable error.
37345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37346$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37347      has_space=`$ECHO "$complete" | $GREP " "`
37348      if test "x$has_space" != x; then
37349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37351      fi
37352      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37353    fi
37354  fi
37355
37356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37359  # "foo.exe" is OK but "foo" is an error.
37360  #
37361  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37362  # It is also a way to make sure we got the proper file name for the real test later on.
37363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37364  if test "x$test_shortpath" = x; then
37365    # Short path failed, file does not exist as specified.
37366    # Try adding .exe or .cmd
37367    if test -f "${new_path}.exe"; then
37368      input_to_shortpath="${new_path}.exe"
37369    elif test -f "${new_path}.cmd"; then
37370      input_to_shortpath="${new_path}.cmd"
37371    else
37372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37373$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37376      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37377    fi
37378  else
37379    input_to_shortpath="$new_path"
37380  fi
37381
37382  # Call helper function which possibly converts this using DOS-style short mode.
37383  # If so, the updated path is stored in $new_path.
37384  new_path="$input_to_shortpath"
37385
37386  input_path="$input_to_shortpath"
37387  # Check if we need to convert this using DOS-style short mode. If the path
37388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37389  # take no chances and rewrite it.
37390  # Note: m4 eats our [], so we need to use [ and ] instead.
37391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37392  if test "x$has_forbidden_chars" != x; then
37393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37397      # Going to short mode and back again did indeed matter. Since short mode is
37398      # case insensitive, let's make it lowercase to improve readability.
37399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37400      # Now convert it back to Unix-style (cygpath)
37401      input_path=`$CYGPATH -u "$shortmode_path"`
37402      new_path="$input_path"
37403    fi
37404  fi
37405
37406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37407  if test "x$test_cygdrive_prefix" = x; then
37408    # As a simple fix, exclude /usr/bin since it's not a real path.
37409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37411      # a path prefixed by /cygdrive for fixpath to work.
37412      new_path="$CYGWIN_ROOT_PATH$input_path"
37413    fi
37414  fi
37415
37416  # remove trailing .exe if any
37417  new_path="${new_path/%.exe/}"
37418
37419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37420
37421  # First separate the path from the arguments. This will split at the first
37422  # space.
37423  complete="$RC"
37424  path="${complete%% *}"
37425  tmp="$complete EOL"
37426  arguments="${tmp#* }"
37427
37428  # Input might be given as Windows format, start by converting to
37429  # unix format.
37430  new_path="$path"
37431
37432  windows_path="$new_path"
37433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37434    unix_path=`$CYGPATH -u "$windows_path"`
37435    new_path="$unix_path"
37436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37438    new_path="$unix_path"
37439  fi
37440
37441
37442  # Now try to locate executable using which
37443  new_path=`$WHICH "$new_path" 2> /dev/null`
37444
37445  if test "x$new_path" = x; then
37446    # Oops. Which didn't find the executable.
37447    # The splitting of arguments from the executable at a space might have been incorrect,
37448    # since paths with space are more likely in Windows. Give it another try with the whole
37449    # argument.
37450    path="$complete"
37451    arguments="EOL"
37452    new_path="$path"
37453
37454  windows_path="$new_path"
37455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37456    unix_path=`$CYGPATH -u "$windows_path"`
37457    new_path="$unix_path"
37458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37460    new_path="$unix_path"
37461  fi
37462
37463
37464    new_path=`$WHICH "$new_path" 2> /dev/null`
37465    # bat and cmd files are not always considered executable in MSYS causing which
37466    # to not find them
37467    if test "x$new_path" = x \
37468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37470      new_path="$path"
37471
37472  windows_path="$new_path"
37473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37474    unix_path=`$CYGPATH -u "$windows_path"`
37475    new_path="$unix_path"
37476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37478    new_path="$unix_path"
37479  fi
37480
37481    fi
37482
37483    if test "x$new_path" = x; then
37484      # It's still not found. Now this is an unrecoverable error.
37485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37486$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37487      has_space=`$ECHO "$complete" | $GREP " "`
37488      if test "x$has_space" != x; then
37489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37491      fi
37492      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37493    fi
37494  fi
37495
37496  # Now new_path has a complete unix path to the binary
37497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37498    # Keep paths in /bin as-is, but remove trailing .exe if any
37499    new_path="${new_path/%.exe/}"
37500    # Do not save /bin paths to all_fixpath_prefixes!
37501  else
37502    # Not in mixed or Windows style, start by that.
37503    new_path=`cmd //c echo $new_path`
37504
37505  input_path="$new_path"
37506  # Check if we need to convert this using DOS-style short mode. If the path
37507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37508  # take no chances and rewrite it.
37509  # Note: m4 eats our [], so we need to use [ and ] instead.
37510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37511  if test "x$has_forbidden_chars" != x; then
37512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37514  fi
37515
37516    # Output is in $new_path
37517
37518  windows_path="$new_path"
37519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37520    unix_path=`$CYGPATH -u "$windows_path"`
37521    new_path="$unix_path"
37522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37524    new_path="$unix_path"
37525  fi
37526
37527    # remove trailing .exe if any
37528    new_path="${new_path/%.exe/}"
37529
37530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37532  fi
37533
37534    else
37535      # We're on a unix platform. Hooray! :)
37536      # First separate the path from the arguments. This will split at the first
37537      # space.
37538      complete="$RC"
37539      path="${complete%% *}"
37540      tmp="$complete EOL"
37541      arguments="${tmp#* }"
37542
37543      # Cannot rely on the command "which" here since it doesn't always work.
37544      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37545      if test -z "$is_absolute_path"; then
37546        # Path to executable is not absolute. Find it.
37547        IFS_save="$IFS"
37548        IFS=:
37549        for p in $PATH; do
37550          if test -f "$p/$path" && test -x "$p/$path"; then
37551            new_path="$p/$path"
37552            break
37553          fi
37554        done
37555        IFS="$IFS_save"
37556      else
37557        # This is an absolute path, we can use it without further modifications.
37558        new_path="$path"
37559      fi
37560
37561      if test "x$new_path" = x; then
37562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37563$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37564        has_space=`$ECHO "$complete" | $GREP " "`
37565        if test "x$has_space" != x; then
37566          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37567$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37568        fi
37569        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37570      fi
37571    fi
37572
37573    # Now join together the path and the arguments once again
37574    if test "x$arguments" != xEOL; then
37575      new_complete="$new_path ${arguments% *}"
37576    else
37577      new_complete="$new_path"
37578    fi
37579
37580    if test "x$complete" != "x$new_complete"; then
37581      RC="$new_complete"
37582      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37583$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37584    fi
37585  fi
37586
37587    # Extract the first word of "dumpbin", so it can be a program name with args.
37588set dummy dumpbin; ac_word=$2
37589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37590$as_echo_n "checking for $ac_word... " >&6; }
37591if ${ac_cv_prog_DUMPBIN+:} false; then :
37592  $as_echo_n "(cached) " >&6
37593else
37594  if test -n "$DUMPBIN"; then
37595  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37596else
37597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37598for as_dir in $PATH
37599do
37600  IFS=$as_save_IFS
37601  test -z "$as_dir" && as_dir=.
37602    for ac_exec_ext in '' $ac_executable_extensions; do
37603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37604    ac_cv_prog_DUMPBIN="dumpbin"
37605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37606    break 2
37607  fi
37608done
37609  done
37610IFS=$as_save_IFS
37611
37612fi
37613fi
37614DUMPBIN=$ac_cv_prog_DUMPBIN
37615if test -n "$DUMPBIN"; then
37616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37617$as_echo "$DUMPBIN" >&6; }
37618else
37619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37620$as_echo "no" >&6; }
37621fi
37622
37623
37624
37625  # Only process if variable expands to non-empty
37626
37627  if test "x$DUMPBIN" != x; then
37628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37629
37630  # First separate the path from the arguments. This will split at the first
37631  # space.
37632  complete="$DUMPBIN"
37633  path="${complete%% *}"
37634  tmp="$complete EOL"
37635  arguments="${tmp#* }"
37636
37637  # Input might be given as Windows format, start by converting to
37638  # unix format.
37639  new_path=`$CYGPATH -u "$path"`
37640
37641  # Now try to locate executable using which
37642  new_path=`$WHICH "$new_path" 2> /dev/null`
37643  # bat and cmd files are not always considered executable in cygwin causing which
37644  # to not find them
37645  if test "x$new_path" = x \
37646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37648    new_path=`$CYGPATH -u "$path"`
37649  fi
37650  if test "x$new_path" = x; then
37651    # Oops. Which didn't find the executable.
37652    # The splitting of arguments from the executable at a space might have been incorrect,
37653    # since paths with space are more likely in Windows. Give it another try with the whole
37654    # argument.
37655    path="$complete"
37656    arguments="EOL"
37657    new_path=`$CYGPATH -u "$path"`
37658    new_path=`$WHICH "$new_path" 2> /dev/null`
37659    # bat and cmd files are not always considered executable in cygwin causing which
37660    # to not find them
37661    if test "x$new_path" = x \
37662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37664      new_path=`$CYGPATH -u "$path"`
37665    fi
37666    if test "x$new_path" = x; then
37667      # It's still not found. Now this is an unrecoverable error.
37668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37669$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37670      has_space=`$ECHO "$complete" | $GREP " "`
37671      if test "x$has_space" != x; then
37672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37674      fi
37675      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37676    fi
37677  fi
37678
37679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37682  # "foo.exe" is OK but "foo" is an error.
37683  #
37684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37685  # It is also a way to make sure we got the proper file name for the real test later on.
37686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37687  if test "x$test_shortpath" = x; then
37688    # Short path failed, file does not exist as specified.
37689    # Try adding .exe or .cmd
37690    if test -f "${new_path}.exe"; then
37691      input_to_shortpath="${new_path}.exe"
37692    elif test -f "${new_path}.cmd"; then
37693      input_to_shortpath="${new_path}.cmd"
37694    else
37695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37696$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37699      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37700    fi
37701  else
37702    input_to_shortpath="$new_path"
37703  fi
37704
37705  # Call helper function which possibly converts this using DOS-style short mode.
37706  # If so, the updated path is stored in $new_path.
37707  new_path="$input_to_shortpath"
37708
37709  input_path="$input_to_shortpath"
37710  # Check if we need to convert this using DOS-style short mode. If the path
37711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37712  # take no chances and rewrite it.
37713  # Note: m4 eats our [], so we need to use [ and ] instead.
37714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37715  if test "x$has_forbidden_chars" != x; then
37716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37720      # Going to short mode and back again did indeed matter. Since short mode is
37721      # case insensitive, let's make it lowercase to improve readability.
37722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37723      # Now convert it back to Unix-style (cygpath)
37724      input_path=`$CYGPATH -u "$shortmode_path"`
37725      new_path="$input_path"
37726    fi
37727  fi
37728
37729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37730  if test "x$test_cygdrive_prefix" = x; then
37731    # As a simple fix, exclude /usr/bin since it's not a real path.
37732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37734      # a path prefixed by /cygdrive for fixpath to work.
37735      new_path="$CYGWIN_ROOT_PATH$input_path"
37736    fi
37737  fi
37738
37739  # remove trailing .exe if any
37740  new_path="${new_path/%.exe/}"
37741
37742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37743
37744  # First separate the path from the arguments. This will split at the first
37745  # space.
37746  complete="$DUMPBIN"
37747  path="${complete%% *}"
37748  tmp="$complete EOL"
37749  arguments="${tmp#* }"
37750
37751  # Input might be given as Windows format, start by converting to
37752  # unix format.
37753  new_path="$path"
37754
37755  windows_path="$new_path"
37756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37757    unix_path=`$CYGPATH -u "$windows_path"`
37758    new_path="$unix_path"
37759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37761    new_path="$unix_path"
37762  fi
37763
37764
37765  # Now try to locate executable using which
37766  new_path=`$WHICH "$new_path" 2> /dev/null`
37767
37768  if test "x$new_path" = x; then
37769    # Oops. Which didn't find the executable.
37770    # The splitting of arguments from the executable at a space might have been incorrect,
37771    # since paths with space are more likely in Windows. Give it another try with the whole
37772    # argument.
37773    path="$complete"
37774    arguments="EOL"
37775    new_path="$path"
37776
37777  windows_path="$new_path"
37778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37779    unix_path=`$CYGPATH -u "$windows_path"`
37780    new_path="$unix_path"
37781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37783    new_path="$unix_path"
37784  fi
37785
37786
37787    new_path=`$WHICH "$new_path" 2> /dev/null`
37788    # bat and cmd files are not always considered executable in MSYS causing which
37789    # to not find them
37790    if test "x$new_path" = x \
37791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37793      new_path="$path"
37794
37795  windows_path="$new_path"
37796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37797    unix_path=`$CYGPATH -u "$windows_path"`
37798    new_path="$unix_path"
37799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37801    new_path="$unix_path"
37802  fi
37803
37804    fi
37805
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 DUMPBIN, which resolves as \"$complete\", is not found." >&5
37809$as_echo "$as_me: The path of DUMPBIN, 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 DUMPBIN" "$LINENO" 5
37816    fi
37817  fi
37818
37819  # Now new_path has a complete unix path to the binary
37820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37821    # Keep paths in /bin as-is, but remove trailing .exe if any
37822    new_path="${new_path/%.exe/}"
37823    # Do not save /bin paths to all_fixpath_prefixes!
37824  else
37825    # Not in mixed or Windows style, start by that.
37826    new_path=`cmd //c echo $new_path`
37827
37828  input_path="$new_path"
37829  # Check if we need to convert this using DOS-style short mode. If the path
37830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37831  # take no chances and rewrite it.
37832  # Note: m4 eats our [], so we need to use [ and ] instead.
37833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37834  if test "x$has_forbidden_chars" != x; then
37835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37837  fi
37838
37839    # Output is in $new_path
37840
37841  windows_path="$new_path"
37842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37843    unix_path=`$CYGPATH -u "$windows_path"`
37844    new_path="$unix_path"
37845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37847    new_path="$unix_path"
37848  fi
37849
37850    # remove trailing .exe if any
37851    new_path="${new_path/%.exe/}"
37852
37853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37855  fi
37856
37857    else
37858      # We're on a unix platform. Hooray! :)
37859      # First separate the path from the arguments. This will split at the first
37860      # space.
37861      complete="$DUMPBIN"
37862      path="${complete%% *}"
37863      tmp="$complete EOL"
37864      arguments="${tmp#* }"
37865
37866      # Cannot rely on the command "which" here since it doesn't always work.
37867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37868      if test -z "$is_absolute_path"; then
37869        # Path to executable is not absolute. Find it.
37870        IFS_save="$IFS"
37871        IFS=:
37872        for p in $PATH; do
37873          if test -f "$p/$path" && test -x "$p/$path"; then
37874            new_path="$p/$path"
37875            break
37876          fi
37877        done
37878        IFS="$IFS_save"
37879      else
37880        # This is an absolute path, we can use it without further modifications.
37881        new_path="$path"
37882      fi
37883
37884      if test "x$new_path" = x; then
37885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37886$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37887        has_space=`$ECHO "$complete" | $GREP " "`
37888        if test "x$has_space" != x; then
37889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37891        fi
37892        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37893      fi
37894    fi
37895
37896    # Now join together the path and the arguments once again
37897    if test "x$arguments" != xEOL; then
37898      new_complete="$new_path ${arguments% *}"
37899    else
37900      new_complete="$new_path"
37901    fi
37902
37903    if test "x$complete" != "x$new_complete"; then
37904      DUMPBIN="$new_complete"
37905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37906$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37907    fi
37908  fi
37909
37910    # We need to check for 'msbuild.exe' because at the place where we expect to
37911    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37912    # won't find the 'msbuild.exe' executable in that case (and the
37913    # 'ac_executable_extensions' is unusable due to performance reasons).
37914    # Notice that we intentionally don't fix up the path to MSBUILD because we
37915    # will call it in a DOS shell during freetype detection on Windows (see
37916    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37917    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37918set dummy msbuild.exe; ac_word=$2
37919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37920$as_echo_n "checking for $ac_word... " >&6; }
37921if ${ac_cv_prog_MSBUILD+:} false; then :
37922  $as_echo_n "(cached) " >&6
37923else
37924  if test -n "$MSBUILD"; then
37925  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37926else
37927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37928for as_dir in $PATH
37929do
37930  IFS=$as_save_IFS
37931  test -z "$as_dir" && as_dir=.
37932    for ac_exec_ext in '' $ac_executable_extensions; do
37933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37934    ac_cv_prog_MSBUILD="msbuild.exe"
37935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37936    break 2
37937  fi
37938done
37939  done
37940IFS=$as_save_IFS
37941
37942fi
37943fi
37944MSBUILD=$ac_cv_prog_MSBUILD
37945if test -n "$MSBUILD"; then
37946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37947$as_echo "$MSBUILD" >&6; }
37948else
37949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37950$as_echo "no" >&6; }
37951fi
37952
37953
37954  fi
37955
37956  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37957
37958
37959  # Publish this variable in the help.
37960
37961
37962  if [ -z "${STRIP+x}" ]; then
37963    # The variable is not set by user, try to locate tool using the code snippet
37964    for ac_prog in strip
37965do
37966  # Extract the first word of "$ac_prog", so it can be a program name with args.
37967set dummy $ac_prog; ac_word=$2
37968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37969$as_echo_n "checking for $ac_word... " >&6; }
37970if ${ac_cv_path_STRIP+:} false; then :
37971  $as_echo_n "(cached) " >&6
37972else
37973  case $STRIP in
37974  [\\/]* | ?:[\\/]*)
37975  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37976  ;;
37977  *)
37978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37979for as_dir in $PATH
37980do
37981  IFS=$as_save_IFS
37982  test -z "$as_dir" && as_dir=.
37983    for ac_exec_ext in '' $ac_executable_extensions; do
37984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37985    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37987    break 2
37988  fi
37989done
37990  done
37991IFS=$as_save_IFS
37992
37993  ;;
37994esac
37995fi
37996STRIP=$ac_cv_path_STRIP
37997if test -n "$STRIP"; then
37998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37999$as_echo "$STRIP" >&6; }
38000else
38001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38002$as_echo "no" >&6; }
38003fi
38004
38005
38006  test -n "$STRIP" && break
38007done
38008
38009  else
38010    # The variable is set, but is it from the command line or the environment?
38011
38012    # Try to remove the string !STRIP! from our list.
38013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38015      # If it failed, the variable was not from the command line. Ignore it,
38016      # but warn the user (except for BASH, which is always set by the calling BASH).
38017      if test "xSTRIP" != xBASH; then
38018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38019$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38020      fi
38021      # Try to locate tool using the code snippet
38022      for ac_prog in strip
38023do
38024  # Extract the first word of "$ac_prog", so it can be a program name with args.
38025set dummy $ac_prog; ac_word=$2
38026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38027$as_echo_n "checking for $ac_word... " >&6; }
38028if ${ac_cv_path_STRIP+:} false; then :
38029  $as_echo_n "(cached) " >&6
38030else
38031  case $STRIP in
38032  [\\/]* | ?:[\\/]*)
38033  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38034  ;;
38035  *)
38036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38037for as_dir in $PATH
38038do
38039  IFS=$as_save_IFS
38040  test -z "$as_dir" && as_dir=.
38041    for ac_exec_ext in '' $ac_executable_extensions; do
38042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38043    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38045    break 2
38046  fi
38047done
38048  done
38049IFS=$as_save_IFS
38050
38051  ;;
38052esac
38053fi
38054STRIP=$ac_cv_path_STRIP
38055if test -n "$STRIP"; then
38056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38057$as_echo "$STRIP" >&6; }
38058else
38059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38060$as_echo "no" >&6; }
38061fi
38062
38063
38064  test -n "$STRIP" && break
38065done
38066
38067    else
38068      # If it succeeded, then it was overridden by the user. We will use it
38069      # for the tool.
38070
38071      # First remove it from the list of overridden variables, so we can test
38072      # for unknown variables in the end.
38073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38074
38075      # Check if we try to supply an empty value
38076      if test "x$STRIP" = x; then
38077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38078$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38080$as_echo_n "checking for STRIP... " >&6; }
38081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38082$as_echo "disabled" >&6; }
38083      else
38084        # Check if the provided tool contains a complete path.
38085        tool_specified="$STRIP"
38086        tool_basename="${tool_specified##*/}"
38087        if test "x$tool_basename" = "x$tool_specified"; then
38088          # A command without a complete path is provided, search $PATH.
38089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38090$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38091          # Extract the first word of "$tool_basename", so it can be a program name with args.
38092set dummy $tool_basename; ac_word=$2
38093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38094$as_echo_n "checking for $ac_word... " >&6; }
38095if ${ac_cv_path_STRIP+:} false; then :
38096  $as_echo_n "(cached) " >&6
38097else
38098  case $STRIP in
38099  [\\/]* | ?:[\\/]*)
38100  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38101  ;;
38102  *)
38103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38104for as_dir in $PATH
38105do
38106  IFS=$as_save_IFS
38107  test -z "$as_dir" && as_dir=.
38108    for ac_exec_ext in '' $ac_executable_extensions; do
38109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38110    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38112    break 2
38113  fi
38114done
38115  done
38116IFS=$as_save_IFS
38117
38118  ;;
38119esac
38120fi
38121STRIP=$ac_cv_path_STRIP
38122if test -n "$STRIP"; then
38123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38124$as_echo "$STRIP" >&6; }
38125else
38126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38127$as_echo "no" >&6; }
38128fi
38129
38130
38131          if test "x$STRIP" = x; then
38132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38133          fi
38134        else
38135          # Otherwise we believe it is a complete path. Use it as it is.
38136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38137$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38139$as_echo_n "checking for STRIP... " >&6; }
38140          if test ! -x "$tool_specified"; then
38141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38142$as_echo "not found" >&6; }
38143            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38144          fi
38145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38146$as_echo "$tool_specified" >&6; }
38147        fi
38148      fi
38149    fi
38150
38151  fi
38152
38153
38154
38155  # Only process if variable expands to non-empty
38156
38157  if test "x$STRIP" != x; then
38158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38159
38160  # First separate the path from the arguments. This will split at the first
38161  # space.
38162  complete="$STRIP"
38163  path="${complete%% *}"
38164  tmp="$complete EOL"
38165  arguments="${tmp#* }"
38166
38167  # Input might be given as Windows format, start by converting to
38168  # unix format.
38169  new_path=`$CYGPATH -u "$path"`
38170
38171  # Now try to locate executable using which
38172  new_path=`$WHICH "$new_path" 2> /dev/null`
38173  # bat and cmd files are not always considered executable in cygwin causing which
38174  # to not find them
38175  if test "x$new_path" = x \
38176      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38177      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38178    new_path=`$CYGPATH -u "$path"`
38179  fi
38180  if test "x$new_path" = x; then
38181    # Oops. Which didn't find the executable.
38182    # The splitting of arguments from the executable at a space might have been incorrect,
38183    # since paths with space are more likely in Windows. Give it another try with the whole
38184    # argument.
38185    path="$complete"
38186    arguments="EOL"
38187    new_path=`$CYGPATH -u "$path"`
38188    new_path=`$WHICH "$new_path" 2> /dev/null`
38189    # bat and cmd files are not always considered executable in cygwin causing which
38190    # to not find them
38191    if test "x$new_path" = x \
38192        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38193        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38194      new_path=`$CYGPATH -u "$path"`
38195    fi
38196    if test "x$new_path" = x; then
38197      # It's still not found. Now this is an unrecoverable error.
38198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38199$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38200      has_space=`$ECHO "$complete" | $GREP " "`
38201      if test "x$has_space" != x; then
38202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38204      fi
38205      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38206    fi
38207  fi
38208
38209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38212  # "foo.exe" is OK but "foo" is an error.
38213  #
38214  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38215  # It is also a way to make sure we got the proper file name for the real test later on.
38216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38217  if test "x$test_shortpath" = x; then
38218    # Short path failed, file does not exist as specified.
38219    # Try adding .exe or .cmd
38220    if test -f "${new_path}.exe"; then
38221      input_to_shortpath="${new_path}.exe"
38222    elif test -f "${new_path}.cmd"; then
38223      input_to_shortpath="${new_path}.cmd"
38224    else
38225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38226$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38229      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38230    fi
38231  else
38232    input_to_shortpath="$new_path"
38233  fi
38234
38235  # Call helper function which possibly converts this using DOS-style short mode.
38236  # If so, the updated path is stored in $new_path.
38237  new_path="$input_to_shortpath"
38238
38239  input_path="$input_to_shortpath"
38240  # Check if we need to convert this using DOS-style short mode. If the path
38241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38242  # take no chances and rewrite it.
38243  # Note: m4 eats our [], so we need to use [ and ] instead.
38244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38245  if test "x$has_forbidden_chars" != x; then
38246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38250      # Going to short mode and back again did indeed matter. Since short mode is
38251      # case insensitive, let's make it lowercase to improve readability.
38252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38253      # Now convert it back to Unix-style (cygpath)
38254      input_path=`$CYGPATH -u "$shortmode_path"`
38255      new_path="$input_path"
38256    fi
38257  fi
38258
38259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38260  if test "x$test_cygdrive_prefix" = x; then
38261    # As a simple fix, exclude /usr/bin since it's not a real path.
38262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38264      # a path prefixed by /cygdrive for fixpath to work.
38265      new_path="$CYGWIN_ROOT_PATH$input_path"
38266    fi
38267  fi
38268
38269  # remove trailing .exe if any
38270  new_path="${new_path/%.exe/}"
38271
38272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38273
38274  # First separate the path from the arguments. This will split at the first
38275  # space.
38276  complete="$STRIP"
38277  path="${complete%% *}"
38278  tmp="$complete EOL"
38279  arguments="${tmp#* }"
38280
38281  # Input might be given as Windows format, start by converting to
38282  # unix format.
38283  new_path="$path"
38284
38285  windows_path="$new_path"
38286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38287    unix_path=`$CYGPATH -u "$windows_path"`
38288    new_path="$unix_path"
38289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38291    new_path="$unix_path"
38292  fi
38293
38294
38295  # Now try to locate executable using which
38296  new_path=`$WHICH "$new_path" 2> /dev/null`
38297
38298  if test "x$new_path" = x; then
38299    # Oops. Which didn't find the executable.
38300    # The splitting of arguments from the executable at a space might have been incorrect,
38301    # since paths with space are more likely in Windows. Give it another try with the whole
38302    # argument.
38303    path="$complete"
38304    arguments="EOL"
38305    new_path="$path"
38306
38307  windows_path="$new_path"
38308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38309    unix_path=`$CYGPATH -u "$windows_path"`
38310    new_path="$unix_path"
38311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38313    new_path="$unix_path"
38314  fi
38315
38316
38317    new_path=`$WHICH "$new_path" 2> /dev/null`
38318    # bat and cmd files are not always considered executable in MSYS causing which
38319    # to not find them
38320    if test "x$new_path" = x \
38321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38323      new_path="$path"
38324
38325  windows_path="$new_path"
38326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38327    unix_path=`$CYGPATH -u "$windows_path"`
38328    new_path="$unix_path"
38329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38331    new_path="$unix_path"
38332  fi
38333
38334    fi
38335
38336    if test "x$new_path" = x; then
38337      # It's still not found. Now this is an unrecoverable error.
38338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38339$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38340      has_space=`$ECHO "$complete" | $GREP " "`
38341      if test "x$has_space" != x; then
38342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38344      fi
38345      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38346    fi
38347  fi
38348
38349  # Now new_path has a complete unix path to the binary
38350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38351    # Keep paths in /bin as-is, but remove trailing .exe if any
38352    new_path="${new_path/%.exe/}"
38353    # Do not save /bin paths to all_fixpath_prefixes!
38354  else
38355    # Not in mixed or Windows style, start by that.
38356    new_path=`cmd //c echo $new_path`
38357
38358  input_path="$new_path"
38359  # Check if we need to convert this using DOS-style short mode. If the path
38360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38361  # take no chances and rewrite it.
38362  # Note: m4 eats our [], so we need to use [ and ] instead.
38363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38364  if test "x$has_forbidden_chars" != x; then
38365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38367  fi
38368
38369    # Output is in $new_path
38370
38371  windows_path="$new_path"
38372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38373    unix_path=`$CYGPATH -u "$windows_path"`
38374    new_path="$unix_path"
38375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38377    new_path="$unix_path"
38378  fi
38379
38380    # remove trailing .exe if any
38381    new_path="${new_path/%.exe/}"
38382
38383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38385  fi
38386
38387    else
38388      # We're on a unix platform. Hooray! :)
38389      # First separate the path from the arguments. This will split at the first
38390      # space.
38391      complete="$STRIP"
38392      path="${complete%% *}"
38393      tmp="$complete EOL"
38394      arguments="${tmp#* }"
38395
38396      # Cannot rely on the command "which" here since it doesn't always work.
38397      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38398      if test -z "$is_absolute_path"; then
38399        # Path to executable is not absolute. Find it.
38400        IFS_save="$IFS"
38401        IFS=:
38402        for p in $PATH; do
38403          if test -f "$p/$path" && test -x "$p/$path"; then
38404            new_path="$p/$path"
38405            break
38406          fi
38407        done
38408        IFS="$IFS_save"
38409      else
38410        # This is an absolute path, we can use it without further modifications.
38411        new_path="$path"
38412      fi
38413
38414      if test "x$new_path" = x; then
38415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38416$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38417        has_space=`$ECHO "$complete" | $GREP " "`
38418        if test "x$has_space" != x; then
38419          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38421        fi
38422        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38423      fi
38424    fi
38425
38426    # Now join together the path and the arguments once again
38427    if test "x$arguments" != xEOL; then
38428      new_complete="$new_path ${arguments% *}"
38429    else
38430      new_complete="$new_path"
38431    fi
38432
38433    if test "x$complete" != "x$new_complete"; then
38434      STRIP="$new_complete"
38435      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38436$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38437    fi
38438  fi
38439
38440
38441
38442  # Publish this variable in the help.
38443
38444
38445  if [ -z "${NM+x}" ]; then
38446    # The variable is not set by user, try to locate tool using the code snippet
38447    for ac_prog in nm
38448do
38449  # Extract the first word of "$ac_prog", so it can be a program name with args.
38450set dummy $ac_prog; ac_word=$2
38451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38452$as_echo_n "checking for $ac_word... " >&6; }
38453if ${ac_cv_path_NM+:} false; then :
38454  $as_echo_n "(cached) " >&6
38455else
38456  case $NM in
38457  [\\/]* | ?:[\\/]*)
38458  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38459  ;;
38460  *)
38461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38462for as_dir in $PATH
38463do
38464  IFS=$as_save_IFS
38465  test -z "$as_dir" && as_dir=.
38466    for ac_exec_ext in '' $ac_executable_extensions; do
38467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38468    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38470    break 2
38471  fi
38472done
38473  done
38474IFS=$as_save_IFS
38475
38476  ;;
38477esac
38478fi
38479NM=$ac_cv_path_NM
38480if test -n "$NM"; then
38481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38482$as_echo "$NM" >&6; }
38483else
38484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38485$as_echo "no" >&6; }
38486fi
38487
38488
38489  test -n "$NM" && break
38490done
38491
38492  else
38493    # The variable is set, but is it from the command line or the environment?
38494
38495    # Try to remove the string !NM! from our list.
38496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38498      # If it failed, the variable was not from the command line. Ignore it,
38499      # but warn the user (except for BASH, which is always set by the calling BASH).
38500      if test "xNM" != xBASH; then
38501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38502$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38503      fi
38504      # Try to locate tool using the code snippet
38505      for ac_prog in nm
38506do
38507  # Extract the first word of "$ac_prog", so it can be a program name with args.
38508set dummy $ac_prog; ac_word=$2
38509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38510$as_echo_n "checking for $ac_word... " >&6; }
38511if ${ac_cv_path_NM+:} false; then :
38512  $as_echo_n "(cached) " >&6
38513else
38514  case $NM in
38515  [\\/]* | ?:[\\/]*)
38516  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38517  ;;
38518  *)
38519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38520for as_dir in $PATH
38521do
38522  IFS=$as_save_IFS
38523  test -z "$as_dir" && as_dir=.
38524    for ac_exec_ext in '' $ac_executable_extensions; do
38525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38526    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38528    break 2
38529  fi
38530done
38531  done
38532IFS=$as_save_IFS
38533
38534  ;;
38535esac
38536fi
38537NM=$ac_cv_path_NM
38538if test -n "$NM"; then
38539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38540$as_echo "$NM" >&6; }
38541else
38542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38543$as_echo "no" >&6; }
38544fi
38545
38546
38547  test -n "$NM" && break
38548done
38549
38550    else
38551      # If it succeeded, then it was overridden by the user. We will use it
38552      # for the tool.
38553
38554      # First remove it from the list of overridden variables, so we can test
38555      # for unknown variables in the end.
38556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38557
38558      # Check if we try to supply an empty value
38559      if test "x$NM" = x; then
38560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38561$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38563$as_echo_n "checking for NM... " >&6; }
38564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38565$as_echo "disabled" >&6; }
38566      else
38567        # Check if the provided tool contains a complete path.
38568        tool_specified="$NM"
38569        tool_basename="${tool_specified##*/}"
38570        if test "x$tool_basename" = "x$tool_specified"; then
38571          # A command without a complete path is provided, search $PATH.
38572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38573$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38574          # Extract the first word of "$tool_basename", so it can be a program name with args.
38575set dummy $tool_basename; ac_word=$2
38576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38577$as_echo_n "checking for $ac_word... " >&6; }
38578if ${ac_cv_path_NM+:} false; then :
38579  $as_echo_n "(cached) " >&6
38580else
38581  case $NM in
38582  [\\/]* | ?:[\\/]*)
38583  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38584  ;;
38585  *)
38586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38587for as_dir in $PATH
38588do
38589  IFS=$as_save_IFS
38590  test -z "$as_dir" && as_dir=.
38591    for ac_exec_ext in '' $ac_executable_extensions; do
38592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38593    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38595    break 2
38596  fi
38597done
38598  done
38599IFS=$as_save_IFS
38600
38601  ;;
38602esac
38603fi
38604NM=$ac_cv_path_NM
38605if test -n "$NM"; then
38606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38607$as_echo "$NM" >&6; }
38608else
38609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38610$as_echo "no" >&6; }
38611fi
38612
38613
38614          if test "x$NM" = x; then
38615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38616          fi
38617        else
38618          # Otherwise we believe it is a complete path. Use it as it is.
38619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38620$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38622$as_echo_n "checking for NM... " >&6; }
38623          if test ! -x "$tool_specified"; then
38624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38625$as_echo "not found" >&6; }
38626            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38627          fi
38628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38629$as_echo "$tool_specified" >&6; }
38630        fi
38631      fi
38632    fi
38633
38634  fi
38635
38636
38637
38638  # Only process if variable expands to non-empty
38639
38640  if test "x$NM" != x; then
38641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38642
38643  # First separate the path from the arguments. This will split at the first
38644  # space.
38645  complete="$NM"
38646  path="${complete%% *}"
38647  tmp="$complete EOL"
38648  arguments="${tmp#* }"
38649
38650  # Input might be given as Windows format, start by converting to
38651  # unix format.
38652  new_path=`$CYGPATH -u "$path"`
38653
38654  # Now try to locate executable using which
38655  new_path=`$WHICH "$new_path" 2> /dev/null`
38656  # bat and cmd files are not always considered executable in cygwin causing which
38657  # to not find them
38658  if test "x$new_path" = x \
38659      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38660      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38661    new_path=`$CYGPATH -u "$path"`
38662  fi
38663  if test "x$new_path" = x; then
38664    # Oops. Which didn't find the executable.
38665    # The splitting of arguments from the executable at a space might have been incorrect,
38666    # since paths with space are more likely in Windows. Give it another try with the whole
38667    # argument.
38668    path="$complete"
38669    arguments="EOL"
38670    new_path=`$CYGPATH -u "$path"`
38671    new_path=`$WHICH "$new_path" 2> /dev/null`
38672    # bat and cmd files are not always considered executable in cygwin causing which
38673    # to not find them
38674    if test "x$new_path" = x \
38675        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38676        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38677      new_path=`$CYGPATH -u "$path"`
38678    fi
38679    if test "x$new_path" = x; then
38680      # It's still not found. Now this is an unrecoverable error.
38681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38682$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38683      has_space=`$ECHO "$complete" | $GREP " "`
38684      if test "x$has_space" != x; then
38685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38687      fi
38688      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38689    fi
38690  fi
38691
38692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38695  # "foo.exe" is OK but "foo" is an error.
38696  #
38697  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38698  # It is also a way to make sure we got the proper file name for the real test later on.
38699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38700  if test "x$test_shortpath" = x; then
38701    # Short path failed, file does not exist as specified.
38702    # Try adding .exe or .cmd
38703    if test -f "${new_path}.exe"; then
38704      input_to_shortpath="${new_path}.exe"
38705    elif test -f "${new_path}.cmd"; then
38706      input_to_shortpath="${new_path}.cmd"
38707    else
38708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38709$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38710      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38711$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38712      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38713    fi
38714  else
38715    input_to_shortpath="$new_path"
38716  fi
38717
38718  # Call helper function which possibly converts this using DOS-style short mode.
38719  # If so, the updated path is stored in $new_path.
38720  new_path="$input_to_shortpath"
38721
38722  input_path="$input_to_shortpath"
38723  # Check if we need to convert this using DOS-style short mode. If the path
38724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38725  # take no chances and rewrite it.
38726  # Note: m4 eats our [], so we need to use [ and ] instead.
38727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38728  if test "x$has_forbidden_chars" != x; then
38729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38733      # Going to short mode and back again did indeed matter. Since short mode is
38734      # case insensitive, let's make it lowercase to improve readability.
38735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38736      # Now convert it back to Unix-style (cygpath)
38737      input_path=`$CYGPATH -u "$shortmode_path"`
38738      new_path="$input_path"
38739    fi
38740  fi
38741
38742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38743  if test "x$test_cygdrive_prefix" = x; then
38744    # As a simple fix, exclude /usr/bin since it's not a real path.
38745    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38747      # a path prefixed by /cygdrive for fixpath to work.
38748      new_path="$CYGWIN_ROOT_PATH$input_path"
38749    fi
38750  fi
38751
38752  # remove trailing .exe if any
38753  new_path="${new_path/%.exe/}"
38754
38755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756
38757  # First separate the path from the arguments. This will split at the first
38758  # space.
38759  complete="$NM"
38760  path="${complete%% *}"
38761  tmp="$complete EOL"
38762  arguments="${tmp#* }"
38763
38764  # Input might be given as Windows format, start by converting to
38765  # unix format.
38766  new_path="$path"
38767
38768  windows_path="$new_path"
38769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38770    unix_path=`$CYGPATH -u "$windows_path"`
38771    new_path="$unix_path"
38772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38774    new_path="$unix_path"
38775  fi
38776
38777
38778  # Now try to locate executable using which
38779  new_path=`$WHICH "$new_path" 2> /dev/null`
38780
38781  if test "x$new_path" = x; then
38782    # Oops. Which didn't find the executable.
38783    # The splitting of arguments from the executable at a space might have been incorrect,
38784    # since paths with space are more likely in Windows. Give it another try with the whole
38785    # argument.
38786    path="$complete"
38787    arguments="EOL"
38788    new_path="$path"
38789
38790  windows_path="$new_path"
38791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38792    unix_path=`$CYGPATH -u "$windows_path"`
38793    new_path="$unix_path"
38794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38796    new_path="$unix_path"
38797  fi
38798
38799
38800    new_path=`$WHICH "$new_path" 2> /dev/null`
38801    # bat and cmd files are not always considered executable in MSYS causing which
38802    # to not find them
38803    if test "x$new_path" = x \
38804        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38805        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38806      new_path="$path"
38807
38808  windows_path="$new_path"
38809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38810    unix_path=`$CYGPATH -u "$windows_path"`
38811    new_path="$unix_path"
38812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38814    new_path="$unix_path"
38815  fi
38816
38817    fi
38818
38819    if test "x$new_path" = x; then
38820      # It's still not found. Now this is an unrecoverable error.
38821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38822$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38823      has_space=`$ECHO "$complete" | $GREP " "`
38824      if test "x$has_space" != x; then
38825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38827      fi
38828      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38829    fi
38830  fi
38831
38832  # Now new_path has a complete unix path to the binary
38833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38834    # Keep paths in /bin as-is, but remove trailing .exe if any
38835    new_path="${new_path/%.exe/}"
38836    # Do not save /bin paths to all_fixpath_prefixes!
38837  else
38838    # Not in mixed or Windows style, start by that.
38839    new_path=`cmd //c echo $new_path`
38840
38841  input_path="$new_path"
38842  # Check if we need to convert this using DOS-style short mode. If the path
38843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38844  # take no chances and rewrite it.
38845  # Note: m4 eats our [], so we need to use [ and ] instead.
38846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38847  if test "x$has_forbidden_chars" != x; then
38848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38850  fi
38851
38852    # Output is in $new_path
38853
38854  windows_path="$new_path"
38855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38856    unix_path=`$CYGPATH -u "$windows_path"`
38857    new_path="$unix_path"
38858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38860    new_path="$unix_path"
38861  fi
38862
38863    # remove trailing .exe if any
38864    new_path="${new_path/%.exe/}"
38865
38866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38868  fi
38869
38870    else
38871      # We're on a unix platform. Hooray! :)
38872      # First separate the path from the arguments. This will split at the first
38873      # space.
38874      complete="$NM"
38875      path="${complete%% *}"
38876      tmp="$complete EOL"
38877      arguments="${tmp#* }"
38878
38879      # Cannot rely on the command "which" here since it doesn't always work.
38880      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38881      if test -z "$is_absolute_path"; then
38882        # Path to executable is not absolute. Find it.
38883        IFS_save="$IFS"
38884        IFS=:
38885        for p in $PATH; do
38886          if test -f "$p/$path" && test -x "$p/$path"; then
38887            new_path="$p/$path"
38888            break
38889          fi
38890        done
38891        IFS="$IFS_save"
38892      else
38893        # This is an absolute path, we can use it without further modifications.
38894        new_path="$path"
38895      fi
38896
38897      if test "x$new_path" = x; then
38898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38899$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38900        has_space=`$ECHO "$complete" | $GREP " "`
38901        if test "x$has_space" != x; then
38902          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38904        fi
38905        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38906      fi
38907    fi
38908
38909    # Now join together the path and the arguments once again
38910    if test "x$arguments" != xEOL; then
38911      new_complete="$new_path ${arguments% *}"
38912    else
38913      new_complete="$new_path"
38914    fi
38915
38916    if test "x$complete" != "x$new_complete"; then
38917      NM="$new_complete"
38918      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38919$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38920    fi
38921  fi
38922
38923
38924
38925  # Publish this variable in the help.
38926
38927
38928  if [ -z "${GNM+x}" ]; then
38929    # The variable is not set by user, try to locate tool using the code snippet
38930    for ac_prog in gnm
38931do
38932  # Extract the first word of "$ac_prog", so it can be a program name with args.
38933set dummy $ac_prog; ac_word=$2
38934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38935$as_echo_n "checking for $ac_word... " >&6; }
38936if ${ac_cv_path_GNM+:} false; then :
38937  $as_echo_n "(cached) " >&6
38938else
38939  case $GNM in
38940  [\\/]* | ?:[\\/]*)
38941  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38942  ;;
38943  *)
38944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38945for as_dir in $PATH
38946do
38947  IFS=$as_save_IFS
38948  test -z "$as_dir" && as_dir=.
38949    for ac_exec_ext in '' $ac_executable_extensions; do
38950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38951    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38953    break 2
38954  fi
38955done
38956  done
38957IFS=$as_save_IFS
38958
38959  ;;
38960esac
38961fi
38962GNM=$ac_cv_path_GNM
38963if test -n "$GNM"; then
38964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38965$as_echo "$GNM" >&6; }
38966else
38967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38968$as_echo "no" >&6; }
38969fi
38970
38971
38972  test -n "$GNM" && break
38973done
38974
38975  else
38976    # The variable is set, but is it from the command line or the environment?
38977
38978    # Try to remove the string !GNM! from our list.
38979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38981      # If it failed, the variable was not from the command line. Ignore it,
38982      # but warn the user (except for BASH, which is always set by the calling BASH).
38983      if test "xGNM" != xBASH; then
38984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38985$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38986      fi
38987      # Try to locate tool using the code snippet
38988      for ac_prog in gnm
38989do
38990  # Extract the first word of "$ac_prog", so it can be a program name with args.
38991set dummy $ac_prog; ac_word=$2
38992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38993$as_echo_n "checking for $ac_word... " >&6; }
38994if ${ac_cv_path_GNM+:} false; then :
38995  $as_echo_n "(cached) " >&6
38996else
38997  case $GNM in
38998  [\\/]* | ?:[\\/]*)
38999  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39000  ;;
39001  *)
39002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39003for as_dir in $PATH
39004do
39005  IFS=$as_save_IFS
39006  test -z "$as_dir" && as_dir=.
39007    for ac_exec_ext in '' $ac_executable_extensions; do
39008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39009    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39011    break 2
39012  fi
39013done
39014  done
39015IFS=$as_save_IFS
39016
39017  ;;
39018esac
39019fi
39020GNM=$ac_cv_path_GNM
39021if test -n "$GNM"; then
39022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39023$as_echo "$GNM" >&6; }
39024else
39025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39026$as_echo "no" >&6; }
39027fi
39028
39029
39030  test -n "$GNM" && break
39031done
39032
39033    else
39034      # If it succeeded, then it was overridden by the user. We will use it
39035      # for the tool.
39036
39037      # First remove it from the list of overridden variables, so we can test
39038      # for unknown variables in the end.
39039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39040
39041      # Check if we try to supply an empty value
39042      if test "x$GNM" = x; then
39043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39044$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39046$as_echo_n "checking for GNM... " >&6; }
39047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39048$as_echo "disabled" >&6; }
39049      else
39050        # Check if the provided tool contains a complete path.
39051        tool_specified="$GNM"
39052        tool_basename="${tool_specified##*/}"
39053        if test "x$tool_basename" = "x$tool_specified"; then
39054          # A command without a complete path is provided, search $PATH.
39055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39056$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39057          # Extract the first word of "$tool_basename", so it can be a program name with args.
39058set dummy $tool_basename; ac_word=$2
39059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39060$as_echo_n "checking for $ac_word... " >&6; }
39061if ${ac_cv_path_GNM+:} false; then :
39062  $as_echo_n "(cached) " >&6
39063else
39064  case $GNM in
39065  [\\/]* | ?:[\\/]*)
39066  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39067  ;;
39068  *)
39069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39070for as_dir in $PATH
39071do
39072  IFS=$as_save_IFS
39073  test -z "$as_dir" && as_dir=.
39074    for ac_exec_ext in '' $ac_executable_extensions; do
39075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39076    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39078    break 2
39079  fi
39080done
39081  done
39082IFS=$as_save_IFS
39083
39084  ;;
39085esac
39086fi
39087GNM=$ac_cv_path_GNM
39088if test -n "$GNM"; then
39089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39090$as_echo "$GNM" >&6; }
39091else
39092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39093$as_echo "no" >&6; }
39094fi
39095
39096
39097          if test "x$GNM" = x; then
39098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39099          fi
39100        else
39101          # Otherwise we believe it is a complete path. Use it as it is.
39102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39103$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39105$as_echo_n "checking for GNM... " >&6; }
39106          if test ! -x "$tool_specified"; then
39107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39108$as_echo "not found" >&6; }
39109            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39110          fi
39111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39112$as_echo "$tool_specified" >&6; }
39113        fi
39114      fi
39115    fi
39116
39117  fi
39118
39119
39120
39121  # Only process if variable expands to non-empty
39122
39123  if test "x$GNM" != x; then
39124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39125
39126  # First separate the path from the arguments. This will split at the first
39127  # space.
39128  complete="$GNM"
39129  path="${complete%% *}"
39130  tmp="$complete EOL"
39131  arguments="${tmp#* }"
39132
39133  # Input might be given as Windows format, start by converting to
39134  # unix format.
39135  new_path=`$CYGPATH -u "$path"`
39136
39137  # Now try to locate executable using which
39138  new_path=`$WHICH "$new_path" 2> /dev/null`
39139  # bat and cmd files are not always considered executable in cygwin causing which
39140  # to not find them
39141  if test "x$new_path" = x \
39142      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39143      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39144    new_path=`$CYGPATH -u "$path"`
39145  fi
39146  if test "x$new_path" = x; then
39147    # Oops. Which didn't find the executable.
39148    # The splitting of arguments from the executable at a space might have been incorrect,
39149    # since paths with space are more likely in Windows. Give it another try with the whole
39150    # argument.
39151    path="$complete"
39152    arguments="EOL"
39153    new_path=`$CYGPATH -u "$path"`
39154    new_path=`$WHICH "$new_path" 2> /dev/null`
39155    # bat and cmd files are not always considered executable in cygwin causing which
39156    # to not find them
39157    if test "x$new_path" = x \
39158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39160      new_path=`$CYGPATH -u "$path"`
39161    fi
39162    if test "x$new_path" = x; then
39163      # It's still not found. Now this is an unrecoverable error.
39164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39165$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39166      has_space=`$ECHO "$complete" | $GREP " "`
39167      if test "x$has_space" != x; then
39168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39170      fi
39171      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39172    fi
39173  fi
39174
39175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39178  # "foo.exe" is OK but "foo" is an error.
39179  #
39180  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39181  # It is also a way to make sure we got the proper file name for the real test later on.
39182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39183  if test "x$test_shortpath" = x; then
39184    # Short path failed, file does not exist as specified.
39185    # Try adding .exe or .cmd
39186    if test -f "${new_path}.exe"; then
39187      input_to_shortpath="${new_path}.exe"
39188    elif test -f "${new_path}.cmd"; then
39189      input_to_shortpath="${new_path}.cmd"
39190    else
39191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39192$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39193      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39194$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39195      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39196    fi
39197  else
39198    input_to_shortpath="$new_path"
39199  fi
39200
39201  # Call helper function which possibly converts this using DOS-style short mode.
39202  # If so, the updated path is stored in $new_path.
39203  new_path="$input_to_shortpath"
39204
39205  input_path="$input_to_shortpath"
39206  # Check if we need to convert this using DOS-style short mode. If the path
39207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39208  # take no chances and rewrite it.
39209  # Note: m4 eats our [], so we need to use [ and ] instead.
39210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39211  if test "x$has_forbidden_chars" != x; then
39212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39216      # Going to short mode and back again did indeed matter. Since short mode is
39217      # case insensitive, let's make it lowercase to improve readability.
39218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39219      # Now convert it back to Unix-style (cygpath)
39220      input_path=`$CYGPATH -u "$shortmode_path"`
39221      new_path="$input_path"
39222    fi
39223  fi
39224
39225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39226  if test "x$test_cygdrive_prefix" = x; then
39227    # As a simple fix, exclude /usr/bin since it's not a real path.
39228    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39230      # a path prefixed by /cygdrive for fixpath to work.
39231      new_path="$CYGWIN_ROOT_PATH$input_path"
39232    fi
39233  fi
39234
39235  # remove trailing .exe if any
39236  new_path="${new_path/%.exe/}"
39237
39238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39239
39240  # First separate the path from the arguments. This will split at the first
39241  # space.
39242  complete="$GNM"
39243  path="${complete%% *}"
39244  tmp="$complete EOL"
39245  arguments="${tmp#* }"
39246
39247  # Input might be given as Windows format, start by converting to
39248  # unix format.
39249  new_path="$path"
39250
39251  windows_path="$new_path"
39252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39253    unix_path=`$CYGPATH -u "$windows_path"`
39254    new_path="$unix_path"
39255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39257    new_path="$unix_path"
39258  fi
39259
39260
39261  # Now try to locate executable using which
39262  new_path=`$WHICH "$new_path" 2> /dev/null`
39263
39264  if test "x$new_path" = x; then
39265    # Oops. Which didn't find the executable.
39266    # The splitting of arguments from the executable at a space might have been incorrect,
39267    # since paths with space are more likely in Windows. Give it another try with the whole
39268    # argument.
39269    path="$complete"
39270    arguments="EOL"
39271    new_path="$path"
39272
39273  windows_path="$new_path"
39274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39275    unix_path=`$CYGPATH -u "$windows_path"`
39276    new_path="$unix_path"
39277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39279    new_path="$unix_path"
39280  fi
39281
39282
39283    new_path=`$WHICH "$new_path" 2> /dev/null`
39284    # bat and cmd files are not always considered executable in MSYS causing which
39285    # to not find them
39286    if test "x$new_path" = x \
39287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39289      new_path="$path"
39290
39291  windows_path="$new_path"
39292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39293    unix_path=`$CYGPATH -u "$windows_path"`
39294    new_path="$unix_path"
39295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39297    new_path="$unix_path"
39298  fi
39299
39300    fi
39301
39302    if test "x$new_path" = x; then
39303      # It's still not found. Now this is an unrecoverable error.
39304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39305$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39306      has_space=`$ECHO "$complete" | $GREP " "`
39307      if test "x$has_space" != x; then
39308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39310      fi
39311      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39312    fi
39313  fi
39314
39315  # Now new_path has a complete unix path to the binary
39316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39317    # Keep paths in /bin as-is, but remove trailing .exe if any
39318    new_path="${new_path/%.exe/}"
39319    # Do not save /bin paths to all_fixpath_prefixes!
39320  else
39321    # Not in mixed or Windows style, start by that.
39322    new_path=`cmd //c echo $new_path`
39323
39324  input_path="$new_path"
39325  # Check if we need to convert this using DOS-style short mode. If the path
39326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39327  # take no chances and rewrite it.
39328  # Note: m4 eats our [], so we need to use [ and ] instead.
39329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39330  if test "x$has_forbidden_chars" != x; then
39331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39333  fi
39334
39335    # Output is in $new_path
39336
39337  windows_path="$new_path"
39338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39339    unix_path=`$CYGPATH -u "$windows_path"`
39340    new_path="$unix_path"
39341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39343    new_path="$unix_path"
39344  fi
39345
39346    # remove trailing .exe if any
39347    new_path="${new_path/%.exe/}"
39348
39349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39351  fi
39352
39353    else
39354      # We're on a unix platform. Hooray! :)
39355      # First separate the path from the arguments. This will split at the first
39356      # space.
39357      complete="$GNM"
39358      path="${complete%% *}"
39359      tmp="$complete EOL"
39360      arguments="${tmp#* }"
39361
39362      # Cannot rely on the command "which" here since it doesn't always work.
39363      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39364      if test -z "$is_absolute_path"; then
39365        # Path to executable is not absolute. Find it.
39366        IFS_save="$IFS"
39367        IFS=:
39368        for p in $PATH; do
39369          if test -f "$p/$path" && test -x "$p/$path"; then
39370            new_path="$p/$path"
39371            break
39372          fi
39373        done
39374        IFS="$IFS_save"
39375      else
39376        # This is an absolute path, we can use it without further modifications.
39377        new_path="$path"
39378      fi
39379
39380      if test "x$new_path" = x; then
39381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39382$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39383        has_space=`$ECHO "$complete" | $GREP " "`
39384        if test "x$has_space" != x; then
39385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39387        fi
39388        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39389      fi
39390    fi
39391
39392    # Now join together the path and the arguments once again
39393    if test "x$arguments" != xEOL; then
39394      new_complete="$new_path ${arguments% *}"
39395    else
39396      new_complete="$new_path"
39397    fi
39398
39399    if test "x$complete" != "x$new_complete"; then
39400      GNM="$new_complete"
39401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39402$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39403    fi
39404  fi
39405
39406  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39407    # FIXME: we should unify this with the solaris case above.
39408
39409
39410  # Publish this variable in the help.
39411
39412
39413  if [ -z "${STRIP+x}" ]; then
39414    # The variable is not set by user, try to locate tool using the code snippet
39415    if test -n "$ac_tool_prefix"; then
39416  for ac_prog in strip
39417  do
39418    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39419set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39421$as_echo_n "checking for $ac_word... " >&6; }
39422if ${ac_cv_prog_STRIP+:} false; then :
39423  $as_echo_n "(cached) " >&6
39424else
39425  if test -n "$STRIP"; then
39426  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39427else
39428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39429for as_dir in $PATH
39430do
39431  IFS=$as_save_IFS
39432  test -z "$as_dir" && as_dir=.
39433    for ac_exec_ext in '' $ac_executable_extensions; do
39434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39435    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39437    break 2
39438  fi
39439done
39440  done
39441IFS=$as_save_IFS
39442
39443fi
39444fi
39445STRIP=$ac_cv_prog_STRIP
39446if test -n "$STRIP"; then
39447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39448$as_echo "$STRIP" >&6; }
39449else
39450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39451$as_echo "no" >&6; }
39452fi
39453
39454
39455    test -n "$STRIP" && break
39456  done
39457fi
39458if test -z "$STRIP"; then
39459  ac_ct_STRIP=$STRIP
39460  for ac_prog in strip
39461do
39462  # Extract the first word of "$ac_prog", so it can be a program name with args.
39463set dummy $ac_prog; ac_word=$2
39464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39465$as_echo_n "checking for $ac_word... " >&6; }
39466if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39467  $as_echo_n "(cached) " >&6
39468else
39469  if test -n "$ac_ct_STRIP"; then
39470  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39471else
39472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39473for as_dir in $PATH
39474do
39475  IFS=$as_save_IFS
39476  test -z "$as_dir" && as_dir=.
39477    for ac_exec_ext in '' $ac_executable_extensions; do
39478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39479    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39481    break 2
39482  fi
39483done
39484  done
39485IFS=$as_save_IFS
39486
39487fi
39488fi
39489ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39490if test -n "$ac_ct_STRIP"; then
39491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39492$as_echo "$ac_ct_STRIP" >&6; }
39493else
39494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39495$as_echo "no" >&6; }
39496fi
39497
39498
39499  test -n "$ac_ct_STRIP" && break
39500done
39501
39502  if test "x$ac_ct_STRIP" = x; then
39503    STRIP=""
39504  else
39505    case $cross_compiling:$ac_tool_warned in
39506yes:)
39507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39509ac_tool_warned=yes ;;
39510esac
39511    STRIP=$ac_ct_STRIP
39512  fi
39513fi
39514
39515  else
39516    # The variable is set, but is it from the command line or the environment?
39517
39518    # Try to remove the string !STRIP! from our list.
39519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39521      # If it failed, the variable was not from the command line. Ignore it,
39522      # but warn the user (except for BASH, which is always set by the calling BASH).
39523      if test "xSTRIP" != xBASH; then
39524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39525$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39526      fi
39527      # Try to locate tool using the code snippet
39528      if test -n "$ac_tool_prefix"; then
39529  for ac_prog in strip
39530  do
39531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39534$as_echo_n "checking for $ac_word... " >&6; }
39535if ${ac_cv_prog_STRIP+:} false; then :
39536  $as_echo_n "(cached) " >&6
39537else
39538  if test -n "$STRIP"; then
39539  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39540else
39541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39542for as_dir in $PATH
39543do
39544  IFS=$as_save_IFS
39545  test -z "$as_dir" && as_dir=.
39546    for ac_exec_ext in '' $ac_executable_extensions; do
39547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39548    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39550    break 2
39551  fi
39552done
39553  done
39554IFS=$as_save_IFS
39555
39556fi
39557fi
39558STRIP=$ac_cv_prog_STRIP
39559if test -n "$STRIP"; then
39560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39561$as_echo "$STRIP" >&6; }
39562else
39563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39564$as_echo "no" >&6; }
39565fi
39566
39567
39568    test -n "$STRIP" && break
39569  done
39570fi
39571if test -z "$STRIP"; then
39572  ac_ct_STRIP=$STRIP
39573  for ac_prog in strip
39574do
39575  # Extract the first word of "$ac_prog", so it can be a program name with args.
39576set dummy $ac_prog; ac_word=$2
39577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39578$as_echo_n "checking for $ac_word... " >&6; }
39579if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39580  $as_echo_n "(cached) " >&6
39581else
39582  if test -n "$ac_ct_STRIP"; then
39583  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39584else
39585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39586for as_dir in $PATH
39587do
39588  IFS=$as_save_IFS
39589  test -z "$as_dir" && as_dir=.
39590    for ac_exec_ext in '' $ac_executable_extensions; do
39591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39592    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39594    break 2
39595  fi
39596done
39597  done
39598IFS=$as_save_IFS
39599
39600fi
39601fi
39602ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39603if test -n "$ac_ct_STRIP"; then
39604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39605$as_echo "$ac_ct_STRIP" >&6; }
39606else
39607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39608$as_echo "no" >&6; }
39609fi
39610
39611
39612  test -n "$ac_ct_STRIP" && break
39613done
39614
39615  if test "x$ac_ct_STRIP" = x; then
39616    STRIP=""
39617  else
39618    case $cross_compiling:$ac_tool_warned in
39619yes:)
39620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39622ac_tool_warned=yes ;;
39623esac
39624    STRIP=$ac_ct_STRIP
39625  fi
39626fi
39627
39628    else
39629      # If it succeeded, then it was overridden by the user. We will use it
39630      # for the tool.
39631
39632      # First remove it from the list of overridden variables, so we can test
39633      # for unknown variables in the end.
39634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39635
39636      # Check if we try to supply an empty value
39637      if test "x$STRIP" = x; then
39638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39639$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39641$as_echo_n "checking for STRIP... " >&6; }
39642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39643$as_echo "disabled" >&6; }
39644      else
39645        # Check if the provided tool contains a complete path.
39646        tool_specified="$STRIP"
39647        tool_basename="${tool_specified##*/}"
39648        if test "x$tool_basename" = "x$tool_specified"; then
39649          # A command without a complete path is provided, search $PATH.
39650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39651$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39652          # Extract the first word of "$tool_basename", so it can be a program name with args.
39653set dummy $tool_basename; ac_word=$2
39654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39655$as_echo_n "checking for $ac_word... " >&6; }
39656if ${ac_cv_path_STRIP+:} false; then :
39657  $as_echo_n "(cached) " >&6
39658else
39659  case $STRIP in
39660  [\\/]* | ?:[\\/]*)
39661  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39662  ;;
39663  *)
39664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39665for as_dir in $PATH
39666do
39667  IFS=$as_save_IFS
39668  test -z "$as_dir" && as_dir=.
39669    for ac_exec_ext in '' $ac_executable_extensions; do
39670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39671    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39673    break 2
39674  fi
39675done
39676  done
39677IFS=$as_save_IFS
39678
39679  ;;
39680esac
39681fi
39682STRIP=$ac_cv_path_STRIP
39683if test -n "$STRIP"; then
39684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39685$as_echo "$STRIP" >&6; }
39686else
39687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39688$as_echo "no" >&6; }
39689fi
39690
39691
39692          if test "x$STRIP" = x; then
39693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39694          fi
39695        else
39696          # Otherwise we believe it is a complete path. Use it as it is.
39697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39698$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39700$as_echo_n "checking for STRIP... " >&6; }
39701          if test ! -x "$tool_specified"; then
39702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39703$as_echo "not found" >&6; }
39704            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39705          fi
39706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39707$as_echo "$tool_specified" >&6; }
39708        fi
39709      fi
39710    fi
39711
39712  fi
39713
39714
39715
39716  # Only process if variable expands to non-empty
39717
39718  if test "x$STRIP" != x; then
39719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39720
39721  # First separate the path from the arguments. This will split at the first
39722  # space.
39723  complete="$STRIP"
39724  path="${complete%% *}"
39725  tmp="$complete EOL"
39726  arguments="${tmp#* }"
39727
39728  # Input might be given as Windows format, start by converting to
39729  # unix format.
39730  new_path=`$CYGPATH -u "$path"`
39731
39732  # Now try to locate executable using which
39733  new_path=`$WHICH "$new_path" 2> /dev/null`
39734  # bat and cmd files are not always considered executable in cygwin causing which
39735  # to not find them
39736  if test "x$new_path" = x \
39737      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39738      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39739    new_path=`$CYGPATH -u "$path"`
39740  fi
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=`$CYGPATH -u "$path"`
39749    new_path=`$WHICH "$new_path" 2> /dev/null`
39750    # bat and cmd files are not always considered executable in cygwin causing which
39751    # to not find them
39752    if test "x$new_path" = x \
39753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39755      new_path=`$CYGPATH -u "$path"`
39756    fi
39757    if test "x$new_path" = x; then
39758      # It's still not found. Now this is an unrecoverable error.
39759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39760$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39761      has_space=`$ECHO "$complete" | $GREP " "`
39762      if test "x$has_space" != x; then
39763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39765      fi
39766      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39767    fi
39768  fi
39769
39770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39773  # "foo.exe" is OK but "foo" is an error.
39774  #
39775  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39776  # It is also a way to make sure we got the proper file name for the real test later on.
39777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39778  if test "x$test_shortpath" = x; then
39779    # Short path failed, file does not exist as specified.
39780    # Try adding .exe or .cmd
39781    if test -f "${new_path}.exe"; then
39782      input_to_shortpath="${new_path}.exe"
39783    elif test -f "${new_path}.cmd"; then
39784      input_to_shortpath="${new_path}.cmd"
39785    else
39786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39787$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39790      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39791    fi
39792  else
39793    input_to_shortpath="$new_path"
39794  fi
39795
39796  # Call helper function which possibly converts this using DOS-style short mode.
39797  # If so, the updated path is stored in $new_path.
39798  new_path="$input_to_shortpath"
39799
39800  input_path="$input_to_shortpath"
39801  # Check if we need to convert this using DOS-style short mode. If the path
39802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39803  # take no chances and rewrite it.
39804  # Note: m4 eats our [], so we need to use [ and ] instead.
39805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39806  if test "x$has_forbidden_chars" != x; then
39807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39811      # Going to short mode and back again did indeed matter. Since short mode is
39812      # case insensitive, let's make it lowercase to improve readability.
39813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39814      # Now convert it back to Unix-style (cygpath)
39815      input_path=`$CYGPATH -u "$shortmode_path"`
39816      new_path="$input_path"
39817    fi
39818  fi
39819
39820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39821  if test "x$test_cygdrive_prefix" = x; then
39822    # As a simple fix, exclude /usr/bin since it's not a real path.
39823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39825      # a path prefixed by /cygdrive for fixpath to work.
39826      new_path="$CYGWIN_ROOT_PATH$input_path"
39827    fi
39828  fi
39829
39830  # remove trailing .exe if any
39831  new_path="${new_path/%.exe/}"
39832
39833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39834
39835  # First separate the path from the arguments. This will split at the first
39836  # space.
39837  complete="$STRIP"
39838  path="${complete%% *}"
39839  tmp="$complete EOL"
39840  arguments="${tmp#* }"
39841
39842  # Input might be given as Windows format, start by converting to
39843  # unix format.
39844  new_path="$path"
39845
39846  windows_path="$new_path"
39847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39848    unix_path=`$CYGPATH -u "$windows_path"`
39849    new_path="$unix_path"
39850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39852    new_path="$unix_path"
39853  fi
39854
39855
39856  # Now try to locate executable using which
39857  new_path=`$WHICH "$new_path" 2> /dev/null`
39858
39859  if test "x$new_path" = x; then
39860    # Oops. Which didn't find the executable.
39861    # The splitting of arguments from the executable at a space might have been incorrect,
39862    # since paths with space are more likely in Windows. Give it another try with the whole
39863    # argument.
39864    path="$complete"
39865    arguments="EOL"
39866    new_path="$path"
39867
39868  windows_path="$new_path"
39869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39870    unix_path=`$CYGPATH -u "$windows_path"`
39871    new_path="$unix_path"
39872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39874    new_path="$unix_path"
39875  fi
39876
39877
39878    new_path=`$WHICH "$new_path" 2> /dev/null`
39879    # bat and cmd files are not always considered executable in MSYS causing which
39880    # to not find them
39881    if test "x$new_path" = x \
39882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39884      new_path="$path"
39885
39886  windows_path="$new_path"
39887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39888    unix_path=`$CYGPATH -u "$windows_path"`
39889    new_path="$unix_path"
39890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39892    new_path="$unix_path"
39893  fi
39894
39895    fi
39896
39897    if test "x$new_path" = x; then
39898      # It's still not found. Now this is an unrecoverable error.
39899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39900$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39901      has_space=`$ECHO "$complete" | $GREP " "`
39902      if test "x$has_space" != x; then
39903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39905      fi
39906      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39907    fi
39908  fi
39909
39910  # Now new_path has a complete unix path to the binary
39911  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39912    # Keep paths in /bin as-is, but remove trailing .exe if any
39913    new_path="${new_path/%.exe/}"
39914    # Do not save /bin paths to all_fixpath_prefixes!
39915  else
39916    # Not in mixed or Windows style, start by that.
39917    new_path=`cmd //c echo $new_path`
39918
39919  input_path="$new_path"
39920  # Check if we need to convert this using DOS-style short mode. If the path
39921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39922  # take no chances and rewrite it.
39923  # Note: m4 eats our [], so we need to use [ and ] instead.
39924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39925  if test "x$has_forbidden_chars" != x; then
39926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39928  fi
39929
39930    # Output is in $new_path
39931
39932  windows_path="$new_path"
39933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39934    unix_path=`$CYGPATH -u "$windows_path"`
39935    new_path="$unix_path"
39936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39938    new_path="$unix_path"
39939  fi
39940
39941    # remove trailing .exe if any
39942    new_path="${new_path/%.exe/}"
39943
39944    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39945    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39946  fi
39947
39948    else
39949      # We're on a unix platform. Hooray! :)
39950      # First separate the path from the arguments. This will split at the first
39951      # space.
39952      complete="$STRIP"
39953      path="${complete%% *}"
39954      tmp="$complete EOL"
39955      arguments="${tmp#* }"
39956
39957      # Cannot rely on the command "which" here since it doesn't always work.
39958      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39959      if test -z "$is_absolute_path"; then
39960        # Path to executable is not absolute. Find it.
39961        IFS_save="$IFS"
39962        IFS=:
39963        for p in $PATH; do
39964          if test -f "$p/$path" && test -x "$p/$path"; then
39965            new_path="$p/$path"
39966            break
39967          fi
39968        done
39969        IFS="$IFS_save"
39970      else
39971        # This is an absolute path, we can use it without further modifications.
39972        new_path="$path"
39973      fi
39974
39975      if test "x$new_path" = x; then
39976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39977$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39978        has_space=`$ECHO "$complete" | $GREP " "`
39979        if test "x$has_space" != x; then
39980          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39982        fi
39983        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39984      fi
39985    fi
39986
39987    # Now join together the path and the arguments once again
39988    if test "x$arguments" != xEOL; then
39989      new_complete="$new_path ${arguments% *}"
39990    else
39991      new_complete="$new_path"
39992    fi
39993
39994    if test "x$complete" != "x$new_complete"; then
39995      STRIP="$new_complete"
39996      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39997$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39998    fi
39999  fi
40000
40001    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40002
40003
40004  # Publish this variable in the help.
40005
40006
40007  if [ -z "${NM+x}" ]; then
40008    # The variable is not set by user, try to locate tool using the code snippet
40009    if test -n "$ac_tool_prefix"; then
40010  for ac_prog in nm gcc-nm
40011  do
40012    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40013set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40015$as_echo_n "checking for $ac_word... " >&6; }
40016if ${ac_cv_prog_NM+:} false; then :
40017  $as_echo_n "(cached) " >&6
40018else
40019  if test -n "$NM"; then
40020  ac_cv_prog_NM="$NM" # Let the user override the test.
40021else
40022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40023for as_dir in $PATH
40024do
40025  IFS=$as_save_IFS
40026  test -z "$as_dir" && as_dir=.
40027    for ac_exec_ext in '' $ac_executable_extensions; do
40028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40029    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40031    break 2
40032  fi
40033done
40034  done
40035IFS=$as_save_IFS
40036
40037fi
40038fi
40039NM=$ac_cv_prog_NM
40040if test -n "$NM"; then
40041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40042$as_echo "$NM" >&6; }
40043else
40044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40045$as_echo "no" >&6; }
40046fi
40047
40048
40049    test -n "$NM" && break
40050  done
40051fi
40052if test -z "$NM"; then
40053  ac_ct_NM=$NM
40054  for ac_prog in nm gcc-nm
40055do
40056  # Extract the first word of "$ac_prog", so it can be a program name with args.
40057set dummy $ac_prog; ac_word=$2
40058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40059$as_echo_n "checking for $ac_word... " >&6; }
40060if ${ac_cv_prog_ac_ct_NM+:} false; then :
40061  $as_echo_n "(cached) " >&6
40062else
40063  if test -n "$ac_ct_NM"; then
40064  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40065else
40066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40067for as_dir in $PATH
40068do
40069  IFS=$as_save_IFS
40070  test -z "$as_dir" && as_dir=.
40071    for ac_exec_ext in '' $ac_executable_extensions; do
40072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40073    ac_cv_prog_ac_ct_NM="$ac_prog"
40074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40075    break 2
40076  fi
40077done
40078  done
40079IFS=$as_save_IFS
40080
40081fi
40082fi
40083ac_ct_NM=$ac_cv_prog_ac_ct_NM
40084if test -n "$ac_ct_NM"; then
40085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40086$as_echo "$ac_ct_NM" >&6; }
40087else
40088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40089$as_echo "no" >&6; }
40090fi
40091
40092
40093  test -n "$ac_ct_NM" && break
40094done
40095
40096  if test "x$ac_ct_NM" = x; then
40097    NM=""
40098  else
40099    case $cross_compiling:$ac_tool_warned in
40100yes:)
40101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40103ac_tool_warned=yes ;;
40104esac
40105    NM=$ac_ct_NM
40106  fi
40107fi
40108
40109  else
40110    # The variable is set, but is it from the command line or the environment?
40111
40112    # Try to remove the string !NM! from our list.
40113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40115      # If it failed, the variable was not from the command line. Ignore it,
40116      # but warn the user (except for BASH, which is always set by the calling BASH).
40117      if test "xNM" != xBASH; then
40118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40119$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40120      fi
40121      # Try to locate tool using the code snippet
40122      if test -n "$ac_tool_prefix"; then
40123  for ac_prog in nm gcc-nm
40124  do
40125    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40126set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40128$as_echo_n "checking for $ac_word... " >&6; }
40129if ${ac_cv_prog_NM+:} false; then :
40130  $as_echo_n "(cached) " >&6
40131else
40132  if test -n "$NM"; then
40133  ac_cv_prog_NM="$NM" # Let the user override the test.
40134else
40135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40136for as_dir in $PATH
40137do
40138  IFS=$as_save_IFS
40139  test -z "$as_dir" && as_dir=.
40140    for ac_exec_ext in '' $ac_executable_extensions; do
40141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40142    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40144    break 2
40145  fi
40146done
40147  done
40148IFS=$as_save_IFS
40149
40150fi
40151fi
40152NM=$ac_cv_prog_NM
40153if test -n "$NM"; then
40154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40155$as_echo "$NM" >&6; }
40156else
40157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40158$as_echo "no" >&6; }
40159fi
40160
40161
40162    test -n "$NM" && break
40163  done
40164fi
40165if test -z "$NM"; then
40166  ac_ct_NM=$NM
40167  for ac_prog in nm gcc-nm
40168do
40169  # Extract the first word of "$ac_prog", so it can be a program name with args.
40170set dummy $ac_prog; ac_word=$2
40171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40172$as_echo_n "checking for $ac_word... " >&6; }
40173if ${ac_cv_prog_ac_ct_NM+:} false; then :
40174  $as_echo_n "(cached) " >&6
40175else
40176  if test -n "$ac_ct_NM"; then
40177  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40178else
40179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40180for as_dir in $PATH
40181do
40182  IFS=$as_save_IFS
40183  test -z "$as_dir" && as_dir=.
40184    for ac_exec_ext in '' $ac_executable_extensions; do
40185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40186    ac_cv_prog_ac_ct_NM="$ac_prog"
40187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40188    break 2
40189  fi
40190done
40191  done
40192IFS=$as_save_IFS
40193
40194fi
40195fi
40196ac_ct_NM=$ac_cv_prog_ac_ct_NM
40197if test -n "$ac_ct_NM"; then
40198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40199$as_echo "$ac_ct_NM" >&6; }
40200else
40201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40202$as_echo "no" >&6; }
40203fi
40204
40205
40206  test -n "$ac_ct_NM" && break
40207done
40208
40209  if test "x$ac_ct_NM" = x; then
40210    NM=""
40211  else
40212    case $cross_compiling:$ac_tool_warned in
40213yes:)
40214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40216ac_tool_warned=yes ;;
40217esac
40218    NM=$ac_ct_NM
40219  fi
40220fi
40221
40222    else
40223      # If it succeeded, then it was overridden by the user. We will use it
40224      # for the tool.
40225
40226      # First remove it from the list of overridden variables, so we can test
40227      # for unknown variables in the end.
40228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40229
40230      # Check if we try to supply an empty value
40231      if test "x$NM" = x; then
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40233$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40235$as_echo_n "checking for NM... " >&6; }
40236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40237$as_echo "disabled" >&6; }
40238      else
40239        # Check if the provided tool contains a complete path.
40240        tool_specified="$NM"
40241        tool_basename="${tool_specified##*/}"
40242        if test "x$tool_basename" = "x$tool_specified"; then
40243          # A command without a complete path is provided, search $PATH.
40244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40245$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40246          # Extract the first word of "$tool_basename", so it can be a program name with args.
40247set dummy $tool_basename; ac_word=$2
40248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40249$as_echo_n "checking for $ac_word... " >&6; }
40250if ${ac_cv_path_NM+:} false; then :
40251  $as_echo_n "(cached) " >&6
40252else
40253  case $NM in
40254  [\\/]* | ?:[\\/]*)
40255  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40256  ;;
40257  *)
40258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40259for as_dir in $PATH
40260do
40261  IFS=$as_save_IFS
40262  test -z "$as_dir" && as_dir=.
40263    for ac_exec_ext in '' $ac_executable_extensions; do
40264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40265    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40267    break 2
40268  fi
40269done
40270  done
40271IFS=$as_save_IFS
40272
40273  ;;
40274esac
40275fi
40276NM=$ac_cv_path_NM
40277if test -n "$NM"; then
40278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40279$as_echo "$NM" >&6; }
40280else
40281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40282$as_echo "no" >&6; }
40283fi
40284
40285
40286          if test "x$NM" = x; then
40287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40288          fi
40289        else
40290          # Otherwise we believe it is a complete path. Use it as it is.
40291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40292$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40294$as_echo_n "checking for NM... " >&6; }
40295          if test ! -x "$tool_specified"; then
40296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40297$as_echo "not found" >&6; }
40298            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40299          fi
40300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40301$as_echo "$tool_specified" >&6; }
40302        fi
40303      fi
40304    fi
40305
40306  fi
40307
40308
40309    else
40310
40311
40312  # Publish this variable in the help.
40313
40314
40315  if [ -z "${NM+x}" ]; then
40316    # The variable is not set by user, try to locate tool using the code snippet
40317    if test -n "$ac_tool_prefix"; then
40318  for ac_prog in nm
40319  do
40320    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40321set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40323$as_echo_n "checking for $ac_word... " >&6; }
40324if ${ac_cv_prog_NM+:} false; then :
40325  $as_echo_n "(cached) " >&6
40326else
40327  if test -n "$NM"; then
40328  ac_cv_prog_NM="$NM" # Let the user override the test.
40329else
40330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40331for as_dir in $PATH
40332do
40333  IFS=$as_save_IFS
40334  test -z "$as_dir" && as_dir=.
40335    for ac_exec_ext in '' $ac_executable_extensions; do
40336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40337    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40339    break 2
40340  fi
40341done
40342  done
40343IFS=$as_save_IFS
40344
40345fi
40346fi
40347NM=$ac_cv_prog_NM
40348if test -n "$NM"; then
40349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40350$as_echo "$NM" >&6; }
40351else
40352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40353$as_echo "no" >&6; }
40354fi
40355
40356
40357    test -n "$NM" && break
40358  done
40359fi
40360if test -z "$NM"; then
40361  ac_ct_NM=$NM
40362  for ac_prog in nm
40363do
40364  # Extract the first word of "$ac_prog", so it can be a program name with args.
40365set dummy $ac_prog; ac_word=$2
40366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40367$as_echo_n "checking for $ac_word... " >&6; }
40368if ${ac_cv_prog_ac_ct_NM+:} false; then :
40369  $as_echo_n "(cached) " >&6
40370else
40371  if test -n "$ac_ct_NM"; then
40372  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40373else
40374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40375for as_dir in $PATH
40376do
40377  IFS=$as_save_IFS
40378  test -z "$as_dir" && as_dir=.
40379    for ac_exec_ext in '' $ac_executable_extensions; do
40380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40381    ac_cv_prog_ac_ct_NM="$ac_prog"
40382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40383    break 2
40384  fi
40385done
40386  done
40387IFS=$as_save_IFS
40388
40389fi
40390fi
40391ac_ct_NM=$ac_cv_prog_ac_ct_NM
40392if test -n "$ac_ct_NM"; then
40393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40394$as_echo "$ac_ct_NM" >&6; }
40395else
40396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40397$as_echo "no" >&6; }
40398fi
40399
40400
40401  test -n "$ac_ct_NM" && break
40402done
40403
40404  if test "x$ac_ct_NM" = x; then
40405    NM=""
40406  else
40407    case $cross_compiling:$ac_tool_warned in
40408yes:)
40409{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40410$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40411ac_tool_warned=yes ;;
40412esac
40413    NM=$ac_ct_NM
40414  fi
40415fi
40416
40417  else
40418    # The variable is set, but is it from the command line or the environment?
40419
40420    # Try to remove the string !NM! from our list.
40421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40423      # If it failed, the variable was not from the command line. Ignore it,
40424      # but warn the user (except for BASH, which is always set by the calling BASH).
40425      if test "xNM" != xBASH; then
40426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40427$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40428      fi
40429      # Try to locate tool using the code snippet
40430      if test -n "$ac_tool_prefix"; then
40431  for ac_prog in nm
40432  do
40433    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40434set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40436$as_echo_n "checking for $ac_word... " >&6; }
40437if ${ac_cv_prog_NM+:} false; then :
40438  $as_echo_n "(cached) " >&6
40439else
40440  if test -n "$NM"; then
40441  ac_cv_prog_NM="$NM" # Let the user override the test.
40442else
40443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40444for as_dir in $PATH
40445do
40446  IFS=$as_save_IFS
40447  test -z "$as_dir" && as_dir=.
40448    for ac_exec_ext in '' $ac_executable_extensions; do
40449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40450    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40452    break 2
40453  fi
40454done
40455  done
40456IFS=$as_save_IFS
40457
40458fi
40459fi
40460NM=$ac_cv_prog_NM
40461if test -n "$NM"; then
40462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40463$as_echo "$NM" >&6; }
40464else
40465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40466$as_echo "no" >&6; }
40467fi
40468
40469
40470    test -n "$NM" && break
40471  done
40472fi
40473if test -z "$NM"; then
40474  ac_ct_NM=$NM
40475  for ac_prog in nm
40476do
40477  # Extract the first word of "$ac_prog", so it can be a program name with args.
40478set dummy $ac_prog; ac_word=$2
40479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40480$as_echo_n "checking for $ac_word... " >&6; }
40481if ${ac_cv_prog_ac_ct_NM+:} false; then :
40482  $as_echo_n "(cached) " >&6
40483else
40484  if test -n "$ac_ct_NM"; then
40485  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40486else
40487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40488for as_dir in $PATH
40489do
40490  IFS=$as_save_IFS
40491  test -z "$as_dir" && as_dir=.
40492    for ac_exec_ext in '' $ac_executable_extensions; do
40493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40494    ac_cv_prog_ac_ct_NM="$ac_prog"
40495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40496    break 2
40497  fi
40498done
40499  done
40500IFS=$as_save_IFS
40501
40502fi
40503fi
40504ac_ct_NM=$ac_cv_prog_ac_ct_NM
40505if test -n "$ac_ct_NM"; then
40506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40507$as_echo "$ac_ct_NM" >&6; }
40508else
40509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40510$as_echo "no" >&6; }
40511fi
40512
40513
40514  test -n "$ac_ct_NM" && break
40515done
40516
40517  if test "x$ac_ct_NM" = x; then
40518    NM=""
40519  else
40520    case $cross_compiling:$ac_tool_warned in
40521yes:)
40522{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40524ac_tool_warned=yes ;;
40525esac
40526    NM=$ac_ct_NM
40527  fi
40528fi
40529
40530    else
40531      # If it succeeded, then it was overridden by the user. We will use it
40532      # for the tool.
40533
40534      # First remove it from the list of overridden variables, so we can test
40535      # for unknown variables in the end.
40536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40537
40538      # Check if we try to supply an empty value
40539      if test "x$NM" = x; then
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40541$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40543$as_echo_n "checking for NM... " >&6; }
40544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40545$as_echo "disabled" >&6; }
40546      else
40547        # Check if the provided tool contains a complete path.
40548        tool_specified="$NM"
40549        tool_basename="${tool_specified##*/}"
40550        if test "x$tool_basename" = "x$tool_specified"; then
40551          # A command without a complete path is provided, search $PATH.
40552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40553$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40554          # Extract the first word of "$tool_basename", so it can be a program name with args.
40555set dummy $tool_basename; ac_word=$2
40556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40557$as_echo_n "checking for $ac_word... " >&6; }
40558if ${ac_cv_path_NM+:} false; then :
40559  $as_echo_n "(cached) " >&6
40560else
40561  case $NM in
40562  [\\/]* | ?:[\\/]*)
40563  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40564  ;;
40565  *)
40566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40567for as_dir in $PATH
40568do
40569  IFS=$as_save_IFS
40570  test -z "$as_dir" && as_dir=.
40571    for ac_exec_ext in '' $ac_executable_extensions; do
40572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40573    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40575    break 2
40576  fi
40577done
40578  done
40579IFS=$as_save_IFS
40580
40581  ;;
40582esac
40583fi
40584NM=$ac_cv_path_NM
40585if test -n "$NM"; then
40586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40587$as_echo "$NM" >&6; }
40588else
40589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40590$as_echo "no" >&6; }
40591fi
40592
40593
40594          if test "x$NM" = x; then
40595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40596          fi
40597        else
40598          # Otherwise we believe it is a complete path. Use it as it is.
40599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40600$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40602$as_echo_n "checking for NM... " >&6; }
40603          if test ! -x "$tool_specified"; then
40604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40605$as_echo "not found" >&6; }
40606            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40607          fi
40608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40609$as_echo "$tool_specified" >&6; }
40610        fi
40611      fi
40612    fi
40613
40614  fi
40615
40616
40617    fi
40618
40619  # Only process if variable expands to non-empty
40620
40621  if test "x$NM" != x; then
40622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40623
40624  # First separate the path from the arguments. This will split at the first
40625  # space.
40626  complete="$NM"
40627  path="${complete%% *}"
40628  tmp="$complete EOL"
40629  arguments="${tmp#* }"
40630
40631  # Input might be given as Windows format, start by converting to
40632  # unix format.
40633  new_path=`$CYGPATH -u "$path"`
40634
40635  # Now try to locate executable using which
40636  new_path=`$WHICH "$new_path" 2> /dev/null`
40637  # bat and cmd files are not always considered executable in cygwin causing which
40638  # to not find them
40639  if test "x$new_path" = x \
40640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40642    new_path=`$CYGPATH -u "$path"`
40643  fi
40644  if test "x$new_path" = x; then
40645    # Oops. Which didn't find the executable.
40646    # The splitting of arguments from the executable at a space might have been incorrect,
40647    # since paths with space are more likely in Windows. Give it another try with the whole
40648    # argument.
40649    path="$complete"
40650    arguments="EOL"
40651    new_path=`$CYGPATH -u "$path"`
40652    new_path=`$WHICH "$new_path" 2> /dev/null`
40653    # bat and cmd files are not always considered executable in cygwin causing which
40654    # to not find them
40655    if test "x$new_path" = x \
40656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40658      new_path=`$CYGPATH -u "$path"`
40659    fi
40660    if test "x$new_path" = x; then
40661      # It's still not found. Now this is an unrecoverable error.
40662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40663$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40664      has_space=`$ECHO "$complete" | $GREP " "`
40665      if test "x$has_space" != x; then
40666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40668      fi
40669      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40670    fi
40671  fi
40672
40673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40676  # "foo.exe" is OK but "foo" is an error.
40677  #
40678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40679  # It is also a way to make sure we got the proper file name for the real test later on.
40680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40681  if test "x$test_shortpath" = x; then
40682    # Short path failed, file does not exist as specified.
40683    # Try adding .exe or .cmd
40684    if test -f "${new_path}.exe"; then
40685      input_to_shortpath="${new_path}.exe"
40686    elif test -f "${new_path}.cmd"; then
40687      input_to_shortpath="${new_path}.cmd"
40688    else
40689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40690$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40693      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40694    fi
40695  else
40696    input_to_shortpath="$new_path"
40697  fi
40698
40699  # Call helper function which possibly converts this using DOS-style short mode.
40700  # If so, the updated path is stored in $new_path.
40701  new_path="$input_to_shortpath"
40702
40703  input_path="$input_to_shortpath"
40704  # Check if we need to convert this using DOS-style short mode. If the path
40705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40706  # take no chances and rewrite it.
40707  # Note: m4 eats our [], so we need to use [ and ] instead.
40708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40709  if test "x$has_forbidden_chars" != x; then
40710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40714      # Going to short mode and back again did indeed matter. Since short mode is
40715      # case insensitive, let's make it lowercase to improve readability.
40716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40717      # Now convert it back to Unix-style (cygpath)
40718      input_path=`$CYGPATH -u "$shortmode_path"`
40719      new_path="$input_path"
40720    fi
40721  fi
40722
40723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40724  if test "x$test_cygdrive_prefix" = x; then
40725    # As a simple fix, exclude /usr/bin since it's not a real path.
40726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40728      # a path prefixed by /cygdrive for fixpath to work.
40729      new_path="$CYGWIN_ROOT_PATH$input_path"
40730    fi
40731  fi
40732
40733  # remove trailing .exe if any
40734  new_path="${new_path/%.exe/}"
40735
40736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40737
40738  # First separate the path from the arguments. This will split at the first
40739  # space.
40740  complete="$NM"
40741  path="${complete%% *}"
40742  tmp="$complete EOL"
40743  arguments="${tmp#* }"
40744
40745  # Input might be given as Windows format, start by converting to
40746  # unix format.
40747  new_path="$path"
40748
40749  windows_path="$new_path"
40750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40751    unix_path=`$CYGPATH -u "$windows_path"`
40752    new_path="$unix_path"
40753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40755    new_path="$unix_path"
40756  fi
40757
40758
40759  # Now try to locate executable using which
40760  new_path=`$WHICH "$new_path" 2> /dev/null`
40761
40762  if test "x$new_path" = x; then
40763    # Oops. Which didn't find the executable.
40764    # The splitting of arguments from the executable at a space might have been incorrect,
40765    # since paths with space are more likely in Windows. Give it another try with the whole
40766    # argument.
40767    path="$complete"
40768    arguments="EOL"
40769    new_path="$path"
40770
40771  windows_path="$new_path"
40772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40773    unix_path=`$CYGPATH -u "$windows_path"`
40774    new_path="$unix_path"
40775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40777    new_path="$unix_path"
40778  fi
40779
40780
40781    new_path=`$WHICH "$new_path" 2> /dev/null`
40782    # bat and cmd files are not always considered executable in MSYS causing which
40783    # to not find them
40784    if test "x$new_path" = x \
40785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40787      new_path="$path"
40788
40789  windows_path="$new_path"
40790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40791    unix_path=`$CYGPATH -u "$windows_path"`
40792    new_path="$unix_path"
40793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40795    new_path="$unix_path"
40796  fi
40797
40798    fi
40799
40800    if test "x$new_path" = x; then
40801      # It's still not found. Now this is an unrecoverable error.
40802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40803$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40804      has_space=`$ECHO "$complete" | $GREP " "`
40805      if test "x$has_space" != x; then
40806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40808      fi
40809      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40810    fi
40811  fi
40812
40813  # Now new_path has a complete unix path to the binary
40814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40815    # Keep paths in /bin as-is, but remove trailing .exe if any
40816    new_path="${new_path/%.exe/}"
40817    # Do not save /bin paths to all_fixpath_prefixes!
40818  else
40819    # Not in mixed or Windows style, start by that.
40820    new_path=`cmd //c echo $new_path`
40821
40822  input_path="$new_path"
40823  # Check if we need to convert this using DOS-style short mode. If the path
40824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40825  # take no chances and rewrite it.
40826  # Note: m4 eats our [], so we need to use [ and ] instead.
40827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40828  if test "x$has_forbidden_chars" != x; then
40829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40831  fi
40832
40833    # Output is in $new_path
40834
40835  windows_path="$new_path"
40836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40837    unix_path=`$CYGPATH -u "$windows_path"`
40838    new_path="$unix_path"
40839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40841    new_path="$unix_path"
40842  fi
40843
40844    # remove trailing .exe if any
40845    new_path="${new_path/%.exe/}"
40846
40847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40849  fi
40850
40851    else
40852      # We're on a unix platform. Hooray! :)
40853      # First separate the path from the arguments. This will split at the first
40854      # space.
40855      complete="$NM"
40856      path="${complete%% *}"
40857      tmp="$complete EOL"
40858      arguments="${tmp#* }"
40859
40860      # Cannot rely on the command "which" here since it doesn't always work.
40861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40862      if test -z "$is_absolute_path"; then
40863        # Path to executable is not absolute. Find it.
40864        IFS_save="$IFS"
40865        IFS=:
40866        for p in $PATH; do
40867          if test -f "$p/$path" && test -x "$p/$path"; then
40868            new_path="$p/$path"
40869            break
40870          fi
40871        done
40872        IFS="$IFS_save"
40873      else
40874        # This is an absolute path, we can use it without further modifications.
40875        new_path="$path"
40876      fi
40877
40878      if test "x$new_path" = x; then
40879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40880$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40881        has_space=`$ECHO "$complete" | $GREP " "`
40882        if test "x$has_space" != x; then
40883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40885        fi
40886        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40887      fi
40888    fi
40889
40890    # Now join together the path and the arguments once again
40891    if test "x$arguments" != xEOL; then
40892      new_complete="$new_path ${arguments% *}"
40893    else
40894      new_complete="$new_path"
40895    fi
40896
40897    if test "x$complete" != "x$new_complete"; then
40898      NM="$new_complete"
40899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40900$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40901    fi
40902  fi
40903
40904    GNM="$NM"
40905
40906  fi
40907
40908  # objcopy is used for moving debug symbols to separate files when
40909  # full debug symbols are enabled.
40910  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40911
40912
40913  # Publish this variable in the help.
40914
40915
40916  if [ -z "${OBJCOPY+x}" ]; then
40917    # The variable is not set by user, try to locate tool using the code snippet
40918    if test -n "$ac_tool_prefix"; then
40919  for ac_prog in gobjcopy objcopy
40920  do
40921    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40922set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40924$as_echo_n "checking for $ac_word... " >&6; }
40925if ${ac_cv_prog_OBJCOPY+:} false; then :
40926  $as_echo_n "(cached) " >&6
40927else
40928  if test -n "$OBJCOPY"; then
40929  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40930else
40931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40932for as_dir in $PATH
40933do
40934  IFS=$as_save_IFS
40935  test -z "$as_dir" && as_dir=.
40936    for ac_exec_ext in '' $ac_executable_extensions; do
40937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40938    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40940    break 2
40941  fi
40942done
40943  done
40944IFS=$as_save_IFS
40945
40946fi
40947fi
40948OBJCOPY=$ac_cv_prog_OBJCOPY
40949if test -n "$OBJCOPY"; then
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40951$as_echo "$OBJCOPY" >&6; }
40952else
40953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40954$as_echo "no" >&6; }
40955fi
40956
40957
40958    test -n "$OBJCOPY" && break
40959  done
40960fi
40961if test -z "$OBJCOPY"; then
40962  ac_ct_OBJCOPY=$OBJCOPY
40963  for ac_prog in gobjcopy objcopy
40964do
40965  # Extract the first word of "$ac_prog", so it can be a program name with args.
40966set dummy $ac_prog; ac_word=$2
40967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40968$as_echo_n "checking for $ac_word... " >&6; }
40969if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40970  $as_echo_n "(cached) " >&6
40971else
40972  if test -n "$ac_ct_OBJCOPY"; then
40973  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40974else
40975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40976for as_dir in $PATH
40977do
40978  IFS=$as_save_IFS
40979  test -z "$as_dir" && as_dir=.
40980    for ac_exec_ext in '' $ac_executable_extensions; do
40981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40982    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40984    break 2
40985  fi
40986done
40987  done
40988IFS=$as_save_IFS
40989
40990fi
40991fi
40992ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40993if test -n "$ac_ct_OBJCOPY"; then
40994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40995$as_echo "$ac_ct_OBJCOPY" >&6; }
40996else
40997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40998$as_echo "no" >&6; }
40999fi
41000
41001
41002  test -n "$ac_ct_OBJCOPY" && break
41003done
41004
41005  if test "x$ac_ct_OBJCOPY" = x; then
41006    OBJCOPY=""
41007  else
41008    case $cross_compiling:$ac_tool_warned in
41009yes:)
41010{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41011$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41012ac_tool_warned=yes ;;
41013esac
41014    OBJCOPY=$ac_ct_OBJCOPY
41015  fi
41016fi
41017
41018  else
41019    # The variable is set, but is it from the command line or the environment?
41020
41021    # Try to remove the string !OBJCOPY! from our list.
41022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41024      # If it failed, the variable was not from the command line. Ignore it,
41025      # but warn the user (except for BASH, which is always set by the calling BASH).
41026      if test "xOBJCOPY" != xBASH; then
41027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41028$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41029      fi
41030      # Try to locate tool using the code snippet
41031      if test -n "$ac_tool_prefix"; then
41032  for ac_prog in gobjcopy objcopy
41033  do
41034    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41035set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41037$as_echo_n "checking for $ac_word... " >&6; }
41038if ${ac_cv_prog_OBJCOPY+:} false; then :
41039  $as_echo_n "(cached) " >&6
41040else
41041  if test -n "$OBJCOPY"; then
41042  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41043else
41044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41045for as_dir in $PATH
41046do
41047  IFS=$as_save_IFS
41048  test -z "$as_dir" && as_dir=.
41049    for ac_exec_ext in '' $ac_executable_extensions; do
41050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41051    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41053    break 2
41054  fi
41055done
41056  done
41057IFS=$as_save_IFS
41058
41059fi
41060fi
41061OBJCOPY=$ac_cv_prog_OBJCOPY
41062if test -n "$OBJCOPY"; then
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41064$as_echo "$OBJCOPY" >&6; }
41065else
41066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41067$as_echo "no" >&6; }
41068fi
41069
41070
41071    test -n "$OBJCOPY" && break
41072  done
41073fi
41074if test -z "$OBJCOPY"; then
41075  ac_ct_OBJCOPY=$OBJCOPY
41076  for ac_prog in gobjcopy objcopy
41077do
41078  # Extract the first word of "$ac_prog", so it can be a program name with args.
41079set dummy $ac_prog; ac_word=$2
41080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41081$as_echo_n "checking for $ac_word... " >&6; }
41082if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41083  $as_echo_n "(cached) " >&6
41084else
41085  if test -n "$ac_ct_OBJCOPY"; then
41086  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41087else
41088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41089for as_dir in $PATH
41090do
41091  IFS=$as_save_IFS
41092  test -z "$as_dir" && as_dir=.
41093    for ac_exec_ext in '' $ac_executable_extensions; do
41094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41095    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41097    break 2
41098  fi
41099done
41100  done
41101IFS=$as_save_IFS
41102
41103fi
41104fi
41105ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41106if test -n "$ac_ct_OBJCOPY"; then
41107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41108$as_echo "$ac_ct_OBJCOPY" >&6; }
41109else
41110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41111$as_echo "no" >&6; }
41112fi
41113
41114
41115  test -n "$ac_ct_OBJCOPY" && break
41116done
41117
41118  if test "x$ac_ct_OBJCOPY" = x; then
41119    OBJCOPY=""
41120  else
41121    case $cross_compiling:$ac_tool_warned in
41122yes:)
41123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41125ac_tool_warned=yes ;;
41126esac
41127    OBJCOPY=$ac_ct_OBJCOPY
41128  fi
41129fi
41130
41131    else
41132      # If it succeeded, then it was overridden by the user. We will use it
41133      # for the tool.
41134
41135      # First remove it from the list of overridden variables, so we can test
41136      # for unknown variables in the end.
41137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41138
41139      # Check if we try to supply an empty value
41140      if test "x$OBJCOPY" = x; then
41141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41142$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41144$as_echo_n "checking for OBJCOPY... " >&6; }
41145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41146$as_echo "disabled" >&6; }
41147      else
41148        # Check if the provided tool contains a complete path.
41149        tool_specified="$OBJCOPY"
41150        tool_basename="${tool_specified##*/}"
41151        if test "x$tool_basename" = "x$tool_specified"; then
41152          # A command without a complete path is provided, search $PATH.
41153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41154$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41155          # Extract the first word of "$tool_basename", so it can be a program name with args.
41156set dummy $tool_basename; ac_word=$2
41157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41158$as_echo_n "checking for $ac_word... " >&6; }
41159if ${ac_cv_path_OBJCOPY+:} false; then :
41160  $as_echo_n "(cached) " >&6
41161else
41162  case $OBJCOPY in
41163  [\\/]* | ?:[\\/]*)
41164  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41165  ;;
41166  *)
41167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41168for as_dir in $PATH
41169do
41170  IFS=$as_save_IFS
41171  test -z "$as_dir" && as_dir=.
41172    for ac_exec_ext in '' $ac_executable_extensions; do
41173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41174    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41176    break 2
41177  fi
41178done
41179  done
41180IFS=$as_save_IFS
41181
41182  ;;
41183esac
41184fi
41185OBJCOPY=$ac_cv_path_OBJCOPY
41186if test -n "$OBJCOPY"; then
41187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41188$as_echo "$OBJCOPY" >&6; }
41189else
41190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41191$as_echo "no" >&6; }
41192fi
41193
41194
41195          if test "x$OBJCOPY" = x; then
41196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41197          fi
41198        else
41199          # Otherwise we believe it is a complete path. Use it as it is.
41200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41201$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41203$as_echo_n "checking for OBJCOPY... " >&6; }
41204          if test ! -x "$tool_specified"; then
41205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41206$as_echo "not found" >&6; }
41207            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41208          fi
41209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41210$as_echo "$tool_specified" >&6; }
41211        fi
41212      fi
41213    fi
41214
41215  fi
41216
41217
41218    # Only call fixup if objcopy was found.
41219    if test -n "$OBJCOPY"; then
41220
41221  # Only process if variable expands to non-empty
41222
41223  if test "x$OBJCOPY" != x; then
41224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41225
41226  # First separate the path from the arguments. This will split at the first
41227  # space.
41228  complete="$OBJCOPY"
41229  path="${complete%% *}"
41230  tmp="$complete EOL"
41231  arguments="${tmp#* }"
41232
41233  # Input might be given as Windows format, start by converting to
41234  # unix format.
41235  new_path=`$CYGPATH -u "$path"`
41236
41237  # Now try to locate executable using which
41238  new_path=`$WHICH "$new_path" 2> /dev/null`
41239  # bat and cmd files are not always considered executable in cygwin causing which
41240  # to not find them
41241  if test "x$new_path" = x \
41242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41244    new_path=`$CYGPATH -u "$path"`
41245  fi
41246  if test "x$new_path" = x; then
41247    # Oops. Which didn't find the executable.
41248    # The splitting of arguments from the executable at a space might have been incorrect,
41249    # since paths with space are more likely in Windows. Give it another try with the whole
41250    # argument.
41251    path="$complete"
41252    arguments="EOL"
41253    new_path=`$CYGPATH -u "$path"`
41254    new_path=`$WHICH "$new_path" 2> /dev/null`
41255    # bat and cmd files are not always considered executable in cygwin causing which
41256    # to not find them
41257    if test "x$new_path" = x \
41258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41260      new_path=`$CYGPATH -u "$path"`
41261    fi
41262    if test "x$new_path" = x; then
41263      # It's still not found. Now this is an unrecoverable error.
41264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41265$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41266      has_space=`$ECHO "$complete" | $GREP " "`
41267      if test "x$has_space" != x; then
41268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41270      fi
41271      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41272    fi
41273  fi
41274
41275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41278  # "foo.exe" is OK but "foo" is an error.
41279  #
41280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41281  # It is also a way to make sure we got the proper file name for the real test later on.
41282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41283  if test "x$test_shortpath" = x; then
41284    # Short path failed, file does not exist as specified.
41285    # Try adding .exe or .cmd
41286    if test -f "${new_path}.exe"; then
41287      input_to_shortpath="${new_path}.exe"
41288    elif test -f "${new_path}.cmd"; then
41289      input_to_shortpath="${new_path}.cmd"
41290    else
41291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41292$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41295      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41296    fi
41297  else
41298    input_to_shortpath="$new_path"
41299  fi
41300
41301  # Call helper function which possibly converts this using DOS-style short mode.
41302  # If so, the updated path is stored in $new_path.
41303  new_path="$input_to_shortpath"
41304
41305  input_path="$input_to_shortpath"
41306  # Check if we need to convert this using DOS-style short mode. If the path
41307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41308  # take no chances and rewrite it.
41309  # Note: m4 eats our [], so we need to use [ and ] instead.
41310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41311  if test "x$has_forbidden_chars" != x; then
41312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41316      # Going to short mode and back again did indeed matter. Since short mode is
41317      # case insensitive, let's make it lowercase to improve readability.
41318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41319      # Now convert it back to Unix-style (cygpath)
41320      input_path=`$CYGPATH -u "$shortmode_path"`
41321      new_path="$input_path"
41322    fi
41323  fi
41324
41325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41326  if test "x$test_cygdrive_prefix" = x; then
41327    # As a simple fix, exclude /usr/bin since it's not a real path.
41328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41330      # a path prefixed by /cygdrive for fixpath to work.
41331      new_path="$CYGWIN_ROOT_PATH$input_path"
41332    fi
41333  fi
41334
41335  # remove trailing .exe if any
41336  new_path="${new_path/%.exe/}"
41337
41338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41339
41340  # First separate the path from the arguments. This will split at the first
41341  # space.
41342  complete="$OBJCOPY"
41343  path="${complete%% *}"
41344  tmp="$complete EOL"
41345  arguments="${tmp#* }"
41346
41347  # Input might be given as Windows format, start by converting to
41348  # unix format.
41349  new_path="$path"
41350
41351  windows_path="$new_path"
41352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41353    unix_path=`$CYGPATH -u "$windows_path"`
41354    new_path="$unix_path"
41355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41357    new_path="$unix_path"
41358  fi
41359
41360
41361  # Now try to locate executable using which
41362  new_path=`$WHICH "$new_path" 2> /dev/null`
41363
41364  if test "x$new_path" = x; then
41365    # Oops. Which didn't find the executable.
41366    # The splitting of arguments from the executable at a space might have been incorrect,
41367    # since paths with space are more likely in Windows. Give it another try with the whole
41368    # argument.
41369    path="$complete"
41370    arguments="EOL"
41371    new_path="$path"
41372
41373  windows_path="$new_path"
41374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41375    unix_path=`$CYGPATH -u "$windows_path"`
41376    new_path="$unix_path"
41377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41379    new_path="$unix_path"
41380  fi
41381
41382
41383    new_path=`$WHICH "$new_path" 2> /dev/null`
41384    # bat and cmd files are not always considered executable in MSYS causing which
41385    # to not find them
41386    if test "x$new_path" = x \
41387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41389      new_path="$path"
41390
41391  windows_path="$new_path"
41392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41393    unix_path=`$CYGPATH -u "$windows_path"`
41394    new_path="$unix_path"
41395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41397    new_path="$unix_path"
41398  fi
41399
41400    fi
41401
41402    if test "x$new_path" = x; then
41403      # It's still not found. Now this is an unrecoverable error.
41404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41405$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41406      has_space=`$ECHO "$complete" | $GREP " "`
41407      if test "x$has_space" != x; then
41408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41410      fi
41411      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41412    fi
41413  fi
41414
41415  # Now new_path has a complete unix path to the binary
41416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41417    # Keep paths in /bin as-is, but remove trailing .exe if any
41418    new_path="${new_path/%.exe/}"
41419    # Do not save /bin paths to all_fixpath_prefixes!
41420  else
41421    # Not in mixed or Windows style, start by that.
41422    new_path=`cmd //c echo $new_path`
41423
41424  input_path="$new_path"
41425  # Check if we need to convert this using DOS-style short mode. If the path
41426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41427  # take no chances and rewrite it.
41428  # Note: m4 eats our [], so we need to use [ and ] instead.
41429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41430  if test "x$has_forbidden_chars" != x; then
41431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41433  fi
41434
41435    # Output is in $new_path
41436
41437  windows_path="$new_path"
41438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41439    unix_path=`$CYGPATH -u "$windows_path"`
41440    new_path="$unix_path"
41441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41443    new_path="$unix_path"
41444  fi
41445
41446    # remove trailing .exe if any
41447    new_path="${new_path/%.exe/}"
41448
41449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41451  fi
41452
41453    else
41454      # We're on a unix platform. Hooray! :)
41455      # First separate the path from the arguments. This will split at the first
41456      # space.
41457      complete="$OBJCOPY"
41458      path="${complete%% *}"
41459      tmp="$complete EOL"
41460      arguments="${tmp#* }"
41461
41462      # Cannot rely on the command "which" here since it doesn't always work.
41463      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41464      if test -z "$is_absolute_path"; then
41465        # Path to executable is not absolute. Find it.
41466        IFS_save="$IFS"
41467        IFS=:
41468        for p in $PATH; do
41469          if test -f "$p/$path" && test -x "$p/$path"; then
41470            new_path="$p/$path"
41471            break
41472          fi
41473        done
41474        IFS="$IFS_save"
41475      else
41476        # This is an absolute path, we can use it without further modifications.
41477        new_path="$path"
41478      fi
41479
41480      if test "x$new_path" = x; then
41481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41482$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41483        has_space=`$ECHO "$complete" | $GREP " "`
41484        if test "x$has_space" != x; then
41485          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41487        fi
41488        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41489      fi
41490    fi
41491
41492    # Now join together the path and the arguments once again
41493    if test "x$arguments" != xEOL; then
41494      new_complete="$new_path ${arguments% *}"
41495    else
41496      new_complete="$new_path"
41497    fi
41498
41499    if test "x$complete" != "x$new_complete"; then
41500      OBJCOPY="$new_complete"
41501      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41502$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41503    fi
41504  fi
41505
41506      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41507        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41508        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41509        # - version number is last blank separate word on first line
41510        # - version number formats that have been seen:
41511        #   - <major>.<minor>
41512        #   - <major>.<minor>.<micro>
41513        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41514        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41515         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41516              -e 's/.* //' \
41517              -e '/^[01]\./b bad' \
41518              -e '/^2\./{' \
41519              -e '  s/^2\.//' \
41520              -e '  /^[0-9]$/b bad' \
41521              -e '  /^[0-9]\./b bad' \
41522              -e '  /^1[0-9]$/b bad' \
41523              -e '  /^1[0-9]\./b bad' \
41524              -e '  /^20\./b bad' \
41525              -e '  /^21\.0$/b bad' \
41526              -e '  /^21\.0\./b bad' \
41527              -e '}' \
41528              -e ':good' \
41529              -e 's/.*/VALID_VERSION/p' \
41530              -e 'q' \
41531              -e ':bad' \
41532              -e 's/.*/BAD_VERSION/p' \
41533              -e 'q'`
41534        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41535          OBJCOPY=
41536          { $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
41537$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41538          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41539$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41540          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41541$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41542          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41543$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41544          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41545$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41546        fi
41547      fi
41548    fi
41549  fi
41550
41551
41552
41553  # Publish this variable in the help.
41554
41555
41556  if [ -z "${OBJDUMP+x}" ]; then
41557    # The variable is not set by user, try to locate tool using the code snippet
41558    if test -n "$ac_tool_prefix"; then
41559  for ac_prog in gobjdump objdump
41560  do
41561    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41564$as_echo_n "checking for $ac_word... " >&6; }
41565if ${ac_cv_prog_OBJDUMP+:} false; then :
41566  $as_echo_n "(cached) " >&6
41567else
41568  if test -n "$OBJDUMP"; then
41569  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41570else
41571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41572for as_dir in $PATH
41573do
41574  IFS=$as_save_IFS
41575  test -z "$as_dir" && as_dir=.
41576    for ac_exec_ext in '' $ac_executable_extensions; do
41577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41578    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41580    break 2
41581  fi
41582done
41583  done
41584IFS=$as_save_IFS
41585
41586fi
41587fi
41588OBJDUMP=$ac_cv_prog_OBJDUMP
41589if test -n "$OBJDUMP"; then
41590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41591$as_echo "$OBJDUMP" >&6; }
41592else
41593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41594$as_echo "no" >&6; }
41595fi
41596
41597
41598    test -n "$OBJDUMP" && break
41599  done
41600fi
41601if test -z "$OBJDUMP"; then
41602  ac_ct_OBJDUMP=$OBJDUMP
41603  for ac_prog in gobjdump objdump
41604do
41605  # Extract the first word of "$ac_prog", so it can be a program name with args.
41606set dummy $ac_prog; ac_word=$2
41607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41608$as_echo_n "checking for $ac_word... " >&6; }
41609if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41610  $as_echo_n "(cached) " >&6
41611else
41612  if test -n "$ac_ct_OBJDUMP"; then
41613  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41614else
41615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41616for as_dir in $PATH
41617do
41618  IFS=$as_save_IFS
41619  test -z "$as_dir" && as_dir=.
41620    for ac_exec_ext in '' $ac_executable_extensions; do
41621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41622    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41624    break 2
41625  fi
41626done
41627  done
41628IFS=$as_save_IFS
41629
41630fi
41631fi
41632ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41633if test -n "$ac_ct_OBJDUMP"; then
41634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41635$as_echo "$ac_ct_OBJDUMP" >&6; }
41636else
41637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41638$as_echo "no" >&6; }
41639fi
41640
41641
41642  test -n "$ac_ct_OBJDUMP" && break
41643done
41644
41645  if test "x$ac_ct_OBJDUMP" = x; then
41646    OBJDUMP=""
41647  else
41648    case $cross_compiling:$ac_tool_warned in
41649yes:)
41650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41652ac_tool_warned=yes ;;
41653esac
41654    OBJDUMP=$ac_ct_OBJDUMP
41655  fi
41656fi
41657
41658  else
41659    # The variable is set, but is it from the command line or the environment?
41660
41661    # Try to remove the string !OBJDUMP! from our list.
41662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41664      # If it failed, the variable was not from the command line. Ignore it,
41665      # but warn the user (except for BASH, which is always set by the calling BASH).
41666      if test "xOBJDUMP" != xBASH; then
41667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41668$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41669      fi
41670      # Try to locate tool using the code snippet
41671      if test -n "$ac_tool_prefix"; then
41672  for ac_prog in gobjdump objdump
41673  do
41674    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41675set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41677$as_echo_n "checking for $ac_word... " >&6; }
41678if ${ac_cv_prog_OBJDUMP+:} false; then :
41679  $as_echo_n "(cached) " >&6
41680else
41681  if test -n "$OBJDUMP"; then
41682  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41683else
41684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41685for as_dir in $PATH
41686do
41687  IFS=$as_save_IFS
41688  test -z "$as_dir" && as_dir=.
41689    for ac_exec_ext in '' $ac_executable_extensions; do
41690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41691    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41693    break 2
41694  fi
41695done
41696  done
41697IFS=$as_save_IFS
41698
41699fi
41700fi
41701OBJDUMP=$ac_cv_prog_OBJDUMP
41702if test -n "$OBJDUMP"; then
41703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41704$as_echo "$OBJDUMP" >&6; }
41705else
41706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41707$as_echo "no" >&6; }
41708fi
41709
41710
41711    test -n "$OBJDUMP" && break
41712  done
41713fi
41714if test -z "$OBJDUMP"; then
41715  ac_ct_OBJDUMP=$OBJDUMP
41716  for ac_prog in gobjdump objdump
41717do
41718  # Extract the first word of "$ac_prog", so it can be a program name with args.
41719set dummy $ac_prog; ac_word=$2
41720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41721$as_echo_n "checking for $ac_word... " >&6; }
41722if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41723  $as_echo_n "(cached) " >&6
41724else
41725  if test -n "$ac_ct_OBJDUMP"; then
41726  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41727else
41728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41729for as_dir in $PATH
41730do
41731  IFS=$as_save_IFS
41732  test -z "$as_dir" && as_dir=.
41733    for ac_exec_ext in '' $ac_executable_extensions; do
41734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41735    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41737    break 2
41738  fi
41739done
41740  done
41741IFS=$as_save_IFS
41742
41743fi
41744fi
41745ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41746if test -n "$ac_ct_OBJDUMP"; then
41747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41748$as_echo "$ac_ct_OBJDUMP" >&6; }
41749else
41750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41751$as_echo "no" >&6; }
41752fi
41753
41754
41755  test -n "$ac_ct_OBJDUMP" && break
41756done
41757
41758  if test "x$ac_ct_OBJDUMP" = x; then
41759    OBJDUMP=""
41760  else
41761    case $cross_compiling:$ac_tool_warned in
41762yes:)
41763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41765ac_tool_warned=yes ;;
41766esac
41767    OBJDUMP=$ac_ct_OBJDUMP
41768  fi
41769fi
41770
41771    else
41772      # If it succeeded, then it was overridden by the user. We will use it
41773      # for the tool.
41774
41775      # First remove it from the list of overridden variables, so we can test
41776      # for unknown variables in the end.
41777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41778
41779      # Check if we try to supply an empty value
41780      if test "x$OBJDUMP" = x; then
41781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41782$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41784$as_echo_n "checking for OBJDUMP... " >&6; }
41785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41786$as_echo "disabled" >&6; }
41787      else
41788        # Check if the provided tool contains a complete path.
41789        tool_specified="$OBJDUMP"
41790        tool_basename="${tool_specified##*/}"
41791        if test "x$tool_basename" = "x$tool_specified"; then
41792          # A command without a complete path is provided, search $PATH.
41793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41794$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41795          # Extract the first word of "$tool_basename", so it can be a program name with args.
41796set dummy $tool_basename; ac_word=$2
41797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41798$as_echo_n "checking for $ac_word... " >&6; }
41799if ${ac_cv_path_OBJDUMP+:} false; then :
41800  $as_echo_n "(cached) " >&6
41801else
41802  case $OBJDUMP in
41803  [\\/]* | ?:[\\/]*)
41804  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41805  ;;
41806  *)
41807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41808for as_dir in $PATH
41809do
41810  IFS=$as_save_IFS
41811  test -z "$as_dir" && as_dir=.
41812    for ac_exec_ext in '' $ac_executable_extensions; do
41813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41814    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41816    break 2
41817  fi
41818done
41819  done
41820IFS=$as_save_IFS
41821
41822  ;;
41823esac
41824fi
41825OBJDUMP=$ac_cv_path_OBJDUMP
41826if test -n "$OBJDUMP"; then
41827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41828$as_echo "$OBJDUMP" >&6; }
41829else
41830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41831$as_echo "no" >&6; }
41832fi
41833
41834
41835          if test "x$OBJDUMP" = x; then
41836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41837          fi
41838        else
41839          # Otherwise we believe it is a complete path. Use it as it is.
41840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41841$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41843$as_echo_n "checking for OBJDUMP... " >&6; }
41844          if test ! -x "$tool_specified"; then
41845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41846$as_echo "not found" >&6; }
41847            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41848          fi
41849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41850$as_echo "$tool_specified" >&6; }
41851        fi
41852      fi
41853    fi
41854
41855  fi
41856
41857
41858  if test "x$OBJDUMP" != x; then
41859    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41860    # bails if argument is missing.
41861
41862  # Only process if variable expands to non-empty
41863
41864  if test "x$OBJDUMP" != x; then
41865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41866
41867  # First separate the path from the arguments. This will split at the first
41868  # space.
41869  complete="$OBJDUMP"
41870  path="${complete%% *}"
41871  tmp="$complete EOL"
41872  arguments="${tmp#* }"
41873
41874  # Input might be given as Windows format, start by converting to
41875  # unix format.
41876  new_path=`$CYGPATH -u "$path"`
41877
41878  # Now try to locate executable using which
41879  new_path=`$WHICH "$new_path" 2> /dev/null`
41880  # bat and cmd files are not always considered executable in cygwin causing which
41881  # to not find them
41882  if test "x$new_path" = x \
41883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41885    new_path=`$CYGPATH -u "$path"`
41886  fi
41887  if test "x$new_path" = x; then
41888    # Oops. Which didn't find the executable.
41889    # The splitting of arguments from the executable at a space might have been incorrect,
41890    # since paths with space are more likely in Windows. Give it another try with the whole
41891    # argument.
41892    path="$complete"
41893    arguments="EOL"
41894    new_path=`$CYGPATH -u "$path"`
41895    new_path=`$WHICH "$new_path" 2> /dev/null`
41896    # bat and cmd files are not always considered executable in cygwin causing which
41897    # to not find them
41898    if test "x$new_path" = x \
41899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41901      new_path=`$CYGPATH -u "$path"`
41902    fi
41903    if test "x$new_path" = x; then
41904      # It's still not found. Now this is an unrecoverable error.
41905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41906$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41907      has_space=`$ECHO "$complete" | $GREP " "`
41908      if test "x$has_space" != x; then
41909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41911      fi
41912      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41913    fi
41914  fi
41915
41916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41919  # "foo.exe" is OK but "foo" is an error.
41920  #
41921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41922  # It is also a way to make sure we got the proper file name for the real test later on.
41923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41924  if test "x$test_shortpath" = x; then
41925    # Short path failed, file does not exist as specified.
41926    # Try adding .exe or .cmd
41927    if test -f "${new_path}.exe"; then
41928      input_to_shortpath="${new_path}.exe"
41929    elif test -f "${new_path}.cmd"; then
41930      input_to_shortpath="${new_path}.cmd"
41931    else
41932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41933$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41936      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41937    fi
41938  else
41939    input_to_shortpath="$new_path"
41940  fi
41941
41942  # Call helper function which possibly converts this using DOS-style short mode.
41943  # If so, the updated path is stored in $new_path.
41944  new_path="$input_to_shortpath"
41945
41946  input_path="$input_to_shortpath"
41947  # Check if we need to convert this using DOS-style short mode. If the path
41948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41949  # take no chances and rewrite it.
41950  # Note: m4 eats our [], so we need to use [ and ] instead.
41951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41952  if test "x$has_forbidden_chars" != x; then
41953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41957      # Going to short mode and back again did indeed matter. Since short mode is
41958      # case insensitive, let's make it lowercase to improve readability.
41959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41960      # Now convert it back to Unix-style (cygpath)
41961      input_path=`$CYGPATH -u "$shortmode_path"`
41962      new_path="$input_path"
41963    fi
41964  fi
41965
41966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41967  if test "x$test_cygdrive_prefix" = x; then
41968    # As a simple fix, exclude /usr/bin since it's not a real path.
41969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41971      # a path prefixed by /cygdrive for fixpath to work.
41972      new_path="$CYGWIN_ROOT_PATH$input_path"
41973    fi
41974  fi
41975
41976  # remove trailing .exe if any
41977  new_path="${new_path/%.exe/}"
41978
41979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41980
41981  # First separate the path from the arguments. This will split at the first
41982  # space.
41983  complete="$OBJDUMP"
41984  path="${complete%% *}"
41985  tmp="$complete EOL"
41986  arguments="${tmp#* }"
41987
41988  # Input might be given as Windows format, start by converting to
41989  # unix format.
41990  new_path="$path"
41991
41992  windows_path="$new_path"
41993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41994    unix_path=`$CYGPATH -u "$windows_path"`
41995    new_path="$unix_path"
41996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41998    new_path="$unix_path"
41999  fi
42000
42001
42002  # Now try to locate executable using which
42003  new_path=`$WHICH "$new_path" 2> /dev/null`
42004
42005  if test "x$new_path" = x; then
42006    # Oops. Which didn't find the executable.
42007    # The splitting of arguments from the executable at a space might have been incorrect,
42008    # since paths with space are more likely in Windows. Give it another try with the whole
42009    # argument.
42010    path="$complete"
42011    arguments="EOL"
42012    new_path="$path"
42013
42014  windows_path="$new_path"
42015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42016    unix_path=`$CYGPATH -u "$windows_path"`
42017    new_path="$unix_path"
42018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42020    new_path="$unix_path"
42021  fi
42022
42023
42024    new_path=`$WHICH "$new_path" 2> /dev/null`
42025    # bat and cmd files are not always considered executable in MSYS causing which
42026    # to not find them
42027    if test "x$new_path" = x \
42028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42030      new_path="$path"
42031
42032  windows_path="$new_path"
42033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42034    unix_path=`$CYGPATH -u "$windows_path"`
42035    new_path="$unix_path"
42036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42038    new_path="$unix_path"
42039  fi
42040
42041    fi
42042
42043    if test "x$new_path" = x; then
42044      # It's still not found. Now this is an unrecoverable error.
42045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42046$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42047      has_space=`$ECHO "$complete" | $GREP " "`
42048      if test "x$has_space" != x; then
42049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42051      fi
42052      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42053    fi
42054  fi
42055
42056  # Now new_path has a complete unix path to the binary
42057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42058    # Keep paths in /bin as-is, but remove trailing .exe if any
42059    new_path="${new_path/%.exe/}"
42060    # Do not save /bin paths to all_fixpath_prefixes!
42061  else
42062    # Not in mixed or Windows style, start by that.
42063    new_path=`cmd //c echo $new_path`
42064
42065  input_path="$new_path"
42066  # Check if we need to convert this using DOS-style short mode. If the path
42067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42068  # take no chances and rewrite it.
42069  # Note: m4 eats our [], so we need to use [ and ] instead.
42070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42071  if test "x$has_forbidden_chars" != x; then
42072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42074  fi
42075
42076    # Output is in $new_path
42077
42078  windows_path="$new_path"
42079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42080    unix_path=`$CYGPATH -u "$windows_path"`
42081    new_path="$unix_path"
42082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42084    new_path="$unix_path"
42085  fi
42086
42087    # remove trailing .exe if any
42088    new_path="${new_path/%.exe/}"
42089
42090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42092  fi
42093
42094    else
42095      # We're on a unix platform. Hooray! :)
42096      # First separate the path from the arguments. This will split at the first
42097      # space.
42098      complete="$OBJDUMP"
42099      path="${complete%% *}"
42100      tmp="$complete EOL"
42101      arguments="${tmp#* }"
42102
42103      # Cannot rely on the command "which" here since it doesn't always work.
42104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42105      if test -z "$is_absolute_path"; then
42106        # Path to executable is not absolute. Find it.
42107        IFS_save="$IFS"
42108        IFS=:
42109        for p in $PATH; do
42110          if test -f "$p/$path" && test -x "$p/$path"; then
42111            new_path="$p/$path"
42112            break
42113          fi
42114        done
42115        IFS="$IFS_save"
42116      else
42117        # This is an absolute path, we can use it without further modifications.
42118        new_path="$path"
42119      fi
42120
42121      if test "x$new_path" = x; then
42122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42123$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42124        has_space=`$ECHO "$complete" | $GREP " "`
42125        if test "x$has_space" != x; then
42126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42128        fi
42129        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42130      fi
42131    fi
42132
42133    # Now join together the path and the arguments once again
42134    if test "x$arguments" != xEOL; then
42135      new_complete="$new_path ${arguments% *}"
42136    else
42137      new_complete="$new_path"
42138    fi
42139
42140    if test "x$complete" != "x$new_complete"; then
42141      OBJDUMP="$new_complete"
42142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42143$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42144    fi
42145  fi
42146
42147  fi
42148
42149
42150  # Restore old path.
42151  PATH="$OLD_PATH"
42152
42153  # Restore the flags to the user specified values.
42154  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42155  CFLAGS="$ORG_CFLAGS"
42156  CXXFLAGS="$ORG_CXXFLAGS"
42157
42158
42159# Finally do some processing after the detection phase
42160
42161  if test "x$COMPILE_TYPE" = "xcross"; then
42162    # Now we need to find a C/C++ compiler that can build executables for the
42163    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42164    # used once. Also, we need to do this without adding a tools dir to the
42165    # path, otherwise we might pick up cross-compilers which don't use standard
42166    # naming.
42167
42168    OLDPATH="$PATH"
42169
42170
42171# Check whether --with-build-devkit was given.
42172if test "${with_build_devkit+set}" = set; then :
42173  withval=$with_build_devkit;
42174fi
42175
42176    if test "x$with_build_devkit" = "xyes"; then
42177      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42178    elif test -n "$with_build_devkit"; then
42179      if test ! -d "$with_build_devkit"; then
42180        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42181      else
42182
42183  # Only process if variable expands to non-empty
42184
42185  if test "x$with_build_devkit" != x; then
42186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42187
42188  # Input might be given as Windows format, start by converting to
42189  # unix format.
42190  path="$with_build_devkit"
42191  new_path=`$CYGPATH -u "$path"`
42192
42193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42196  # "foo.exe" is OK but "foo" is an error.
42197  #
42198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42199  # It is also a way to make sure we got the proper file name for the real test later on.
42200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42201  if test "x$test_shortpath" = x; then
42202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42203$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42204    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42205  fi
42206
42207  # Call helper function which possibly converts this using DOS-style short mode.
42208  # If so, the updated path is stored in $new_path.
42209
42210  input_path="$new_path"
42211  # Check if we need to convert this using DOS-style short mode. If the path
42212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42213  # take no chances and rewrite it.
42214  # Note: m4 eats our [], so we need to use [ and ] instead.
42215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42216  if test "x$has_forbidden_chars" != x; then
42217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42221      # Going to short mode and back again did indeed matter. Since short mode is
42222      # case insensitive, let's make it lowercase to improve readability.
42223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42224      # Now convert it back to Unix-style (cygpath)
42225      input_path=`$CYGPATH -u "$shortmode_path"`
42226      new_path="$input_path"
42227    fi
42228  fi
42229
42230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42231  if test "x$test_cygdrive_prefix" = x; then
42232    # As a simple fix, exclude /usr/bin since it's not a real path.
42233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42235      # a path prefixed by /cygdrive for fixpath to work.
42236      new_path="$CYGWIN_ROOT_PATH$input_path"
42237    fi
42238  fi
42239
42240
42241  if test "x$path" != "x$new_path"; then
42242    with_build_devkit="$new_path"
42243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42244$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42245  fi
42246
42247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42248
42249  path="$with_build_devkit"
42250  has_colon=`$ECHO $path | $GREP ^.:`
42251  new_path="$path"
42252  if test "x$has_colon" = x; then
42253    # Not in mixed or Windows style, start by that.
42254    new_path=`cmd //c echo $path`
42255  fi
42256
42257
42258  input_path="$new_path"
42259  # Check if we need to convert this using DOS-style short mode. If the path
42260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42261  # take no chances and rewrite it.
42262  # Note: m4 eats our [], so we need to use [ and ] instead.
42263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42264  if test "x$has_forbidden_chars" != x; then
42265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42267  fi
42268
42269
42270  windows_path="$new_path"
42271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42272    unix_path=`$CYGPATH -u "$windows_path"`
42273    new_path="$unix_path"
42274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42276    new_path="$unix_path"
42277  fi
42278
42279  if test "x$path" != "x$new_path"; then
42280    with_build_devkit="$new_path"
42281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42282$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42283  fi
42284
42285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42287
42288    else
42289      # We're on a unix platform. Hooray! :)
42290      path="$with_build_devkit"
42291      has_space=`$ECHO "$path" | $GREP " "`
42292      if test "x$has_space" != x; then
42293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42294$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42296      fi
42297
42298      # Use eval to expand a potential ~
42299      eval path="$path"
42300      if test ! -f "$path" && test ! -d "$path"; then
42301        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42302      fi
42303
42304      if test -d "$path"; then
42305        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42306      else
42307        dir="`$DIRNAME "$path"`"
42308        base="`$BASENAME "$path"`"
42309        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
42310      fi
42311    fi
42312  fi
42313
42314        BUILD_DEVKIT_ROOT="$with_build_devkit"
42315        # Check for a meta data info file in the root of the devkit
42316        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42317          # Process devkit.info so that existing devkit variables are not
42318          # modified by this
42319          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42320              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42321              -e "s/\$host/\$build/g" \
42322              $BUILD_DEVKIT_ROOT/devkit.info \
42323              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42324          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42325          # This potentially sets the following:
42326          # A descriptive name of the devkit
42327
42328  if test "x$BUILD_DEVKIT_NAME" = x; then
42329    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42330  fi
42331
42332          # Corresponds to --with-extra-path
42333
42334  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42335    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42336  fi
42337
42338          # Corresponds to --with-toolchain-path
42339
42340  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42341    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42342  fi
42343
42344          # Corresponds to --with-sysroot
42345
42346  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42347    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42348  fi
42349
42350          # Skip the Window specific parts
42351        fi
42352
42353        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42354$as_echo_n "checking for build platform devkit... " >&6; }
42355        if test "x$BUILD_DEVKIT_NAME" != x; then
42356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42357$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42358        else
42359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42360$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42361        fi
42362
42363        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42364
42365  if test "x$BUILD_SYSROOT" != "x"; then
42366    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42367      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42368        # Solaris Studio does not have a concept of sysroot. Instead we must
42369        # make sure the default include and lib dirs are appended to each
42370        # compile and link command line. Must also add -I-xbuiltin to enable
42371        # inlining of system functions and intrinsics.
42372        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
42373        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42374            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42375            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42376      fi
42377    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42378      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42379      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42380    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42381      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42382      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42383    fi
42384    # Propagate the sysroot args to hotspot
42385    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42386    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42387    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42388    # The global CFLAGS and LDFLAGS variables need these for configure to function
42389    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42390    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42391    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42392    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42393  fi
42394
42395  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42396    # We also need -iframework<path>/System/Library/Frameworks
42397    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42398    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42399    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42400    # set this here so it doesn't have to be peppered throughout the forest
42401    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42402    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42403  fi
42404
42405
42406
42407
42408
42409         # Fallback default of just /bin if DEVKIT_PATH is not defined
42410        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42411          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42412        fi
42413        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42414      fi
42415    fi
42416
42417    # FIXME: we should list the discovered compilers as an exclude pattern!
42418    # If we do that, we can do this detection before POST_DETECTION, and still
42419    # find the build compilers in the tools dir, if needed.
42420
42421
42422
42423  # Publish this variable in the help.
42424
42425
42426  if [ -z "${BUILD_CC+x}" ]; then
42427    # The variable is not set by user, try to locate tool using the code snippet
42428    for ac_prog in cl cc gcc
42429do
42430  # Extract the first word of "$ac_prog", so it can be a program name with args.
42431set dummy $ac_prog; ac_word=$2
42432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42433$as_echo_n "checking for $ac_word... " >&6; }
42434if ${ac_cv_path_BUILD_CC+:} false; then :
42435  $as_echo_n "(cached) " >&6
42436else
42437  case $BUILD_CC in
42438  [\\/]* | ?:[\\/]*)
42439  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42440  ;;
42441  *)
42442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42443for as_dir in $PATH
42444do
42445  IFS=$as_save_IFS
42446  test -z "$as_dir" && as_dir=.
42447    for ac_exec_ext in '' $ac_executable_extensions; do
42448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42449    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42451    break 2
42452  fi
42453done
42454  done
42455IFS=$as_save_IFS
42456
42457  ;;
42458esac
42459fi
42460BUILD_CC=$ac_cv_path_BUILD_CC
42461if test -n "$BUILD_CC"; then
42462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42463$as_echo "$BUILD_CC" >&6; }
42464else
42465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42466$as_echo "no" >&6; }
42467fi
42468
42469
42470  test -n "$BUILD_CC" && break
42471done
42472
42473  else
42474    # The variable is set, but is it from the command line or the environment?
42475
42476    # Try to remove the string !BUILD_CC! from our list.
42477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42479      # If it failed, the variable was not from the command line. Ignore it,
42480      # but warn the user (except for BASH, which is always set by the calling BASH).
42481      if test "xBUILD_CC" != xBASH; then
42482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42483$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42484      fi
42485      # Try to locate tool using the code snippet
42486      for ac_prog in cl cc gcc
42487do
42488  # Extract the first word of "$ac_prog", so it can be a program name with args.
42489set dummy $ac_prog; ac_word=$2
42490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42491$as_echo_n "checking for $ac_word... " >&6; }
42492if ${ac_cv_path_BUILD_CC+:} false; then :
42493  $as_echo_n "(cached) " >&6
42494else
42495  case $BUILD_CC in
42496  [\\/]* | ?:[\\/]*)
42497  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42498  ;;
42499  *)
42500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42501for as_dir in $PATH
42502do
42503  IFS=$as_save_IFS
42504  test -z "$as_dir" && as_dir=.
42505    for ac_exec_ext in '' $ac_executable_extensions; do
42506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42507    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42509    break 2
42510  fi
42511done
42512  done
42513IFS=$as_save_IFS
42514
42515  ;;
42516esac
42517fi
42518BUILD_CC=$ac_cv_path_BUILD_CC
42519if test -n "$BUILD_CC"; then
42520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42521$as_echo "$BUILD_CC" >&6; }
42522else
42523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42524$as_echo "no" >&6; }
42525fi
42526
42527
42528  test -n "$BUILD_CC" && break
42529done
42530
42531    else
42532      # If it succeeded, then it was overridden by the user. We will use it
42533      # for the tool.
42534
42535      # First remove it from the list of overridden variables, so we can test
42536      # for unknown variables in the end.
42537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42538
42539      # Check if we try to supply an empty value
42540      if test "x$BUILD_CC" = x; then
42541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42542$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42544$as_echo_n "checking for BUILD_CC... " >&6; }
42545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42546$as_echo "disabled" >&6; }
42547      else
42548        # Check if the provided tool contains a complete path.
42549        tool_specified="$BUILD_CC"
42550        tool_basename="${tool_specified##*/}"
42551        if test "x$tool_basename" = "x$tool_specified"; then
42552          # A command without a complete path is provided, search $PATH.
42553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42554$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42555          # Extract the first word of "$tool_basename", so it can be a program name with args.
42556set dummy $tool_basename; ac_word=$2
42557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42558$as_echo_n "checking for $ac_word... " >&6; }
42559if ${ac_cv_path_BUILD_CC+:} false; then :
42560  $as_echo_n "(cached) " >&6
42561else
42562  case $BUILD_CC in
42563  [\\/]* | ?:[\\/]*)
42564  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42565  ;;
42566  *)
42567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42568for as_dir in $PATH
42569do
42570  IFS=$as_save_IFS
42571  test -z "$as_dir" && as_dir=.
42572    for ac_exec_ext in '' $ac_executable_extensions; do
42573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42574    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42576    break 2
42577  fi
42578done
42579  done
42580IFS=$as_save_IFS
42581
42582  ;;
42583esac
42584fi
42585BUILD_CC=$ac_cv_path_BUILD_CC
42586if test -n "$BUILD_CC"; then
42587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42588$as_echo "$BUILD_CC" >&6; }
42589else
42590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42591$as_echo "no" >&6; }
42592fi
42593
42594
42595          if test "x$BUILD_CC" = x; then
42596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42597          fi
42598        else
42599          # Otherwise we believe it is a complete path. Use it as it is.
42600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42601$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42603$as_echo_n "checking for BUILD_CC... " >&6; }
42604          if test ! -x "$tool_specified"; then
42605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42606$as_echo "not found" >&6; }
42607            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42608          fi
42609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42610$as_echo "$tool_specified" >&6; }
42611        fi
42612      fi
42613    fi
42614
42615  fi
42616
42617
42618
42619  if test "x$BUILD_CC" = x; then
42620    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42621  fi
42622
42623
42624
42625  # Only process if variable expands to non-empty
42626
42627  if test "x$BUILD_CC" != x; then
42628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42629
42630  # First separate the path from the arguments. This will split at the first
42631  # space.
42632  complete="$BUILD_CC"
42633  path="${complete%% *}"
42634  tmp="$complete EOL"
42635  arguments="${tmp#* }"
42636
42637  # Input might be given as Windows format, start by converting to
42638  # unix format.
42639  new_path=`$CYGPATH -u "$path"`
42640
42641  # Now try to locate executable using which
42642  new_path=`$WHICH "$new_path" 2> /dev/null`
42643  # bat and cmd files are not always considered executable in cygwin causing which
42644  # to not find them
42645  if test "x$new_path" = x \
42646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42648    new_path=`$CYGPATH -u "$path"`
42649  fi
42650  if test "x$new_path" = x; then
42651    # Oops. Which didn't find the executable.
42652    # The splitting of arguments from the executable at a space might have been incorrect,
42653    # since paths with space are more likely in Windows. Give it another try with the whole
42654    # argument.
42655    path="$complete"
42656    arguments="EOL"
42657    new_path=`$CYGPATH -u "$path"`
42658    new_path=`$WHICH "$new_path" 2> /dev/null`
42659    # bat and cmd files are not always considered executable in cygwin causing which
42660    # to not find them
42661    if test "x$new_path" = x \
42662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42664      new_path=`$CYGPATH -u "$path"`
42665    fi
42666    if test "x$new_path" = x; then
42667      # It's still not found. Now this is an unrecoverable error.
42668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42669$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42670      has_space=`$ECHO "$complete" | $GREP " "`
42671      if test "x$has_space" != x; then
42672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42674      fi
42675      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42676    fi
42677  fi
42678
42679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42682  # "foo.exe" is OK but "foo" is an error.
42683  #
42684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42685  # It is also a way to make sure we got the proper file name for the real test later on.
42686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42687  if test "x$test_shortpath" = x; then
42688    # Short path failed, file does not exist as specified.
42689    # Try adding .exe or .cmd
42690    if test -f "${new_path}.exe"; then
42691      input_to_shortpath="${new_path}.exe"
42692    elif test -f "${new_path}.cmd"; then
42693      input_to_shortpath="${new_path}.cmd"
42694    else
42695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42696$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42699      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42700    fi
42701  else
42702    input_to_shortpath="$new_path"
42703  fi
42704
42705  # Call helper function which possibly converts this using DOS-style short mode.
42706  # If so, the updated path is stored in $new_path.
42707  new_path="$input_to_shortpath"
42708
42709  input_path="$input_to_shortpath"
42710  # Check if we need to convert this using DOS-style short mode. If the path
42711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42712  # take no chances and rewrite it.
42713  # Note: m4 eats our [], so we need to use [ and ] instead.
42714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42715  if test "x$has_forbidden_chars" != x; then
42716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42720      # Going to short mode and back again did indeed matter. Since short mode is
42721      # case insensitive, let's make it lowercase to improve readability.
42722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42723      # Now convert it back to Unix-style (cygpath)
42724      input_path=`$CYGPATH -u "$shortmode_path"`
42725      new_path="$input_path"
42726    fi
42727  fi
42728
42729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42730  if test "x$test_cygdrive_prefix" = x; then
42731    # As a simple fix, exclude /usr/bin since it's not a real path.
42732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42734      # a path prefixed by /cygdrive for fixpath to work.
42735      new_path="$CYGWIN_ROOT_PATH$input_path"
42736    fi
42737  fi
42738
42739  # remove trailing .exe if any
42740  new_path="${new_path/%.exe/}"
42741
42742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42743
42744  # First separate the path from the arguments. This will split at the first
42745  # space.
42746  complete="$BUILD_CC"
42747  path="${complete%% *}"
42748  tmp="$complete EOL"
42749  arguments="${tmp#* }"
42750
42751  # Input might be given as Windows format, start by converting to
42752  # unix format.
42753  new_path="$path"
42754
42755  windows_path="$new_path"
42756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42757    unix_path=`$CYGPATH -u "$windows_path"`
42758    new_path="$unix_path"
42759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42761    new_path="$unix_path"
42762  fi
42763
42764
42765  # Now try to locate executable using which
42766  new_path=`$WHICH "$new_path" 2> /dev/null`
42767
42768  if test "x$new_path" = x; then
42769    # Oops. Which didn't find the executable.
42770    # The splitting of arguments from the executable at a space might have been incorrect,
42771    # since paths with space are more likely in Windows. Give it another try with the whole
42772    # argument.
42773    path="$complete"
42774    arguments="EOL"
42775    new_path="$path"
42776
42777  windows_path="$new_path"
42778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42779    unix_path=`$CYGPATH -u "$windows_path"`
42780    new_path="$unix_path"
42781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42783    new_path="$unix_path"
42784  fi
42785
42786
42787    new_path=`$WHICH "$new_path" 2> /dev/null`
42788    # bat and cmd files are not always considered executable in MSYS causing which
42789    # to not find them
42790    if test "x$new_path" = x \
42791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42793      new_path="$path"
42794
42795  windows_path="$new_path"
42796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42797    unix_path=`$CYGPATH -u "$windows_path"`
42798    new_path="$unix_path"
42799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42801    new_path="$unix_path"
42802  fi
42803
42804    fi
42805
42806    if test "x$new_path" = x; then
42807      # It's still not found. Now this is an unrecoverable error.
42808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42809$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42810      has_space=`$ECHO "$complete" | $GREP " "`
42811      if test "x$has_space" != x; then
42812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42814      fi
42815      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42816    fi
42817  fi
42818
42819  # Now new_path has a complete unix path to the binary
42820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42821    # Keep paths in /bin as-is, but remove trailing .exe if any
42822    new_path="${new_path/%.exe/}"
42823    # Do not save /bin paths to all_fixpath_prefixes!
42824  else
42825    # Not in mixed or Windows style, start by that.
42826    new_path=`cmd //c echo $new_path`
42827
42828  input_path="$new_path"
42829  # Check if we need to convert this using DOS-style short mode. If the path
42830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42831  # take no chances and rewrite it.
42832  # Note: m4 eats our [], so we need to use [ and ] instead.
42833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42834  if test "x$has_forbidden_chars" != x; then
42835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42837  fi
42838
42839    # Output is in $new_path
42840
42841  windows_path="$new_path"
42842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42843    unix_path=`$CYGPATH -u "$windows_path"`
42844    new_path="$unix_path"
42845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42847    new_path="$unix_path"
42848  fi
42849
42850    # remove trailing .exe if any
42851    new_path="${new_path/%.exe/}"
42852
42853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42855  fi
42856
42857    else
42858      # We're on a unix platform. Hooray! :)
42859      # First separate the path from the arguments. This will split at the first
42860      # space.
42861      complete="$BUILD_CC"
42862      path="${complete%% *}"
42863      tmp="$complete EOL"
42864      arguments="${tmp#* }"
42865
42866      # Cannot rely on the command "which" here since it doesn't always work.
42867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42868      if test -z "$is_absolute_path"; then
42869        # Path to executable is not absolute. Find it.
42870        IFS_save="$IFS"
42871        IFS=:
42872        for p in $PATH; do
42873          if test -f "$p/$path" && test -x "$p/$path"; then
42874            new_path="$p/$path"
42875            break
42876          fi
42877        done
42878        IFS="$IFS_save"
42879      else
42880        # This is an absolute path, we can use it without further modifications.
42881        new_path="$path"
42882      fi
42883
42884      if test "x$new_path" = x; then
42885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42886$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42887        has_space=`$ECHO "$complete" | $GREP " "`
42888        if test "x$has_space" != x; then
42889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42891        fi
42892        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42893      fi
42894    fi
42895
42896    # Now join together the path and the arguments once again
42897    if test "x$arguments" != xEOL; then
42898      new_complete="$new_path ${arguments% *}"
42899    else
42900      new_complete="$new_path"
42901    fi
42902
42903    if test "x$complete" != "x$new_complete"; then
42904      BUILD_CC="$new_complete"
42905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42906$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42907    fi
42908  fi
42909
42910
42911
42912
42913  # Publish this variable in the help.
42914
42915
42916  if [ -z "${BUILD_CXX+x}" ]; then
42917    # The variable is not set by user, try to locate tool using the code snippet
42918    for ac_prog in cl CC g++
42919do
42920  # Extract the first word of "$ac_prog", so it can be a program name with args.
42921set dummy $ac_prog; ac_word=$2
42922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42923$as_echo_n "checking for $ac_word... " >&6; }
42924if ${ac_cv_path_BUILD_CXX+:} false; then :
42925  $as_echo_n "(cached) " >&6
42926else
42927  case $BUILD_CXX in
42928  [\\/]* | ?:[\\/]*)
42929  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42930  ;;
42931  *)
42932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42933for as_dir in $PATH
42934do
42935  IFS=$as_save_IFS
42936  test -z "$as_dir" && as_dir=.
42937    for ac_exec_ext in '' $ac_executable_extensions; do
42938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42939    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42941    break 2
42942  fi
42943done
42944  done
42945IFS=$as_save_IFS
42946
42947  ;;
42948esac
42949fi
42950BUILD_CXX=$ac_cv_path_BUILD_CXX
42951if test -n "$BUILD_CXX"; then
42952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42953$as_echo "$BUILD_CXX" >&6; }
42954else
42955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42956$as_echo "no" >&6; }
42957fi
42958
42959
42960  test -n "$BUILD_CXX" && break
42961done
42962
42963  else
42964    # The variable is set, but is it from the command line or the environment?
42965
42966    # Try to remove the string !BUILD_CXX! from our list.
42967    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42968    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42969      # If it failed, the variable was not from the command line. Ignore it,
42970      # but warn the user (except for BASH, which is always set by the calling BASH).
42971      if test "xBUILD_CXX" != xBASH; then
42972        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42973$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42974      fi
42975      # Try to locate tool using the code snippet
42976      for ac_prog in cl CC g++
42977do
42978  # Extract the first word of "$ac_prog", so it can be a program name with args.
42979set dummy $ac_prog; ac_word=$2
42980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42981$as_echo_n "checking for $ac_word... " >&6; }
42982if ${ac_cv_path_BUILD_CXX+:} false; then :
42983  $as_echo_n "(cached) " >&6
42984else
42985  case $BUILD_CXX in
42986  [\\/]* | ?:[\\/]*)
42987  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42988  ;;
42989  *)
42990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42991for as_dir in $PATH
42992do
42993  IFS=$as_save_IFS
42994  test -z "$as_dir" && as_dir=.
42995    for ac_exec_ext in '' $ac_executable_extensions; do
42996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42997    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42999    break 2
43000  fi
43001done
43002  done
43003IFS=$as_save_IFS
43004
43005  ;;
43006esac
43007fi
43008BUILD_CXX=$ac_cv_path_BUILD_CXX
43009if test -n "$BUILD_CXX"; then
43010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43011$as_echo "$BUILD_CXX" >&6; }
43012else
43013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43014$as_echo "no" >&6; }
43015fi
43016
43017
43018  test -n "$BUILD_CXX" && break
43019done
43020
43021    else
43022      # If it succeeded, then it was overridden by the user. We will use it
43023      # for the tool.
43024
43025      # First remove it from the list of overridden variables, so we can test
43026      # for unknown variables in the end.
43027      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43028
43029      # Check if we try to supply an empty value
43030      if test "x$BUILD_CXX" = x; then
43031        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43032$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43034$as_echo_n "checking for BUILD_CXX... " >&6; }
43035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43036$as_echo "disabled" >&6; }
43037      else
43038        # Check if the provided tool contains a complete path.
43039        tool_specified="$BUILD_CXX"
43040        tool_basename="${tool_specified##*/}"
43041        if test "x$tool_basename" = "x$tool_specified"; then
43042          # A command without a complete path is provided, search $PATH.
43043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43044$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43045          # Extract the first word of "$tool_basename", so it can be a program name with args.
43046set dummy $tool_basename; ac_word=$2
43047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43048$as_echo_n "checking for $ac_word... " >&6; }
43049if ${ac_cv_path_BUILD_CXX+:} false; then :
43050  $as_echo_n "(cached) " >&6
43051else
43052  case $BUILD_CXX in
43053  [\\/]* | ?:[\\/]*)
43054  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43055  ;;
43056  *)
43057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43058for as_dir in $PATH
43059do
43060  IFS=$as_save_IFS
43061  test -z "$as_dir" && as_dir=.
43062    for ac_exec_ext in '' $ac_executable_extensions; do
43063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43064    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43066    break 2
43067  fi
43068done
43069  done
43070IFS=$as_save_IFS
43071
43072  ;;
43073esac
43074fi
43075BUILD_CXX=$ac_cv_path_BUILD_CXX
43076if test -n "$BUILD_CXX"; then
43077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43078$as_echo "$BUILD_CXX" >&6; }
43079else
43080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43081$as_echo "no" >&6; }
43082fi
43083
43084
43085          if test "x$BUILD_CXX" = x; then
43086            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43087          fi
43088        else
43089          # Otherwise we believe it is a complete path. Use it as it is.
43090          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43091$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43092          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43093$as_echo_n "checking for BUILD_CXX... " >&6; }
43094          if test ! -x "$tool_specified"; then
43095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43096$as_echo "not found" >&6; }
43097            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43098          fi
43099          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43100$as_echo "$tool_specified" >&6; }
43101        fi
43102      fi
43103    fi
43104
43105  fi
43106
43107
43108
43109  if test "x$BUILD_CXX" = x; then
43110    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43111  fi
43112
43113
43114
43115  # Only process if variable expands to non-empty
43116
43117  if test "x$BUILD_CXX" != x; then
43118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43119
43120  # First separate the path from the arguments. This will split at the first
43121  # space.
43122  complete="$BUILD_CXX"
43123  path="${complete%% *}"
43124  tmp="$complete EOL"
43125  arguments="${tmp#* }"
43126
43127  # Input might be given as Windows format, start by converting to
43128  # unix format.
43129  new_path=`$CYGPATH -u "$path"`
43130
43131  # Now try to locate executable using which
43132  new_path=`$WHICH "$new_path" 2> /dev/null`
43133  # bat and cmd files are not always considered executable in cygwin causing which
43134  # to not find them
43135  if test "x$new_path" = x \
43136      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43137      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43138    new_path=`$CYGPATH -u "$path"`
43139  fi
43140  if test "x$new_path" = x; then
43141    # Oops. Which didn't find the executable.
43142    # The splitting of arguments from the executable at a space might have been incorrect,
43143    # since paths with space are more likely in Windows. Give it another try with the whole
43144    # argument.
43145    path="$complete"
43146    arguments="EOL"
43147    new_path=`$CYGPATH -u "$path"`
43148    new_path=`$WHICH "$new_path" 2> /dev/null`
43149    # bat and cmd files are not always considered executable in cygwin causing which
43150    # to not find them
43151    if test "x$new_path" = x \
43152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43154      new_path=`$CYGPATH -u "$path"`
43155    fi
43156    if test "x$new_path" = x; then
43157      # It's still not found. Now this is an unrecoverable error.
43158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43159$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43160      has_space=`$ECHO "$complete" | $GREP " "`
43161      if test "x$has_space" != x; then
43162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43164      fi
43165      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43166    fi
43167  fi
43168
43169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43172  # "foo.exe" is OK but "foo" is an error.
43173  #
43174  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43175  # It is also a way to make sure we got the proper file name for the real test later on.
43176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43177  if test "x$test_shortpath" = x; then
43178    # Short path failed, file does not exist as specified.
43179    # Try adding .exe or .cmd
43180    if test -f "${new_path}.exe"; then
43181      input_to_shortpath="${new_path}.exe"
43182    elif test -f "${new_path}.cmd"; then
43183      input_to_shortpath="${new_path}.cmd"
43184    else
43185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43186$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43189      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43190    fi
43191  else
43192    input_to_shortpath="$new_path"
43193  fi
43194
43195  # Call helper function which possibly converts this using DOS-style short mode.
43196  # If so, the updated path is stored in $new_path.
43197  new_path="$input_to_shortpath"
43198
43199  input_path="$input_to_shortpath"
43200  # Check if we need to convert this using DOS-style short mode. If the path
43201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43202  # take no chances and rewrite it.
43203  # Note: m4 eats our [], so we need to use [ and ] instead.
43204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43205  if test "x$has_forbidden_chars" != x; then
43206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43210      # Going to short mode and back again did indeed matter. Since short mode is
43211      # case insensitive, let's make it lowercase to improve readability.
43212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43213      # Now convert it back to Unix-style (cygpath)
43214      input_path=`$CYGPATH -u "$shortmode_path"`
43215      new_path="$input_path"
43216    fi
43217  fi
43218
43219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43220  if test "x$test_cygdrive_prefix" = x; then
43221    # As a simple fix, exclude /usr/bin since it's not a real path.
43222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43224      # a path prefixed by /cygdrive for fixpath to work.
43225      new_path="$CYGWIN_ROOT_PATH$input_path"
43226    fi
43227  fi
43228
43229  # remove trailing .exe if any
43230  new_path="${new_path/%.exe/}"
43231
43232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43233
43234  # First separate the path from the arguments. This will split at the first
43235  # space.
43236  complete="$BUILD_CXX"
43237  path="${complete%% *}"
43238  tmp="$complete EOL"
43239  arguments="${tmp#* }"
43240
43241  # Input might be given as Windows format, start by converting to
43242  # unix format.
43243  new_path="$path"
43244
43245  windows_path="$new_path"
43246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43247    unix_path=`$CYGPATH -u "$windows_path"`
43248    new_path="$unix_path"
43249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43251    new_path="$unix_path"
43252  fi
43253
43254
43255  # Now try to locate executable using which
43256  new_path=`$WHICH "$new_path" 2> /dev/null`
43257
43258  if test "x$new_path" = x; then
43259    # Oops. Which didn't find the executable.
43260    # The splitting of arguments from the executable at a space might have been incorrect,
43261    # since paths with space are more likely in Windows. Give it another try with the whole
43262    # argument.
43263    path="$complete"
43264    arguments="EOL"
43265    new_path="$path"
43266
43267  windows_path="$new_path"
43268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43269    unix_path=`$CYGPATH -u "$windows_path"`
43270    new_path="$unix_path"
43271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43273    new_path="$unix_path"
43274  fi
43275
43276
43277    new_path=`$WHICH "$new_path" 2> /dev/null`
43278    # bat and cmd files are not always considered executable in MSYS causing which
43279    # to not find them
43280    if test "x$new_path" = x \
43281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43283      new_path="$path"
43284
43285  windows_path="$new_path"
43286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43287    unix_path=`$CYGPATH -u "$windows_path"`
43288    new_path="$unix_path"
43289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43291    new_path="$unix_path"
43292  fi
43293
43294    fi
43295
43296    if test "x$new_path" = x; then
43297      # It's still not found. Now this is an unrecoverable error.
43298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43299$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43300      has_space=`$ECHO "$complete" | $GREP " "`
43301      if test "x$has_space" != x; then
43302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43304      fi
43305      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43306    fi
43307  fi
43308
43309  # Now new_path has a complete unix path to the binary
43310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43311    # Keep paths in /bin as-is, but remove trailing .exe if any
43312    new_path="${new_path/%.exe/}"
43313    # Do not save /bin paths to all_fixpath_prefixes!
43314  else
43315    # Not in mixed or Windows style, start by that.
43316    new_path=`cmd //c echo $new_path`
43317
43318  input_path="$new_path"
43319  # Check if we need to convert this using DOS-style short mode. If the path
43320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43321  # take no chances and rewrite it.
43322  # Note: m4 eats our [], so we need to use [ and ] instead.
43323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43324  if test "x$has_forbidden_chars" != x; then
43325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43327  fi
43328
43329    # Output is in $new_path
43330
43331  windows_path="$new_path"
43332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43333    unix_path=`$CYGPATH -u "$windows_path"`
43334    new_path="$unix_path"
43335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43337    new_path="$unix_path"
43338  fi
43339
43340    # remove trailing .exe if any
43341    new_path="${new_path/%.exe/}"
43342
43343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43345  fi
43346
43347    else
43348      # We're on a unix platform. Hooray! :)
43349      # First separate the path from the arguments. This will split at the first
43350      # space.
43351      complete="$BUILD_CXX"
43352      path="${complete%% *}"
43353      tmp="$complete EOL"
43354      arguments="${tmp#* }"
43355
43356      # Cannot rely on the command "which" here since it doesn't always work.
43357      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43358      if test -z "$is_absolute_path"; then
43359        # Path to executable is not absolute. Find it.
43360        IFS_save="$IFS"
43361        IFS=:
43362        for p in $PATH; do
43363          if test -f "$p/$path" && test -x "$p/$path"; then
43364            new_path="$p/$path"
43365            break
43366          fi
43367        done
43368        IFS="$IFS_save"
43369      else
43370        # This is an absolute path, we can use it without further modifications.
43371        new_path="$path"
43372      fi
43373
43374      if test "x$new_path" = x; then
43375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43376$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43377        has_space=`$ECHO "$complete" | $GREP " "`
43378        if test "x$has_space" != x; then
43379          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43380$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43381        fi
43382        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43383      fi
43384    fi
43385
43386    # Now join together the path and the arguments once again
43387    if test "x$arguments" != xEOL; then
43388      new_complete="$new_path ${arguments% *}"
43389    else
43390      new_complete="$new_path"
43391    fi
43392
43393    if test "x$complete" != "x$new_complete"; then
43394      BUILD_CXX="$new_complete"
43395      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43396$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43397    fi
43398  fi
43399
43400
43401
43402  # Publish this variable in the help.
43403
43404
43405  if [ -z "${BUILD_NM+x}" ]; then
43406    # The variable is not set by user, try to locate tool using the code snippet
43407    for ac_prog in nm gcc-nm
43408do
43409  # Extract the first word of "$ac_prog", so it can be a program name with args.
43410set dummy $ac_prog; ac_word=$2
43411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43412$as_echo_n "checking for $ac_word... " >&6; }
43413if ${ac_cv_path_BUILD_NM+:} false; then :
43414  $as_echo_n "(cached) " >&6
43415else
43416  case $BUILD_NM in
43417  [\\/]* | ?:[\\/]*)
43418  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43419  ;;
43420  *)
43421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43422for as_dir in $PATH
43423do
43424  IFS=$as_save_IFS
43425  test -z "$as_dir" && as_dir=.
43426    for ac_exec_ext in '' $ac_executable_extensions; do
43427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43428    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43430    break 2
43431  fi
43432done
43433  done
43434IFS=$as_save_IFS
43435
43436  ;;
43437esac
43438fi
43439BUILD_NM=$ac_cv_path_BUILD_NM
43440if test -n "$BUILD_NM"; then
43441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43442$as_echo "$BUILD_NM" >&6; }
43443else
43444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43445$as_echo "no" >&6; }
43446fi
43447
43448
43449  test -n "$BUILD_NM" && break
43450done
43451
43452  else
43453    # The variable is set, but is it from the command line or the environment?
43454
43455    # Try to remove the string !BUILD_NM! from our list.
43456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43458      # If it failed, the variable was not from the command line. Ignore it,
43459      # but warn the user (except for BASH, which is always set by the calling BASH).
43460      if test "xBUILD_NM" != xBASH; then
43461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43462$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43463      fi
43464      # Try to locate tool using the code snippet
43465      for ac_prog in nm gcc-nm
43466do
43467  # Extract the first word of "$ac_prog", so it can be a program name with args.
43468set dummy $ac_prog; ac_word=$2
43469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43470$as_echo_n "checking for $ac_word... " >&6; }
43471if ${ac_cv_path_BUILD_NM+:} false; then :
43472  $as_echo_n "(cached) " >&6
43473else
43474  case $BUILD_NM in
43475  [\\/]* | ?:[\\/]*)
43476  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43477  ;;
43478  *)
43479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43480for as_dir in $PATH
43481do
43482  IFS=$as_save_IFS
43483  test -z "$as_dir" && as_dir=.
43484    for ac_exec_ext in '' $ac_executable_extensions; do
43485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43486    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43488    break 2
43489  fi
43490done
43491  done
43492IFS=$as_save_IFS
43493
43494  ;;
43495esac
43496fi
43497BUILD_NM=$ac_cv_path_BUILD_NM
43498if test -n "$BUILD_NM"; then
43499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43500$as_echo "$BUILD_NM" >&6; }
43501else
43502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43503$as_echo "no" >&6; }
43504fi
43505
43506
43507  test -n "$BUILD_NM" && break
43508done
43509
43510    else
43511      # If it succeeded, then it was overridden by the user. We will use it
43512      # for the tool.
43513
43514      # First remove it from the list of overridden variables, so we can test
43515      # for unknown variables in the end.
43516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43517
43518      # Check if we try to supply an empty value
43519      if test "x$BUILD_NM" = x; then
43520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43521$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43523$as_echo_n "checking for BUILD_NM... " >&6; }
43524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43525$as_echo "disabled" >&6; }
43526      else
43527        # Check if the provided tool contains a complete path.
43528        tool_specified="$BUILD_NM"
43529        tool_basename="${tool_specified##*/}"
43530        if test "x$tool_basename" = "x$tool_specified"; then
43531          # A command without a complete path is provided, search $PATH.
43532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43533$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43534          # Extract the first word of "$tool_basename", so it can be a program name with args.
43535set dummy $tool_basename; ac_word=$2
43536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43537$as_echo_n "checking for $ac_word... " >&6; }
43538if ${ac_cv_path_BUILD_NM+:} false; then :
43539  $as_echo_n "(cached) " >&6
43540else
43541  case $BUILD_NM in
43542  [\\/]* | ?:[\\/]*)
43543  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43544  ;;
43545  *)
43546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43547for as_dir in $PATH
43548do
43549  IFS=$as_save_IFS
43550  test -z "$as_dir" && as_dir=.
43551    for ac_exec_ext in '' $ac_executable_extensions; do
43552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43553    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43555    break 2
43556  fi
43557done
43558  done
43559IFS=$as_save_IFS
43560
43561  ;;
43562esac
43563fi
43564BUILD_NM=$ac_cv_path_BUILD_NM
43565if test -n "$BUILD_NM"; then
43566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43567$as_echo "$BUILD_NM" >&6; }
43568else
43569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43570$as_echo "no" >&6; }
43571fi
43572
43573
43574          if test "x$BUILD_NM" = x; then
43575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43576          fi
43577        else
43578          # Otherwise we believe it is a complete path. Use it as it is.
43579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43580$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43582$as_echo_n "checking for BUILD_NM... " >&6; }
43583          if test ! -x "$tool_specified"; then
43584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43585$as_echo "not found" >&6; }
43586            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43587          fi
43588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43589$as_echo "$tool_specified" >&6; }
43590        fi
43591      fi
43592    fi
43593
43594  fi
43595
43596
43597
43598  # Only process if variable expands to non-empty
43599
43600  if test "x$BUILD_NM" != x; then
43601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43602
43603  # First separate the path from the arguments. This will split at the first
43604  # space.
43605  complete="$BUILD_NM"
43606  path="${complete%% *}"
43607  tmp="$complete EOL"
43608  arguments="${tmp#* }"
43609
43610  # Input might be given as Windows format, start by converting to
43611  # unix format.
43612  new_path=`$CYGPATH -u "$path"`
43613
43614  # Now try to locate executable using which
43615  new_path=`$WHICH "$new_path" 2> /dev/null`
43616  # bat and cmd files are not always considered executable in cygwin causing which
43617  # to not find them
43618  if test "x$new_path" = x \
43619      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43620      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43621    new_path=`$CYGPATH -u "$path"`
43622  fi
43623  if test "x$new_path" = x; then
43624    # Oops. Which didn't find the executable.
43625    # The splitting of arguments from the executable at a space might have been incorrect,
43626    # since paths with space are more likely in Windows. Give it another try with the whole
43627    # argument.
43628    path="$complete"
43629    arguments="EOL"
43630    new_path=`$CYGPATH -u "$path"`
43631    new_path=`$WHICH "$new_path" 2> /dev/null`
43632    # bat and cmd files are not always considered executable in cygwin causing which
43633    # to not find them
43634    if test "x$new_path" = x \
43635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43637      new_path=`$CYGPATH -u "$path"`
43638    fi
43639    if test "x$new_path" = x; then
43640      # It's still not found. Now this is an unrecoverable error.
43641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43642$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43643      has_space=`$ECHO "$complete" | $GREP " "`
43644      if test "x$has_space" != x; then
43645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43647      fi
43648      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43649    fi
43650  fi
43651
43652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43655  # "foo.exe" is OK but "foo" is an error.
43656  #
43657  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43658  # It is also a way to make sure we got the proper file name for the real test later on.
43659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43660  if test "x$test_shortpath" = x; then
43661    # Short path failed, file does not exist as specified.
43662    # Try adding .exe or .cmd
43663    if test -f "${new_path}.exe"; then
43664      input_to_shortpath="${new_path}.exe"
43665    elif test -f "${new_path}.cmd"; then
43666      input_to_shortpath="${new_path}.cmd"
43667    else
43668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43669$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43670      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43671$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43672      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43673    fi
43674  else
43675    input_to_shortpath="$new_path"
43676  fi
43677
43678  # Call helper function which possibly converts this using DOS-style short mode.
43679  # If so, the updated path is stored in $new_path.
43680  new_path="$input_to_shortpath"
43681
43682  input_path="$input_to_shortpath"
43683  # Check if we need to convert this using DOS-style short mode. If the path
43684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43685  # take no chances and rewrite it.
43686  # Note: m4 eats our [], so we need to use [ and ] instead.
43687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43688  if test "x$has_forbidden_chars" != x; then
43689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43693      # Going to short mode and back again did indeed matter. Since short mode is
43694      # case insensitive, let's make it lowercase to improve readability.
43695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43696      # Now convert it back to Unix-style (cygpath)
43697      input_path=`$CYGPATH -u "$shortmode_path"`
43698      new_path="$input_path"
43699    fi
43700  fi
43701
43702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43703  if test "x$test_cygdrive_prefix" = x; then
43704    # As a simple fix, exclude /usr/bin since it's not a real path.
43705    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43707      # a path prefixed by /cygdrive for fixpath to work.
43708      new_path="$CYGWIN_ROOT_PATH$input_path"
43709    fi
43710  fi
43711
43712  # remove trailing .exe if any
43713  new_path="${new_path/%.exe/}"
43714
43715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43716
43717  # First separate the path from the arguments. This will split at the first
43718  # space.
43719  complete="$BUILD_NM"
43720  path="${complete%% *}"
43721  tmp="$complete EOL"
43722  arguments="${tmp#* }"
43723
43724  # Input might be given as Windows format, start by converting to
43725  # unix format.
43726  new_path="$path"
43727
43728  windows_path="$new_path"
43729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43730    unix_path=`$CYGPATH -u "$windows_path"`
43731    new_path="$unix_path"
43732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43734    new_path="$unix_path"
43735  fi
43736
43737
43738  # Now try to locate executable using which
43739  new_path=`$WHICH "$new_path" 2> /dev/null`
43740
43741  if test "x$new_path" = x; then
43742    # Oops. Which didn't find the executable.
43743    # The splitting of arguments from the executable at a space might have been incorrect,
43744    # since paths with space are more likely in Windows. Give it another try with the whole
43745    # argument.
43746    path="$complete"
43747    arguments="EOL"
43748    new_path="$path"
43749
43750  windows_path="$new_path"
43751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43752    unix_path=`$CYGPATH -u "$windows_path"`
43753    new_path="$unix_path"
43754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43756    new_path="$unix_path"
43757  fi
43758
43759
43760    new_path=`$WHICH "$new_path" 2> /dev/null`
43761    # bat and cmd files are not always considered executable in MSYS causing which
43762    # to not find them
43763    if test "x$new_path" = x \
43764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43766      new_path="$path"
43767
43768  windows_path="$new_path"
43769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43770    unix_path=`$CYGPATH -u "$windows_path"`
43771    new_path="$unix_path"
43772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43774    new_path="$unix_path"
43775  fi
43776
43777    fi
43778
43779    if test "x$new_path" = x; then
43780      # It's still not found. Now this is an unrecoverable error.
43781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43782$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43783      has_space=`$ECHO "$complete" | $GREP " "`
43784      if test "x$has_space" != x; then
43785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43787      fi
43788      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43789    fi
43790  fi
43791
43792  # Now new_path has a complete unix path to the binary
43793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43794    # Keep paths in /bin as-is, but remove trailing .exe if any
43795    new_path="${new_path/%.exe/}"
43796    # Do not save /bin paths to all_fixpath_prefixes!
43797  else
43798    # Not in mixed or Windows style, start by that.
43799    new_path=`cmd //c echo $new_path`
43800
43801  input_path="$new_path"
43802  # Check if we need to convert this using DOS-style short mode. If the path
43803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43804  # take no chances and rewrite it.
43805  # Note: m4 eats our [], so we need to use [ and ] instead.
43806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43807  if test "x$has_forbidden_chars" != x; then
43808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43810  fi
43811
43812    # Output is in $new_path
43813
43814  windows_path="$new_path"
43815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43816    unix_path=`$CYGPATH -u "$windows_path"`
43817    new_path="$unix_path"
43818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43820    new_path="$unix_path"
43821  fi
43822
43823    # remove trailing .exe if any
43824    new_path="${new_path/%.exe/}"
43825
43826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43828  fi
43829
43830    else
43831      # We're on a unix platform. Hooray! :)
43832      # First separate the path from the arguments. This will split at the first
43833      # space.
43834      complete="$BUILD_NM"
43835      path="${complete%% *}"
43836      tmp="$complete EOL"
43837      arguments="${tmp#* }"
43838
43839      # Cannot rely on the command "which" here since it doesn't always work.
43840      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43841      if test -z "$is_absolute_path"; then
43842        # Path to executable is not absolute. Find it.
43843        IFS_save="$IFS"
43844        IFS=:
43845        for p in $PATH; do
43846          if test -f "$p/$path" && test -x "$p/$path"; then
43847            new_path="$p/$path"
43848            break
43849          fi
43850        done
43851        IFS="$IFS_save"
43852      else
43853        # This is an absolute path, we can use it without further modifications.
43854        new_path="$path"
43855      fi
43856
43857      if test "x$new_path" = x; then
43858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43859$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43860        has_space=`$ECHO "$complete" | $GREP " "`
43861        if test "x$has_space" != x; then
43862          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43864        fi
43865        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43866      fi
43867    fi
43868
43869    # Now join together the path and the arguments once again
43870    if test "x$arguments" != xEOL; then
43871      new_complete="$new_path ${arguments% *}"
43872    else
43873      new_complete="$new_path"
43874    fi
43875
43876    if test "x$complete" != "x$new_complete"; then
43877      BUILD_NM="$new_complete"
43878      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
43879$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
43880    fi
43881  fi
43882
43883
43884
43885  # Publish this variable in the help.
43886
43887
43888  if [ -z "${BUILD_AR+x}" ]; then
43889    # The variable is not set by user, try to locate tool using the code snippet
43890    for ac_prog in ar gcc-ar
43891do
43892  # Extract the first word of "$ac_prog", so it can be a program name with args.
43893set dummy $ac_prog; ac_word=$2
43894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43895$as_echo_n "checking for $ac_word... " >&6; }
43896if ${ac_cv_path_BUILD_AR+:} false; then :
43897  $as_echo_n "(cached) " >&6
43898else
43899  case $BUILD_AR in
43900  [\\/]* | ?:[\\/]*)
43901  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
43902  ;;
43903  *)
43904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43905for as_dir in $PATH
43906do
43907  IFS=$as_save_IFS
43908  test -z "$as_dir" && as_dir=.
43909    for ac_exec_ext in '' $ac_executable_extensions; do
43910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43911    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
43912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43913    break 2
43914  fi
43915done
43916  done
43917IFS=$as_save_IFS
43918
43919  ;;
43920esac
43921fi
43922BUILD_AR=$ac_cv_path_BUILD_AR
43923if test -n "$BUILD_AR"; then
43924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
43925$as_echo "$BUILD_AR" >&6; }
43926else
43927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43928$as_echo "no" >&6; }
43929fi
43930
43931
43932  test -n "$BUILD_AR" && break
43933done
43934
43935  else
43936    # The variable is set, but is it from the command line or the environment?
43937
43938    # Try to remove the string !BUILD_AR! from our list.
43939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
43940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43941      # If it failed, the variable was not from the command line. Ignore it,
43942      # but warn the user (except for BASH, which is always set by the calling BASH).
43943      if test "xBUILD_AR" != xBASH; then
43944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
43945$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
43946      fi
43947      # Try to locate tool using the code snippet
43948      for ac_prog in ar gcc-ar
43949do
43950  # Extract the first word of "$ac_prog", so it can be a program name with args.
43951set dummy $ac_prog; ac_word=$2
43952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43953$as_echo_n "checking for $ac_word... " >&6; }
43954if ${ac_cv_path_BUILD_AR+:} false; then :
43955  $as_echo_n "(cached) " >&6
43956else
43957  case $BUILD_AR in
43958  [\\/]* | ?:[\\/]*)
43959  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
43960  ;;
43961  *)
43962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43963for as_dir in $PATH
43964do
43965  IFS=$as_save_IFS
43966  test -z "$as_dir" && as_dir=.
43967    for ac_exec_ext in '' $ac_executable_extensions; do
43968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43969    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
43970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43971    break 2
43972  fi
43973done
43974  done
43975IFS=$as_save_IFS
43976
43977  ;;
43978esac
43979fi
43980BUILD_AR=$ac_cv_path_BUILD_AR
43981if test -n "$BUILD_AR"; then
43982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
43983$as_echo "$BUILD_AR" >&6; }
43984else
43985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43986$as_echo "no" >&6; }
43987fi
43988
43989
43990  test -n "$BUILD_AR" && break
43991done
43992
43993    else
43994      # If it succeeded, then it was overridden by the user. We will use it
43995      # for the tool.
43996
43997      # First remove it from the list of overridden variables, so we can test
43998      # for unknown variables in the end.
43999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44000
44001      # Check if we try to supply an empty value
44002      if test "x$BUILD_AR" = x; then
44003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44004$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44006$as_echo_n "checking for BUILD_AR... " >&6; }
44007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44008$as_echo "disabled" >&6; }
44009      else
44010        # Check if the provided tool contains a complete path.
44011        tool_specified="$BUILD_AR"
44012        tool_basename="${tool_specified##*/}"
44013        if test "x$tool_basename" = "x$tool_specified"; then
44014          # A command without a complete path is provided, search $PATH.
44015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44016$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44017          # Extract the first word of "$tool_basename", so it can be a program name with args.
44018set dummy $tool_basename; ac_word=$2
44019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44020$as_echo_n "checking for $ac_word... " >&6; }
44021if ${ac_cv_path_BUILD_AR+:} false; then :
44022  $as_echo_n "(cached) " >&6
44023else
44024  case $BUILD_AR in
44025  [\\/]* | ?:[\\/]*)
44026  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44027  ;;
44028  *)
44029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44030for as_dir in $PATH
44031do
44032  IFS=$as_save_IFS
44033  test -z "$as_dir" && as_dir=.
44034    for ac_exec_ext in '' $ac_executable_extensions; do
44035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44036    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44038    break 2
44039  fi
44040done
44041  done
44042IFS=$as_save_IFS
44043
44044  ;;
44045esac
44046fi
44047BUILD_AR=$ac_cv_path_BUILD_AR
44048if test -n "$BUILD_AR"; then
44049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44050$as_echo "$BUILD_AR" >&6; }
44051else
44052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44053$as_echo "no" >&6; }
44054fi
44055
44056
44057          if test "x$BUILD_AR" = x; then
44058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44059          fi
44060        else
44061          # Otherwise we believe it is a complete path. Use it as it is.
44062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44063$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44065$as_echo_n "checking for BUILD_AR... " >&6; }
44066          if test ! -x "$tool_specified"; then
44067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44068$as_echo "not found" >&6; }
44069            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44070          fi
44071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44072$as_echo "$tool_specified" >&6; }
44073        fi
44074      fi
44075    fi
44076
44077  fi
44078
44079
44080
44081  # Only process if variable expands to non-empty
44082
44083  if test "x$BUILD_AR" != x; then
44084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44085
44086  # First separate the path from the arguments. This will split at the first
44087  # space.
44088  complete="$BUILD_AR"
44089  path="${complete%% *}"
44090  tmp="$complete EOL"
44091  arguments="${tmp#* }"
44092
44093  # Input might be given as Windows format, start by converting to
44094  # unix format.
44095  new_path=`$CYGPATH -u "$path"`
44096
44097  # Now try to locate executable using which
44098  new_path=`$WHICH "$new_path" 2> /dev/null`
44099  # bat and cmd files are not always considered executable in cygwin causing which
44100  # to not find them
44101  if test "x$new_path" = x \
44102      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44103      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44104    new_path=`$CYGPATH -u "$path"`
44105  fi
44106  if test "x$new_path" = x; then
44107    # Oops. Which didn't find the executable.
44108    # The splitting of arguments from the executable at a space might have been incorrect,
44109    # since paths with space are more likely in Windows. Give it another try with the whole
44110    # argument.
44111    path="$complete"
44112    arguments="EOL"
44113    new_path=`$CYGPATH -u "$path"`
44114    new_path=`$WHICH "$new_path" 2> /dev/null`
44115    # bat and cmd files are not always considered executable in cygwin causing which
44116    # to not find them
44117    if test "x$new_path" = x \
44118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44120      new_path=`$CYGPATH -u "$path"`
44121    fi
44122    if test "x$new_path" = x; then
44123      # It's still not found. Now this is an unrecoverable error.
44124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44125$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44126      has_space=`$ECHO "$complete" | $GREP " "`
44127      if test "x$has_space" != x; then
44128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44130      fi
44131      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44132    fi
44133  fi
44134
44135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44138  # "foo.exe" is OK but "foo" is an error.
44139  #
44140  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44141  # It is also a way to make sure we got the proper file name for the real test later on.
44142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44143  if test "x$test_shortpath" = x; then
44144    # Short path failed, file does not exist as specified.
44145    # Try adding .exe or .cmd
44146    if test -f "${new_path}.exe"; then
44147      input_to_shortpath="${new_path}.exe"
44148    elif test -f "${new_path}.cmd"; then
44149      input_to_shortpath="${new_path}.cmd"
44150    else
44151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44152$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44155      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44156    fi
44157  else
44158    input_to_shortpath="$new_path"
44159  fi
44160
44161  # Call helper function which possibly converts this using DOS-style short mode.
44162  # If so, the updated path is stored in $new_path.
44163  new_path="$input_to_shortpath"
44164
44165  input_path="$input_to_shortpath"
44166  # Check if we need to convert this using DOS-style short mode. If the path
44167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44168  # take no chances and rewrite it.
44169  # Note: m4 eats our [], so we need to use [ and ] instead.
44170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44171  if test "x$has_forbidden_chars" != x; then
44172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44176      # Going to short mode and back again did indeed matter. Since short mode is
44177      # case insensitive, let's make it lowercase to improve readability.
44178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44179      # Now convert it back to Unix-style (cygpath)
44180      input_path=`$CYGPATH -u "$shortmode_path"`
44181      new_path="$input_path"
44182    fi
44183  fi
44184
44185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44186  if test "x$test_cygdrive_prefix" = x; then
44187    # As a simple fix, exclude /usr/bin since it's not a real path.
44188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44190      # a path prefixed by /cygdrive for fixpath to work.
44191      new_path="$CYGWIN_ROOT_PATH$input_path"
44192    fi
44193  fi
44194
44195  # remove trailing .exe if any
44196  new_path="${new_path/%.exe/}"
44197
44198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44199
44200  # First separate the path from the arguments. This will split at the first
44201  # space.
44202  complete="$BUILD_AR"
44203  path="${complete%% *}"
44204  tmp="$complete EOL"
44205  arguments="${tmp#* }"
44206
44207  # Input might be given as Windows format, start by converting to
44208  # unix format.
44209  new_path="$path"
44210
44211  windows_path="$new_path"
44212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44213    unix_path=`$CYGPATH -u "$windows_path"`
44214    new_path="$unix_path"
44215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44217    new_path="$unix_path"
44218  fi
44219
44220
44221  # Now try to locate executable using which
44222  new_path=`$WHICH "$new_path" 2> /dev/null`
44223
44224  if test "x$new_path" = x; then
44225    # Oops. Which didn't find the executable.
44226    # The splitting of arguments from the executable at a space might have been incorrect,
44227    # since paths with space are more likely in Windows. Give it another try with the whole
44228    # argument.
44229    path="$complete"
44230    arguments="EOL"
44231    new_path="$path"
44232
44233  windows_path="$new_path"
44234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44235    unix_path=`$CYGPATH -u "$windows_path"`
44236    new_path="$unix_path"
44237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44239    new_path="$unix_path"
44240  fi
44241
44242
44243    new_path=`$WHICH "$new_path" 2> /dev/null`
44244    # bat and cmd files are not always considered executable in MSYS causing which
44245    # to not find them
44246    if test "x$new_path" = x \
44247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44249      new_path="$path"
44250
44251  windows_path="$new_path"
44252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44253    unix_path=`$CYGPATH -u "$windows_path"`
44254    new_path="$unix_path"
44255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44257    new_path="$unix_path"
44258  fi
44259
44260    fi
44261
44262    if test "x$new_path" = x; then
44263      # It's still not found. Now this is an unrecoverable error.
44264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44265$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44266      has_space=`$ECHO "$complete" | $GREP " "`
44267      if test "x$has_space" != x; then
44268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44270      fi
44271      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44272    fi
44273  fi
44274
44275  # Now new_path has a complete unix path to the binary
44276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44277    # Keep paths in /bin as-is, but remove trailing .exe if any
44278    new_path="${new_path/%.exe/}"
44279    # Do not save /bin paths to all_fixpath_prefixes!
44280  else
44281    # Not in mixed or Windows style, start by that.
44282    new_path=`cmd //c echo $new_path`
44283
44284  input_path="$new_path"
44285  # Check if we need to convert this using DOS-style short mode. If the path
44286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44287  # take no chances and rewrite it.
44288  # Note: m4 eats our [], so we need to use [ and ] instead.
44289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44290  if test "x$has_forbidden_chars" != x; then
44291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44293  fi
44294
44295    # Output is in $new_path
44296
44297  windows_path="$new_path"
44298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44299    unix_path=`$CYGPATH -u "$windows_path"`
44300    new_path="$unix_path"
44301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44303    new_path="$unix_path"
44304  fi
44305
44306    # remove trailing .exe if any
44307    new_path="${new_path/%.exe/}"
44308
44309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44311  fi
44312
44313    else
44314      # We're on a unix platform. Hooray! :)
44315      # First separate the path from the arguments. This will split at the first
44316      # space.
44317      complete="$BUILD_AR"
44318      path="${complete%% *}"
44319      tmp="$complete EOL"
44320      arguments="${tmp#* }"
44321
44322      # Cannot rely on the command "which" here since it doesn't always work.
44323      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44324      if test -z "$is_absolute_path"; then
44325        # Path to executable is not absolute. Find it.
44326        IFS_save="$IFS"
44327        IFS=:
44328        for p in $PATH; do
44329          if test -f "$p/$path" && test -x "$p/$path"; then
44330            new_path="$p/$path"
44331            break
44332          fi
44333        done
44334        IFS="$IFS_save"
44335      else
44336        # This is an absolute path, we can use it without further modifications.
44337        new_path="$path"
44338      fi
44339
44340      if test "x$new_path" = x; then
44341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44342$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44343        has_space=`$ECHO "$complete" | $GREP " "`
44344        if test "x$has_space" != x; then
44345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44347        fi
44348        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44349      fi
44350    fi
44351
44352    # Now join together the path and the arguments once again
44353    if test "x$arguments" != xEOL; then
44354      new_complete="$new_path ${arguments% *}"
44355    else
44356      new_complete="$new_path"
44357    fi
44358
44359    if test "x$complete" != "x$new_complete"; then
44360      BUILD_AR="$new_complete"
44361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44362$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44363    fi
44364  fi
44365
44366    # Assume the C compiler is the assembler
44367    BUILD_AS="$BUILD_CC -c"
44368    # Just like for the target compiler, use the compiler as linker
44369    BUILD_LD="$BUILD_CC"
44370    BUILD_LDCXX="$BUILD_CXX"
44371
44372    PATH="$OLDPATH"
44373  else
44374    # If we are not cross compiling, use the normal target compilers for
44375    # building the build platform executables.
44376    BUILD_CC="$CC"
44377    BUILD_CXX="$CXX"
44378    BUILD_LD="$LD"
44379    BUILD_LDCXX="$LDCXX"
44380    BUILD_NM="$NM"
44381    BUILD_AS="$AS"
44382    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44383    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44384    BUILD_AR="$AR"
44385  fi
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44399    # For hotspot, we need these in Windows mixed path,
44400    # so rewrite them all. Need added .exe suffix.
44401    HOTSPOT_CXX="$CXX.exe"
44402    HOTSPOT_LD="$LD.exe"
44403    HOTSPOT_MT="$MT.exe"
44404    HOTSPOT_RC="$RC.exe"
44405
44406  unix_path="$HOTSPOT_CXX"
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    windows_path=`$CYGPATH -m "$unix_path"`
44409    HOTSPOT_CXX="$windows_path"
44410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411    windows_path=`cmd //c echo $unix_path`
44412    HOTSPOT_CXX="$windows_path"
44413  fi
44414
44415
44416  unix_path="$HOTSPOT_LD"
44417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44418    windows_path=`$CYGPATH -m "$unix_path"`
44419    HOTSPOT_LD="$windows_path"
44420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44421    windows_path=`cmd //c echo $unix_path`
44422    HOTSPOT_LD="$windows_path"
44423  fi
44424
44425
44426  unix_path="$HOTSPOT_MT"
44427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44428    windows_path=`$CYGPATH -m "$unix_path"`
44429    HOTSPOT_MT="$windows_path"
44430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44431    windows_path=`cmd //c echo $unix_path`
44432    HOTSPOT_MT="$windows_path"
44433  fi
44434
44435
44436  unix_path="$HOTSPOT_RC"
44437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44438    windows_path=`$CYGPATH -m "$unix_path"`
44439    HOTSPOT_RC="$windows_path"
44440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44441    windows_path=`cmd //c echo $unix_path`
44442    HOTSPOT_RC="$windows_path"
44443  fi
44444
44445
44446
44447  else
44448    HOTSPOT_CXX="$CXX"
44449    HOTSPOT_LD="$LD"
44450  fi
44451
44452
44453
44454  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44455    USE_CLANG=true
44456  fi
44457
44458
44459
44460
44461
44462  # The package path is used only on macosx?
44463  # FIXME: clean this up, and/or move it elsewhere.
44464  PACKAGE_PATH=/opt/local
44465
44466
44467  # Check for extra potential brokenness.
44468  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44469    # On Windows, double-check that we got the right compiler.
44470    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44471    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44472    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44473      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44474        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
44475      fi
44476    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44477      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44478        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44479      fi
44480    fi
44481  fi
44482
44483  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44484    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44485    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44486    # This is later checked when setting flags.
44487
44488    # "-Og" suppported for GCC 4.8 and later
44489    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535
44536
44537    # Execute function body
44538
44539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44540$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44541  supports=yes
44542
44543  saved_cflags="$CFLAGS"
44544  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44545  ac_ext=c
44546ac_cpp='$CPP $CPPFLAGS'
44547ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44548ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44549ac_compiler_gnu=$ac_cv_c_compiler_gnu
44550
44551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44552/* end confdefs.h.  */
44553int i;
44554_ACEOF
44555if ac_fn_c_try_compile "$LINENO"; then :
44556
44557else
44558  supports=no
44559fi
44560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44561  ac_ext=cpp
44562ac_cpp='$CXXCPP $CPPFLAGS'
44563ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44564ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44565ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44566
44567  CFLAGS="$saved_cflags"
44568
44569  saved_cxxflags="$CXXFLAGS"
44570  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44571  ac_ext=cpp
44572ac_cpp='$CXXCPP $CPPFLAGS'
44573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44576
44577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44578/* end confdefs.h.  */
44579int i;
44580_ACEOF
44581if ac_fn_cxx_try_compile "$LINENO"; then :
44582
44583else
44584  supports=no
44585fi
44586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44587  ac_ext=cpp
44588ac_cpp='$CXXCPP $CPPFLAGS'
44589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44592
44593  CXXFLAGS="$saved_cxxflags"
44594
44595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44596$as_echo "$supports" >&6; }
44597  if test "x$supports" = "xyes" ; then
44598    :
44599    HAS_CFLAG_OPTIMIZE_DEBUG=true
44600  else
44601    :
44602    HAS_CFLAG_OPTIMIZE_DEBUG=false
44603  fi
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615
44616
44617    # "-z relro" supported in GNU binutils 2.17 and later
44618    LINKER_RELRO_FLAG="-Wl,-z,relro"
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666    # Execute function body
44667
44668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44669$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44670  supports=yes
44671
44672  saved_ldflags="$LDFLAGS"
44673  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44674  ac_ext=c
44675ac_cpp='$CPP $CPPFLAGS'
44676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44678ac_compiler_gnu=$ac_cv_c_compiler_gnu
44679
44680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44681/* end confdefs.h.  */
44682
44683int
44684main ()
44685{
44686
44687  ;
44688  return 0;
44689}
44690_ACEOF
44691if ac_fn_c_try_link "$LINENO"; then :
44692
44693else
44694  supports=no
44695fi
44696rm -f core conftest.err conftest.$ac_objext \
44697    conftest$ac_exeext conftest.$ac_ext
44698  ac_ext=cpp
44699ac_cpp='$CXXCPP $CPPFLAGS'
44700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44703
44704  LDFLAGS="$saved_ldflags"
44705
44706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44707$as_echo "$supports" >&6; }
44708  if test "x$supports" = "xyes" ; then
44709    :
44710    HAS_LINKER_RELRO=true
44711  else
44712    :
44713    HAS_LINKER_RELRO=false
44714  fi
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726
44727
44728    # "-z now" supported in GNU binutils 2.11 and later
44729    LINKER_NOW_FLAG="-Wl,-z,now"
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777    # Execute function body
44778
44779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44780$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44781  supports=yes
44782
44783  saved_ldflags="$LDFLAGS"
44784  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44785  ac_ext=c
44786ac_cpp='$CPP $CPPFLAGS'
44787ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44788ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44789ac_compiler_gnu=$ac_cv_c_compiler_gnu
44790
44791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44792/* end confdefs.h.  */
44793
44794int
44795main ()
44796{
44797
44798  ;
44799  return 0;
44800}
44801_ACEOF
44802if ac_fn_c_try_link "$LINENO"; then :
44803
44804else
44805  supports=no
44806fi
44807rm -f core conftest.err conftest.$ac_objext \
44808    conftest$ac_exeext conftest.$ac_ext
44809  ac_ext=cpp
44810ac_cpp='$CXXCPP $CPPFLAGS'
44811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44814
44815  LDFLAGS="$saved_ldflags"
44816
44817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44818$as_echo "$supports" >&6; }
44819  if test "x$supports" = "xyes" ; then
44820    :
44821    HAS_LINKER_NOW=true
44822  else
44823    :
44824    HAS_LINKER_NOW=false
44825  fi
44826
44827
44828
44829
44830
44831
44832
44833
44834
44835
44836
44837
44838  fi
44839
44840  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44841  # in executable.'
44842  USING_BROKEN_SUSE_LD=no
44843  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44845$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44846    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44847    $ECHO "int main() { }" > main.c
44848    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
44849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44850$as_echo "no" >&6; }
44851      USING_BROKEN_SUSE_LD=no
44852    else
44853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44854$as_echo "yes" >&6; }
44855      USING_BROKEN_SUSE_LD=yes
44856    fi
44857    rm -rf version-script.map main.c a.out
44858  fi
44859
44860
44861
44862# Setup the JTReg Regression Test Harness.
44863
44864
44865# Check whether --with-jtreg was given.
44866if test "${with_jtreg+set}" = set; then :
44867  withval=$with_jtreg;
44868else
44869  with_jtreg=no
44870fi
44871
44872
44873  if test "x$with_jtreg" = xno; then
44874    # jtreg disabled
44875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44876$as_echo_n "checking for jtreg... " >&6; }
44877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44878$as_echo "no" >&6; }
44879  else
44880    if test "x$with_jtreg" != xyes; then
44881      # with path specified.
44882      JT_HOME="$with_jtreg"
44883    fi
44884
44885    if test "x$JT_HOME" != x; then
44886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44887$as_echo_n "checking for jtreg... " >&6; }
44888
44889      # use JT_HOME enviroment var.
44890
44891  # Only process if variable expands to non-empty
44892
44893  if test "x$JT_HOME" != x; then
44894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44895
44896  # Input might be given as Windows format, start by converting to
44897  # unix format.
44898  path="$JT_HOME"
44899  new_path=`$CYGPATH -u "$path"`
44900
44901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44904  # "foo.exe" is OK but "foo" is an error.
44905  #
44906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44907  # It is also a way to make sure we got the proper file name for the real test later on.
44908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44909  if test "x$test_shortpath" = x; then
44910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44911$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44912    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44913  fi
44914
44915  # Call helper function which possibly converts this using DOS-style short mode.
44916  # If so, the updated path is stored in $new_path.
44917
44918  input_path="$new_path"
44919  # Check if we need to convert this using DOS-style short mode. If the path
44920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44921  # take no chances and rewrite it.
44922  # Note: m4 eats our [], so we need to use [ and ] instead.
44923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44924  if test "x$has_forbidden_chars" != x; then
44925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44929      # Going to short mode and back again did indeed matter. Since short mode is
44930      # case insensitive, let's make it lowercase to improve readability.
44931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44932      # Now convert it back to Unix-style (cygpath)
44933      input_path=`$CYGPATH -u "$shortmode_path"`
44934      new_path="$input_path"
44935    fi
44936  fi
44937
44938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44939  if test "x$test_cygdrive_prefix" = x; then
44940    # As a simple fix, exclude /usr/bin since it's not a real path.
44941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44943      # a path prefixed by /cygdrive for fixpath to work.
44944      new_path="$CYGWIN_ROOT_PATH$input_path"
44945    fi
44946  fi
44947
44948
44949  if test "x$path" != "x$new_path"; then
44950    JT_HOME="$new_path"
44951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44952$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44953  fi
44954
44955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44956
44957  path="$JT_HOME"
44958  has_colon=`$ECHO $path | $GREP ^.:`
44959  new_path="$path"
44960  if test "x$has_colon" = x; then
44961    # Not in mixed or Windows style, start by that.
44962    new_path=`cmd //c echo $path`
44963  fi
44964
44965
44966  input_path="$new_path"
44967  # Check if we need to convert this using DOS-style short mode. If the path
44968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44969  # take no chances and rewrite it.
44970  # Note: m4 eats our [], so we need to use [ and ] instead.
44971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44972  if test "x$has_forbidden_chars" != x; then
44973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44975  fi
44976
44977
44978  windows_path="$new_path"
44979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44980    unix_path=`$CYGPATH -u "$windows_path"`
44981    new_path="$unix_path"
44982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44984    new_path="$unix_path"
44985  fi
44986
44987  if test "x$path" != "x$new_path"; then
44988    JT_HOME="$new_path"
44989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44990$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44991  fi
44992
44993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44995
44996    else
44997      # We're on a unix platform. Hooray! :)
44998      path="$JT_HOME"
44999      has_space=`$ECHO "$path" | $GREP " "`
45000      if test "x$has_space" != x; then
45001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45002$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45004      fi
45005
45006      # Use eval to expand a potential ~
45007      eval path="$path"
45008      if test ! -f "$path" && test ! -d "$path"; then
45009        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45010      fi
45011
45012      if test -d "$path"; then
45013        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45014      else
45015        dir="`$DIRNAME "$path"`"
45016        base="`$BASENAME "$path"`"
45017        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45018      fi
45019    fi
45020  fi
45021
45022
45023      # jtreg win32 script works for everybody
45024      JTREGEXE="$JT_HOME/bin/jtreg"
45025
45026      if test ! -f "$JTREGEXE"; then
45027        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45028      fi
45029
45030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45031$as_echo "$JTREGEXE" >&6; }
45032    else
45033      # try to find jtreg on path
45034
45035
45036
45037  # Publish this variable in the help.
45038
45039
45040  if [ -z "${JTREGEXE+x}" ]; then
45041    # The variable is not set by user, try to locate tool using the code snippet
45042    for ac_prog in jtreg
45043do
45044  # Extract the first word of "$ac_prog", so it can be a program name with args.
45045set dummy $ac_prog; ac_word=$2
45046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45047$as_echo_n "checking for $ac_word... " >&6; }
45048if ${ac_cv_path_JTREGEXE+:} false; then :
45049  $as_echo_n "(cached) " >&6
45050else
45051  case $JTREGEXE in
45052  [\\/]* | ?:[\\/]*)
45053  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45054  ;;
45055  *)
45056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45057for as_dir in $PATH
45058do
45059  IFS=$as_save_IFS
45060  test -z "$as_dir" && as_dir=.
45061    for ac_exec_ext in '' $ac_executable_extensions; do
45062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45063    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45065    break 2
45066  fi
45067done
45068  done
45069IFS=$as_save_IFS
45070
45071  ;;
45072esac
45073fi
45074JTREGEXE=$ac_cv_path_JTREGEXE
45075if test -n "$JTREGEXE"; then
45076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45077$as_echo "$JTREGEXE" >&6; }
45078else
45079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45080$as_echo "no" >&6; }
45081fi
45082
45083
45084  test -n "$JTREGEXE" && break
45085done
45086
45087  else
45088    # The variable is set, but is it from the command line or the environment?
45089
45090    # Try to remove the string !JTREGEXE! from our list.
45091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45093      # If it failed, the variable was not from the command line. Ignore it,
45094      # but warn the user (except for BASH, which is always set by the calling BASH).
45095      if test "xJTREGEXE" != xBASH; then
45096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45097$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45098      fi
45099      # Try to locate tool using the code snippet
45100      for ac_prog in jtreg
45101do
45102  # Extract the first word of "$ac_prog", so it can be a program name with args.
45103set dummy $ac_prog; ac_word=$2
45104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45105$as_echo_n "checking for $ac_word... " >&6; }
45106if ${ac_cv_path_JTREGEXE+:} false; then :
45107  $as_echo_n "(cached) " >&6
45108else
45109  case $JTREGEXE in
45110  [\\/]* | ?:[\\/]*)
45111  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45112  ;;
45113  *)
45114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45115for as_dir in $PATH
45116do
45117  IFS=$as_save_IFS
45118  test -z "$as_dir" && as_dir=.
45119    for ac_exec_ext in '' $ac_executable_extensions; do
45120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45121    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45123    break 2
45124  fi
45125done
45126  done
45127IFS=$as_save_IFS
45128
45129  ;;
45130esac
45131fi
45132JTREGEXE=$ac_cv_path_JTREGEXE
45133if test -n "$JTREGEXE"; then
45134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45135$as_echo "$JTREGEXE" >&6; }
45136else
45137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45138$as_echo "no" >&6; }
45139fi
45140
45141
45142  test -n "$JTREGEXE" && break
45143done
45144
45145    else
45146      # If it succeeded, then it was overridden by the user. We will use it
45147      # for the tool.
45148
45149      # First remove it from the list of overridden variables, so we can test
45150      # for unknown variables in the end.
45151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45152
45153      # Check if we try to supply an empty value
45154      if test "x$JTREGEXE" = x; then
45155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45156$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45158$as_echo_n "checking for JTREGEXE... " >&6; }
45159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45160$as_echo "disabled" >&6; }
45161      else
45162        # Check if the provided tool contains a complete path.
45163        tool_specified="$JTREGEXE"
45164        tool_basename="${tool_specified##*/}"
45165        if test "x$tool_basename" = "x$tool_specified"; then
45166          # A command without a complete path is provided, search $PATH.
45167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45168$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45169          # Extract the first word of "$tool_basename", so it can be a program name with args.
45170set dummy $tool_basename; ac_word=$2
45171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45172$as_echo_n "checking for $ac_word... " >&6; }
45173if ${ac_cv_path_JTREGEXE+:} false; then :
45174  $as_echo_n "(cached) " >&6
45175else
45176  case $JTREGEXE in
45177  [\\/]* | ?:[\\/]*)
45178  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45179  ;;
45180  *)
45181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45182for as_dir in $PATH
45183do
45184  IFS=$as_save_IFS
45185  test -z "$as_dir" && as_dir=.
45186    for ac_exec_ext in '' $ac_executable_extensions; do
45187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45188    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45190    break 2
45191  fi
45192done
45193  done
45194IFS=$as_save_IFS
45195
45196  ;;
45197esac
45198fi
45199JTREGEXE=$ac_cv_path_JTREGEXE
45200if test -n "$JTREGEXE"; then
45201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45202$as_echo "$JTREGEXE" >&6; }
45203else
45204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45205$as_echo "no" >&6; }
45206fi
45207
45208
45209          if test "x$JTREGEXE" = x; then
45210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45211          fi
45212        else
45213          # Otherwise we believe it is a complete path. Use it as it is.
45214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45215$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45217$as_echo_n "checking for JTREGEXE... " >&6; }
45218          if test ! -x "$tool_specified"; then
45219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45220$as_echo "not found" >&6; }
45221            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45222          fi
45223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45224$as_echo "$tool_specified" >&6; }
45225        fi
45226      fi
45227    fi
45228
45229  fi
45230
45231
45232
45233  if test "x$JTREGEXE" = x; then
45234    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45235  fi
45236
45237
45238      JT_HOME="`$DIRNAME $JTREGEXE`"
45239    fi
45240  fi
45241
45242
45243
45244
45245
45246
45247  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45248  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45249  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45250    COMPILER_TARGET_BITS_FLAG="-q"
45251    COMPILER_COMMAND_FILE_FLAG="-f"
45252  else
45253    COMPILER_TARGET_BITS_FLAG="-m"
45254    COMPILER_COMMAND_FILE_FLAG="@"
45255
45256    # The solstudio linker does not support @-files.
45257    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45258      COMPILER_COMMAND_FILE_FLAG=
45259    fi
45260
45261    # Check if @file is supported by gcc
45262    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45263      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45264$as_echo_n "checking if @file is supported by gcc... " >&6; }
45265      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45266      $ECHO "" "--version" > command.file
45267      if $CXX @command.file 2>&5 >&5; then
45268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45269$as_echo "yes" >&6; }
45270        COMPILER_COMMAND_FILE_FLAG="@"
45271      else
45272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45273$as_echo "no" >&6; }
45274        COMPILER_COMMAND_FILE_FLAG=
45275      fi
45276      rm -rf command.file
45277    fi
45278  fi
45279
45280
45281
45282  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45283  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45284    ARFLAGS="-r"
45285  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45286    ARFLAGS="-X64"
45287  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45288    # lib.exe is used as AR to create static libraries.
45289    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45290  else
45291    ARFLAGS=""
45292  fi
45293
45294
45295  ## Setup strip.
45296  # FIXME: should this really be per platform, or should it be per toolchain type?
45297  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45298  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45299  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45300    STRIPFLAGS="-g"
45301  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45302    STRIPFLAGS="-x"
45303  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45304    STRIPFLAGS="-S"
45305  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45306    STRIPFLAGS="-X32_64"
45307  fi
45308
45309
45310
45311  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45312    CC_OUT_OPTION=-Fo
45313    EXE_OUT_OPTION=-out:
45314    LD_OUT_OPTION=-out:
45315    AR_OUT_OPTION=-out:
45316  else
45317    # The option used to specify the target .o,.a or .so file.
45318    # When compiling, how to specify the to be created object file.
45319    CC_OUT_OPTION='-o$(SPACE)'
45320    # When linking, how to specify the to be created executable.
45321    EXE_OUT_OPTION='-o$(SPACE)'
45322    # When linking, how to specify the to be created dynamically linkable library.
45323    LD_OUT_OPTION='-o$(SPACE)'
45324    # When archiving, how to specify the to be create static archive for object files.
45325    AR_OUT_OPTION='rcs$(SPACE)'
45326  fi
45327
45328
45329
45330
45331
45332  # On Windows, we need to set RC flags.
45333  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45334    RC_FLAGS="-nologo -l0x409"
45335    if test "x$VARIANT" = xOPT; then
45336      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45337    fi
45338
45339    # The version variables used to create RC_FLAGS may be overridden
45340    # in a custom configure script, or possibly the command line.
45341    # Let those variables be expanded at make time in spec.gmk.
45342    # The \$ are escaped to the shell, and the $(...) variables
45343    # are evaluated by make.
45344    RC_FLAGS="$RC_FLAGS \
45345        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45346        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45347        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45348        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45349        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45350        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45351        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45352  fi
45353
45354
45355  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45356    # silence copyright notice and other headers.
45357    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45358  fi
45359
45360
45361# FIXME: Currently we must test this after toolchain but before flags. Fix!
45362
45363# Now we can test some aspects on the target using configure macros.
45364
45365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45366$as_echo_n "checking for ANSI C header files... " >&6; }
45367if ${ac_cv_header_stdc+:} false; then :
45368  $as_echo_n "(cached) " >&6
45369else
45370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45371/* end confdefs.h.  */
45372#include <stdlib.h>
45373#include <stdarg.h>
45374#include <string.h>
45375#include <float.h>
45376
45377int
45378main ()
45379{
45380
45381  ;
45382  return 0;
45383}
45384_ACEOF
45385if ac_fn_cxx_try_compile "$LINENO"; then :
45386  ac_cv_header_stdc=yes
45387else
45388  ac_cv_header_stdc=no
45389fi
45390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45391
45392if test $ac_cv_header_stdc = yes; then
45393  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45395/* end confdefs.h.  */
45396#include <string.h>
45397
45398_ACEOF
45399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45400  $EGREP "memchr" >/dev/null 2>&1; then :
45401
45402else
45403  ac_cv_header_stdc=no
45404fi
45405rm -f conftest*
45406
45407fi
45408
45409if test $ac_cv_header_stdc = yes; then
45410  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45412/* end confdefs.h.  */
45413#include <stdlib.h>
45414
45415_ACEOF
45416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45417  $EGREP "free" >/dev/null 2>&1; then :
45418
45419else
45420  ac_cv_header_stdc=no
45421fi
45422rm -f conftest*
45423
45424fi
45425
45426if test $ac_cv_header_stdc = yes; then
45427  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45428  if test "$cross_compiling" = yes; then :
45429  :
45430else
45431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45432/* end confdefs.h.  */
45433#include <ctype.h>
45434#include <stdlib.h>
45435#if ((' ' & 0x0FF) == 0x020)
45436# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45437# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45438#else
45439# define ISLOWER(c) \
45440		   (('a' <= (c) && (c) <= 'i') \
45441		     || ('j' <= (c) && (c) <= 'r') \
45442		     || ('s' <= (c) && (c) <= 'z'))
45443# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45444#endif
45445
45446#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45447int
45448main ()
45449{
45450  int i;
45451  for (i = 0; i < 256; i++)
45452    if (XOR (islower (i), ISLOWER (i))
45453	|| toupper (i) != TOUPPER (i))
45454      return 2;
45455  return 0;
45456}
45457_ACEOF
45458if ac_fn_cxx_try_run "$LINENO"; then :
45459
45460else
45461  ac_cv_header_stdc=no
45462fi
45463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45464  conftest.$ac_objext conftest.beam conftest.$ac_ext
45465fi
45466
45467fi
45468fi
45469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45470$as_echo "$ac_cv_header_stdc" >&6; }
45471if test $ac_cv_header_stdc = yes; then
45472
45473$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45474
45475fi
45476
45477# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45478for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45479		  inttypes.h stdint.h unistd.h
45480do :
45481  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45482ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45483"
45484if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45485  cat >>confdefs.h <<_ACEOF
45486#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45487_ACEOF
45488
45489fi
45490
45491done
45492
45493
45494
45495  ###############################################################################
45496  #
45497  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45498  # (The JVM can use 32 or 64 bit Java pointers but that decision
45499  # is made at runtime.)
45500  #
45501
45502  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45503    # Always specify -m flag on Solaris
45504    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45505
45506  # When we add flags to the "official" CFLAGS etc, we need to
45507  # keep track of these additions in ADDED_CFLAGS etc. These
45508  # will later be checked to make sure only controlled additions
45509  # have been made to CFLAGS etc.
45510  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45511  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45512  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45513
45514  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45515  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45516  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45517
45518  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45519  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45520  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45521
45522  elif test "x$COMPILE_TYPE" = xreduced; then
45523    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45524      # Specify -m if running reduced on unix platforms
45525
45526  # When we add flags to the "official" CFLAGS etc, we need to
45527  # keep track of these additions in ADDED_CFLAGS etc. These
45528  # will later be checked to make sure only controlled additions
45529  # have been made to CFLAGS etc.
45530  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45531  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45532  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45533
45534  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45535  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45536  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45537
45538  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45539  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45540  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45541
45542    fi
45543  fi
45544
45545  # Make compilation sanity check
45546  for ac_header in stdio.h
45547do :
45548  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45549if test "x$ac_cv_header_stdio_h" = xyes; then :
45550  cat >>confdefs.h <<_ACEOF
45551#define HAVE_STDIO_H 1
45552_ACEOF
45553
45554else
45555
45556    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45557$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45558    if test "x$COMPILE_TYPE" = xreduced; then
45559
45560  # Print a helpful message on how to acquire the necessary build dependency.
45561  # reduced is the help tag: freetype, cups, alsa etc
45562  MISSING_DEPENDENCY=reduced
45563
45564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45565    cygwin_help $MISSING_DEPENDENCY
45566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45567    msys_help $MISSING_DEPENDENCY
45568  else
45569    PKGHANDLER_COMMAND=
45570
45571    case $PKGHANDLER in
45572      apt-get)
45573        apt_help     $MISSING_DEPENDENCY ;;
45574      yum)
45575        yum_help     $MISSING_DEPENDENCY ;;
45576      port)
45577        port_help    $MISSING_DEPENDENCY ;;
45578      pkgutil)
45579        pkgutil_help $MISSING_DEPENDENCY ;;
45580      pkgadd)
45581        pkgadd_help  $MISSING_DEPENDENCY ;;
45582    esac
45583
45584    if test "x$PKGHANDLER_COMMAND" != x; then
45585      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45586    fi
45587  fi
45588
45589      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45590$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45591    elif test "x$COMPILE_TYPE" = xcross; then
45592      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45593$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45594    fi
45595    as_fn_error $? "Cannot continue." "$LINENO" 5
45596
45597fi
45598
45599done
45600
45601
45602  # The cast to long int works around a bug in the HP C Compiler
45603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45605# This bug is HP SR number 8606223364.
45606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45607$as_echo_n "checking size of int *... " >&6; }
45608if ${ac_cv_sizeof_int_p+:} false; then :
45609  $as_echo_n "(cached) " >&6
45610else
45611  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45612
45613else
45614  if test "$ac_cv_type_int_p" = yes; then
45615     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45617as_fn_error 77 "cannot compute sizeof (int *)
45618See \`config.log' for more details" "$LINENO" 5; }
45619   else
45620     ac_cv_sizeof_int_p=0
45621   fi
45622fi
45623
45624fi
45625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45626$as_echo "$ac_cv_sizeof_int_p" >&6; }
45627
45628
45629
45630cat >>confdefs.h <<_ACEOF
45631#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45632_ACEOF
45633
45634
45635
45636  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45637  if test "x$ac_cv_sizeof_int_p" = x; then
45638    # The test failed, lets stick to the assumed value.
45639    { $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
45640$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45641  else
45642    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45643
45644    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45645      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45646      # Let's try to implicitely set the compilers target architecture and retry the test
45647      { $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
45648$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;}
45649      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45650$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45651
45652  # When we add flags to the "official" CFLAGS etc, we need to
45653  # keep track of these additions in ADDED_CFLAGS etc. These
45654  # will later be checked to make sure only controlled additions
45655  # have been made to CFLAGS etc.
45656  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45657  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45658  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45659
45660  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45661  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45662  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45663
45664  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45665  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45666  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45667
45668
45669      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45670      unset ac_cv_sizeof_int_p
45671      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45672      cat >>confdefs.h <<_ACEOF
45673#undef SIZEOF_INT_P
45674_ACEOF
45675
45676      # The cast to long int works around a bug in the HP C Compiler
45677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45679# This bug is HP SR number 8606223364.
45680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45681$as_echo_n "checking size of int *... " >&6; }
45682if ${ac_cv_sizeof_int_p+:} false; then :
45683  $as_echo_n "(cached) " >&6
45684else
45685  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45686
45687else
45688  if test "$ac_cv_type_int_p" = yes; then
45689     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45691as_fn_error 77 "cannot compute sizeof (int *)
45692See \`config.log' for more details" "$LINENO" 5; }
45693   else
45694     ac_cv_sizeof_int_p=0
45695   fi
45696fi
45697
45698fi
45699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45700$as_echo "$ac_cv_sizeof_int_p" >&6; }
45701
45702
45703
45704cat >>confdefs.h <<_ACEOF
45705#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45706_ACEOF
45707
45708
45709
45710      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45711
45712      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45713        { $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
45714$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;}
45715        if test "x$COMPILE_TYPE" = xreduced; then
45716
45717  # Print a helpful message on how to acquire the necessary build dependency.
45718  # reduced is the help tag: freetype, cups, alsa etc
45719  MISSING_DEPENDENCY=reduced
45720
45721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45722    cygwin_help $MISSING_DEPENDENCY
45723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45724    msys_help $MISSING_DEPENDENCY
45725  else
45726    PKGHANDLER_COMMAND=
45727
45728    case $PKGHANDLER in
45729      apt-get)
45730        apt_help     $MISSING_DEPENDENCY ;;
45731      yum)
45732        yum_help     $MISSING_DEPENDENCY ;;
45733      port)
45734        port_help    $MISSING_DEPENDENCY ;;
45735      pkgutil)
45736        pkgutil_help $MISSING_DEPENDENCY ;;
45737      pkgadd)
45738        pkgadd_help  $MISSING_DEPENDENCY ;;
45739    esac
45740
45741    if test "x$PKGHANDLER_COMMAND" != x; then
45742      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45743    fi
45744  fi
45745
45746          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45747$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45748        elif test "x$COMPILE_TYPE" = xcross; then
45749          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45750$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45751        fi
45752        as_fn_error $? "Cannot continue." "$LINENO" 5
45753      fi
45754    fi
45755  fi
45756
45757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45758$as_echo_n "checking for target address size... " >&6; }
45759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45760$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45761
45762
45763  ###############################################################################
45764  #
45765  # Is the target little of big endian?
45766  #
45767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45768$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45769if ${ac_cv_c_bigendian+:} false; then :
45770  $as_echo_n "(cached) " >&6
45771else
45772  ac_cv_c_bigendian=unknown
45773    # See if we're dealing with a universal compiler.
45774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45775/* end confdefs.h.  */
45776#ifndef __APPLE_CC__
45777	       not a universal capable compiler
45778	     #endif
45779	     typedef int dummy;
45780
45781_ACEOF
45782if ac_fn_cxx_try_compile "$LINENO"; then :
45783
45784	# Check for potential -arch flags.  It is not universal unless
45785	# there are at least two -arch flags with different values.
45786	ac_arch=
45787	ac_prev=
45788	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45789	 if test -n "$ac_prev"; then
45790	   case $ac_word in
45791	     i?86 | x86_64 | ppc | ppc64)
45792	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45793		 ac_arch=$ac_word
45794	       else
45795		 ac_cv_c_bigendian=universal
45796		 break
45797	       fi
45798	       ;;
45799	   esac
45800	   ac_prev=
45801	 elif test "x$ac_word" = "x-arch"; then
45802	   ac_prev=arch
45803	 fi
45804       done
45805fi
45806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45807    if test $ac_cv_c_bigendian = unknown; then
45808      # See if sys/param.h defines the BYTE_ORDER macro.
45809      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45810/* end confdefs.h.  */
45811#include <sys/types.h>
45812	     #include <sys/param.h>
45813
45814int
45815main ()
45816{
45817#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45818		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45819		     && LITTLE_ENDIAN)
45820	      bogus endian macros
45821	     #endif
45822
45823  ;
45824  return 0;
45825}
45826_ACEOF
45827if ac_fn_cxx_try_compile "$LINENO"; then :
45828  # It does; now see whether it defined to BIG_ENDIAN or not.
45829	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45830/* end confdefs.h.  */
45831#include <sys/types.h>
45832		#include <sys/param.h>
45833
45834int
45835main ()
45836{
45837#if BYTE_ORDER != BIG_ENDIAN
45838		 not big endian
45839		#endif
45840
45841  ;
45842  return 0;
45843}
45844_ACEOF
45845if ac_fn_cxx_try_compile "$LINENO"; then :
45846  ac_cv_c_bigendian=yes
45847else
45848  ac_cv_c_bigendian=no
45849fi
45850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45851fi
45852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45853    fi
45854    if test $ac_cv_c_bigendian = unknown; then
45855      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45856      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45857/* end confdefs.h.  */
45858#include <limits.h>
45859
45860int
45861main ()
45862{
45863#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45864	      bogus endian macros
45865	     #endif
45866
45867  ;
45868  return 0;
45869}
45870_ACEOF
45871if ac_fn_cxx_try_compile "$LINENO"; then :
45872  # It does; now see whether it defined to _BIG_ENDIAN or not.
45873	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45874/* end confdefs.h.  */
45875#include <limits.h>
45876
45877int
45878main ()
45879{
45880#ifndef _BIG_ENDIAN
45881		 not big endian
45882		#endif
45883
45884  ;
45885  return 0;
45886}
45887_ACEOF
45888if ac_fn_cxx_try_compile "$LINENO"; then :
45889  ac_cv_c_bigendian=yes
45890else
45891  ac_cv_c_bigendian=no
45892fi
45893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45894fi
45895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45896    fi
45897    if test $ac_cv_c_bigendian = unknown; then
45898      # Compile a test program.
45899      if test "$cross_compiling" = yes; then :
45900  # Try to guess by grepping values from an object file.
45901	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45902/* end confdefs.h.  */
45903short int ascii_mm[] =
45904		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45905		short int ascii_ii[] =
45906		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45907		int use_ascii (int i) {
45908		  return ascii_mm[i] + ascii_ii[i];
45909		}
45910		short int ebcdic_ii[] =
45911		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45912		short int ebcdic_mm[] =
45913		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45914		int use_ebcdic (int i) {
45915		  return ebcdic_mm[i] + ebcdic_ii[i];
45916		}
45917		extern int foo;
45918
45919int
45920main ()
45921{
45922return use_ascii (foo) == use_ebcdic (foo);
45923  ;
45924  return 0;
45925}
45926_ACEOF
45927if ac_fn_cxx_try_compile "$LINENO"; then :
45928  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45929	      ac_cv_c_bigendian=yes
45930	    fi
45931	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45932	      if test "$ac_cv_c_bigendian" = unknown; then
45933		ac_cv_c_bigendian=no
45934	      else
45935		# finding both strings is unlikely to happen, but who knows?
45936		ac_cv_c_bigendian=unknown
45937	      fi
45938	    fi
45939fi
45940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45941else
45942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45943/* end confdefs.h.  */
45944$ac_includes_default
45945int
45946main ()
45947{
45948
45949	     /* Are we little or big endian?  From Harbison&Steele.  */
45950	     union
45951	     {
45952	       long int l;
45953	       char c[sizeof (long int)];
45954	     } u;
45955	     u.l = 1;
45956	     return u.c[sizeof (long int) - 1] == 1;
45957
45958  ;
45959  return 0;
45960}
45961_ACEOF
45962if ac_fn_cxx_try_run "$LINENO"; then :
45963  ac_cv_c_bigendian=no
45964else
45965  ac_cv_c_bigendian=yes
45966fi
45967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45968  conftest.$ac_objext conftest.beam conftest.$ac_ext
45969fi
45970
45971    fi
45972fi
45973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45974$as_echo "$ac_cv_c_bigendian" >&6; }
45975 case $ac_cv_c_bigendian in #(
45976   yes)
45977     ENDIAN="big";; #(
45978   no)
45979     ENDIAN="little" ;; #(
45980   universal)
45981     ENDIAN="universal_endianness"
45982     ;; #(
45983   *)
45984     ENDIAN="unknown" ;;
45985 esac
45986
45987
45988  if test "x$ENDIAN" = xuniversal_endianness; then
45989    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45990  fi
45991  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45992    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
45993  fi
45994
45995
45996# Configure flags for the tools
45997
45998  ###############################################################################
45999  #
46000  # How to compile shared libraries.
46001  #
46002
46003  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46004    PICFLAG="-fPIC"
46005    C_FLAG_REORDER=''
46006    CXX_FLAG_REORDER=''
46007
46008    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46009      # Linking is different on MacOSX
46010      if test "x$STATIC_BUILD" = xtrue; then
46011        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46012      else
46013        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46014      fi
46015      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46016      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46017      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46018      SET_SHARED_LIBRARY_MAPFILE=''
46019    else
46020      # Default works for linux, might work on other platforms as well.
46021      SHARED_LIBRARY_FLAGS='-shared'
46022      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46023      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46024      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46025      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46026    fi
46027  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46028    C_FLAG_REORDER=''
46029    CXX_FLAG_REORDER=''
46030
46031    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46032      # Linking is different on MacOSX
46033      PICFLAG=''
46034      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46035      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46036      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46037      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46038      SET_SHARED_LIBRARY_MAPFILE=''
46039    else
46040      # Default works for linux, might work on other platforms as well.
46041      PICFLAG='-fPIC'
46042      SHARED_LIBRARY_FLAGS='-shared'
46043      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46044      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46045      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46046      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46047    fi
46048  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46049    PICFLAG="-KPIC"
46050    C_FLAG_REORDER='-xF'
46051    CXX_FLAG_REORDER='-xF'
46052    SHARED_LIBRARY_FLAGS="-G"
46053    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46054    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46055    SET_SHARED_LIBRARY_NAME='-h $1'
46056    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46057  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46058    PICFLAG="-qpic=large"
46059    C_FLAG_REORDER=''
46060    CXX_FLAG_REORDER=''
46061    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46062    SET_EXECUTABLE_ORIGIN=""
46063    SET_SHARED_LIBRARY_ORIGIN=''
46064    SET_SHARED_LIBRARY_NAME=''
46065    SET_SHARED_LIBRARY_MAPFILE=''
46066  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46067    PICFLAG=""
46068    C_FLAG_REORDER=''
46069    CXX_FLAG_REORDER=''
46070    SHARED_LIBRARY_FLAGS="-dll"
46071    SET_EXECUTABLE_ORIGIN=''
46072    SET_SHARED_LIBRARY_ORIGIN=''
46073    SET_SHARED_LIBRARY_NAME=''
46074    SET_SHARED_LIBRARY_MAPFILE=''
46075  fi
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46086    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46087    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46088    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46089  fi
46090  # The (cross) compiler is now configured, we can now test capabilities
46091  # of the target platform.
46092
46093
46094
46095  ###############################################################################
46096  #
46097  # Setup the opt flags for different compilers
46098  # and different operating systems.
46099  #
46100
46101  # FIXME: this was indirectly the old default, but just inherited.
46102  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46103  #   C_FLAG_DEPS="-MMD -MF"
46104  # fi
46105
46106  # Generate make dependency files
46107  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46108    C_FLAG_DEPS="-MMD -MF"
46109  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46110    C_FLAG_DEPS="-MMD -MF"
46111  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46112    C_FLAG_DEPS="-xMMD -xMF"
46113  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46114    C_FLAG_DEPS="-qmakedep=gcc -MF"
46115  fi
46116  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46117
46118
46119
46120  # Debug symbols
46121  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46122    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46123      # reduce from default "-g2" option to save space
46124      CFLAGS_DEBUG_SYMBOLS="-g1"
46125      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46126    else
46127      CFLAGS_DEBUG_SYMBOLS="-g"
46128      CXXFLAGS_DEBUG_SYMBOLS="-g"
46129    fi
46130  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46131    CFLAGS_DEBUG_SYMBOLS="-g"
46132    CXXFLAGS_DEBUG_SYMBOLS="-g"
46133  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46134    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46135    # -g0 enables debug symbols without disabling inlining.
46136    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46137  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46138    CFLAGS_DEBUG_SYMBOLS="-g"
46139    CXXFLAGS_DEBUG_SYMBOLS="-g"
46140  fi
46141
46142
46143
46144  # bounds, memory and behavior checking options
46145  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46146    case $DEBUG_LEVEL in
46147    release )
46148      # no adjustment
46149      ;;
46150    fastdebug )
46151      # no adjustment
46152      ;;
46153    slowdebug )
46154      # Add runtime stack smashing and undefined behavior checks.
46155      # Not all versions of gcc support -fstack-protector
46156      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192
46193
46194
46195
46196
46197
46198
46199    # Execute function body
46200
46201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
46202$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
46203  supports=yes
46204
46205  saved_cflags="$CFLAGS"
46206  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
46207  ac_ext=c
46208ac_cpp='$CPP $CPPFLAGS'
46209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46211ac_compiler_gnu=$ac_cv_c_compiler_gnu
46212
46213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46214/* end confdefs.h.  */
46215int i;
46216_ACEOF
46217if ac_fn_c_try_compile "$LINENO"; then :
46218
46219else
46220  supports=no
46221fi
46222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46223  ac_ext=cpp
46224ac_cpp='$CXXCPP $CPPFLAGS'
46225ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46226ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46227ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46228
46229  CFLAGS="$saved_cflags"
46230
46231  saved_cxxflags="$CXXFLAGS"
46232  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
46233  ac_ext=cpp
46234ac_cpp='$CXXCPP $CPPFLAGS'
46235ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46236ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46237ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46238
46239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46240/* end confdefs.h.  */
46241int i;
46242_ACEOF
46243if ac_fn_cxx_try_compile "$LINENO"; then :
46244
46245else
46246  supports=no
46247fi
46248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46249  ac_ext=cpp
46250ac_cpp='$CXXCPP $CPPFLAGS'
46251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46254
46255  CXXFLAGS="$saved_cxxflags"
46256
46257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46258$as_echo "$supports" >&6; }
46259  if test "x$supports" = "xyes" ; then
46260    :
46261
46262  else
46263    :
46264    STACK_PROTECTOR_CFLAG=""
46265  fi
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46280      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46281      ;;
46282    esac
46283  fi
46284
46285  # Optimization levels
46286  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46287    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46288
46289    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46290      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46291      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46292      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46293      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46294      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46295      C_O_FLAG_NONE="-xregs=no%frameptr"
46296      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46297      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46298      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46299      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46300      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46301      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46302        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46303        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46304      fi
46305    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46306      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46307      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46308      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46309      C_O_FLAG_DEBUG=""
46310      C_O_FLAG_NONE=""
46311      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46312      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46313      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46314      C_O_FLAG_DEBUG=""
46315      CXX_O_FLAG_NONE=""
46316    fi
46317  else
46318    # The remaining toolchains share opt flags between CC and CXX;
46319    # setup for C and duplicate afterwards.
46320    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46321      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46322        # On MacOSX we optimize for size, something
46323        # we should do for all platforms?
46324        C_O_FLAG_HIGHEST="-Os"
46325        C_O_FLAG_HI="-Os"
46326        C_O_FLAG_NORM="-Os"
46327      else
46328        C_O_FLAG_HIGHEST="-O3"
46329        C_O_FLAG_HI="-O3"
46330        C_O_FLAG_NORM="-O2"
46331      fi
46332      C_O_FLAG_DEBUG="-O0"
46333      C_O_FLAG_NONE="-O0"
46334    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46335      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46336        # On MacOSX we optimize for size, something
46337        # we should do for all platforms?
46338        C_O_FLAG_HIGHEST="-Os"
46339        C_O_FLAG_HI="-Os"
46340        C_O_FLAG_NORM="-Os"
46341      else
46342        C_O_FLAG_HIGHEST="-O3"
46343        C_O_FLAG_HI="-O3"
46344        C_O_FLAG_NORM="-O2"
46345      fi
46346      C_O_FLAG_DEBUG="-O0"
46347      C_O_FLAG_NONE="-O0"
46348    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46349      C_O_FLAG_HIGHEST="-O3"
46350      C_O_FLAG_HI="-O3 -qstrict"
46351      C_O_FLAG_NORM="-O2"
46352      C_O_FLAG_DEBUG="-qnoopt"
46353      C_O_FLAG_NONE="-qnoopt"
46354    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46355      C_O_FLAG_HIGHEST="-O2"
46356      C_O_FLAG_HI="-O1"
46357      C_O_FLAG_NORM="-O1"
46358      C_O_FLAG_DEBUG="-Od"
46359      C_O_FLAG_NONE="-Od"
46360    fi
46361    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46362    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46363    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46364    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46365    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46366  fi
46367
46368  # Adjust optimization flags according to debug level.
46369  case $DEBUG_LEVEL in
46370    release )
46371      # no adjustment
46372      ;;
46373    fastdebug )
46374      # Not quite so much optimization
46375      C_O_FLAG_HI="$C_O_FLAG_NORM"
46376      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46377      ;;
46378    slowdebug )
46379      # Disable optimization
46380      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46381      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46382      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46383      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46384      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46385      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46386      ;;
46387  esac
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399
46400
46401  # Special extras...
46402  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46403    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46404      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46405      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46406    fi
46407    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46408    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46409  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46410    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46411    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46412  fi
46413
46414  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46415  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46416  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46417
46418  ###############################################################################
46419  #
46420  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46421  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46422  #
46423
46424  # Setup compiler/platform specific flags into
46425  #    CFLAGS_JDK    - C Compiler flags
46426  #    CXXFLAGS_JDK  - C++ Compiler flags
46427  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46428  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46429    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46430      # Force compatibility with i586 on 32 bit intel platforms.
46431      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46432    fi
46433    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46434        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46435    case $OPENJDK_TARGET_CPU_ARCH in
46436      arm )
46437        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46438        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46439        ;;
46440      ppc )
46441        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46442        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46443        ;;
46444      * )
46445        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46446        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46447        ;;
46448    esac
46449  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46450    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46451      if test "x$OPENJDK_TARGET_CPU" = xx86; then
46452        # Force compatibility with i586 on 32 bit intel platforms.
46453        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46454      fi
46455      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46456          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46457      case $OPENJDK_TARGET_CPU_ARCH in
46458        ppc )
46459          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46460          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46461          ;;
46462        * )
46463          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46464          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46465          ;;
46466      esac
46467    fi
46468  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46469    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46470    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46471      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46472    fi
46473
46474    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46475    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46476  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46477    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46478    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46479  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46480    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46481        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46482        -DWIN32_LEAN_AND_MEAN \
46483        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46484        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46485        -DWIN32 -DIAL"
46486    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46487      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46488    else
46489      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46490    fi
46491    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46492    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46493    # studio.
46494    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46495      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46496          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46497    fi
46498  fi
46499
46500  ###############################################################################
46501
46502  # Adjust flags according to debug level.
46503  case $DEBUG_LEVEL in
46504    fastdebug | slowdebug )
46505      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46506      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46507      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46508      ;;
46509    release )
46510      ;;
46511    * )
46512      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46513      ;;
46514  esac
46515
46516  # Setup LP64
46517  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46518
46519  # Set some common defines. These works for all compilers, but assume
46520  # -D is universally accepted.
46521
46522  # Setup endianness
46523  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46524    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46525    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46526    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46527    #   Note: -Dmacro         is the same as    #define macro 1
46528    #         -Dmacro=        is the same as    #define macro
46529    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46530      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46531    else
46532      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46533    fi
46534  else
46535    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46536    # are defined in the system?
46537    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46538      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46539    else
46540      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46541    fi
46542  fi
46543
46544  # Setup target OS define. Use OS target name but in upper case.
46545  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46546  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46547
46548  # Setup target CPU
46549  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46550
46551  # Setup debug/release defines
46552  if test "x$DEBUG_LEVEL" = xrelease; then
46553    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46554    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46555      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46556    fi
46557  else
46558    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46559  fi
46560
46561  # Set some additional per-OS defines.
46562  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46563    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46564  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46565    # FIXME: PPC64 should not be here.
46566    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46567  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46568    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46569  fi
46570
46571  # Additional macosx handling
46572  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46573    # Setting these parameters makes it an error to link to macosx APIs that are
46574    # newer than the given OS version and makes the linked binaries compatible
46575    # even if built on a newer version of the OS.
46576    # The expected format is X.Y.Z
46577    MACOSX_VERSION_MIN=10.7.0
46578
46579
46580    # The macro takes the version with no dots, ex: 1070
46581    # Let the flags variables get resolved in make for easier override on make
46582    # command line.
46583    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46584    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46585  fi
46586
46587  # Setup some hard coded includes
46588  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46589      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46590      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46591      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46592      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46593      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46594
46595  # The shared libraries are compiled using the picflag.
46596  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46597  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46598
46599  # Executable flags
46600  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46601  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46602
46603
46604
46605
46606
46607
46608  # Flags for compiling test libraries
46609  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46610  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46611
46612  # Flags for compiling test executables
46613  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46614  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46615
46616
46617
46618
46619
46620
46621  # Setup LDFLAGS et al.
46622  #
46623
46624  # Now this is odd. The JDK native libraries have to link against libjvm.so
46625  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46626  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46627  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46628  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46629  # libraries will link to whatever is in memory. Yuck.
46630  #
46631  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46632  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46633    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46634    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46635      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46636    fi
46637    # TODO: make -debug optional "--disable-full-debug-symbols"
46638    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46639  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46640    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46641    # We have previously set HAS_GNU_HASH if this is the case
46642    if test -n "$HAS_GNU_HASH"; then
46643      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
46644    fi
46645    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46646      # And since we now know that the linker is gnu, then add -z defs, to forbid
46647      # undefined symbols in object files.
46648      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
46649      case $DEBUG_LEVEL in
46650        release )
46651          # tell linker to optimize libraries.
46652          # Should this be supplied to the OSS linker as well?
46653          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
46654          ;;
46655        slowdebug )
46656          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46657            # do relocations at load
46658            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46659            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46660          fi
46661          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46662            # mark relocations read only
46663            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46664            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46665          fi
46666          ;;
46667        fastdebug )
46668          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46669            # mark relocations read only
46670            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46671            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46672          fi
46673          ;;
46674        * )
46675          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46676          ;;
46677        esac
46678    fi
46679  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46680    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
46681    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46682  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46683    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46684  fi
46685
46686  # Customize LDFLAGS for executables
46687
46688  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46689
46690  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46691    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46692      LDFLAGS_STACK_SIZE=1048576
46693    else
46694      LDFLAGS_STACK_SIZE=327680
46695    fi
46696    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46697  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46698    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
46699  fi
46700
46701  # Customize LDFLAGS for libs
46702  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46703
46704  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
46705  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46706    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46707        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46708    JDKLIB_LIBS=""
46709  else
46710    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46711        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46712
46713    # On some platforms (mac) the linker warns about non existing -L dirs.
46714    # Add server first if available. Linking aginst client does not always produce the same results.
46715    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46716    # Default to server for other variants.
46717    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46718      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46719    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46720      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46721    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46722      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46723    else
46724      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46725    fi
46726
46727    JDKLIB_LIBS="-ljava -ljvm"
46728    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46729      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46730    fi
46731  fi
46732
46733
46734
46735
46736
46737
46738
46739  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46740  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46741
46742
46743
46744
46745
46746  # Some Zero and Shark settings.
46747  # ZERO_ARCHFLAG tells the compiler which mode to build for
46748  case "${OPENJDK_TARGET_CPU}" in
46749    s390)
46750      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46751      ;;
46752    *)
46753      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46754  esac
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790
46791
46792
46793
46794
46795
46796
46797    # Execute function body
46798
46799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46800$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46801  supports=yes
46802
46803  saved_cflags="$CFLAGS"
46804  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46805  ac_ext=c
46806ac_cpp='$CPP $CPPFLAGS'
46807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46809ac_compiler_gnu=$ac_cv_c_compiler_gnu
46810
46811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46812/* end confdefs.h.  */
46813int i;
46814_ACEOF
46815if ac_fn_c_try_compile "$LINENO"; then :
46816
46817else
46818  supports=no
46819fi
46820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46821  ac_ext=cpp
46822ac_cpp='$CXXCPP $CPPFLAGS'
46823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46826
46827  CFLAGS="$saved_cflags"
46828
46829  saved_cxxflags="$CXXFLAGS"
46830  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46831  ac_ext=cpp
46832ac_cpp='$CXXCPP $CPPFLAGS'
46833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46836
46837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46838/* end confdefs.h.  */
46839int i;
46840_ACEOF
46841if ac_fn_cxx_try_compile "$LINENO"; then :
46842
46843else
46844  supports=no
46845fi
46846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46847  ac_ext=cpp
46848ac_cpp='$CXXCPP $CPPFLAGS'
46849ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46850ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46851ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46852
46853  CXXFLAGS="$saved_cxxflags"
46854
46855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46856$as_echo "$supports" >&6; }
46857  if test "x$supports" = "xyes" ; then
46858    :
46859
46860  else
46861    :
46862    ZERO_ARCHFLAG=""
46863  fi
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878  # Check that the compiler supports -mX (or -qX on AIX) flags
46879  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920
46921
46922
46923
46924
46925
46926
46927    # Execute function body
46928
46929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46930$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46931  supports=yes
46932
46933  saved_cflags="$CFLAGS"
46934  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46935  ac_ext=c
46936ac_cpp='$CPP $CPPFLAGS'
46937ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46938ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46939ac_compiler_gnu=$ac_cv_c_compiler_gnu
46940
46941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46942/* end confdefs.h.  */
46943int i;
46944_ACEOF
46945if ac_fn_c_try_compile "$LINENO"; then :
46946
46947else
46948  supports=no
46949fi
46950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46951  ac_ext=cpp
46952ac_cpp='$CXXCPP $CPPFLAGS'
46953ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46954ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46955ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46956
46957  CFLAGS="$saved_cflags"
46958
46959  saved_cxxflags="$CXXFLAGS"
46960  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46961  ac_ext=cpp
46962ac_cpp='$CXXCPP $CPPFLAGS'
46963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46966
46967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46968/* end confdefs.h.  */
46969int i;
46970_ACEOF
46971if ac_fn_cxx_try_compile "$LINENO"; then :
46972
46973else
46974  supports=no
46975fi
46976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46977  ac_ext=cpp
46978ac_cpp='$CXXCPP $CPPFLAGS'
46979ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46980ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46981ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46982
46983  CXXFLAGS="$saved_cxxflags"
46984
46985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46986$as_echo "$supports" >&6; }
46987  if test "x$supports" = "xyes" ; then
46988    :
46989    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46990  else
46991    :
46992    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46993  fi
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008  # Check whether --enable-warnings-as-errors was given.
47009if test "${enable_warnings_as_errors+set}" = set; then :
47010  enableval=$enable_warnings_as_errors;
47011fi
47012
47013
47014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47015$as_echo_n "checking if native warnings are errors... " >&6; }
47016  if test "x$enable_warnings_as_errors" = "xyes"; then
47017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47018$as_echo "yes (explicitely set)" >&6; }
47019    WARNINGS_AS_ERRORS=true
47020  elif test "x$enable_warnings_as_errors" = "xno"; then
47021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47022$as_echo "no" >&6; }
47023    WARNINGS_AS_ERRORS=false
47024  elif test "x$enable_warnings_as_errors" = "x"; then
47025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47026$as_echo "yes (default)" >&6; }
47027    WARNINGS_AS_ERRORS=true
47028  else
47029    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47030  fi
47031
47032  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47033    # Set legacy hotspot variable
47034    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47035  else
47036    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47037  fi
47038
47039
47040
47041
47042  case "${TOOLCHAIN_TYPE}" in
47043    microsoft)
47044      DISABLE_WARNING_PREFIX="-wd"
47045      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47046      ;;
47047    solstudio)
47048      DISABLE_WARNING_PREFIX="-erroff="
47049      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47050      ;;
47051    gcc)
47052      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100    # Execute function body
47101
47102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47103$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47104  supports=yes
47105
47106  saved_cflags="$CFLAGS"
47107  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47108  ac_ext=c
47109ac_cpp='$CPP $CPPFLAGS'
47110ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47111ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47112ac_compiler_gnu=$ac_cv_c_compiler_gnu
47113
47114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47115/* end confdefs.h.  */
47116int i;
47117_ACEOF
47118if ac_fn_c_try_compile "$LINENO"; then :
47119
47120else
47121  supports=no
47122fi
47123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47124  ac_ext=cpp
47125ac_cpp='$CXXCPP $CPPFLAGS'
47126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47129
47130  CFLAGS="$saved_cflags"
47131
47132  saved_cxxflags="$CXXFLAGS"
47133  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47134  ac_ext=cpp
47135ac_cpp='$CXXCPP $CPPFLAGS'
47136ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47137ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47138ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47139
47140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47141/* end confdefs.h.  */
47142int i;
47143_ACEOF
47144if ac_fn_cxx_try_compile "$LINENO"; then :
47145
47146else
47147  supports=no
47148fi
47149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47150  ac_ext=cpp
47151ac_cpp='$CXXCPP $CPPFLAGS'
47152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47155
47156  CXXFLAGS="$saved_cxxflags"
47157
47158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47159$as_echo "$supports" >&6; }
47160  if test "x$supports" = "xyes" ; then
47161    :
47162    GCC_CAN_DISABLE_WARNINGS=true
47163  else
47164    :
47165    GCC_CAN_DISABLE_WARNINGS=false
47166
47167  fi
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47181        DISABLE_WARNING_PREFIX="-Wno-"
47182      else
47183        DISABLE_WARNING_PREFIX=
47184      fi
47185      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47186      # Repeate the check for the BUILD_CC
47187      CC_OLD="$CC"
47188      CC="$BUILD_CC"
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236    # Execute function body
47237
47238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47239$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47240  supports=yes
47241
47242  saved_cflags="$CFLAGS"
47243  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47244  ac_ext=c
47245ac_cpp='$CPP $CPPFLAGS'
47246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47248ac_compiler_gnu=$ac_cv_c_compiler_gnu
47249
47250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47251/* end confdefs.h.  */
47252int i;
47253_ACEOF
47254if ac_fn_c_try_compile "$LINENO"; then :
47255
47256else
47257  supports=no
47258fi
47259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47260  ac_ext=cpp
47261ac_cpp='$CXXCPP $CPPFLAGS'
47262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47265
47266  CFLAGS="$saved_cflags"
47267
47268  saved_cxxflags="$CXXFLAGS"
47269  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47270  ac_ext=cpp
47271ac_cpp='$CXXCPP $CPPFLAGS'
47272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47275
47276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47277/* end confdefs.h.  */
47278int i;
47279_ACEOF
47280if ac_fn_cxx_try_compile "$LINENO"; then :
47281
47282else
47283  supports=no
47284fi
47285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47286  ac_ext=cpp
47287ac_cpp='$CXXCPP $CPPFLAGS'
47288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47291
47292  CXXFLAGS="$saved_cxxflags"
47293
47294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47295$as_echo "$supports" >&6; }
47296  if test "x$supports" = "xyes" ; then
47297    :
47298    BUILD_CC_CAN_DISABLE_WARNINGS=true
47299  else
47300    :
47301    BUILD_CC_CAN_DISABLE_WARNINGS=false
47302
47303  fi
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47317        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47318      else
47319        BUILD_CC_DISABLE_WARNING_PREFIX=
47320      fi
47321      CC="$CC_OLD"
47322      ;;
47323    clang)
47324      DISABLE_WARNING_PREFIX="-Wno-"
47325      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47326      ;;
47327  esac
47328
47329
47330
47331
47332# Setup debug symbols (need objcopy from the toolchain for that)
47333
47334  #
47335  # NATIVE_DEBUG_SYMBOLS
47336  # This must be done after the toolchain is setup, since we're looking at objcopy.
47337  #
47338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47339$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47340
47341# Check whether --with-native-debug-symbols was given.
47342if test "${with_native_debug_symbols+set}" = set; then :
47343  withval=$with_native_debug_symbols;
47344        if test "x$OPENJDK_TARGET_OS" = xaix; then
47345          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
47346            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
47347          fi
47348        fi
47349
47350else
47351
47352        if test "x$OPENJDK_TARGET_OS" = xaix; then
47353          # AIX doesn't support 'zipped' so use 'internal' as default
47354          with_native_debug_symbols="internal"
47355        else
47356          with_native_debug_symbols="zipped"
47357        fi
47358
47359fi
47360
47361  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47363$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47364
47365  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47366
47367    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47368      if test "x$OBJCOPY" = x; then
47369        # enabling of enable-debug-symbols and can't find objcopy
47370        # this is an error
47371        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47372      fi
47373    fi
47374
47375    COMPILE_WITH_DEBUG_SYMBOLS=true
47376    COPY_DEBUG_SYMBOLS=true
47377    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
47378
47379    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47380    DEBUG_BINARIES=false
47381    STRIP_POLICY=min_strip
47382
47383  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47384    COMPILE_WITH_DEBUG_SYMBOLS=false
47385    COPY_DEBUG_SYMBOLS=false
47386    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47387
47388    DEBUG_BINARIES=false
47389    STRIP_POLICY=no_strip
47390  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47391    COMPILE_WITH_DEBUG_SYMBOLS=true
47392    COPY_DEBUG_SYMBOLS=false
47393    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47394
47395    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
47396    DEBUG_BINARIES=true
47397    STRIP_POLICY=no_strip
47398    STRIP=""
47399
47400  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47401
47402    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47403      if test "x$OBJCOPY" = x; then
47404        # enabling of enable-debug-symbols and can't find objcopy
47405        # this is an error
47406        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47407      fi
47408    fi
47409
47410    COMPILE_WITH_DEBUG_SYMBOLS=true
47411    COPY_DEBUG_SYMBOLS=true
47412    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47413
47414    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47415    DEBUG_BINARIES=false
47416    STRIP_POLICY=min_strip
47417  else
47418    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47419  fi
47420
47421  # --enable-debug-symbols is deprecated.
47422  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47423
47424  # Check whether --enable-debug-symbols was given.
47425if test "${enable_debug_symbols+set}" = set; then :
47426  enableval=$enable_debug_symbols;
47427fi
47428
47429  if test "x$enable_debug_symbols" != x; then
47430    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47431$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47432
47433    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47434      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47435$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47436    fi
47437
47438  fi
47439
47440
47441  # --enable-zip-debug-info is deprecated.
47442  # Please use --with-native-debug-symbols=zipped .
47443
47444  # Check whether --enable-zip-debug-info was given.
47445if test "${enable_zip_debug_info+set}" = set; then :
47446  enableval=$enable_zip_debug_info;
47447fi
47448
47449  if test "x$enable_zip_debug_info" != x; then
47450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47451$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47452
47453    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47454      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47455$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47456    fi
47457
47458  fi
47459
47460
47461
47462
47463
47464
47465  # Legacy values
47466
47467
47468
47469
47470  # Check whether --enable-native-coverage was given.
47471if test "${enable_native_coverage+set}" = set; then :
47472  enableval=$enable_native_coverage;
47473fi
47474
47475  GCOV_ENABLED="false"
47476  if test "x$enable_native_coverage" = "xyes"; then
47477    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47479$as_echo_n "checking if native coverage is enabled... " >&6; }
47480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47481$as_echo "yes" >&6; }
47482      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47483      GCOV_LDFLAGS="-fprofile-arcs"
47484      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47485      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47486      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47487      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47488      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47489      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47490      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47491      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47492      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47493      GCOV_ENABLED="true"
47494    else
47495      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47496    fi
47497  elif test "x$enable_native_coverage" = "xno"; then
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47499$as_echo_n "checking if native coverage is enabled... " >&6; }
47500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47501$as_echo "no" >&6; }
47502  elif test "x$enable_native_coverage" != "x"; then
47503    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47504  fi
47505
47506
47507
47508
47509###############################################################################
47510#
47511# Check dependencies for external and internal libraries.
47512#
47513###############################################################################
47514
47515# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47516
47517  # When using cygwin or msys, we need a wrapper binary that renames
47518  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47519  # @files and rewrites these too! This wrapper binary is
47520  # called fixpath.
47521  FIXPATH=
47522  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47524$as_echo_n "checking if fixpath can be created... " >&6; }
47525    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47526    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47527    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47528    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47529      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47530      FIXPATH="$FIXPATH_BIN -c"
47531    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47532      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47533      # @ was chosen as separator to minimize risk of other tools messing around with it
47534      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47535          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47536      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47537      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47538    fi
47539    FIXPATH_SRC_W="$FIXPATH_SRC"
47540    FIXPATH_BIN_W="$FIXPATH_BIN"
47541
47542  unix_path="$FIXPATH_SRC_W"
47543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47544    windows_path=`$CYGPATH -m "$unix_path"`
47545    FIXPATH_SRC_W="$windows_path"
47546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47547    windows_path=`cmd //c echo $unix_path`
47548    FIXPATH_SRC_W="$windows_path"
47549  fi
47550
47551
47552  unix_path="$FIXPATH_BIN_W"
47553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47554    windows_path=`$CYGPATH -m "$unix_path"`
47555    FIXPATH_BIN_W="$windows_path"
47556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47557    windows_path=`cmd //c echo $unix_path`
47558    FIXPATH_BIN_W="$windows_path"
47559  fi
47560
47561    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47562    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47563    cd $FIXPATH_DIR
47564    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47565    cd $CURDIR
47566
47567    if test ! -x $FIXPATH_BIN; then
47568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47569$as_echo "no" >&6; }
47570      cat $FIXPATH_DIR/fixpath1.log
47571      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47572    fi
47573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47574$as_echo "yes" >&6; }
47575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47576$as_echo_n "checking if fixpath.exe works... " >&6; }
47577    cd $FIXPATH_DIR
47578    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47579        > $FIXPATH_DIR/fixpath2.log 2>&1
47580    cd $CURDIR
47581    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47583$as_echo "no" >&6; }
47584      cat $FIXPATH_DIR/fixpath2.log
47585      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47586    fi
47587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47588$as_echo "yes" >&6; }
47589
47590    FIXPATH_DETACH_FLAG="--detach"
47591  fi
47592
47593
47594
47595
47596
47597
47598  # Check if X11 is needed
47599  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47600    # No X11 support on windows or macosx
47601    NEEDS_LIB_X11=false
47602  else
47603    if test "x$SUPPORT_HEADFUL" = xno; then
47604      # No X11 support if building headless-only
47605      NEEDS_LIB_X11=false
47606    else
47607      # All other instances need X11
47608      NEEDS_LIB_X11=true
47609    fi
47610  fi
47611
47612  # Check if cups is needed
47613  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47614    # Windows have a separate print system
47615    NEEDS_LIB_CUPS=false
47616  else
47617    NEEDS_LIB_CUPS=true
47618  fi
47619
47620  # Check if freetype is needed
47621  if test "x$OPENJDK" = "xtrue"; then
47622    NEEDS_LIB_FREETYPE=true
47623  else
47624    NEEDS_LIB_FREETYPE=false
47625  fi
47626
47627  # Check if alsa is needed
47628  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47629    NEEDS_LIB_ALSA=true
47630  else
47631    NEEDS_LIB_ALSA=false
47632  fi
47633
47634  # Check if ffi is needed
47635  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47636    NEEDS_LIB_FFI=true
47637  else
47638    NEEDS_LIB_FFI=false
47639  fi
47640
47641
47642  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47643  # dynamic build is configured on command line.
47644
47645# Check whether --with-stdc++lib was given.
47646if test "${with_stdc__lib+set}" = set; then :
47647  withval=$with_stdc__lib;
47648        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47649                && test "x$with_stdc__lib" != xdefault; then
47650          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47651        fi
47652
47653else
47654  with_stdc__lib=default
47655
47656fi
47657
47658
47659  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47660    # Test if -lstdc++ works.
47661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47662$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47663    ac_ext=cpp
47664ac_cpp='$CXXCPP $CPPFLAGS'
47665ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47666ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47667ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47668
47669    OLD_CXXFLAGS="$CXXFLAGS"
47670    CXXFLAGS="$CXXFLAGS -lstdc++"
47671    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47672/* end confdefs.h.  */
47673
47674int
47675main ()
47676{
47677return 0;
47678  ;
47679  return 0;
47680}
47681_ACEOF
47682if ac_fn_cxx_try_link "$LINENO"; then :
47683  has_dynamic_libstdcxx=yes
47684else
47685  has_dynamic_libstdcxx=no
47686fi
47687rm -f core conftest.err conftest.$ac_objext \
47688    conftest$ac_exeext conftest.$ac_ext
47689    CXXFLAGS="$OLD_CXXFLAGS"
47690    ac_ext=cpp
47691ac_cpp='$CXXCPP $CPPFLAGS'
47692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47695
47696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47697$as_echo "$has_dynamic_libstdcxx" >&6; }
47698
47699    # Test if stdc++ can be linked statically.
47700    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47701$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47702    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47703    ac_ext=cpp
47704ac_cpp='$CXXCPP $CPPFLAGS'
47705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47708
47709    OLD_LIBS="$LIBS"
47710    OLD_CXX="$CXX"
47711    LIBS="$STATIC_STDCXX_FLAGS"
47712    CXX="$CC"
47713    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47714/* end confdefs.h.  */
47715
47716int
47717main ()
47718{
47719return 0;
47720  ;
47721  return 0;
47722}
47723_ACEOF
47724if ac_fn_cxx_try_link "$LINENO"; then :
47725  has_static_libstdcxx=yes
47726else
47727  has_static_libstdcxx=no
47728fi
47729rm -f core conftest.err conftest.$ac_objext \
47730    conftest$ac_exeext conftest.$ac_ext
47731    LIBS="$OLD_LIBS"
47732    CXX="$OLD_CXX"
47733    ac_ext=cpp
47734ac_cpp='$CXXCPP $CPPFLAGS'
47735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47738
47739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47740$as_echo "$has_static_libstdcxx" >&6; }
47741
47742    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47743      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47744    fi
47745
47746    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47747      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47748    fi
47749
47750    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47751      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47752    fi
47753
47754    # If dynamic was requested, it's available since it would fail above otherwise.
47755    # If dynamic wasn't requested, go with static unless it isn't available.
47756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47757$as_echo_n "checking how to link with libstdc++... " >&6; }
47758    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47759      LIBCXX="$LIBCXX -lstdc++"
47760      LDCXX="$CXX"
47761      STATIC_CXX_SETTING="STATIC_CXX=false"
47762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47763$as_echo "dynamic" >&6; }
47764    else
47765      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47766      LDCXX="$CC"
47767      STATIC_CXX_SETTING="STATIC_CXX=true"
47768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47769$as_echo "static" >&6; }
47770    fi
47771  fi
47772
47773
47774  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47775  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47776    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47777  fi
47778
47779  # TODO better (platform agnostic) test
47780  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47781    LIBCXX="-lstdc++"
47782  fi
47783
47784
47785  # Setup Windows runtime dlls
47786  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47787
47788
47789# Check whether --with-msvcr-dll was given.
47790if test "${with_msvcr_dll+set}" = set; then :
47791  withval=$with_msvcr_dll;
47792fi
47793
47794
47795  if test "x$with_msvcr_dll" != x; then
47796    # If given explicitely by user, do not probe. If not present, fail directly.
47797
47798  DLL_NAME="$MSVCR_NAME"
47799  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47800  METHOD="--with-msvcr-dll"
47801  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47802    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47803$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47804
47805    # Need to check if the found msvcr is correct architecture
47806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47807$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47808    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47810      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47811      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47812      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47813        CORRECT_MSVCR_ARCH="PE32 executable"
47814      else
47815        CORRECT_MSVCR_ARCH="PE32+ executable"
47816      fi
47817    else
47818      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47819        CORRECT_MSVCR_ARCH=386
47820      else
47821        CORRECT_MSVCR_ARCH=x86-64
47822      fi
47823    fi
47824    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47826$as_echo "ok" >&6; }
47827      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47828
47829  # Only process if variable expands to non-empty
47830
47831  if test "x$MSVC_DLL" != x; then
47832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47833
47834  # Input might be given as Windows format, start by converting to
47835  # unix format.
47836  path="$MSVC_DLL"
47837  new_path=`$CYGPATH -u "$path"`
47838
47839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47842  # "foo.exe" is OK but "foo" is an error.
47843  #
47844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47845  # It is also a way to make sure we got the proper file name for the real test later on.
47846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47847  if test "x$test_shortpath" = x; then
47848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47849$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47850    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47851  fi
47852
47853  # Call helper function which possibly converts this using DOS-style short mode.
47854  # If so, the updated path is stored in $new_path.
47855
47856  input_path="$new_path"
47857  # Check if we need to convert this using DOS-style short mode. If the path
47858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47859  # take no chances and rewrite it.
47860  # Note: m4 eats our [], so we need to use [ and ] instead.
47861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47862  if test "x$has_forbidden_chars" != x; then
47863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47867      # Going to short mode and back again did indeed matter. Since short mode is
47868      # case insensitive, let's make it lowercase to improve readability.
47869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47870      # Now convert it back to Unix-style (cygpath)
47871      input_path=`$CYGPATH -u "$shortmode_path"`
47872      new_path="$input_path"
47873    fi
47874  fi
47875
47876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47877  if test "x$test_cygdrive_prefix" = x; then
47878    # As a simple fix, exclude /usr/bin since it's not a real path.
47879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47881      # a path prefixed by /cygdrive for fixpath to work.
47882      new_path="$CYGWIN_ROOT_PATH$input_path"
47883    fi
47884  fi
47885
47886
47887  if test "x$path" != "x$new_path"; then
47888    MSVC_DLL="$new_path"
47889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47890$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47891  fi
47892
47893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47894
47895  path="$MSVC_DLL"
47896  has_colon=`$ECHO $path | $GREP ^.:`
47897  new_path="$path"
47898  if test "x$has_colon" = x; then
47899    # Not in mixed or Windows style, start by that.
47900    new_path=`cmd //c echo $path`
47901  fi
47902
47903
47904  input_path="$new_path"
47905  # Check if we need to convert this using DOS-style short mode. If the path
47906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47907  # take no chances and rewrite it.
47908  # Note: m4 eats our [], so we need to use [ and ] instead.
47909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47910  if test "x$has_forbidden_chars" != x; then
47911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47913  fi
47914
47915
47916  windows_path="$new_path"
47917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47918    unix_path=`$CYGPATH -u "$windows_path"`
47919    new_path="$unix_path"
47920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47922    new_path="$unix_path"
47923  fi
47924
47925  if test "x$path" != "x$new_path"; then
47926    MSVC_DLL="$new_path"
47927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47928$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47929  fi
47930
47931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47933
47934    else
47935      # We're on a unix platform. Hooray! :)
47936      path="$MSVC_DLL"
47937      has_space=`$ECHO "$path" | $GREP " "`
47938      if test "x$has_space" != x; then
47939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47940$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47942      fi
47943
47944      # Use eval to expand a potential ~
47945      eval path="$path"
47946      if test ! -f "$path" && test ! -d "$path"; then
47947        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47948      fi
47949
47950      if test -d "$path"; then
47951        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47952      else
47953        dir="`$DIRNAME "$path"`"
47954        base="`$BASENAME "$path"`"
47955        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
47956      fi
47957    fi
47958  fi
47959
47960      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47961$as_echo_n "checking for $DLL_NAME... " >&6; }
47962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47963$as_echo "$MSVC_DLL" >&6; }
47964    else
47965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47966$as_echo "incorrect, ignoring" >&6; }
47967      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47968$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47969    fi
47970  fi
47971
47972    if test "x$MSVC_DLL" = x; then
47973      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47974    fi
47975    MSVCR_DLL="$MSVC_DLL"
47976  elif test "x$DEVKIT_MSVCR_DLL" != x; then
47977
47978  DLL_NAME="$MSVCR_NAME"
47979  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47980  METHOD="devkit"
47981  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47983$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47984
47985    # Need to check if the found msvcr is correct architecture
47986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47987$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47988    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47990      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47991      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47992      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47993        CORRECT_MSVCR_ARCH="PE32 executable"
47994      else
47995        CORRECT_MSVCR_ARCH="PE32+ executable"
47996      fi
47997    else
47998      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47999        CORRECT_MSVCR_ARCH=386
48000      else
48001        CORRECT_MSVCR_ARCH=x86-64
48002      fi
48003    fi
48004    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48006$as_echo "ok" >&6; }
48007      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48008
48009  # Only process if variable expands to non-empty
48010
48011  if test "x$MSVC_DLL" != x; then
48012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48013
48014  # Input might be given as Windows format, start by converting to
48015  # unix format.
48016  path="$MSVC_DLL"
48017  new_path=`$CYGPATH -u "$path"`
48018
48019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48022  # "foo.exe" is OK but "foo" is an error.
48023  #
48024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48025  # It is also a way to make sure we got the proper file name for the real test later on.
48026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48027  if test "x$test_shortpath" = x; then
48028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48029$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48030    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48031  fi
48032
48033  # Call helper function which possibly converts this using DOS-style short mode.
48034  # If so, the updated path is stored in $new_path.
48035
48036  input_path="$new_path"
48037  # Check if we need to convert this using DOS-style short mode. If the path
48038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48039  # take no chances and rewrite it.
48040  # Note: m4 eats our [], so we need to use [ and ] instead.
48041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48042  if test "x$has_forbidden_chars" != x; then
48043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48047      # Going to short mode and back again did indeed matter. Since short mode is
48048      # case insensitive, let's make it lowercase to improve readability.
48049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48050      # Now convert it back to Unix-style (cygpath)
48051      input_path=`$CYGPATH -u "$shortmode_path"`
48052      new_path="$input_path"
48053    fi
48054  fi
48055
48056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48057  if test "x$test_cygdrive_prefix" = x; then
48058    # As a simple fix, exclude /usr/bin since it's not a real path.
48059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48061      # a path prefixed by /cygdrive for fixpath to work.
48062      new_path="$CYGWIN_ROOT_PATH$input_path"
48063    fi
48064  fi
48065
48066
48067  if test "x$path" != "x$new_path"; then
48068    MSVC_DLL="$new_path"
48069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48070$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48071  fi
48072
48073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48074
48075  path="$MSVC_DLL"
48076  has_colon=`$ECHO $path | $GREP ^.:`
48077  new_path="$path"
48078  if test "x$has_colon" = x; then
48079    # Not in mixed or Windows style, start by that.
48080    new_path=`cmd //c echo $path`
48081  fi
48082
48083
48084  input_path="$new_path"
48085  # Check if we need to convert this using DOS-style short mode. If the path
48086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48087  # take no chances and rewrite it.
48088  # Note: m4 eats our [], so we need to use [ and ] instead.
48089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48090  if test "x$has_forbidden_chars" != x; then
48091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48093  fi
48094
48095
48096  windows_path="$new_path"
48097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48098    unix_path=`$CYGPATH -u "$windows_path"`
48099    new_path="$unix_path"
48100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48102    new_path="$unix_path"
48103  fi
48104
48105  if test "x$path" != "x$new_path"; then
48106    MSVC_DLL="$new_path"
48107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48108$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48109  fi
48110
48111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48113
48114    else
48115      # We're on a unix platform. Hooray! :)
48116      path="$MSVC_DLL"
48117      has_space=`$ECHO "$path" | $GREP " "`
48118      if test "x$has_space" != x; then
48119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48120$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48122      fi
48123
48124      # Use eval to expand a potential ~
48125      eval path="$path"
48126      if test ! -f "$path" && test ! -d "$path"; then
48127        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48128      fi
48129
48130      if test -d "$path"; then
48131        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48132      else
48133        dir="`$DIRNAME "$path"`"
48134        base="`$BASENAME "$path"`"
48135        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48136      fi
48137    fi
48138  fi
48139
48140      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48141$as_echo_n "checking for $DLL_NAME... " >&6; }
48142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48143$as_echo "$MSVC_DLL" >&6; }
48144    else
48145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48146$as_echo "incorrect, ignoring" >&6; }
48147      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48148$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48149    fi
48150  fi
48151
48152    if test "x$MSVC_DLL" = x; then
48153      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48154    fi
48155    MSVCR_DLL="$MSVC_DLL"
48156  else
48157
48158  DLL_NAME="${MSVCR_NAME}"
48159  MSVC_DLL=
48160
48161  if test "x$MSVC_DLL" = x; then
48162    # Probe: Using well-known location from Visual Studio 10.0
48163    if test "x$VCINSTALLDIR" != x; then
48164      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48165
48166  windows_path="$CYGWIN_VC_INSTALL_DIR"
48167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48168    unix_path=`$CYGPATH -u "$windows_path"`
48169    CYGWIN_VC_INSTALL_DIR="$unix_path"
48170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48172    CYGWIN_VC_INSTALL_DIR="$unix_path"
48173  fi
48174
48175      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48176        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48177      else
48178        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48179      fi
48180      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48181
48182  DLL_NAME="$DLL_NAME"
48183  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48184  METHOD="well-known location in VCINSTALLDIR"
48185  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48186    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48187$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48188
48189    # Need to check if the found msvcr is correct architecture
48190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48191$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48192    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48194      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48195      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48196      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48197        CORRECT_MSVCR_ARCH="PE32 executable"
48198      else
48199        CORRECT_MSVCR_ARCH="PE32+ executable"
48200      fi
48201    else
48202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48203        CORRECT_MSVCR_ARCH=386
48204      else
48205        CORRECT_MSVCR_ARCH=x86-64
48206      fi
48207    fi
48208    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48210$as_echo "ok" >&6; }
48211      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48212
48213  # Only process if variable expands to non-empty
48214
48215  if test "x$MSVC_DLL" != x; then
48216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48217
48218  # Input might be given as Windows format, start by converting to
48219  # unix format.
48220  path="$MSVC_DLL"
48221  new_path=`$CYGPATH -u "$path"`
48222
48223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48226  # "foo.exe" is OK but "foo" is an error.
48227  #
48228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48229  # It is also a way to make sure we got the proper file name for the real test later on.
48230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48231  if test "x$test_shortpath" = x; then
48232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48234    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48235  fi
48236
48237  # Call helper function which possibly converts this using DOS-style short mode.
48238  # If so, the updated path is stored in $new_path.
48239
48240  input_path="$new_path"
48241  # Check if we need to convert this using DOS-style short mode. If the path
48242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48243  # take no chances and rewrite it.
48244  # Note: m4 eats our [], so we need to use [ and ] instead.
48245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48246  if test "x$has_forbidden_chars" != x; then
48247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48251      # Going to short mode and back again did indeed matter. Since short mode is
48252      # case insensitive, let's make it lowercase to improve readability.
48253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48254      # Now convert it back to Unix-style (cygpath)
48255      input_path=`$CYGPATH -u "$shortmode_path"`
48256      new_path="$input_path"
48257    fi
48258  fi
48259
48260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48261  if test "x$test_cygdrive_prefix" = x; then
48262    # As a simple fix, exclude /usr/bin since it's not a real path.
48263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48265      # a path prefixed by /cygdrive for fixpath to work.
48266      new_path="$CYGWIN_ROOT_PATH$input_path"
48267    fi
48268  fi
48269
48270
48271  if test "x$path" != "x$new_path"; then
48272    MSVC_DLL="$new_path"
48273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48274$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48275  fi
48276
48277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48278
48279  path="$MSVC_DLL"
48280  has_colon=`$ECHO $path | $GREP ^.:`
48281  new_path="$path"
48282  if test "x$has_colon" = x; then
48283    # Not in mixed or Windows style, start by that.
48284    new_path=`cmd //c echo $path`
48285  fi
48286
48287
48288  input_path="$new_path"
48289  # Check if we need to convert this using DOS-style short mode. If the path
48290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48291  # take no chances and rewrite it.
48292  # Note: m4 eats our [], so we need to use [ and ] instead.
48293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48294  if test "x$has_forbidden_chars" != x; then
48295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48297  fi
48298
48299
48300  windows_path="$new_path"
48301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48302    unix_path=`$CYGPATH -u "$windows_path"`
48303    new_path="$unix_path"
48304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48306    new_path="$unix_path"
48307  fi
48308
48309  if test "x$path" != "x$new_path"; then
48310    MSVC_DLL="$new_path"
48311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48312$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48313  fi
48314
48315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48317
48318    else
48319      # We're on a unix platform. Hooray! :)
48320      path="$MSVC_DLL"
48321      has_space=`$ECHO "$path" | $GREP " "`
48322      if test "x$has_space" != x; then
48323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48324$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48326      fi
48327
48328      # Use eval to expand a potential ~
48329      eval path="$path"
48330      if test ! -f "$path" && test ! -d "$path"; then
48331        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48332      fi
48333
48334      if test -d "$path"; then
48335        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48336      else
48337        dir="`$DIRNAME "$path"`"
48338        base="`$BASENAME "$path"`"
48339        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48340      fi
48341    fi
48342  fi
48343
48344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48345$as_echo_n "checking for $DLL_NAME... " >&6; }
48346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48347$as_echo "$MSVC_DLL" >&6; }
48348    else
48349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48350$as_echo "incorrect, ignoring" >&6; }
48351      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48352$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48353    fi
48354  fi
48355
48356    fi
48357  fi
48358
48359  if test "x$MSVC_DLL" = x; then
48360    # Probe: Check in the Boot JDK directory.
48361    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48362
48363  DLL_NAME="$DLL_NAME"
48364  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48365  METHOD="well-known location in Boot JDK"
48366  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48367    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48368$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48369
48370    # Need to check if the found msvcr is correct architecture
48371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48372$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48373    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48375      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48376      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48377      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48378        CORRECT_MSVCR_ARCH="PE32 executable"
48379      else
48380        CORRECT_MSVCR_ARCH="PE32+ executable"
48381      fi
48382    else
48383      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48384        CORRECT_MSVCR_ARCH=386
48385      else
48386        CORRECT_MSVCR_ARCH=x86-64
48387      fi
48388    fi
48389    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48391$as_echo "ok" >&6; }
48392      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48393
48394  # Only process if variable expands to non-empty
48395
48396  if test "x$MSVC_DLL" != x; then
48397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48398
48399  # Input might be given as Windows format, start by converting to
48400  # unix format.
48401  path="$MSVC_DLL"
48402  new_path=`$CYGPATH -u "$path"`
48403
48404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48407  # "foo.exe" is OK but "foo" is an error.
48408  #
48409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48410  # It is also a way to make sure we got the proper file name for the real test later on.
48411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48412  if test "x$test_shortpath" = x; then
48413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48414$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48415    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48416  fi
48417
48418  # Call helper function which possibly converts this using DOS-style short mode.
48419  # If so, the updated path is stored in $new_path.
48420
48421  input_path="$new_path"
48422  # Check if we need to convert this using DOS-style short mode. If the path
48423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48424  # take no chances and rewrite it.
48425  # Note: m4 eats our [], so we need to use [ and ] instead.
48426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48427  if test "x$has_forbidden_chars" != x; then
48428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48432      # Going to short mode and back again did indeed matter. Since short mode is
48433      # case insensitive, let's make it lowercase to improve readability.
48434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48435      # Now convert it back to Unix-style (cygpath)
48436      input_path=`$CYGPATH -u "$shortmode_path"`
48437      new_path="$input_path"
48438    fi
48439  fi
48440
48441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48442  if test "x$test_cygdrive_prefix" = x; then
48443    # As a simple fix, exclude /usr/bin since it's not a real path.
48444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48446      # a path prefixed by /cygdrive for fixpath to work.
48447      new_path="$CYGWIN_ROOT_PATH$input_path"
48448    fi
48449  fi
48450
48451
48452  if test "x$path" != "x$new_path"; then
48453    MSVC_DLL="$new_path"
48454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48455$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48456  fi
48457
48458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48459
48460  path="$MSVC_DLL"
48461  has_colon=`$ECHO $path | $GREP ^.:`
48462  new_path="$path"
48463  if test "x$has_colon" = x; then
48464    # Not in mixed or Windows style, start by that.
48465    new_path=`cmd //c echo $path`
48466  fi
48467
48468
48469  input_path="$new_path"
48470  # Check if we need to convert this using DOS-style short mode. If the path
48471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48472  # take no chances and rewrite it.
48473  # Note: m4 eats our [], so we need to use [ and ] instead.
48474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48475  if test "x$has_forbidden_chars" != x; then
48476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48478  fi
48479
48480
48481  windows_path="$new_path"
48482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48483    unix_path=`$CYGPATH -u "$windows_path"`
48484    new_path="$unix_path"
48485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48487    new_path="$unix_path"
48488  fi
48489
48490  if test "x$path" != "x$new_path"; then
48491    MSVC_DLL="$new_path"
48492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48493$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48494  fi
48495
48496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48498
48499    else
48500      # We're on a unix platform. Hooray! :)
48501      path="$MSVC_DLL"
48502      has_space=`$ECHO "$path" | $GREP " "`
48503      if test "x$has_space" != x; then
48504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48505$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48507      fi
48508
48509      # Use eval to expand a potential ~
48510      eval path="$path"
48511      if test ! -f "$path" && test ! -d "$path"; then
48512        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48513      fi
48514
48515      if test -d "$path"; then
48516        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48517      else
48518        dir="`$DIRNAME "$path"`"
48519        base="`$BASENAME "$path"`"
48520        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48521      fi
48522    fi
48523  fi
48524
48525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48526$as_echo_n "checking for $DLL_NAME... " >&6; }
48527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48528$as_echo "$MSVC_DLL" >&6; }
48529    else
48530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48531$as_echo "incorrect, ignoring" >&6; }
48532      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48533$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48534    fi
48535  fi
48536
48537  fi
48538
48539  if test "x$MSVC_DLL" = x; then
48540    # Probe: Look in the Windows system32 directory
48541    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48542
48543  windows_path="$CYGWIN_SYSTEMROOT"
48544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48545    unix_path=`$CYGPATH -u "$windows_path"`
48546    CYGWIN_SYSTEMROOT="$unix_path"
48547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48549    CYGWIN_SYSTEMROOT="$unix_path"
48550  fi
48551
48552    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48553
48554  DLL_NAME="$DLL_NAME"
48555  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48556  METHOD="well-known location in SYSTEMROOT"
48557  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48559$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48560
48561    # Need to check if the found msvcr is correct architecture
48562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48563$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48564    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48566      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48567      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48569        CORRECT_MSVCR_ARCH="PE32 executable"
48570      else
48571        CORRECT_MSVCR_ARCH="PE32+ executable"
48572      fi
48573    else
48574      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48575        CORRECT_MSVCR_ARCH=386
48576      else
48577        CORRECT_MSVCR_ARCH=x86-64
48578      fi
48579    fi
48580    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48582$as_echo "ok" >&6; }
48583      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48584
48585  # Only process if variable expands to non-empty
48586
48587  if test "x$MSVC_DLL" != x; then
48588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48589
48590  # Input might be given as Windows format, start by converting to
48591  # unix format.
48592  path="$MSVC_DLL"
48593  new_path=`$CYGPATH -u "$path"`
48594
48595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48598  # "foo.exe" is OK but "foo" is an error.
48599  #
48600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48601  # It is also a way to make sure we got the proper file name for the real test later on.
48602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48603  if test "x$test_shortpath" = x; then
48604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48605$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48606    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48607  fi
48608
48609  # Call helper function which possibly converts this using DOS-style short mode.
48610  # If so, the updated path is stored in $new_path.
48611
48612  input_path="$new_path"
48613  # Check if we need to convert this using DOS-style short mode. If the path
48614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48615  # take no chances and rewrite it.
48616  # Note: m4 eats our [], so we need to use [ and ] instead.
48617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48618  if test "x$has_forbidden_chars" != x; then
48619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48623      # Going to short mode and back again did indeed matter. Since short mode is
48624      # case insensitive, let's make it lowercase to improve readability.
48625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48626      # Now convert it back to Unix-style (cygpath)
48627      input_path=`$CYGPATH -u "$shortmode_path"`
48628      new_path="$input_path"
48629    fi
48630  fi
48631
48632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48633  if test "x$test_cygdrive_prefix" = x; then
48634    # As a simple fix, exclude /usr/bin since it's not a real path.
48635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48637      # a path prefixed by /cygdrive for fixpath to work.
48638      new_path="$CYGWIN_ROOT_PATH$input_path"
48639    fi
48640  fi
48641
48642
48643  if test "x$path" != "x$new_path"; then
48644    MSVC_DLL="$new_path"
48645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48646$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48647  fi
48648
48649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48650
48651  path="$MSVC_DLL"
48652  has_colon=`$ECHO $path | $GREP ^.:`
48653  new_path="$path"
48654  if test "x$has_colon" = x; then
48655    # Not in mixed or Windows style, start by that.
48656    new_path=`cmd //c echo $path`
48657  fi
48658
48659
48660  input_path="$new_path"
48661  # Check if we need to convert this using DOS-style short mode. If the path
48662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48663  # take no chances and rewrite it.
48664  # Note: m4 eats our [], so we need to use [ and ] instead.
48665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48666  if test "x$has_forbidden_chars" != x; then
48667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48669  fi
48670
48671
48672  windows_path="$new_path"
48673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48674    unix_path=`$CYGPATH -u "$windows_path"`
48675    new_path="$unix_path"
48676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48678    new_path="$unix_path"
48679  fi
48680
48681  if test "x$path" != "x$new_path"; then
48682    MSVC_DLL="$new_path"
48683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48684$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48685  fi
48686
48687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48689
48690    else
48691      # We're on a unix platform. Hooray! :)
48692      path="$MSVC_DLL"
48693      has_space=`$ECHO "$path" | $GREP " "`
48694      if test "x$has_space" != x; then
48695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48696$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48698      fi
48699
48700      # Use eval to expand a potential ~
48701      eval path="$path"
48702      if test ! -f "$path" && test ! -d "$path"; then
48703        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48704      fi
48705
48706      if test -d "$path"; then
48707        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48708      else
48709        dir="`$DIRNAME "$path"`"
48710        base="`$BASENAME "$path"`"
48711        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48712      fi
48713    fi
48714  fi
48715
48716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48717$as_echo_n "checking for $DLL_NAME... " >&6; }
48718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48719$as_echo "$MSVC_DLL" >&6; }
48720    else
48721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48722$as_echo "incorrect, ignoring" >&6; }
48723      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48724$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48725    fi
48726  fi
48727
48728  fi
48729
48730  if test "x$MSVC_DLL" = x; then
48731    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48732    if test "x$VS100COMNTOOLS" != x; then
48733      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48734
48735  windows_path="$CYGWIN_VS_TOOLS_DIR"
48736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48737    unix_path=`$CYGPATH -u "$windows_path"`
48738    CYGWIN_VS_TOOLS_DIR="$unix_path"
48739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48741    CYGWIN_VS_TOOLS_DIR="$unix_path"
48742  fi
48743
48744      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48745        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48746	    | $GREP -i /x64/ | $HEAD --lines 1`
48747      else
48748        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48749	    | $GREP -i /x86/ | $HEAD --lines 1`
48750      fi
48751
48752  DLL_NAME="$DLL_NAME"
48753  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48754  METHOD="search of VS100COMNTOOLS"
48755  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48756    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48757$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48758
48759    # Need to check if the found msvcr is correct architecture
48760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48761$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48762    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48764      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48765      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48766      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48767        CORRECT_MSVCR_ARCH="PE32 executable"
48768      else
48769        CORRECT_MSVCR_ARCH="PE32+ executable"
48770      fi
48771    else
48772      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48773        CORRECT_MSVCR_ARCH=386
48774      else
48775        CORRECT_MSVCR_ARCH=x86-64
48776      fi
48777    fi
48778    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48780$as_echo "ok" >&6; }
48781      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48782
48783  # Only process if variable expands to non-empty
48784
48785  if test "x$MSVC_DLL" != x; then
48786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48787
48788  # Input might be given as Windows format, start by converting to
48789  # unix format.
48790  path="$MSVC_DLL"
48791  new_path=`$CYGPATH -u "$path"`
48792
48793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48796  # "foo.exe" is OK but "foo" is an error.
48797  #
48798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48799  # It is also a way to make sure we got the proper file name for the real test later on.
48800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48801  if test "x$test_shortpath" = x; then
48802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48803$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48804    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48805  fi
48806
48807  # Call helper function which possibly converts this using DOS-style short mode.
48808  # If so, the updated path is stored in $new_path.
48809
48810  input_path="$new_path"
48811  # Check if we need to convert this using DOS-style short mode. If the path
48812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48813  # take no chances and rewrite it.
48814  # Note: m4 eats our [], so we need to use [ and ] instead.
48815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48816  if test "x$has_forbidden_chars" != x; then
48817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48821      # Going to short mode and back again did indeed matter. Since short mode is
48822      # case insensitive, let's make it lowercase to improve readability.
48823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48824      # Now convert it back to Unix-style (cygpath)
48825      input_path=`$CYGPATH -u "$shortmode_path"`
48826      new_path="$input_path"
48827    fi
48828  fi
48829
48830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48831  if test "x$test_cygdrive_prefix" = x; then
48832    # As a simple fix, exclude /usr/bin since it's not a real path.
48833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48835      # a path prefixed by /cygdrive for fixpath to work.
48836      new_path="$CYGWIN_ROOT_PATH$input_path"
48837    fi
48838  fi
48839
48840
48841  if test "x$path" != "x$new_path"; then
48842    MSVC_DLL="$new_path"
48843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48844$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48845  fi
48846
48847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48848
48849  path="$MSVC_DLL"
48850  has_colon=`$ECHO $path | $GREP ^.:`
48851  new_path="$path"
48852  if test "x$has_colon" = x; then
48853    # Not in mixed or Windows style, start by that.
48854    new_path=`cmd //c echo $path`
48855  fi
48856
48857
48858  input_path="$new_path"
48859  # Check if we need to convert this using DOS-style short mode. If the path
48860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48861  # take no chances and rewrite it.
48862  # Note: m4 eats our [], so we need to use [ and ] instead.
48863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48864  if test "x$has_forbidden_chars" != x; then
48865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48867  fi
48868
48869
48870  windows_path="$new_path"
48871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48872    unix_path=`$CYGPATH -u "$windows_path"`
48873    new_path="$unix_path"
48874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48876    new_path="$unix_path"
48877  fi
48878
48879  if test "x$path" != "x$new_path"; then
48880    MSVC_DLL="$new_path"
48881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48882$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48883  fi
48884
48885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48887
48888    else
48889      # We're on a unix platform. Hooray! :)
48890      path="$MSVC_DLL"
48891      has_space=`$ECHO "$path" | $GREP " "`
48892      if test "x$has_space" != x; then
48893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48894$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48895        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48896      fi
48897
48898      # Use eval to expand a potential ~
48899      eval path="$path"
48900      if test ! -f "$path" && test ! -d "$path"; then
48901        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48902      fi
48903
48904      if test -d "$path"; then
48905        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48906      else
48907        dir="`$DIRNAME "$path"`"
48908        base="`$BASENAME "$path"`"
48909        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48910      fi
48911    fi
48912  fi
48913
48914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48915$as_echo_n "checking for $DLL_NAME... " >&6; }
48916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48917$as_echo "$MSVC_DLL" >&6; }
48918    else
48919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48920$as_echo "incorrect, ignoring" >&6; }
48921      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48922$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48923    fi
48924  fi
48925
48926    fi
48927  fi
48928
48929  if test "x$MSVC_DLL" = x; then
48930    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48931    # (This was the original behaviour; kept since it might turn something up)
48932    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48933      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48934        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48935	    | $GREP x64 | $HEAD --lines 1`
48936      else
48937        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48938	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48939        if test "x$POSSIBLE_MSVC_DLL" = x; then
48940          # We're grasping at straws now...
48941          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48942	      | $HEAD --lines 1`
48943        fi
48944      fi
48945
48946
48947  DLL_NAME="$DLL_NAME"
48948  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48949  METHOD="search of VCINSTALLDIR"
48950  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48952$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48953
48954    # Need to check if the found msvcr is correct architecture
48955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48956$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48957    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48959      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48960      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48961      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48962        CORRECT_MSVCR_ARCH="PE32 executable"
48963      else
48964        CORRECT_MSVCR_ARCH="PE32+ executable"
48965      fi
48966    else
48967      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48968        CORRECT_MSVCR_ARCH=386
48969      else
48970        CORRECT_MSVCR_ARCH=x86-64
48971      fi
48972    fi
48973    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48975$as_echo "ok" >&6; }
48976      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48977
48978  # Only process if variable expands to non-empty
48979
48980  if test "x$MSVC_DLL" != x; then
48981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48982
48983  # Input might be given as Windows format, start by converting to
48984  # unix format.
48985  path="$MSVC_DLL"
48986  new_path=`$CYGPATH -u "$path"`
48987
48988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48991  # "foo.exe" is OK but "foo" is an error.
48992  #
48993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48994  # It is also a way to make sure we got the proper file name for the real test later on.
48995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48996  if test "x$test_shortpath" = x; then
48997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48998$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48999    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49000  fi
49001
49002  # Call helper function which possibly converts this using DOS-style short mode.
49003  # If so, the updated path is stored in $new_path.
49004
49005  input_path="$new_path"
49006  # Check if we need to convert this using DOS-style short mode. If the path
49007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49008  # take no chances and rewrite it.
49009  # Note: m4 eats our [], so we need to use [ and ] instead.
49010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49011  if test "x$has_forbidden_chars" != x; then
49012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49016      # Going to short mode and back again did indeed matter. Since short mode is
49017      # case insensitive, let's make it lowercase to improve readability.
49018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49019      # Now convert it back to Unix-style (cygpath)
49020      input_path=`$CYGPATH -u "$shortmode_path"`
49021      new_path="$input_path"
49022    fi
49023  fi
49024
49025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49026  if test "x$test_cygdrive_prefix" = x; then
49027    # As a simple fix, exclude /usr/bin since it's not a real path.
49028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49030      # a path prefixed by /cygdrive for fixpath to work.
49031      new_path="$CYGWIN_ROOT_PATH$input_path"
49032    fi
49033  fi
49034
49035
49036  if test "x$path" != "x$new_path"; then
49037    MSVC_DLL="$new_path"
49038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49039$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49040  fi
49041
49042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49043
49044  path="$MSVC_DLL"
49045  has_colon=`$ECHO $path | $GREP ^.:`
49046  new_path="$path"
49047  if test "x$has_colon" = x; then
49048    # Not in mixed or Windows style, start by that.
49049    new_path=`cmd //c echo $path`
49050  fi
49051
49052
49053  input_path="$new_path"
49054  # Check if we need to convert this using DOS-style short mode. If the path
49055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49056  # take no chances and rewrite it.
49057  # Note: m4 eats our [], so we need to use [ and ] instead.
49058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49059  if test "x$has_forbidden_chars" != x; then
49060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49062  fi
49063
49064
49065  windows_path="$new_path"
49066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49067    unix_path=`$CYGPATH -u "$windows_path"`
49068    new_path="$unix_path"
49069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49071    new_path="$unix_path"
49072  fi
49073
49074  if test "x$path" != "x$new_path"; then
49075    MSVC_DLL="$new_path"
49076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49077$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49078  fi
49079
49080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49082
49083    else
49084      # We're on a unix platform. Hooray! :)
49085      path="$MSVC_DLL"
49086      has_space=`$ECHO "$path" | $GREP " "`
49087      if test "x$has_space" != x; then
49088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49089$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49090        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49091      fi
49092
49093      # Use eval to expand a potential ~
49094      eval path="$path"
49095      if test ! -f "$path" && test ! -d "$path"; then
49096        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49097      fi
49098
49099      if test -d "$path"; then
49100        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49101      else
49102        dir="`$DIRNAME "$path"`"
49103        base="`$BASENAME "$path"`"
49104        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49105      fi
49106    fi
49107  fi
49108
49109      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49110$as_echo_n "checking for $DLL_NAME... " >&6; }
49111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49112$as_echo "$MSVC_DLL" >&6; }
49113    else
49114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49115$as_echo "incorrect, ignoring" >&6; }
49116      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49117$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49118    fi
49119  fi
49120
49121    fi
49122  fi
49123
49124  if test "x$MSVC_DLL" = x; then
49125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49126$as_echo_n "checking for $DLL_NAME... " >&6; }
49127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49128$as_echo "no" >&6; }
49129    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49130  fi
49131
49132    MSVCR_DLL="$MSVC_DLL"
49133  fi
49134
49135
49136
49137# Check whether --with-msvcp-dll was given.
49138if test "${with_msvcp_dll+set}" = set; then :
49139  withval=$with_msvcp_dll;
49140fi
49141
49142
49143  if test "x$MSVCP_NAME" != "x"; then
49144    if test "x$with_msvcp_dll" != x; then
49145      # If given explicitely by user, do not probe. If not present, fail directly.
49146
49147  DLL_NAME="$MSVCP_NAME"
49148  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49149  METHOD="--with-msvcp-dll"
49150  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49151    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49152$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49153
49154    # Need to check if the found msvcr is correct architecture
49155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49156$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49157    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49159      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49160      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49161      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49162        CORRECT_MSVCR_ARCH="PE32 executable"
49163      else
49164        CORRECT_MSVCR_ARCH="PE32+ executable"
49165      fi
49166    else
49167      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49168        CORRECT_MSVCR_ARCH=386
49169      else
49170        CORRECT_MSVCR_ARCH=x86-64
49171      fi
49172    fi
49173    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49175$as_echo "ok" >&6; }
49176      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49177
49178  # Only process if variable expands to non-empty
49179
49180  if test "x$MSVC_DLL" != x; then
49181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49182
49183  # Input might be given as Windows format, start by converting to
49184  # unix format.
49185  path="$MSVC_DLL"
49186  new_path=`$CYGPATH -u "$path"`
49187
49188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49191  # "foo.exe" is OK but "foo" is an error.
49192  #
49193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49194  # It is also a way to make sure we got the proper file name for the real test later on.
49195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49196  if test "x$test_shortpath" = x; then
49197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49198$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49199    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49200  fi
49201
49202  # Call helper function which possibly converts this using DOS-style short mode.
49203  # If so, the updated path is stored in $new_path.
49204
49205  input_path="$new_path"
49206  # Check if we need to convert this using DOS-style short mode. If the path
49207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49208  # take no chances and rewrite it.
49209  # Note: m4 eats our [], so we need to use [ and ] instead.
49210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49211  if test "x$has_forbidden_chars" != x; then
49212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49216      # Going to short mode and back again did indeed matter. Since short mode is
49217      # case insensitive, let's make it lowercase to improve readability.
49218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49219      # Now convert it back to Unix-style (cygpath)
49220      input_path=`$CYGPATH -u "$shortmode_path"`
49221      new_path="$input_path"
49222    fi
49223  fi
49224
49225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49226  if test "x$test_cygdrive_prefix" = x; then
49227    # As a simple fix, exclude /usr/bin since it's not a real path.
49228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49230      # a path prefixed by /cygdrive for fixpath to work.
49231      new_path="$CYGWIN_ROOT_PATH$input_path"
49232    fi
49233  fi
49234
49235
49236  if test "x$path" != "x$new_path"; then
49237    MSVC_DLL="$new_path"
49238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49239$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49240  fi
49241
49242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49243
49244  path="$MSVC_DLL"
49245  has_colon=`$ECHO $path | $GREP ^.:`
49246  new_path="$path"
49247  if test "x$has_colon" = x; then
49248    # Not in mixed or Windows style, start by that.
49249    new_path=`cmd //c echo $path`
49250  fi
49251
49252
49253  input_path="$new_path"
49254  # Check if we need to convert this using DOS-style short mode. If the path
49255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49256  # take no chances and rewrite it.
49257  # Note: m4 eats our [], so we need to use [ and ] instead.
49258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49259  if test "x$has_forbidden_chars" != x; then
49260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49262  fi
49263
49264
49265  windows_path="$new_path"
49266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49267    unix_path=`$CYGPATH -u "$windows_path"`
49268    new_path="$unix_path"
49269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49271    new_path="$unix_path"
49272  fi
49273
49274  if test "x$path" != "x$new_path"; then
49275    MSVC_DLL="$new_path"
49276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49277$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49278  fi
49279
49280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49282
49283    else
49284      # We're on a unix platform. Hooray! :)
49285      path="$MSVC_DLL"
49286      has_space=`$ECHO "$path" | $GREP " "`
49287      if test "x$has_space" != x; then
49288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49289$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49291      fi
49292
49293      # Use eval to expand a potential ~
49294      eval path="$path"
49295      if test ! -f "$path" && test ! -d "$path"; then
49296        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49297      fi
49298
49299      if test -d "$path"; then
49300        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49301      else
49302        dir="`$DIRNAME "$path"`"
49303        base="`$BASENAME "$path"`"
49304        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49305      fi
49306    fi
49307  fi
49308
49309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49310$as_echo_n "checking for $DLL_NAME... " >&6; }
49311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49312$as_echo "$MSVC_DLL" >&6; }
49313    else
49314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49315$as_echo "incorrect, ignoring" >&6; }
49316      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49317$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49318    fi
49319  fi
49320
49321      if test "x$MSVC_DLL" = x; then
49322        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49323      fi
49324      MSVCP_DLL="$MSVC_DLL"
49325    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49326
49327  DLL_NAME="$MSVCP_NAME"
49328  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49329  METHOD="devkit"
49330  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49332$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49333
49334    # Need to check if the found msvcr is correct architecture
49335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49336$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49337    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49339      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49340      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49341      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49342        CORRECT_MSVCR_ARCH="PE32 executable"
49343      else
49344        CORRECT_MSVCR_ARCH="PE32+ executable"
49345      fi
49346    else
49347      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49348        CORRECT_MSVCR_ARCH=386
49349      else
49350        CORRECT_MSVCR_ARCH=x86-64
49351      fi
49352    fi
49353    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49355$as_echo "ok" >&6; }
49356      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49357
49358  # Only process if variable expands to non-empty
49359
49360  if test "x$MSVC_DLL" != x; then
49361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49362
49363  # Input might be given as Windows format, start by converting to
49364  # unix format.
49365  path="$MSVC_DLL"
49366  new_path=`$CYGPATH -u "$path"`
49367
49368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49371  # "foo.exe" is OK but "foo" is an error.
49372  #
49373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49374  # It is also a way to make sure we got the proper file name for the real test later on.
49375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49376  if test "x$test_shortpath" = x; then
49377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49378$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49379    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49380  fi
49381
49382  # Call helper function which possibly converts this using DOS-style short mode.
49383  # If so, the updated path is stored in $new_path.
49384
49385  input_path="$new_path"
49386  # Check if we need to convert this using DOS-style short mode. If the path
49387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49388  # take no chances and rewrite it.
49389  # Note: m4 eats our [], so we need to use [ and ] instead.
49390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49391  if test "x$has_forbidden_chars" != x; then
49392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49396      # Going to short mode and back again did indeed matter. Since short mode is
49397      # case insensitive, let's make it lowercase to improve readability.
49398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49399      # Now convert it back to Unix-style (cygpath)
49400      input_path=`$CYGPATH -u "$shortmode_path"`
49401      new_path="$input_path"
49402    fi
49403  fi
49404
49405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49406  if test "x$test_cygdrive_prefix" = x; then
49407    # As a simple fix, exclude /usr/bin since it's not a real path.
49408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49410      # a path prefixed by /cygdrive for fixpath to work.
49411      new_path="$CYGWIN_ROOT_PATH$input_path"
49412    fi
49413  fi
49414
49415
49416  if test "x$path" != "x$new_path"; then
49417    MSVC_DLL="$new_path"
49418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49419$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49420  fi
49421
49422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49423
49424  path="$MSVC_DLL"
49425  has_colon=`$ECHO $path | $GREP ^.:`
49426  new_path="$path"
49427  if test "x$has_colon" = x; then
49428    # Not in mixed or Windows style, start by that.
49429    new_path=`cmd //c echo $path`
49430  fi
49431
49432
49433  input_path="$new_path"
49434  # Check if we need to convert this using DOS-style short mode. If the path
49435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49436  # take no chances and rewrite it.
49437  # Note: m4 eats our [], so we need to use [ and ] instead.
49438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49439  if test "x$has_forbidden_chars" != x; then
49440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49442  fi
49443
49444
49445  windows_path="$new_path"
49446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49447    unix_path=`$CYGPATH -u "$windows_path"`
49448    new_path="$unix_path"
49449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49451    new_path="$unix_path"
49452  fi
49453
49454  if test "x$path" != "x$new_path"; then
49455    MSVC_DLL="$new_path"
49456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49457$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49458  fi
49459
49460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49462
49463    else
49464      # We're on a unix platform. Hooray! :)
49465      path="$MSVC_DLL"
49466      has_space=`$ECHO "$path" | $GREP " "`
49467      if test "x$has_space" != x; then
49468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49469$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49471      fi
49472
49473      # Use eval to expand a potential ~
49474      eval path="$path"
49475      if test ! -f "$path" && test ! -d "$path"; then
49476        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49477      fi
49478
49479      if test -d "$path"; then
49480        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49481      else
49482        dir="`$DIRNAME "$path"`"
49483        base="`$BASENAME "$path"`"
49484        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49485      fi
49486    fi
49487  fi
49488
49489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49490$as_echo_n "checking for $DLL_NAME... " >&6; }
49491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49492$as_echo "$MSVC_DLL" >&6; }
49493    else
49494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49495$as_echo "incorrect, ignoring" >&6; }
49496      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49497$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49498    fi
49499  fi
49500
49501      if test "x$MSVC_DLL" = x; then
49502        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49503      fi
49504      MSVCP_DLL="$MSVC_DLL"
49505    else
49506
49507  DLL_NAME="${MSVCP_NAME}"
49508  MSVC_DLL=
49509
49510  if test "x$MSVC_DLL" = x; then
49511    # Probe: Using well-known location from Visual Studio 10.0
49512    if test "x$VCINSTALLDIR" != x; then
49513      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49514
49515  windows_path="$CYGWIN_VC_INSTALL_DIR"
49516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49517    unix_path=`$CYGPATH -u "$windows_path"`
49518    CYGWIN_VC_INSTALL_DIR="$unix_path"
49519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49521    CYGWIN_VC_INSTALL_DIR="$unix_path"
49522  fi
49523
49524      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49525        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49526      else
49527        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49528      fi
49529      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49530
49531  DLL_NAME="$DLL_NAME"
49532  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49533  METHOD="well-known location in VCINSTALLDIR"
49534  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49535    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49536$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49537
49538    # Need to check if the found msvcr is correct architecture
49539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49540$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49541    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49543      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49544      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49545      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49546        CORRECT_MSVCR_ARCH="PE32 executable"
49547      else
49548        CORRECT_MSVCR_ARCH="PE32+ executable"
49549      fi
49550    else
49551      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49552        CORRECT_MSVCR_ARCH=386
49553      else
49554        CORRECT_MSVCR_ARCH=x86-64
49555      fi
49556    fi
49557    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49559$as_echo "ok" >&6; }
49560      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49561
49562  # Only process if variable expands to non-empty
49563
49564  if test "x$MSVC_DLL" != x; then
49565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49566
49567  # Input might be given as Windows format, start by converting to
49568  # unix format.
49569  path="$MSVC_DLL"
49570  new_path=`$CYGPATH -u "$path"`
49571
49572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49575  # "foo.exe" is OK but "foo" is an error.
49576  #
49577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49578  # It is also a way to make sure we got the proper file name for the real test later on.
49579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49580  if test "x$test_shortpath" = x; then
49581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49583    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49584  fi
49585
49586  # Call helper function which possibly converts this using DOS-style short mode.
49587  # If so, the updated path is stored in $new_path.
49588
49589  input_path="$new_path"
49590  # Check if we need to convert this using DOS-style short mode. If the path
49591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49592  # take no chances and rewrite it.
49593  # Note: m4 eats our [], so we need to use [ and ] instead.
49594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49595  if test "x$has_forbidden_chars" != x; then
49596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49600      # Going to short mode and back again did indeed matter. Since short mode is
49601      # case insensitive, let's make it lowercase to improve readability.
49602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49603      # Now convert it back to Unix-style (cygpath)
49604      input_path=`$CYGPATH -u "$shortmode_path"`
49605      new_path="$input_path"
49606    fi
49607  fi
49608
49609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49610  if test "x$test_cygdrive_prefix" = x; then
49611    # As a simple fix, exclude /usr/bin since it's not a real path.
49612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49614      # a path prefixed by /cygdrive for fixpath to work.
49615      new_path="$CYGWIN_ROOT_PATH$input_path"
49616    fi
49617  fi
49618
49619
49620  if test "x$path" != "x$new_path"; then
49621    MSVC_DLL="$new_path"
49622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49624  fi
49625
49626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49627
49628  path="$MSVC_DLL"
49629  has_colon=`$ECHO $path | $GREP ^.:`
49630  new_path="$path"
49631  if test "x$has_colon" = x; then
49632    # Not in mixed or Windows style, start by that.
49633    new_path=`cmd //c echo $path`
49634  fi
49635
49636
49637  input_path="$new_path"
49638  # Check if we need to convert this using DOS-style short mode. If the path
49639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49640  # take no chances and rewrite it.
49641  # Note: m4 eats our [], so we need to use [ and ] instead.
49642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49643  if test "x$has_forbidden_chars" != x; then
49644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49646  fi
49647
49648
49649  windows_path="$new_path"
49650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49651    unix_path=`$CYGPATH -u "$windows_path"`
49652    new_path="$unix_path"
49653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49655    new_path="$unix_path"
49656  fi
49657
49658  if test "x$path" != "x$new_path"; then
49659    MSVC_DLL="$new_path"
49660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49661$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49662  fi
49663
49664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49666
49667    else
49668      # We're on a unix platform. Hooray! :)
49669      path="$MSVC_DLL"
49670      has_space=`$ECHO "$path" | $GREP " "`
49671      if test "x$has_space" != x; then
49672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49675      fi
49676
49677      # Use eval to expand a potential ~
49678      eval path="$path"
49679      if test ! -f "$path" && test ! -d "$path"; then
49680        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49681      fi
49682
49683      if test -d "$path"; then
49684        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49685      else
49686        dir="`$DIRNAME "$path"`"
49687        base="`$BASENAME "$path"`"
49688        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49689      fi
49690    fi
49691  fi
49692
49693      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49694$as_echo_n "checking for $DLL_NAME... " >&6; }
49695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49696$as_echo "$MSVC_DLL" >&6; }
49697    else
49698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49699$as_echo "incorrect, ignoring" >&6; }
49700      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49701$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49702    fi
49703  fi
49704
49705    fi
49706  fi
49707
49708  if test "x$MSVC_DLL" = x; then
49709    # Probe: Check in the Boot JDK directory.
49710    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49711
49712  DLL_NAME="$DLL_NAME"
49713  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49714  METHOD="well-known location in Boot JDK"
49715  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49716    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49717$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49718
49719    # Need to check if the found msvcr is correct architecture
49720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49721$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49722    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49724      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49725      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49726      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49727        CORRECT_MSVCR_ARCH="PE32 executable"
49728      else
49729        CORRECT_MSVCR_ARCH="PE32+ executable"
49730      fi
49731    else
49732      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49733        CORRECT_MSVCR_ARCH=386
49734      else
49735        CORRECT_MSVCR_ARCH=x86-64
49736      fi
49737    fi
49738    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49740$as_echo "ok" >&6; }
49741      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49742
49743  # Only process if variable expands to non-empty
49744
49745  if test "x$MSVC_DLL" != x; then
49746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49747
49748  # Input might be given as Windows format, start by converting to
49749  # unix format.
49750  path="$MSVC_DLL"
49751  new_path=`$CYGPATH -u "$path"`
49752
49753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49756  # "foo.exe" is OK but "foo" is an error.
49757  #
49758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49759  # It is also a way to make sure we got the proper file name for the real test later on.
49760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49761  if test "x$test_shortpath" = x; then
49762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49763$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49764    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49765  fi
49766
49767  # Call helper function which possibly converts this using DOS-style short mode.
49768  # If so, the updated path is stored in $new_path.
49769
49770  input_path="$new_path"
49771  # Check if we need to convert this using DOS-style short mode. If the path
49772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49773  # take no chances and rewrite it.
49774  # Note: m4 eats our [], so we need to use [ and ] instead.
49775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49776  if test "x$has_forbidden_chars" != x; then
49777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49781      # Going to short mode and back again did indeed matter. Since short mode is
49782      # case insensitive, let's make it lowercase to improve readability.
49783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49784      # Now convert it back to Unix-style (cygpath)
49785      input_path=`$CYGPATH -u "$shortmode_path"`
49786      new_path="$input_path"
49787    fi
49788  fi
49789
49790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49791  if test "x$test_cygdrive_prefix" = x; then
49792    # As a simple fix, exclude /usr/bin since it's not a real path.
49793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49795      # a path prefixed by /cygdrive for fixpath to work.
49796      new_path="$CYGWIN_ROOT_PATH$input_path"
49797    fi
49798  fi
49799
49800
49801  if test "x$path" != "x$new_path"; then
49802    MSVC_DLL="$new_path"
49803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49804$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49805  fi
49806
49807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49808
49809  path="$MSVC_DLL"
49810  has_colon=`$ECHO $path | $GREP ^.:`
49811  new_path="$path"
49812  if test "x$has_colon" = x; then
49813    # Not in mixed or Windows style, start by that.
49814    new_path=`cmd //c echo $path`
49815  fi
49816
49817
49818  input_path="$new_path"
49819  # Check if we need to convert this using DOS-style short mode. If the path
49820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49821  # take no chances and rewrite it.
49822  # Note: m4 eats our [], so we need to use [ and ] instead.
49823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49824  if test "x$has_forbidden_chars" != x; then
49825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49827  fi
49828
49829
49830  windows_path="$new_path"
49831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49832    unix_path=`$CYGPATH -u "$windows_path"`
49833    new_path="$unix_path"
49834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49836    new_path="$unix_path"
49837  fi
49838
49839  if test "x$path" != "x$new_path"; then
49840    MSVC_DLL="$new_path"
49841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49842$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49843  fi
49844
49845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49847
49848    else
49849      # We're on a unix platform. Hooray! :)
49850      path="$MSVC_DLL"
49851      has_space=`$ECHO "$path" | $GREP " "`
49852      if test "x$has_space" != x; then
49853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49854$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49856      fi
49857
49858      # Use eval to expand a potential ~
49859      eval path="$path"
49860      if test ! -f "$path" && test ! -d "$path"; then
49861        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49862      fi
49863
49864      if test -d "$path"; then
49865        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49866      else
49867        dir="`$DIRNAME "$path"`"
49868        base="`$BASENAME "$path"`"
49869        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49870      fi
49871    fi
49872  fi
49873
49874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49875$as_echo_n "checking for $DLL_NAME... " >&6; }
49876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49877$as_echo "$MSVC_DLL" >&6; }
49878    else
49879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49880$as_echo "incorrect, ignoring" >&6; }
49881      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49882$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49883    fi
49884  fi
49885
49886  fi
49887
49888  if test "x$MSVC_DLL" = x; then
49889    # Probe: Look in the Windows system32 directory
49890    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49891
49892  windows_path="$CYGWIN_SYSTEMROOT"
49893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49894    unix_path=`$CYGPATH -u "$windows_path"`
49895    CYGWIN_SYSTEMROOT="$unix_path"
49896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49898    CYGWIN_SYSTEMROOT="$unix_path"
49899  fi
49900
49901    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49902
49903  DLL_NAME="$DLL_NAME"
49904  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49905  METHOD="well-known location in SYSTEMROOT"
49906  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49908$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49909
49910    # Need to check if the found msvcr is correct architecture
49911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49912$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49913    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49915      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49916      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49917      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49918        CORRECT_MSVCR_ARCH="PE32 executable"
49919      else
49920        CORRECT_MSVCR_ARCH="PE32+ executable"
49921      fi
49922    else
49923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49924        CORRECT_MSVCR_ARCH=386
49925      else
49926        CORRECT_MSVCR_ARCH=x86-64
49927      fi
49928    fi
49929    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49931$as_echo "ok" >&6; }
49932      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49933
49934  # Only process if variable expands to non-empty
49935
49936  if test "x$MSVC_DLL" != x; then
49937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49938
49939  # Input might be given as Windows format, start by converting to
49940  # unix format.
49941  path="$MSVC_DLL"
49942  new_path=`$CYGPATH -u "$path"`
49943
49944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49947  # "foo.exe" is OK but "foo" is an error.
49948  #
49949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49950  # It is also a way to make sure we got the proper file name for the real test later on.
49951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49952  if test "x$test_shortpath" = x; then
49953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49954$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49955    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49956  fi
49957
49958  # Call helper function which possibly converts this using DOS-style short mode.
49959  # If so, the updated path is stored in $new_path.
49960
49961  input_path="$new_path"
49962  # Check if we need to convert this using DOS-style short mode. If the path
49963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49964  # take no chances and rewrite it.
49965  # Note: m4 eats our [], so we need to use [ and ] instead.
49966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49967  if test "x$has_forbidden_chars" != x; then
49968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49972      # Going to short mode and back again did indeed matter. Since short mode is
49973      # case insensitive, let's make it lowercase to improve readability.
49974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49975      # Now convert it back to Unix-style (cygpath)
49976      input_path=`$CYGPATH -u "$shortmode_path"`
49977      new_path="$input_path"
49978    fi
49979  fi
49980
49981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49982  if test "x$test_cygdrive_prefix" = x; then
49983    # As a simple fix, exclude /usr/bin since it's not a real path.
49984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49986      # a path prefixed by /cygdrive for fixpath to work.
49987      new_path="$CYGWIN_ROOT_PATH$input_path"
49988    fi
49989  fi
49990
49991
49992  if test "x$path" != "x$new_path"; then
49993    MSVC_DLL="$new_path"
49994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49995$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49996  fi
49997
49998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49999
50000  path="$MSVC_DLL"
50001  has_colon=`$ECHO $path | $GREP ^.:`
50002  new_path="$path"
50003  if test "x$has_colon" = x; then
50004    # Not in mixed or Windows style, start by that.
50005    new_path=`cmd //c echo $path`
50006  fi
50007
50008
50009  input_path="$new_path"
50010  # Check if we need to convert this using DOS-style short mode. If the path
50011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50012  # take no chances and rewrite it.
50013  # Note: m4 eats our [], so we need to use [ and ] instead.
50014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50015  if test "x$has_forbidden_chars" != x; then
50016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50018  fi
50019
50020
50021  windows_path="$new_path"
50022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50023    unix_path=`$CYGPATH -u "$windows_path"`
50024    new_path="$unix_path"
50025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50027    new_path="$unix_path"
50028  fi
50029
50030  if test "x$path" != "x$new_path"; then
50031    MSVC_DLL="$new_path"
50032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50033$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50034  fi
50035
50036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50038
50039    else
50040      # We're on a unix platform. Hooray! :)
50041      path="$MSVC_DLL"
50042      has_space=`$ECHO "$path" | $GREP " "`
50043      if test "x$has_space" != x; then
50044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50045$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50047      fi
50048
50049      # Use eval to expand a potential ~
50050      eval path="$path"
50051      if test ! -f "$path" && test ! -d "$path"; then
50052        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50053      fi
50054
50055      if test -d "$path"; then
50056        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50057      else
50058        dir="`$DIRNAME "$path"`"
50059        base="`$BASENAME "$path"`"
50060        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50061      fi
50062    fi
50063  fi
50064
50065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50066$as_echo_n "checking for $DLL_NAME... " >&6; }
50067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50068$as_echo "$MSVC_DLL" >&6; }
50069    else
50070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50071$as_echo "incorrect, ignoring" >&6; }
50072      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50073$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50074    fi
50075  fi
50076
50077  fi
50078
50079  if test "x$MSVC_DLL" = x; then
50080    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50081    if test "x$VS100COMNTOOLS" != x; then
50082      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50083
50084  windows_path="$CYGWIN_VS_TOOLS_DIR"
50085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50086    unix_path=`$CYGPATH -u "$windows_path"`
50087    CYGWIN_VS_TOOLS_DIR="$unix_path"
50088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50090    CYGWIN_VS_TOOLS_DIR="$unix_path"
50091  fi
50092
50093      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50094        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50095	    | $GREP -i /x64/ | $HEAD --lines 1`
50096      else
50097        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50098	    | $GREP -i /x86/ | $HEAD --lines 1`
50099      fi
50100
50101  DLL_NAME="$DLL_NAME"
50102  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50103  METHOD="search of VS100COMNTOOLS"
50104  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50105    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50106$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50107
50108    # Need to check if the found msvcr is correct architecture
50109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50110$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50111    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50113      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50114      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50115      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50116        CORRECT_MSVCR_ARCH="PE32 executable"
50117      else
50118        CORRECT_MSVCR_ARCH="PE32+ executable"
50119      fi
50120    else
50121      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50122        CORRECT_MSVCR_ARCH=386
50123      else
50124        CORRECT_MSVCR_ARCH=x86-64
50125      fi
50126    fi
50127    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50129$as_echo "ok" >&6; }
50130      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50131
50132  # Only process if variable expands to non-empty
50133
50134  if test "x$MSVC_DLL" != x; then
50135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50136
50137  # Input might be given as Windows format, start by converting to
50138  # unix format.
50139  path="$MSVC_DLL"
50140  new_path=`$CYGPATH -u "$path"`
50141
50142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50145  # "foo.exe" is OK but "foo" is an error.
50146  #
50147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50148  # It is also a way to make sure we got the proper file name for the real test later on.
50149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50150  if test "x$test_shortpath" = x; then
50151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50152$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50153    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50154  fi
50155
50156  # Call helper function which possibly converts this using DOS-style short mode.
50157  # If so, the updated path is stored in $new_path.
50158
50159  input_path="$new_path"
50160  # Check if we need to convert this using DOS-style short mode. If the path
50161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50162  # take no chances and rewrite it.
50163  # Note: m4 eats our [], so we need to use [ and ] instead.
50164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50165  if test "x$has_forbidden_chars" != x; then
50166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50170      # Going to short mode and back again did indeed matter. Since short mode is
50171      # case insensitive, let's make it lowercase to improve readability.
50172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50173      # Now convert it back to Unix-style (cygpath)
50174      input_path=`$CYGPATH -u "$shortmode_path"`
50175      new_path="$input_path"
50176    fi
50177  fi
50178
50179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50180  if test "x$test_cygdrive_prefix" = x; then
50181    # As a simple fix, exclude /usr/bin since it's not a real path.
50182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50184      # a path prefixed by /cygdrive for fixpath to work.
50185      new_path="$CYGWIN_ROOT_PATH$input_path"
50186    fi
50187  fi
50188
50189
50190  if test "x$path" != "x$new_path"; then
50191    MSVC_DLL="$new_path"
50192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50193$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50194  fi
50195
50196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50197
50198  path="$MSVC_DLL"
50199  has_colon=`$ECHO $path | $GREP ^.:`
50200  new_path="$path"
50201  if test "x$has_colon" = x; then
50202    # Not in mixed or Windows style, start by that.
50203    new_path=`cmd //c echo $path`
50204  fi
50205
50206
50207  input_path="$new_path"
50208  # Check if we need to convert this using DOS-style short mode. If the path
50209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50210  # take no chances and rewrite it.
50211  # Note: m4 eats our [], so we need to use [ and ] instead.
50212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50213  if test "x$has_forbidden_chars" != x; then
50214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50216  fi
50217
50218
50219  windows_path="$new_path"
50220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50221    unix_path=`$CYGPATH -u "$windows_path"`
50222    new_path="$unix_path"
50223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50225    new_path="$unix_path"
50226  fi
50227
50228  if test "x$path" != "x$new_path"; then
50229    MSVC_DLL="$new_path"
50230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50231$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50232  fi
50233
50234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50236
50237    else
50238      # We're on a unix platform. Hooray! :)
50239      path="$MSVC_DLL"
50240      has_space=`$ECHO "$path" | $GREP " "`
50241      if test "x$has_space" != x; then
50242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50243$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50244        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50245      fi
50246
50247      # Use eval to expand a potential ~
50248      eval path="$path"
50249      if test ! -f "$path" && test ! -d "$path"; then
50250        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50251      fi
50252
50253      if test -d "$path"; then
50254        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50255      else
50256        dir="`$DIRNAME "$path"`"
50257        base="`$BASENAME "$path"`"
50258        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50259      fi
50260    fi
50261  fi
50262
50263      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50264$as_echo_n "checking for $DLL_NAME... " >&6; }
50265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50266$as_echo "$MSVC_DLL" >&6; }
50267    else
50268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50269$as_echo "incorrect, ignoring" >&6; }
50270      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50271$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50272    fi
50273  fi
50274
50275    fi
50276  fi
50277
50278  if test "x$MSVC_DLL" = x; then
50279    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50280    # (This was the original behaviour; kept since it might turn something up)
50281    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50282      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50283        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50284	    | $GREP x64 | $HEAD --lines 1`
50285      else
50286        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50287	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50288        if test "x$POSSIBLE_MSVC_DLL" = x; then
50289          # We're grasping at straws now...
50290          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50291	      | $HEAD --lines 1`
50292        fi
50293      fi
50294
50295
50296  DLL_NAME="$DLL_NAME"
50297  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50298  METHOD="search of VCINSTALLDIR"
50299  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50300    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50301$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50302
50303    # Need to check if the found msvcr is correct architecture
50304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50305$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50306    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50308      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50309      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50310      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50311        CORRECT_MSVCR_ARCH="PE32 executable"
50312      else
50313        CORRECT_MSVCR_ARCH="PE32+ executable"
50314      fi
50315    else
50316      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50317        CORRECT_MSVCR_ARCH=386
50318      else
50319        CORRECT_MSVCR_ARCH=x86-64
50320      fi
50321    fi
50322    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50324$as_echo "ok" >&6; }
50325      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50326
50327  # Only process if variable expands to non-empty
50328
50329  if test "x$MSVC_DLL" != x; then
50330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50331
50332  # Input might be given as Windows format, start by converting to
50333  # unix format.
50334  path="$MSVC_DLL"
50335  new_path=`$CYGPATH -u "$path"`
50336
50337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50340  # "foo.exe" is OK but "foo" is an error.
50341  #
50342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50343  # It is also a way to make sure we got the proper file name for the real test later on.
50344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50345  if test "x$test_shortpath" = x; then
50346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50347$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50348    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50349  fi
50350
50351  # Call helper function which possibly converts this using DOS-style short mode.
50352  # If so, the updated path is stored in $new_path.
50353
50354  input_path="$new_path"
50355  # Check if we need to convert this using DOS-style short mode. If the path
50356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50357  # take no chances and rewrite it.
50358  # Note: m4 eats our [], so we need to use [ and ] instead.
50359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50360  if test "x$has_forbidden_chars" != x; then
50361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50365      # Going to short mode and back again did indeed matter. Since short mode is
50366      # case insensitive, let's make it lowercase to improve readability.
50367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50368      # Now convert it back to Unix-style (cygpath)
50369      input_path=`$CYGPATH -u "$shortmode_path"`
50370      new_path="$input_path"
50371    fi
50372  fi
50373
50374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50375  if test "x$test_cygdrive_prefix" = x; then
50376    # As a simple fix, exclude /usr/bin since it's not a real path.
50377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50379      # a path prefixed by /cygdrive for fixpath to work.
50380      new_path="$CYGWIN_ROOT_PATH$input_path"
50381    fi
50382  fi
50383
50384
50385  if test "x$path" != "x$new_path"; then
50386    MSVC_DLL="$new_path"
50387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50388$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50389  fi
50390
50391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50392
50393  path="$MSVC_DLL"
50394  has_colon=`$ECHO $path | $GREP ^.:`
50395  new_path="$path"
50396  if test "x$has_colon" = x; then
50397    # Not in mixed or Windows style, start by that.
50398    new_path=`cmd //c echo $path`
50399  fi
50400
50401
50402  input_path="$new_path"
50403  # Check if we need to convert this using DOS-style short mode. If the path
50404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50405  # take no chances and rewrite it.
50406  # Note: m4 eats our [], so we need to use [ and ] instead.
50407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50408  if test "x$has_forbidden_chars" != x; then
50409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50411  fi
50412
50413
50414  windows_path="$new_path"
50415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50416    unix_path=`$CYGPATH -u "$windows_path"`
50417    new_path="$unix_path"
50418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50420    new_path="$unix_path"
50421  fi
50422
50423  if test "x$path" != "x$new_path"; then
50424    MSVC_DLL="$new_path"
50425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50426$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50427  fi
50428
50429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50431
50432    else
50433      # We're on a unix platform. Hooray! :)
50434      path="$MSVC_DLL"
50435      has_space=`$ECHO "$path" | $GREP " "`
50436      if test "x$has_space" != x; then
50437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50438$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50440      fi
50441
50442      # Use eval to expand a potential ~
50443      eval path="$path"
50444      if test ! -f "$path" && test ! -d "$path"; then
50445        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50446      fi
50447
50448      if test -d "$path"; then
50449        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50450      else
50451        dir="`$DIRNAME "$path"`"
50452        base="`$BASENAME "$path"`"
50453        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50454      fi
50455    fi
50456  fi
50457
50458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50459$as_echo_n "checking for $DLL_NAME... " >&6; }
50460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50461$as_echo "$MSVC_DLL" >&6; }
50462    else
50463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50464$as_echo "incorrect, ignoring" >&6; }
50465      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50466$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50467    fi
50468  fi
50469
50470    fi
50471  fi
50472
50473  if test "x$MSVC_DLL" = x; then
50474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50475$as_echo_n "checking for $DLL_NAME... " >&6; }
50476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50477$as_echo "no" >&6; }
50478    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50479  fi
50480
50481      MSVCP_DLL="$MSVC_DLL"
50482    fi
50483
50484  fi
50485
50486  fi
50487
50488
50489  if test "x$NEEDS_LIB_X11" = xfalse; then
50490    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50491      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50492$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50493    fi
50494    X_CFLAGS=
50495    X_LIBS=
50496  else
50497
50498    if test "x${with_x}" = xno; then
50499      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50500    fi
50501
50502    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50503      # The user has specified a X11 base directory. Use it for includes and
50504      # libraries, unless explicitely overridden.
50505      if test "x$x_includes" = xNONE; then
50506        x_includes="${with_x}/include"
50507      fi
50508      if test "x$x_libraries" = xNONE; then
50509        x_libraries="${with_x}/lib"
50510      fi
50511    else
50512      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50513      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50514      # --x-libraries for the sysroot, if that seems to be correct.
50515      if test "x$SYSROOT" != "x"; then
50516        if test "x$x_includes" = xNONE; then
50517          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50518            x_includes="$SYSROOT/usr/X11R6/include"
50519          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50520            x_includes="$SYSROOT/usr/include"
50521          fi
50522        fi
50523        if test "x$x_libraries" = xNONE; then
50524          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50525            x_libraries="$SYSROOT/usr/X11R6/lib"
50526          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50527            x_libraries="$SYSROOT/usr/lib64"
50528          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50529            x_libraries="$SYSROOT/usr/lib"
50530          fi
50531        fi
50532      fi
50533    fi
50534
50535    # Now let autoconf do it's magic
50536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50537$as_echo_n "checking for X... " >&6; }
50538
50539
50540# Check whether --with-x was given.
50541if test "${with_x+set}" = set; then :
50542  withval=$with_x;
50543fi
50544
50545# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50546if test "x$with_x" = xno; then
50547  # The user explicitly disabled X.
50548  have_x=disabled
50549else
50550  case $x_includes,$x_libraries in #(
50551    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50552    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50553  $as_echo_n "(cached) " >&6
50554else
50555  # One or both of the vars are not set, and there is no cached value.
50556ac_x_includes=no ac_x_libraries=no
50557rm -f -r conftest.dir
50558if mkdir conftest.dir; then
50559  cd conftest.dir
50560  cat >Imakefile <<'_ACEOF'
50561incroot:
50562	@echo incroot='${INCROOT}'
50563usrlibdir:
50564	@echo usrlibdir='${USRLIBDIR}'
50565libdir:
50566	@echo libdir='${LIBDIR}'
50567_ACEOF
50568  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50569    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50570    for ac_var in incroot usrlibdir libdir; do
50571      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50572    done
50573    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50574    for ac_extension in a so sl dylib la dll; do
50575      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50576	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50577	ac_im_usrlibdir=$ac_im_libdir; break
50578      fi
50579    done
50580    # Screen out bogus values from the imake configuration.  They are
50581    # bogus both because they are the default anyway, and because
50582    # using them would break gcc on systems where it needs fixed includes.
50583    case $ac_im_incroot in
50584	/usr/include) ac_x_includes= ;;
50585	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50586    esac
50587    case $ac_im_usrlibdir in
50588	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50589	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50590    esac
50591  fi
50592  cd ..
50593  rm -f -r conftest.dir
50594fi
50595
50596# Standard set of common directories for X headers.
50597# Check X11 before X11Rn because it is often a symlink to the current release.
50598ac_x_header_dirs='
50599/usr/X11/include
50600/usr/X11R7/include
50601/usr/X11R6/include
50602/usr/X11R5/include
50603/usr/X11R4/include
50604
50605/usr/include/X11
50606/usr/include/X11R7
50607/usr/include/X11R6
50608/usr/include/X11R5
50609/usr/include/X11R4
50610
50611/usr/local/X11/include
50612/usr/local/X11R7/include
50613/usr/local/X11R6/include
50614/usr/local/X11R5/include
50615/usr/local/X11R4/include
50616
50617/usr/local/include/X11
50618/usr/local/include/X11R7
50619/usr/local/include/X11R6
50620/usr/local/include/X11R5
50621/usr/local/include/X11R4
50622
50623/usr/X386/include
50624/usr/x386/include
50625/usr/XFree86/include/X11
50626
50627/usr/include
50628/usr/local/include
50629/usr/unsupported/include
50630/usr/athena/include
50631/usr/local/x11r5/include
50632/usr/lpp/Xamples/include
50633
50634/usr/openwin/include
50635/usr/openwin/share/include'
50636
50637if test "$ac_x_includes" = no; then
50638  # Guess where to find include files, by looking for Xlib.h.
50639  # First, try using that file with no special directory specified.
50640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50641/* end confdefs.h.  */
50642#include <X11/Xlib.h>
50643_ACEOF
50644if ac_fn_cxx_try_cpp "$LINENO"; then :
50645  # We can compile using X headers with no special include directory.
50646ac_x_includes=
50647else
50648  for ac_dir in $ac_x_header_dirs; do
50649  if test -r "$ac_dir/X11/Xlib.h"; then
50650    ac_x_includes=$ac_dir
50651    break
50652  fi
50653done
50654fi
50655rm -f conftest.err conftest.i conftest.$ac_ext
50656fi # $ac_x_includes = no
50657
50658if test "$ac_x_libraries" = no; then
50659  # Check for the libraries.
50660  # See if we find them without any special options.
50661  # Don't add to $LIBS permanently.
50662  ac_save_LIBS=$LIBS
50663  LIBS="-lX11 $LIBS"
50664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50665/* end confdefs.h.  */
50666#include <X11/Xlib.h>
50667int
50668main ()
50669{
50670XrmInitialize ()
50671  ;
50672  return 0;
50673}
50674_ACEOF
50675if ac_fn_cxx_try_link "$LINENO"; then :
50676  LIBS=$ac_save_LIBS
50677# We can link X programs with no special library path.
50678ac_x_libraries=
50679else
50680  LIBS=$ac_save_LIBS
50681for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50682do
50683  # Don't even attempt the hair of trying to link an X program!
50684  for ac_extension in a so sl dylib la dll; do
50685    if test -r "$ac_dir/libX11.$ac_extension"; then
50686      ac_x_libraries=$ac_dir
50687      break 2
50688    fi
50689  done
50690done
50691fi
50692rm -f core conftest.err conftest.$ac_objext \
50693    conftest$ac_exeext conftest.$ac_ext
50694fi # $ac_x_libraries = no
50695
50696case $ac_x_includes,$ac_x_libraries in #(
50697  no,* | *,no | *\'*)
50698    # Didn't find X, or a directory has "'" in its name.
50699    ac_cv_have_x="have_x=no";; #(
50700  *)
50701    # Record where we found X for the cache.
50702    ac_cv_have_x="have_x=yes\
50703	ac_x_includes='$ac_x_includes'\
50704	ac_x_libraries='$ac_x_libraries'"
50705esac
50706fi
50707;; #(
50708    *) have_x=yes;;
50709  esac
50710  eval "$ac_cv_have_x"
50711fi # $with_x != no
50712
50713if test "$have_x" != yes; then
50714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50715$as_echo "$have_x" >&6; }
50716  no_x=yes
50717else
50718  # If each of the values was on the command line, it overrides each guess.
50719  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50720  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50721  # Update the cache value to reflect the command line values.
50722  ac_cv_have_x="have_x=yes\
50723	ac_x_includes='$x_includes'\
50724	ac_x_libraries='$x_libraries'"
50725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50726$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50727fi
50728
50729    if test "$no_x" = yes; then
50730  # Not all programs may use this symbol, but it does not hurt to define it.
50731
50732$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50733
50734  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50735else
50736  if test -n "$x_includes"; then
50737    X_CFLAGS="$X_CFLAGS -I$x_includes"
50738  fi
50739
50740  # It would also be nice to do this for all -L options, not just this one.
50741  if test -n "$x_libraries"; then
50742    X_LIBS="$X_LIBS -L$x_libraries"
50743    # For Solaris; some versions of Sun CC require a space after -R and
50744    # others require no space.  Words are not sufficient . . . .
50745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50746$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50747    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50748    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50749    ac_cxx_werror_flag=yes
50750    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50751/* end confdefs.h.  */
50752
50753int
50754main ()
50755{
50756
50757  ;
50758  return 0;
50759}
50760_ACEOF
50761if ac_fn_cxx_try_link "$LINENO"; then :
50762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50763$as_echo "no" >&6; }
50764       X_LIBS="$X_LIBS -R$x_libraries"
50765else
50766  LIBS="$ac_xsave_LIBS -R $x_libraries"
50767       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50768/* end confdefs.h.  */
50769
50770int
50771main ()
50772{
50773
50774  ;
50775  return 0;
50776}
50777_ACEOF
50778if ac_fn_cxx_try_link "$LINENO"; then :
50779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50780$as_echo "yes" >&6; }
50781	  X_LIBS="$X_LIBS -R $x_libraries"
50782else
50783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50784$as_echo "neither works" >&6; }
50785fi
50786rm -f core conftest.err conftest.$ac_objext \
50787    conftest$ac_exeext conftest.$ac_ext
50788fi
50789rm -f core conftest.err conftest.$ac_objext \
50790    conftest$ac_exeext conftest.$ac_ext
50791    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50792    LIBS=$ac_xsave_LIBS
50793  fi
50794
50795  # Check for system-dependent libraries X programs must link with.
50796  # Do this before checking for the system-independent R6 libraries
50797  # (-lICE), since we may need -lsocket or whatever for X linking.
50798
50799  if test "$ISC" = yes; then
50800    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50801  else
50802    # Martyn Johnson says this is needed for Ultrix, if the X
50803    # libraries were built with DECnet support.  And Karl Berry says
50804    # the Alpha needs dnet_stub (dnet does not exist).
50805    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50806    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50807/* end confdefs.h.  */
50808
50809/* Override any GCC internal prototype to avoid an error.
50810   Use char because int might match the return type of a GCC
50811   builtin and then its argument prototype would still apply.  */
50812#ifdef __cplusplus
50813extern "C"
50814#endif
50815char XOpenDisplay ();
50816int
50817main ()
50818{
50819return XOpenDisplay ();
50820  ;
50821  return 0;
50822}
50823_ACEOF
50824if ac_fn_cxx_try_link "$LINENO"; then :
50825
50826else
50827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50828$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50829if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50830  $as_echo_n "(cached) " >&6
50831else
50832  ac_check_lib_save_LIBS=$LIBS
50833LIBS="-ldnet  $LIBS"
50834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50835/* end confdefs.h.  */
50836
50837/* Override any GCC internal prototype to avoid an error.
50838   Use char because int might match the return type of a GCC
50839   builtin and then its argument prototype would still apply.  */
50840#ifdef __cplusplus
50841extern "C"
50842#endif
50843char dnet_ntoa ();
50844int
50845main ()
50846{
50847return dnet_ntoa ();
50848  ;
50849  return 0;
50850}
50851_ACEOF
50852if ac_fn_cxx_try_link "$LINENO"; then :
50853  ac_cv_lib_dnet_dnet_ntoa=yes
50854else
50855  ac_cv_lib_dnet_dnet_ntoa=no
50856fi
50857rm -f core conftest.err conftest.$ac_objext \
50858    conftest$ac_exeext conftest.$ac_ext
50859LIBS=$ac_check_lib_save_LIBS
50860fi
50861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50862$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50863if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50864  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50865fi
50866
50867    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50869$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50870if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50871  $as_echo_n "(cached) " >&6
50872else
50873  ac_check_lib_save_LIBS=$LIBS
50874LIBS="-ldnet_stub  $LIBS"
50875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50876/* end confdefs.h.  */
50877
50878/* Override any GCC internal prototype to avoid an error.
50879   Use char because int might match the return type of a GCC
50880   builtin and then its argument prototype would still apply.  */
50881#ifdef __cplusplus
50882extern "C"
50883#endif
50884char dnet_ntoa ();
50885int
50886main ()
50887{
50888return dnet_ntoa ();
50889  ;
50890  return 0;
50891}
50892_ACEOF
50893if ac_fn_cxx_try_link "$LINENO"; then :
50894  ac_cv_lib_dnet_stub_dnet_ntoa=yes
50895else
50896  ac_cv_lib_dnet_stub_dnet_ntoa=no
50897fi
50898rm -f core conftest.err conftest.$ac_objext \
50899    conftest$ac_exeext conftest.$ac_ext
50900LIBS=$ac_check_lib_save_LIBS
50901fi
50902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50903$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50904if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50905  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50906fi
50907
50908    fi
50909fi
50910rm -f core conftest.err conftest.$ac_objext \
50911    conftest$ac_exeext conftest.$ac_ext
50912    LIBS="$ac_xsave_LIBS"
50913
50914    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50915    # to get the SysV transport functions.
50916    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50917    # needs -lnsl.
50918    # The nsl library prevents programs from opening the X display
50919    # on Irix 5.2, according to T.E. Dickey.
50920    # The functions gethostbyname, getservbyname, and inet_addr are
50921    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50922    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50923if test "x$ac_cv_func_gethostbyname" = xyes; then :
50924
50925fi
50926
50927    if test $ac_cv_func_gethostbyname = no; then
50928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50929$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50930if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50931  $as_echo_n "(cached) " >&6
50932else
50933  ac_check_lib_save_LIBS=$LIBS
50934LIBS="-lnsl  $LIBS"
50935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50936/* end confdefs.h.  */
50937
50938/* Override any GCC internal prototype to avoid an error.
50939   Use char because int might match the return type of a GCC
50940   builtin and then its argument prototype would still apply.  */
50941#ifdef __cplusplus
50942extern "C"
50943#endif
50944char gethostbyname ();
50945int
50946main ()
50947{
50948return gethostbyname ();
50949  ;
50950  return 0;
50951}
50952_ACEOF
50953if ac_fn_cxx_try_link "$LINENO"; then :
50954  ac_cv_lib_nsl_gethostbyname=yes
50955else
50956  ac_cv_lib_nsl_gethostbyname=no
50957fi
50958rm -f core conftest.err conftest.$ac_objext \
50959    conftest$ac_exeext conftest.$ac_ext
50960LIBS=$ac_check_lib_save_LIBS
50961fi
50962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50963$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50964if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50965  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50966fi
50967
50968      if test $ac_cv_lib_nsl_gethostbyname = no; then
50969	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50970$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50971if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50972  $as_echo_n "(cached) " >&6
50973else
50974  ac_check_lib_save_LIBS=$LIBS
50975LIBS="-lbsd  $LIBS"
50976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50977/* end confdefs.h.  */
50978
50979/* Override any GCC internal prototype to avoid an error.
50980   Use char because int might match the return type of a GCC
50981   builtin and then its argument prototype would still apply.  */
50982#ifdef __cplusplus
50983extern "C"
50984#endif
50985char gethostbyname ();
50986int
50987main ()
50988{
50989return gethostbyname ();
50990  ;
50991  return 0;
50992}
50993_ACEOF
50994if ac_fn_cxx_try_link "$LINENO"; then :
50995  ac_cv_lib_bsd_gethostbyname=yes
50996else
50997  ac_cv_lib_bsd_gethostbyname=no
50998fi
50999rm -f core conftest.err conftest.$ac_objext \
51000    conftest$ac_exeext conftest.$ac_ext
51001LIBS=$ac_check_lib_save_LIBS
51002fi
51003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51004$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51005if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51006  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51007fi
51008
51009      fi
51010    fi
51011
51012    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51013    # socket/setsockopt and other routines are undefined under SCO ODT
51014    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51015    # on later versions), says Simon Leinen: it contains gethostby*
51016    # variants that don't use the name server (or something).  -lsocket
51017    # must be given before -lnsl if both are needed.  We assume that
51018    # if connect needs -lnsl, so does gethostbyname.
51019    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51020if test "x$ac_cv_func_connect" = xyes; then :
51021
51022fi
51023
51024    if test $ac_cv_func_connect = no; then
51025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51026$as_echo_n "checking for connect in -lsocket... " >&6; }
51027if ${ac_cv_lib_socket_connect+:} false; then :
51028  $as_echo_n "(cached) " >&6
51029else
51030  ac_check_lib_save_LIBS=$LIBS
51031LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51033/* end confdefs.h.  */
51034
51035/* Override any GCC internal prototype to avoid an error.
51036   Use char because int might match the return type of a GCC
51037   builtin and then its argument prototype would still apply.  */
51038#ifdef __cplusplus
51039extern "C"
51040#endif
51041char connect ();
51042int
51043main ()
51044{
51045return connect ();
51046  ;
51047  return 0;
51048}
51049_ACEOF
51050if ac_fn_cxx_try_link "$LINENO"; then :
51051  ac_cv_lib_socket_connect=yes
51052else
51053  ac_cv_lib_socket_connect=no
51054fi
51055rm -f core conftest.err conftest.$ac_objext \
51056    conftest$ac_exeext conftest.$ac_ext
51057LIBS=$ac_check_lib_save_LIBS
51058fi
51059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51060$as_echo "$ac_cv_lib_socket_connect" >&6; }
51061if test "x$ac_cv_lib_socket_connect" = xyes; then :
51062  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51063fi
51064
51065    fi
51066
51067    # Guillermo Gomez says -lposix is necessary on A/UX.
51068    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51069if test "x$ac_cv_func_remove" = xyes; then :
51070
51071fi
51072
51073    if test $ac_cv_func_remove = no; then
51074      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51075$as_echo_n "checking for remove in -lposix... " >&6; }
51076if ${ac_cv_lib_posix_remove+:} false; then :
51077  $as_echo_n "(cached) " >&6
51078else
51079  ac_check_lib_save_LIBS=$LIBS
51080LIBS="-lposix  $LIBS"
51081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51082/* end confdefs.h.  */
51083
51084/* Override any GCC internal prototype to avoid an error.
51085   Use char because int might match the return type of a GCC
51086   builtin and then its argument prototype would still apply.  */
51087#ifdef __cplusplus
51088extern "C"
51089#endif
51090char remove ();
51091int
51092main ()
51093{
51094return remove ();
51095  ;
51096  return 0;
51097}
51098_ACEOF
51099if ac_fn_cxx_try_link "$LINENO"; then :
51100  ac_cv_lib_posix_remove=yes
51101else
51102  ac_cv_lib_posix_remove=no
51103fi
51104rm -f core conftest.err conftest.$ac_objext \
51105    conftest$ac_exeext conftest.$ac_ext
51106LIBS=$ac_check_lib_save_LIBS
51107fi
51108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51109$as_echo "$ac_cv_lib_posix_remove" >&6; }
51110if test "x$ac_cv_lib_posix_remove" = xyes; then :
51111  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51112fi
51113
51114    fi
51115
51116    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51117    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51118if test "x$ac_cv_func_shmat" = xyes; then :
51119
51120fi
51121
51122    if test $ac_cv_func_shmat = no; then
51123      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51124$as_echo_n "checking for shmat in -lipc... " >&6; }
51125if ${ac_cv_lib_ipc_shmat+:} false; then :
51126  $as_echo_n "(cached) " >&6
51127else
51128  ac_check_lib_save_LIBS=$LIBS
51129LIBS="-lipc  $LIBS"
51130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51131/* end confdefs.h.  */
51132
51133/* Override any GCC internal prototype to avoid an error.
51134   Use char because int might match the return type of a GCC
51135   builtin and then its argument prototype would still apply.  */
51136#ifdef __cplusplus
51137extern "C"
51138#endif
51139char shmat ();
51140int
51141main ()
51142{
51143return shmat ();
51144  ;
51145  return 0;
51146}
51147_ACEOF
51148if ac_fn_cxx_try_link "$LINENO"; then :
51149  ac_cv_lib_ipc_shmat=yes
51150else
51151  ac_cv_lib_ipc_shmat=no
51152fi
51153rm -f core conftest.err conftest.$ac_objext \
51154    conftest$ac_exeext conftest.$ac_ext
51155LIBS=$ac_check_lib_save_LIBS
51156fi
51157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51158$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51159if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51160  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51161fi
51162
51163    fi
51164  fi
51165
51166  # Check for libraries that X11R6 Xt/Xaw programs need.
51167  ac_save_LDFLAGS=$LDFLAGS
51168  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51169  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51170  # check for ICE first), but we must link in the order -lSM -lICE or
51171  # we get undefined symbols.  So assume we have SM if we have ICE.
51172  # These have to be linked with before -lX11, unlike the other
51173  # libraries we check for below, so use a different variable.
51174  # John Interrante, Karl Berry
51175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51176$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51177if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51178  $as_echo_n "(cached) " >&6
51179else
51180  ac_check_lib_save_LIBS=$LIBS
51181LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51183/* end confdefs.h.  */
51184
51185/* Override any GCC internal prototype to avoid an error.
51186   Use char because int might match the return type of a GCC
51187   builtin and then its argument prototype would still apply.  */
51188#ifdef __cplusplus
51189extern "C"
51190#endif
51191char IceConnectionNumber ();
51192int
51193main ()
51194{
51195return IceConnectionNumber ();
51196  ;
51197  return 0;
51198}
51199_ACEOF
51200if ac_fn_cxx_try_link "$LINENO"; then :
51201  ac_cv_lib_ICE_IceConnectionNumber=yes
51202else
51203  ac_cv_lib_ICE_IceConnectionNumber=no
51204fi
51205rm -f core conftest.err conftest.$ac_objext \
51206    conftest$ac_exeext conftest.$ac_ext
51207LIBS=$ac_check_lib_save_LIBS
51208fi
51209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51210$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51211if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51212  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51213fi
51214
51215  LDFLAGS=$ac_save_LDFLAGS
51216
51217fi
51218
51219
51220    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51221    # this doesn't make sense so we remove it.
51222    if test "x$COMPILE_TYPE" = xcross; then
51223      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51224    fi
51225
51226    if test "x$no_x" = xyes; then
51227
51228  # Print a helpful message on how to acquire the necessary build dependency.
51229  # x11 is the help tag: freetype, cups, alsa etc
51230  MISSING_DEPENDENCY=x11
51231
51232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51233    cygwin_help $MISSING_DEPENDENCY
51234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51235    msys_help $MISSING_DEPENDENCY
51236  else
51237    PKGHANDLER_COMMAND=
51238
51239    case $PKGHANDLER in
51240      apt-get)
51241        apt_help     $MISSING_DEPENDENCY ;;
51242      yum)
51243        yum_help     $MISSING_DEPENDENCY ;;
51244      port)
51245        port_help    $MISSING_DEPENDENCY ;;
51246      pkgutil)
51247        pkgutil_help $MISSING_DEPENDENCY ;;
51248      pkgadd)
51249        pkgadd_help  $MISSING_DEPENDENCY ;;
51250    esac
51251
51252    if test "x$PKGHANDLER_COMMAND" != x; then
51253      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51254    fi
51255  fi
51256
51257      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51258    fi
51259
51260    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51261      OPENWIN_HOME="/usr/openwin"
51262      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51263      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51264          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51265          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51266          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51267    fi
51268
51269    ac_ext=c
51270ac_cpp='$CPP $CPPFLAGS'
51271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51273ac_compiler_gnu=$ac_cv_c_compiler_gnu
51274
51275    OLD_CFLAGS="$CFLAGS"
51276    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51277
51278    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51279    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51280do :
51281  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51282ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51283          # include <X11/Xlib.h>
51284          # include <X11/Xutil.h>
51285
51286
51287"
51288if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51289  cat >>confdefs.h <<_ACEOF
51290#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51291_ACEOF
51292 X11_HEADERS_OK=yes
51293else
51294  X11_HEADERS_OK=no; break
51295fi
51296
51297done
51298
51299
51300    if test "x$X11_HEADERS_OK" = xno; then
51301
51302  # Print a helpful message on how to acquire the necessary build dependency.
51303  # x11 is the help tag: freetype, cups, alsa etc
51304  MISSING_DEPENDENCY=x11
51305
51306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51307    cygwin_help $MISSING_DEPENDENCY
51308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51309    msys_help $MISSING_DEPENDENCY
51310  else
51311    PKGHANDLER_COMMAND=
51312
51313    case $PKGHANDLER in
51314      apt-get)
51315        apt_help     $MISSING_DEPENDENCY ;;
51316      yum)
51317        yum_help     $MISSING_DEPENDENCY ;;
51318      port)
51319        port_help    $MISSING_DEPENDENCY ;;
51320      pkgutil)
51321        pkgutil_help $MISSING_DEPENDENCY ;;
51322      pkgadd)
51323        pkgadd_help  $MISSING_DEPENDENCY ;;
51324    esac
51325
51326    if test "x$PKGHANDLER_COMMAND" != x; then
51327      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51328    fi
51329  fi
51330
51331      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51332    fi
51333
51334    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51335    # defined in libawt_xawt.
51336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51337$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51338    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51339/* end confdefs.h.  */
51340#include <X11/extensions/Xrender.h>
51341int
51342main ()
51343{
51344XLinearGradient x;
51345  ;
51346  return 0;
51347}
51348_ACEOF
51349if ac_fn_c_try_compile "$LINENO"; then :
51350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51351$as_echo "yes" >&6; }
51352else
51353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51354$as_echo "no" >&6; }
51355         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51356fi
51357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51358
51359    CFLAGS="$OLD_CFLAGS"
51360    ac_ext=cpp
51361ac_cpp='$CXXCPP $CPPFLAGS'
51362ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51363ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51364ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51365
51366  fi # NEEDS_LIB_X11
51367
51368
51369
51370
51371
51372
51373# Check whether --with-cups was given.
51374if test "${with_cups+set}" = set; then :
51375  withval=$with_cups;
51376fi
51377
51378
51379# Check whether --with-cups-include was given.
51380if test "${with_cups_include+set}" = set; then :
51381  withval=$with_cups_include;
51382fi
51383
51384
51385  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51386    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51387        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51388      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51389$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51390    fi
51391    CUPS_CFLAGS=
51392  else
51393    CUPS_FOUND=no
51394
51395    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51396      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51397    fi
51398
51399    if test "x${with_cups}" != x; then
51400      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51401$as_echo_n "checking for cups headers... " >&6; }
51402      if test -s "${with_cups}/include/cups/cups.h"; then
51403        CUPS_CFLAGS="-I${with_cups}/include"
51404        CUPS_FOUND=yes
51405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51406$as_echo "$CUPS_FOUND" >&6; }
51407      else
51408        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
51409      fi
51410    fi
51411    if test "x${with_cups_include}" != x; then
51412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51413$as_echo_n "checking for cups headers... " >&6; }
51414      if test -s "${with_cups_include}/cups/cups.h"; then
51415        CUPS_CFLAGS="-I${with_cups_include}"
51416        CUPS_FOUND=yes
51417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51418$as_echo "$CUPS_FOUND" >&6; }
51419      else
51420        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
51421      fi
51422    fi
51423    if test "x$CUPS_FOUND" = xno; then
51424      # Are the cups headers installed in the default /usr/include location?
51425      for ac_header in cups/cups.h cups/ppd.h
51426do :
51427  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51428ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51429if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51430  cat >>confdefs.h <<_ACEOF
51431#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51432_ACEOF
51433
51434          CUPS_FOUND=yes
51435          CUPS_CFLAGS=
51436          DEFAULT_CUPS=yes
51437
51438fi
51439
51440done
51441
51442    fi
51443    if test "x$CUPS_FOUND" = xno; then
51444      # Getting nervous now? Lets poke around for standard Solaris third-party
51445      # package installation locations.
51446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51447$as_echo_n "checking for cups headers... " >&6; }
51448      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51449        # An SFW package seems to be installed!
51450        CUPS_FOUND=yes
51451        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51452      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51453        # A CSW package seems to be installed!
51454        CUPS_FOUND=yes
51455        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51456      fi
51457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51458$as_echo "$CUPS_FOUND" >&6; }
51459    fi
51460    if test "x$CUPS_FOUND" = xno; then
51461
51462  # Print a helpful message on how to acquire the necessary build dependency.
51463  # cups is the help tag: freetype, cups, alsa etc
51464  MISSING_DEPENDENCY=cups
51465
51466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51467    cygwin_help $MISSING_DEPENDENCY
51468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51469    msys_help $MISSING_DEPENDENCY
51470  else
51471    PKGHANDLER_COMMAND=
51472
51473    case $PKGHANDLER in
51474      apt-get)
51475        apt_help     $MISSING_DEPENDENCY ;;
51476      yum)
51477        yum_help     $MISSING_DEPENDENCY ;;
51478      port)
51479        port_help    $MISSING_DEPENDENCY ;;
51480      pkgutil)
51481        pkgutil_help $MISSING_DEPENDENCY ;;
51482      pkgadd)
51483        pkgadd_help  $MISSING_DEPENDENCY ;;
51484    esac
51485
51486    if test "x$PKGHANDLER_COMMAND" != x; then
51487      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51488    fi
51489  fi
51490
51491      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51492    fi
51493  fi
51494
51495
51496
51497
51498
51499# Check whether --with-freetype was given.
51500if test "${with_freetype+set}" = set; then :
51501  withval=$with_freetype;
51502fi
51503
51504
51505# Check whether --with-freetype-include was given.
51506if test "${with_freetype_include+set}" = set; then :
51507  withval=$with_freetype_include;
51508fi
51509
51510
51511# Check whether --with-freetype-lib was given.
51512if test "${with_freetype_lib+set}" = set; then :
51513  withval=$with_freetype_lib;
51514fi
51515
51516
51517# Check whether --with-freetype-src was given.
51518if test "${with_freetype_src+set}" = set; then :
51519  withval=$with_freetype_src;
51520fi
51521
51522  # Check whether --enable-freetype-bundling was given.
51523if test "${enable_freetype_bundling+set}" = set; then :
51524  enableval=$enable_freetype_bundling;
51525fi
51526
51527
51528  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51529  FREETYPE_BASE_NAME=freetype
51530  FREETYPE_CFLAGS=
51531  FREETYPE_LIBS=
51532  FREETYPE_BUNDLE_LIB_PATH=
51533
51534  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51535    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51536        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51537        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51538        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51539      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51540$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51541    fi
51542    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51543      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51544$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51545    fi
51546  else
51547    # freetype is needed to build; go get it!
51548
51549    BUNDLE_FREETYPE="$enable_freetype_bundling"
51550
51551    if  test "x$with_freetype_src" != x; then
51552      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51553        # Try to build freetype if --with-freetype-src was given on Windows
51554
51555  FREETYPE_SRC_PATH="$with_freetype_src"
51556  BUILD_FREETYPE=yes
51557
51558  # Check if the freetype sources are acessible..
51559  if ! test -d $FREETYPE_SRC_PATH; then
51560    { $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
51561$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51562    BUILD_FREETYPE=no
51563  fi
51564  # ..and contain a vc2010 project file
51565  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51566  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51567    { $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
51568$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51569    BUILD_FREETYPE=no
51570  fi
51571  # Now check if configure found a version of 'msbuild.exe'
51572  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51573    { $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
51574$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;}
51575    BUILD_FREETYPE=no
51576  fi
51577
51578  # Ready to go..
51579  if test "x$BUILD_FREETYPE" = xyes; then
51580    # msbuild requires trailing slashes for output directories
51581    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51582    freetype_lib_path_unix="$freetype_lib_path"
51583    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51584
51585  unix_path="$vcxproj_path"
51586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51587    windows_path=`$CYGPATH -m "$unix_path"`
51588    vcxproj_path="$windows_path"
51589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51590    windows_path=`cmd //c echo $unix_path`
51591    vcxproj_path="$windows_path"
51592  fi
51593
51594
51595  unix_path="$freetype_lib_path"
51596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51597    windows_path=`$CYGPATH -m "$unix_path"`
51598    freetype_lib_path="$windows_path"
51599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51600    windows_path=`cmd //c echo $unix_path`
51601    freetype_lib_path="$windows_path"
51602  fi
51603
51604
51605  unix_path="$freetype_obj_path"
51606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51607    windows_path=`$CYGPATH -m "$unix_path"`
51608    freetype_obj_path="$windows_path"
51609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51610    windows_path=`cmd //c echo $unix_path`
51611    freetype_obj_path="$windows_path"
51612  fi
51613
51614    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51615      freetype_platform=x64
51616    else
51617      freetype_platform=win32
51618    fi
51619
51620    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51621    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51622    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51623    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51624    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51625$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51626
51627    # First we try to build the freetype.dll
51628    $ECHO -e "@echo off\n"\
51629        "$MSBUILD $vcxproj_path "\
51630        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51631        "/p:Configuration=\"Release Multithreaded\" "\
51632        "/p:Platform=$freetype_platform "\
51633        "/p:ConfigurationType=DynamicLibrary "\
51634        "/p:TargetName=freetype "\
51635        "/p:OutDir=\"$freetype_lib_path\" "\
51636        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51637    cmd /c freetype.bat
51638
51639    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51640      # If that succeeds we also build freetype.lib
51641      $ECHO -e "@echo off\n"\
51642          "$MSBUILD $vcxproj_path "\
51643          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51644          "/p:Configuration=\"Release Multithreaded\" "\
51645          "/p:Platform=$freetype_platform "\
51646          "/p:ConfigurationType=StaticLibrary "\
51647          "/p:TargetName=freetype "\
51648          "/p:OutDir=\"$freetype_lib_path\" "\
51649          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51650      cmd /c freetype.bat
51651
51652      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51653        # Once we build both, lib and dll, set freetype lib and include path appropriately
51654        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51655        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51656        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51657$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51658      else
51659        BUILD_FREETYPE=no
51660      fi
51661    else
51662      BUILD_FREETYPE=no
51663    fi
51664  fi
51665
51666        if test "x$BUILD_FREETYPE" = xyes; then
51667          # Okay, we built it. Check that it works.
51668
51669  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51670  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51671  METHOD="--with-freetype-src"
51672
51673  # Let's start with an optimistic view of the world :-)
51674  FOUND_FREETYPE=yes
51675
51676  # First look for the canonical freetype main include file ft2build.h.
51677  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51678    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51679    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51680    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51681      # Fail.
51682      FOUND_FREETYPE=no
51683    fi
51684  fi
51685
51686  if test "x$FOUND_FREETYPE" = xyes; then
51687    # Include file found, let's continue the sanity check.
51688    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51689$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51690
51691    # Reset to default value
51692    FREETYPE_BASE_NAME=freetype
51693    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51694    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51695      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51696          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51697        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51698        # for the .6 version explicitly.
51699        FREETYPE_BASE_NAME=freetype.6
51700        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51701        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51702$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51703      else
51704        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51705$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51706        FOUND_FREETYPE=no
51707      fi
51708    else
51709      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51710        # On Windows, we will need both .lib and .dll file.
51711        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51712          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51713$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51714          FOUND_FREETYPE=no
51715        fi
51716      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51717          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51718        # Found lib in isa dir, use that instead.
51719        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51720        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51721$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51722      fi
51723    fi
51724  fi
51725
51726  if test "x$FOUND_FREETYPE" = xyes; then
51727
51728  # Only process if variable expands to non-empty
51729
51730  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51732
51733  # Input might be given as Windows format, start by converting to
51734  # unix format.
51735  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51736  new_path=`$CYGPATH -u "$path"`
51737
51738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51741  # "foo.exe" is OK but "foo" is an error.
51742  #
51743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51744  # It is also a way to make sure we got the proper file name for the real test later on.
51745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51746  if test "x$test_shortpath" = x; then
51747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51749    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51750  fi
51751
51752  # Call helper function which possibly converts this using DOS-style short mode.
51753  # If so, the updated path is stored in $new_path.
51754
51755  input_path="$new_path"
51756  # Check if we need to convert this using DOS-style short mode. If the path
51757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51758  # take no chances and rewrite it.
51759  # Note: m4 eats our [], so we need to use [ and ] instead.
51760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51761  if test "x$has_forbidden_chars" != x; then
51762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51766      # Going to short mode and back again did indeed matter. Since short mode is
51767      # case insensitive, let's make it lowercase to improve readability.
51768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51769      # Now convert it back to Unix-style (cygpath)
51770      input_path=`$CYGPATH -u "$shortmode_path"`
51771      new_path="$input_path"
51772    fi
51773  fi
51774
51775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51776  if test "x$test_cygdrive_prefix" = x; then
51777    # As a simple fix, exclude /usr/bin since it's not a real path.
51778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51780      # a path prefixed by /cygdrive for fixpath to work.
51781      new_path="$CYGWIN_ROOT_PATH$input_path"
51782    fi
51783  fi
51784
51785
51786  if test "x$path" != "x$new_path"; then
51787    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51789$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51790  fi
51791
51792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51793
51794  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51795  has_colon=`$ECHO $path | $GREP ^.:`
51796  new_path="$path"
51797  if test "x$has_colon" = x; then
51798    # Not in mixed or Windows style, start by that.
51799    new_path=`cmd //c echo $path`
51800  fi
51801
51802
51803  input_path="$new_path"
51804  # Check if we need to convert this using DOS-style short mode. If the path
51805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51806  # take no chances and rewrite it.
51807  # Note: m4 eats our [], so we need to use [ and ] instead.
51808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51809  if test "x$has_forbidden_chars" != x; then
51810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51812  fi
51813
51814
51815  windows_path="$new_path"
51816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51817    unix_path=`$CYGPATH -u "$windows_path"`
51818    new_path="$unix_path"
51819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51821    new_path="$unix_path"
51822  fi
51823
51824  if test "x$path" != "x$new_path"; then
51825    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51828  fi
51829
51830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51832
51833    else
51834      # We're on a unix platform. Hooray! :)
51835      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51836      has_space=`$ECHO "$path" | $GREP " "`
51837      if test "x$has_space" != x; then
51838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51841      fi
51842
51843      # Use eval to expand a potential ~
51844      eval path="$path"
51845      if test ! -f "$path" && test ! -d "$path"; then
51846        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51847      fi
51848
51849      if test -d "$path"; then
51850        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51851      else
51852        dir="`$DIRNAME "$path"`"
51853        base="`$BASENAME "$path"`"
51854        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
51855      fi
51856    fi
51857  fi
51858
51859
51860  # Only process if variable expands to non-empty
51861
51862  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51864
51865  # Input might be given as Windows format, start by converting to
51866  # unix format.
51867  path="$POTENTIAL_FREETYPE_LIB_PATH"
51868  new_path=`$CYGPATH -u "$path"`
51869
51870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51873  # "foo.exe" is OK but "foo" is an error.
51874  #
51875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51876  # It is also a way to make sure we got the proper file name for the real test later on.
51877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51878  if test "x$test_shortpath" = x; then
51879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51880$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51881    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51882  fi
51883
51884  # Call helper function which possibly converts this using DOS-style short mode.
51885  # If so, the updated path is stored in $new_path.
51886
51887  input_path="$new_path"
51888  # Check if we need to convert this using DOS-style short mode. If the path
51889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51890  # take no chances and rewrite it.
51891  # Note: m4 eats our [], so we need to use [ and ] instead.
51892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51893  if test "x$has_forbidden_chars" != x; then
51894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51898      # Going to short mode and back again did indeed matter. Since short mode is
51899      # case insensitive, let's make it lowercase to improve readability.
51900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51901      # Now convert it back to Unix-style (cygpath)
51902      input_path=`$CYGPATH -u "$shortmode_path"`
51903      new_path="$input_path"
51904    fi
51905  fi
51906
51907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51908  if test "x$test_cygdrive_prefix" = x; then
51909    # As a simple fix, exclude /usr/bin since it's not a real path.
51910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51912      # a path prefixed by /cygdrive for fixpath to work.
51913      new_path="$CYGWIN_ROOT_PATH$input_path"
51914    fi
51915  fi
51916
51917
51918  if test "x$path" != "x$new_path"; then
51919    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51922  fi
51923
51924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51925
51926  path="$POTENTIAL_FREETYPE_LIB_PATH"
51927  has_colon=`$ECHO $path | $GREP ^.:`
51928  new_path="$path"
51929  if test "x$has_colon" = x; then
51930    # Not in mixed or Windows style, start by that.
51931    new_path=`cmd //c echo $path`
51932  fi
51933
51934
51935  input_path="$new_path"
51936  # Check if we need to convert this using DOS-style short mode. If the path
51937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51938  # take no chances and rewrite it.
51939  # Note: m4 eats our [], so we need to use [ and ] instead.
51940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51941  if test "x$has_forbidden_chars" != x; then
51942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51944  fi
51945
51946
51947  windows_path="$new_path"
51948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51949    unix_path=`$CYGPATH -u "$windows_path"`
51950    new_path="$unix_path"
51951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51953    new_path="$unix_path"
51954  fi
51955
51956  if test "x$path" != "x$new_path"; then
51957    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51959$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51960  fi
51961
51962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51964
51965    else
51966      # We're on a unix platform. Hooray! :)
51967      path="$POTENTIAL_FREETYPE_LIB_PATH"
51968      has_space=`$ECHO "$path" | $GREP " "`
51969      if test "x$has_space" != x; then
51970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51973      fi
51974
51975      # Use eval to expand a potential ~
51976      eval path="$path"
51977      if test ! -f "$path" && test ! -d "$path"; then
51978        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51979      fi
51980
51981      if test -d "$path"; then
51982        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51983      else
51984        dir="`$DIRNAME "$path"`"
51985        base="`$BASENAME "$path"`"
51986        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
51987      fi
51988    fi
51989  fi
51990
51991
51992    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51994$as_echo_n "checking for freetype includes... " >&6; }
51995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51996$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51997    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51999$as_echo_n "checking for freetype libraries... " >&6; }
52000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52001$as_echo "$FREETYPE_LIB_PATH" >&6; }
52002  fi
52003
52004          if test "x$FOUND_FREETYPE" != xyes; then
52005            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52006          fi
52007        else
52008          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52009$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52010          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52011        fi
52012      else
52013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52014$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52015      fi
52016    fi
52017
52018    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52019      # User has specified settings
52020
52021      if test "x$BUNDLE_FREETYPE" = x; then
52022        # If not specified, default is to bundle freetype
52023        BUNDLE_FREETYPE=yes
52024      fi
52025
52026      if test "x$with_freetype" != x; then
52027        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52028        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52029      fi
52030
52031      # Allow --with-freetype-lib and --with-freetype-include to override
52032      if test "x$with_freetype_include" != x; then
52033        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52034      fi
52035      if test "x$with_freetype_lib" != x; then
52036        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52037      fi
52038
52039      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52040        # Okay, we got it. Check that it works.
52041
52042  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52043  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52044  METHOD="--with-freetype"
52045
52046  # Let's start with an optimistic view of the world :-)
52047  FOUND_FREETYPE=yes
52048
52049  # First look for the canonical freetype main include file ft2build.h.
52050  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52051    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52052    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52053    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52054      # Fail.
52055      FOUND_FREETYPE=no
52056    fi
52057  fi
52058
52059  if test "x$FOUND_FREETYPE" = xyes; then
52060    # Include file found, let's continue the sanity check.
52061    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52062$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52063
52064    # Reset to default value
52065    FREETYPE_BASE_NAME=freetype
52066    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52067    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52068      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52069          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52070        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52071        # for the .6 version explicitly.
52072        FREETYPE_BASE_NAME=freetype.6
52073        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52074        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52075$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52076      else
52077        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52078$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52079        FOUND_FREETYPE=no
52080      fi
52081    else
52082      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52083        # On Windows, we will need both .lib and .dll file.
52084        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52085          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52086$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52087          FOUND_FREETYPE=no
52088        fi
52089      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52090          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52091        # Found lib in isa dir, use that instead.
52092        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52093        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52094$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52095      fi
52096    fi
52097  fi
52098
52099  if test "x$FOUND_FREETYPE" = xyes; then
52100
52101  # Only process if variable expands to non-empty
52102
52103  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52105
52106  # Input might be given as Windows format, start by converting to
52107  # unix format.
52108  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52109  new_path=`$CYGPATH -u "$path"`
52110
52111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52114  # "foo.exe" is OK but "foo" is an error.
52115  #
52116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52117  # It is also a way to make sure we got the proper file name for the real test later on.
52118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52119  if test "x$test_shortpath" = x; then
52120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52122    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52123  fi
52124
52125  # Call helper function which possibly converts this using DOS-style short mode.
52126  # If so, the updated path is stored in $new_path.
52127
52128  input_path="$new_path"
52129  # Check if we need to convert this using DOS-style short mode. If the path
52130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52131  # take no chances and rewrite it.
52132  # Note: m4 eats our [], so we need to use [ and ] instead.
52133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52134  if test "x$has_forbidden_chars" != x; then
52135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52139      # Going to short mode and back again did indeed matter. Since short mode is
52140      # case insensitive, let's make it lowercase to improve readability.
52141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52142      # Now convert it back to Unix-style (cygpath)
52143      input_path=`$CYGPATH -u "$shortmode_path"`
52144      new_path="$input_path"
52145    fi
52146  fi
52147
52148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52149  if test "x$test_cygdrive_prefix" = x; then
52150    # As a simple fix, exclude /usr/bin since it's not a real path.
52151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52153      # a path prefixed by /cygdrive for fixpath to work.
52154      new_path="$CYGWIN_ROOT_PATH$input_path"
52155    fi
52156  fi
52157
52158
52159  if test "x$path" != "x$new_path"; then
52160    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52162$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52163  fi
52164
52165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52166
52167  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52168  has_colon=`$ECHO $path | $GREP ^.:`
52169  new_path="$path"
52170  if test "x$has_colon" = x; then
52171    # Not in mixed or Windows style, start by that.
52172    new_path=`cmd //c echo $path`
52173  fi
52174
52175
52176  input_path="$new_path"
52177  # Check if we need to convert this using DOS-style short mode. If the path
52178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52179  # take no chances and rewrite it.
52180  # Note: m4 eats our [], so we need to use [ and ] instead.
52181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52182  if test "x$has_forbidden_chars" != x; then
52183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52185  fi
52186
52187
52188  windows_path="$new_path"
52189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52190    unix_path=`$CYGPATH -u "$windows_path"`
52191    new_path="$unix_path"
52192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52194    new_path="$unix_path"
52195  fi
52196
52197  if test "x$path" != "x$new_path"; then
52198    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52200$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52201  fi
52202
52203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52205
52206    else
52207      # We're on a unix platform. Hooray! :)
52208      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52209      has_space=`$ECHO "$path" | $GREP " "`
52210      if test "x$has_space" != x; then
52211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52214      fi
52215
52216      # Use eval to expand a potential ~
52217      eval path="$path"
52218      if test ! -f "$path" && test ! -d "$path"; then
52219        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52220      fi
52221
52222      if test -d "$path"; then
52223        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52224      else
52225        dir="`$DIRNAME "$path"`"
52226        base="`$BASENAME "$path"`"
52227        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52228      fi
52229    fi
52230  fi
52231
52232
52233  # Only process if variable expands to non-empty
52234
52235  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52237
52238  # Input might be given as Windows format, start by converting to
52239  # unix format.
52240  path="$POTENTIAL_FREETYPE_LIB_PATH"
52241  new_path=`$CYGPATH -u "$path"`
52242
52243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52246  # "foo.exe" is OK but "foo" is an error.
52247  #
52248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52249  # It is also a way to make sure we got the proper file name for the real test later on.
52250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52251  if test "x$test_shortpath" = x; then
52252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52254    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52255  fi
52256
52257  # Call helper function which possibly converts this using DOS-style short mode.
52258  # If so, the updated path is stored in $new_path.
52259
52260  input_path="$new_path"
52261  # Check if we need to convert this using DOS-style short mode. If the path
52262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52263  # take no chances and rewrite it.
52264  # Note: m4 eats our [], so we need to use [ and ] instead.
52265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52266  if test "x$has_forbidden_chars" != x; then
52267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52271      # Going to short mode and back again did indeed matter. Since short mode is
52272      # case insensitive, let's make it lowercase to improve readability.
52273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52274      # Now convert it back to Unix-style (cygpath)
52275      input_path=`$CYGPATH -u "$shortmode_path"`
52276      new_path="$input_path"
52277    fi
52278  fi
52279
52280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52281  if test "x$test_cygdrive_prefix" = x; then
52282    # As a simple fix, exclude /usr/bin since it's not a real path.
52283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52285      # a path prefixed by /cygdrive for fixpath to work.
52286      new_path="$CYGWIN_ROOT_PATH$input_path"
52287    fi
52288  fi
52289
52290
52291  if test "x$path" != "x$new_path"; then
52292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52295  fi
52296
52297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52298
52299  path="$POTENTIAL_FREETYPE_LIB_PATH"
52300  has_colon=`$ECHO $path | $GREP ^.:`
52301  new_path="$path"
52302  if test "x$has_colon" = x; then
52303    # Not in mixed or Windows style, start by that.
52304    new_path=`cmd //c echo $path`
52305  fi
52306
52307
52308  input_path="$new_path"
52309  # Check if we need to convert this using DOS-style short mode. If the path
52310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52311  # take no chances and rewrite it.
52312  # Note: m4 eats our [], so we need to use [ and ] instead.
52313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52314  if test "x$has_forbidden_chars" != x; then
52315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52317  fi
52318
52319
52320  windows_path="$new_path"
52321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52322    unix_path=`$CYGPATH -u "$windows_path"`
52323    new_path="$unix_path"
52324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52326    new_path="$unix_path"
52327  fi
52328
52329  if test "x$path" != "x$new_path"; then
52330    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52333  fi
52334
52335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52337
52338    else
52339      # We're on a unix platform. Hooray! :)
52340      path="$POTENTIAL_FREETYPE_LIB_PATH"
52341      has_space=`$ECHO "$path" | $GREP " "`
52342      if test "x$has_space" != x; then
52343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52346      fi
52347
52348      # Use eval to expand a potential ~
52349      eval path="$path"
52350      if test ! -f "$path" && test ! -d "$path"; then
52351        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52352      fi
52353
52354      if test -d "$path"; then
52355        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52356      else
52357        dir="`$DIRNAME "$path"`"
52358        base="`$BASENAME "$path"`"
52359        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52360      fi
52361    fi
52362  fi
52363
52364
52365    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52367$as_echo_n "checking for freetype includes... " >&6; }
52368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52369$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52370    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52372$as_echo_n "checking for freetype libraries... " >&6; }
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52374$as_echo "$FREETYPE_LIB_PATH" >&6; }
52375  fi
52376
52377        if test "x$FOUND_FREETYPE" != xyes; then
52378          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52379        fi
52380      else
52381        # User specified only one of lib or include. This is an error.
52382        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52383          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52384$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52385          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52386        else
52387          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52388$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52389          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52390        fi
52391      fi
52392    else
52393      # User did not specify settings, but we need freetype. Try to locate it.
52394
52395      if test "x$BUNDLE_FREETYPE" = x; then
52396        # If not specified, default is to bundle freetype only on windows
52397        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52398          BUNDLE_FREETYPE=yes
52399        else
52400          BUNDLE_FREETYPE=no
52401        fi
52402      fi
52403
52404      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52405      if test "x$SYSROOT" = x; then
52406        if test "x$FOUND_FREETYPE" != xyes; then
52407          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52408          if test "x$PKG_CONFIG" != x; then
52409
52410pkg_failed=no
52411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52412$as_echo_n "checking for FREETYPE... " >&6; }
52413
52414if test -n "$FREETYPE_CFLAGS"; then
52415    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52416 elif test -n "$PKG_CONFIG"; then
52417    if test -n "$PKG_CONFIG" && \
52418    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52419  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52420  ac_status=$?
52421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52422  test $ac_status = 0; }; then
52423  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52424else
52425  pkg_failed=yes
52426fi
52427 else
52428    pkg_failed=untried
52429fi
52430if test -n "$FREETYPE_LIBS"; then
52431    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52432 elif test -n "$PKG_CONFIG"; then
52433    if test -n "$PKG_CONFIG" && \
52434    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52435  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52436  ac_status=$?
52437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52438  test $ac_status = 0; }; then
52439  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52440else
52441  pkg_failed=yes
52442fi
52443 else
52444    pkg_failed=untried
52445fi
52446
52447
52448
52449if test $pkg_failed = yes; then
52450
52451if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52452        _pkg_short_errors_supported=yes
52453else
52454        _pkg_short_errors_supported=no
52455fi
52456        if test $_pkg_short_errors_supported = yes; then
52457	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52458        else
52459	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52460        fi
52461	# Put the nasty error message in config.log where it belongs
52462	echo "$FREETYPE_PKG_ERRORS" >&5
52463
52464	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52465$as_echo "no" >&6; }
52466                FOUND_FREETYPE=no
52467elif test $pkg_failed = untried; then
52468	FOUND_FREETYPE=no
52469else
52470	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52471	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52473$as_echo "yes" >&6; }
52474	FOUND_FREETYPE=yes
52475fi
52476            if test "x$FOUND_FREETYPE" = xyes; then
52477              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52478              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52479              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52480              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52481                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52482              fi
52483              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52484              if test "x$BUNDLE_FREETYPE" = xyes; then
52485                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52486$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52487                FOUND_FREETYPE=no
52488              else
52489                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52490$as_echo_n "checking for freetype... " >&6; }
52491                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52492$as_echo "yes (using pkg-config)" >&6; }
52493              fi
52494            fi
52495          fi
52496        fi
52497      fi
52498
52499      if test "x$FOUND_FREETYPE" != xyes; then
52500        # Check in well-known locations
52501        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52502          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52503
52504  windows_path="$FREETYPE_BASE_DIR"
52505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52506    unix_path=`$CYGPATH -u "$windows_path"`
52507    FREETYPE_BASE_DIR="$unix_path"
52508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52510    FREETYPE_BASE_DIR="$unix_path"
52511  fi
52512
52513
52514  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52515  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52516  METHOD="well-known location"
52517
52518  # Let's start with an optimistic view of the world :-)
52519  FOUND_FREETYPE=yes
52520
52521  # First look for the canonical freetype main include file ft2build.h.
52522  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52523    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52524    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52525    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52526      # Fail.
52527      FOUND_FREETYPE=no
52528    fi
52529  fi
52530
52531  if test "x$FOUND_FREETYPE" = xyes; then
52532    # Include file found, let's continue the sanity check.
52533    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52534$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52535
52536    # Reset to default value
52537    FREETYPE_BASE_NAME=freetype
52538    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52539    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52540      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52541          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52542        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52543        # for the .6 version explicitly.
52544        FREETYPE_BASE_NAME=freetype.6
52545        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52546        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52547$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52548      else
52549        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52550$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52551        FOUND_FREETYPE=no
52552      fi
52553    else
52554      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52555        # On Windows, we will need both .lib and .dll file.
52556        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52557          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52558$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52559          FOUND_FREETYPE=no
52560        fi
52561      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52562          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52563        # Found lib in isa dir, use that instead.
52564        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52565        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52566$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52567      fi
52568    fi
52569  fi
52570
52571  if test "x$FOUND_FREETYPE" = xyes; then
52572
52573  # Only process if variable expands to non-empty
52574
52575  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52577
52578  # Input might be given as Windows format, start by converting to
52579  # unix format.
52580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52581  new_path=`$CYGPATH -u "$path"`
52582
52583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52586  # "foo.exe" is OK but "foo" is an error.
52587  #
52588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52589  # It is also a way to make sure we got the proper file name for the real test later on.
52590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52591  if test "x$test_shortpath" = x; then
52592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52594    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52595  fi
52596
52597  # Call helper function which possibly converts this using DOS-style short mode.
52598  # If so, the updated path is stored in $new_path.
52599
52600  input_path="$new_path"
52601  # Check if we need to convert this using DOS-style short mode. If the path
52602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52603  # take no chances and rewrite it.
52604  # Note: m4 eats our [], so we need to use [ and ] instead.
52605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52606  if test "x$has_forbidden_chars" != x; then
52607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52611      # Going to short mode and back again did indeed matter. Since short mode is
52612      # case insensitive, let's make it lowercase to improve readability.
52613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52614      # Now convert it back to Unix-style (cygpath)
52615      input_path=`$CYGPATH -u "$shortmode_path"`
52616      new_path="$input_path"
52617    fi
52618  fi
52619
52620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52621  if test "x$test_cygdrive_prefix" = x; then
52622    # As a simple fix, exclude /usr/bin since it's not a real path.
52623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52625      # a path prefixed by /cygdrive for fixpath to work.
52626      new_path="$CYGWIN_ROOT_PATH$input_path"
52627    fi
52628  fi
52629
52630
52631  if test "x$path" != "x$new_path"; then
52632    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52635  fi
52636
52637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52638
52639  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52640  has_colon=`$ECHO $path | $GREP ^.:`
52641  new_path="$path"
52642  if test "x$has_colon" = x; then
52643    # Not in mixed or Windows style, start by that.
52644    new_path=`cmd //c echo $path`
52645  fi
52646
52647
52648  input_path="$new_path"
52649  # Check if we need to convert this using DOS-style short mode. If the path
52650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52651  # take no chances and rewrite it.
52652  # Note: m4 eats our [], so we need to use [ and ] instead.
52653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52654  if test "x$has_forbidden_chars" != x; then
52655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52657  fi
52658
52659
52660  windows_path="$new_path"
52661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52662    unix_path=`$CYGPATH -u "$windows_path"`
52663    new_path="$unix_path"
52664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52666    new_path="$unix_path"
52667  fi
52668
52669  if test "x$path" != "x$new_path"; then
52670    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52673  fi
52674
52675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52677
52678    else
52679      # We're on a unix platform. Hooray! :)
52680      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52681      has_space=`$ECHO "$path" | $GREP " "`
52682      if test "x$has_space" != x; then
52683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52686      fi
52687
52688      # Use eval to expand a potential ~
52689      eval path="$path"
52690      if test ! -f "$path" && test ! -d "$path"; then
52691        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52692      fi
52693
52694      if test -d "$path"; then
52695        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52696      else
52697        dir="`$DIRNAME "$path"`"
52698        base="`$BASENAME "$path"`"
52699        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52700      fi
52701    fi
52702  fi
52703
52704
52705  # Only process if variable expands to non-empty
52706
52707  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52709
52710  # Input might be given as Windows format, start by converting to
52711  # unix format.
52712  path="$POTENTIAL_FREETYPE_LIB_PATH"
52713  new_path=`$CYGPATH -u "$path"`
52714
52715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52718  # "foo.exe" is OK but "foo" is an error.
52719  #
52720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52721  # It is also a way to make sure we got the proper file name for the real test later on.
52722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52723  if test "x$test_shortpath" = x; then
52724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52726    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52727  fi
52728
52729  # Call helper function which possibly converts this using DOS-style short mode.
52730  # If so, the updated path is stored in $new_path.
52731
52732  input_path="$new_path"
52733  # Check if we need to convert this using DOS-style short mode. If the path
52734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52735  # take no chances and rewrite it.
52736  # Note: m4 eats our [], so we need to use [ and ] instead.
52737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52738  if test "x$has_forbidden_chars" != x; then
52739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52743      # Going to short mode and back again did indeed matter. Since short mode is
52744      # case insensitive, let's make it lowercase to improve readability.
52745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52746      # Now convert it back to Unix-style (cygpath)
52747      input_path=`$CYGPATH -u "$shortmode_path"`
52748      new_path="$input_path"
52749    fi
52750  fi
52751
52752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52753  if test "x$test_cygdrive_prefix" = x; then
52754    # As a simple fix, exclude /usr/bin since it's not a real path.
52755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52757      # a path prefixed by /cygdrive for fixpath to work.
52758      new_path="$CYGWIN_ROOT_PATH$input_path"
52759    fi
52760  fi
52761
52762
52763  if test "x$path" != "x$new_path"; then
52764    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52767  fi
52768
52769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52770
52771  path="$POTENTIAL_FREETYPE_LIB_PATH"
52772  has_colon=`$ECHO $path | $GREP ^.:`
52773  new_path="$path"
52774  if test "x$has_colon" = x; then
52775    # Not in mixed or Windows style, start by that.
52776    new_path=`cmd //c echo $path`
52777  fi
52778
52779
52780  input_path="$new_path"
52781  # Check if we need to convert this using DOS-style short mode. If the path
52782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52783  # take no chances and rewrite it.
52784  # Note: m4 eats our [], so we need to use [ and ] instead.
52785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52786  if test "x$has_forbidden_chars" != x; then
52787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52789  fi
52790
52791
52792  windows_path="$new_path"
52793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52794    unix_path=`$CYGPATH -u "$windows_path"`
52795    new_path="$unix_path"
52796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52798    new_path="$unix_path"
52799  fi
52800
52801  if test "x$path" != "x$new_path"; then
52802    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52804$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52805  fi
52806
52807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52809
52810    else
52811      # We're on a unix platform. Hooray! :)
52812      path="$POTENTIAL_FREETYPE_LIB_PATH"
52813      has_space=`$ECHO "$path" | $GREP " "`
52814      if test "x$has_space" != x; then
52815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52816$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52818      fi
52819
52820      # Use eval to expand a potential ~
52821      eval path="$path"
52822      if test ! -f "$path" && test ! -d "$path"; then
52823        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52824      fi
52825
52826      if test -d "$path"; then
52827        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52828      else
52829        dir="`$DIRNAME "$path"`"
52830        base="`$BASENAME "$path"`"
52831        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52832      fi
52833    fi
52834  fi
52835
52836
52837    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52839$as_echo_n "checking for freetype includes... " >&6; }
52840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52841$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52842    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52844$as_echo_n "checking for freetype libraries... " >&6; }
52845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52846$as_echo "$FREETYPE_LIB_PATH" >&6; }
52847  fi
52848
52849          if test "x$FOUND_FREETYPE" != xyes; then
52850            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52851
52852  windows_path="$FREETYPE_BASE_DIR"
52853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52854    unix_path=`$CYGPATH -u "$windows_path"`
52855    FREETYPE_BASE_DIR="$unix_path"
52856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52858    FREETYPE_BASE_DIR="$unix_path"
52859  fi
52860
52861
52862  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52863  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52864  METHOD="well-known location"
52865
52866  # Let's start with an optimistic view of the world :-)
52867  FOUND_FREETYPE=yes
52868
52869  # First look for the canonical freetype main include file ft2build.h.
52870  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52871    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52872    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52873    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52874      # Fail.
52875      FOUND_FREETYPE=no
52876    fi
52877  fi
52878
52879  if test "x$FOUND_FREETYPE" = xyes; then
52880    # Include file found, let's continue the sanity check.
52881    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52882$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52883
52884    # Reset to default value
52885    FREETYPE_BASE_NAME=freetype
52886    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52887    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52888      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52889          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52890        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52891        # for the .6 version explicitly.
52892        FREETYPE_BASE_NAME=freetype.6
52893        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52894        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52895$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52896      else
52897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52898$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52899        FOUND_FREETYPE=no
52900      fi
52901    else
52902      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52903        # On Windows, we will need both .lib and .dll file.
52904        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52905          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52906$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52907          FOUND_FREETYPE=no
52908        fi
52909      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52910          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52911        # Found lib in isa dir, use that instead.
52912        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52913        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52914$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52915      fi
52916    fi
52917  fi
52918
52919  if test "x$FOUND_FREETYPE" = xyes; then
52920
52921  # Only process if variable expands to non-empty
52922
52923  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52925
52926  # Input might be given as Windows format, start by converting to
52927  # unix format.
52928  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52929  new_path=`$CYGPATH -u "$path"`
52930
52931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52934  # "foo.exe" is OK but "foo" is an error.
52935  #
52936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52937  # It is also a way to make sure we got the proper file name for the real test later on.
52938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52939  if test "x$test_shortpath" = x; then
52940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52942    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52943  fi
52944
52945  # Call helper function which possibly converts this using DOS-style short mode.
52946  # If so, the updated path is stored in $new_path.
52947
52948  input_path="$new_path"
52949  # Check if we need to convert this using DOS-style short mode. If the path
52950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52951  # take no chances and rewrite it.
52952  # Note: m4 eats our [], so we need to use [ and ] instead.
52953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52954  if test "x$has_forbidden_chars" != x; then
52955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52959      # Going to short mode and back again did indeed matter. Since short mode is
52960      # case insensitive, let's make it lowercase to improve readability.
52961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52962      # Now convert it back to Unix-style (cygpath)
52963      input_path=`$CYGPATH -u "$shortmode_path"`
52964      new_path="$input_path"
52965    fi
52966  fi
52967
52968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52969  if test "x$test_cygdrive_prefix" = x; then
52970    # As a simple fix, exclude /usr/bin since it's not a real path.
52971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52973      # a path prefixed by /cygdrive for fixpath to work.
52974      new_path="$CYGWIN_ROOT_PATH$input_path"
52975    fi
52976  fi
52977
52978
52979  if test "x$path" != "x$new_path"; then
52980    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52983  fi
52984
52985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52986
52987  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52988  has_colon=`$ECHO $path | $GREP ^.:`
52989  new_path="$path"
52990  if test "x$has_colon" = x; then
52991    # Not in mixed or Windows style, start by that.
52992    new_path=`cmd //c echo $path`
52993  fi
52994
52995
52996  input_path="$new_path"
52997  # Check if we need to convert this using DOS-style short mode. If the path
52998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52999  # take no chances and rewrite it.
53000  # Note: m4 eats our [], so we need to use [ and ] instead.
53001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53002  if test "x$has_forbidden_chars" != x; then
53003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53005  fi
53006
53007
53008  windows_path="$new_path"
53009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53010    unix_path=`$CYGPATH -u "$windows_path"`
53011    new_path="$unix_path"
53012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53014    new_path="$unix_path"
53015  fi
53016
53017  if test "x$path" != "x$new_path"; then
53018    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53021  fi
53022
53023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53025
53026    else
53027      # We're on a unix platform. Hooray! :)
53028      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53029      has_space=`$ECHO "$path" | $GREP " "`
53030      if test "x$has_space" != x; then
53031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53034      fi
53035
53036      # Use eval to expand a potential ~
53037      eval path="$path"
53038      if test ! -f "$path" && test ! -d "$path"; then
53039        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53040      fi
53041
53042      if test -d "$path"; then
53043        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53044      else
53045        dir="`$DIRNAME "$path"`"
53046        base="`$BASENAME "$path"`"
53047        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53048      fi
53049    fi
53050  fi
53051
53052
53053  # Only process if variable expands to non-empty
53054
53055  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53056    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53057
53058  # Input might be given as Windows format, start by converting to
53059  # unix format.
53060  path="$POTENTIAL_FREETYPE_LIB_PATH"
53061  new_path=`$CYGPATH -u "$path"`
53062
53063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53066  # "foo.exe" is OK but "foo" is an error.
53067  #
53068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53069  # It is also a way to make sure we got the proper file name for the real test later on.
53070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53071  if test "x$test_shortpath" = x; then
53072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53074    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53075  fi
53076
53077  # Call helper function which possibly converts this using DOS-style short mode.
53078  # If so, the updated path is stored in $new_path.
53079
53080  input_path="$new_path"
53081  # Check if we need to convert this using DOS-style short mode. If the path
53082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53083  # take no chances and rewrite it.
53084  # Note: m4 eats our [], so we need to use [ and ] instead.
53085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53086  if test "x$has_forbidden_chars" != x; then
53087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53091      # Going to short mode and back again did indeed matter. Since short mode is
53092      # case insensitive, let's make it lowercase to improve readability.
53093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53094      # Now convert it back to Unix-style (cygpath)
53095      input_path=`$CYGPATH -u "$shortmode_path"`
53096      new_path="$input_path"
53097    fi
53098  fi
53099
53100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53101  if test "x$test_cygdrive_prefix" = x; then
53102    # As a simple fix, exclude /usr/bin since it's not a real path.
53103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53105      # a path prefixed by /cygdrive for fixpath to work.
53106      new_path="$CYGWIN_ROOT_PATH$input_path"
53107    fi
53108  fi
53109
53110
53111  if test "x$path" != "x$new_path"; then
53112    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53115  fi
53116
53117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53118
53119  path="$POTENTIAL_FREETYPE_LIB_PATH"
53120  has_colon=`$ECHO $path | $GREP ^.:`
53121  new_path="$path"
53122  if test "x$has_colon" = x; then
53123    # Not in mixed or Windows style, start by that.
53124    new_path=`cmd //c echo $path`
53125  fi
53126
53127
53128  input_path="$new_path"
53129  # Check if we need to convert this using DOS-style short mode. If the path
53130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53131  # take no chances and rewrite it.
53132  # Note: m4 eats our [], so we need to use [ and ] instead.
53133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53134  if test "x$has_forbidden_chars" != x; then
53135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53137  fi
53138
53139
53140  windows_path="$new_path"
53141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53142    unix_path=`$CYGPATH -u "$windows_path"`
53143    new_path="$unix_path"
53144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53146    new_path="$unix_path"
53147  fi
53148
53149  if test "x$path" != "x$new_path"; then
53150    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53152$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53153  fi
53154
53155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53157
53158    else
53159      # We're on a unix platform. Hooray! :)
53160      path="$POTENTIAL_FREETYPE_LIB_PATH"
53161      has_space=`$ECHO "$path" | $GREP " "`
53162      if test "x$has_space" != x; then
53163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53165        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53166      fi
53167
53168      # Use eval to expand a potential ~
53169      eval path="$path"
53170      if test ! -f "$path" && test ! -d "$path"; then
53171        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53172      fi
53173
53174      if test -d "$path"; then
53175        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53176      else
53177        dir="`$DIRNAME "$path"`"
53178        base="`$BASENAME "$path"`"
53179        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53180      fi
53181    fi
53182  fi
53183
53184
53185    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53187$as_echo_n "checking for freetype includes... " >&6; }
53188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53189$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53190    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53192$as_echo_n "checking for freetype libraries... " >&6; }
53193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53194$as_echo "$FREETYPE_LIB_PATH" >&6; }
53195  fi
53196
53197          fi
53198          if test "x$FOUND_FREETYPE" != xyes; then
53199            FREETYPE_BASE_DIR="$HOME/freetype"
53200
53201  windows_path="$FREETYPE_BASE_DIR"
53202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53203    unix_path=`$CYGPATH -u "$windows_path"`
53204    FREETYPE_BASE_DIR="$unix_path"
53205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53207    FREETYPE_BASE_DIR="$unix_path"
53208  fi
53209
53210            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53211
53212  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53213  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53214  METHOD="well-known location"
53215
53216  # Let's start with an optimistic view of the world :-)
53217  FOUND_FREETYPE=yes
53218
53219  # First look for the canonical freetype main include file ft2build.h.
53220  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53221    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53222    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53223    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53224      # Fail.
53225      FOUND_FREETYPE=no
53226    fi
53227  fi
53228
53229  if test "x$FOUND_FREETYPE" = xyes; then
53230    # Include file found, let's continue the sanity check.
53231    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53232$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53233
53234    # Reset to default value
53235    FREETYPE_BASE_NAME=freetype
53236    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53237    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53238      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53239          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53240        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53241        # for the .6 version explicitly.
53242        FREETYPE_BASE_NAME=freetype.6
53243        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53244        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53245$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53246      else
53247        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53248$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53249        FOUND_FREETYPE=no
53250      fi
53251    else
53252      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53253        # On Windows, we will need both .lib and .dll file.
53254        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53255          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53256$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53257          FOUND_FREETYPE=no
53258        fi
53259      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53260          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53261        # Found lib in isa dir, use that instead.
53262        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53263        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53264$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53265      fi
53266    fi
53267  fi
53268
53269  if test "x$FOUND_FREETYPE" = xyes; then
53270
53271  # Only process if variable expands to non-empty
53272
53273  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53275
53276  # Input might be given as Windows format, start by converting to
53277  # unix format.
53278  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53279  new_path=`$CYGPATH -u "$path"`
53280
53281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53284  # "foo.exe" is OK but "foo" is an error.
53285  #
53286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53287  # It is also a way to make sure we got the proper file name for the real test later on.
53288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53289  if test "x$test_shortpath" = x; then
53290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53291$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53292    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53293  fi
53294
53295  # Call helper function which possibly converts this using DOS-style short mode.
53296  # If so, the updated path is stored in $new_path.
53297
53298  input_path="$new_path"
53299  # Check if we need to convert this using DOS-style short mode. If the path
53300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53301  # take no chances and rewrite it.
53302  # Note: m4 eats our [], so we need to use [ and ] instead.
53303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53304  if test "x$has_forbidden_chars" != x; then
53305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53309      # Going to short mode and back again did indeed matter. Since short mode is
53310      # case insensitive, let's make it lowercase to improve readability.
53311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53312      # Now convert it back to Unix-style (cygpath)
53313      input_path=`$CYGPATH -u "$shortmode_path"`
53314      new_path="$input_path"
53315    fi
53316  fi
53317
53318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53319  if test "x$test_cygdrive_prefix" = x; then
53320    # As a simple fix, exclude /usr/bin since it's not a real path.
53321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53323      # a path prefixed by /cygdrive for fixpath to work.
53324      new_path="$CYGWIN_ROOT_PATH$input_path"
53325    fi
53326  fi
53327
53328
53329  if test "x$path" != "x$new_path"; then
53330    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53333  fi
53334
53335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53336
53337  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53338  has_colon=`$ECHO $path | $GREP ^.:`
53339  new_path="$path"
53340  if test "x$has_colon" = x; then
53341    # Not in mixed or Windows style, start by that.
53342    new_path=`cmd //c echo $path`
53343  fi
53344
53345
53346  input_path="$new_path"
53347  # Check if we need to convert this using DOS-style short mode. If the path
53348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53349  # take no chances and rewrite it.
53350  # Note: m4 eats our [], so we need to use [ and ] instead.
53351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53352  if test "x$has_forbidden_chars" != x; then
53353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53355  fi
53356
53357
53358  windows_path="$new_path"
53359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53360    unix_path=`$CYGPATH -u "$windows_path"`
53361    new_path="$unix_path"
53362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53364    new_path="$unix_path"
53365  fi
53366
53367  if test "x$path" != "x$new_path"; then
53368    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53371  fi
53372
53373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53375
53376    else
53377      # We're on a unix platform. Hooray! :)
53378      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53379      has_space=`$ECHO "$path" | $GREP " "`
53380      if test "x$has_space" != x; then
53381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53384      fi
53385
53386      # Use eval to expand a potential ~
53387      eval path="$path"
53388      if test ! -f "$path" && test ! -d "$path"; then
53389        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53390      fi
53391
53392      if test -d "$path"; then
53393        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53394      else
53395        dir="`$DIRNAME "$path"`"
53396        base="`$BASENAME "$path"`"
53397        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53398      fi
53399    fi
53400  fi
53401
53402
53403  # Only process if variable expands to non-empty
53404
53405  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53407
53408  # Input might be given as Windows format, start by converting to
53409  # unix format.
53410  path="$POTENTIAL_FREETYPE_LIB_PATH"
53411  new_path=`$CYGPATH -u "$path"`
53412
53413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53416  # "foo.exe" is OK but "foo" is an error.
53417  #
53418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53419  # It is also a way to make sure we got the proper file name for the real test later on.
53420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53421  if test "x$test_shortpath" = x; then
53422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53424    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53425  fi
53426
53427  # Call helper function which possibly converts this using DOS-style short mode.
53428  # If so, the updated path is stored in $new_path.
53429
53430  input_path="$new_path"
53431  # Check if we need to convert this using DOS-style short mode. If the path
53432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53433  # take no chances and rewrite it.
53434  # Note: m4 eats our [], so we need to use [ and ] instead.
53435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53436  if test "x$has_forbidden_chars" != x; then
53437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53441      # Going to short mode and back again did indeed matter. Since short mode is
53442      # case insensitive, let's make it lowercase to improve readability.
53443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53444      # Now convert it back to Unix-style (cygpath)
53445      input_path=`$CYGPATH -u "$shortmode_path"`
53446      new_path="$input_path"
53447    fi
53448  fi
53449
53450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53451  if test "x$test_cygdrive_prefix" = x; then
53452    # As a simple fix, exclude /usr/bin since it's not a real path.
53453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53455      # a path prefixed by /cygdrive for fixpath to work.
53456      new_path="$CYGWIN_ROOT_PATH$input_path"
53457    fi
53458  fi
53459
53460
53461  if test "x$path" != "x$new_path"; then
53462    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53464$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53465  fi
53466
53467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53468
53469  path="$POTENTIAL_FREETYPE_LIB_PATH"
53470  has_colon=`$ECHO $path | $GREP ^.:`
53471  new_path="$path"
53472  if test "x$has_colon" = x; then
53473    # Not in mixed or Windows style, start by that.
53474    new_path=`cmd //c echo $path`
53475  fi
53476
53477
53478  input_path="$new_path"
53479  # Check if we need to convert this using DOS-style short mode. If the path
53480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53481  # take no chances and rewrite it.
53482  # Note: m4 eats our [], so we need to use [ and ] instead.
53483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53484  if test "x$has_forbidden_chars" != x; then
53485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53487  fi
53488
53489
53490  windows_path="$new_path"
53491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53492    unix_path=`$CYGPATH -u "$windows_path"`
53493    new_path="$unix_path"
53494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53496    new_path="$unix_path"
53497  fi
53498
53499  if test "x$path" != "x$new_path"; then
53500    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53503  fi
53504
53505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53507
53508    else
53509      # We're on a unix platform. Hooray! :)
53510      path="$POTENTIAL_FREETYPE_LIB_PATH"
53511      has_space=`$ECHO "$path" | $GREP " "`
53512      if test "x$has_space" != x; then
53513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53516      fi
53517
53518      # Use eval to expand a potential ~
53519      eval path="$path"
53520      if test ! -f "$path" && test ! -d "$path"; then
53521        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53522      fi
53523
53524      if test -d "$path"; then
53525        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53526      else
53527        dir="`$DIRNAME "$path"`"
53528        base="`$BASENAME "$path"`"
53529        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53530      fi
53531    fi
53532  fi
53533
53534
53535    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53537$as_echo_n "checking for freetype includes... " >&6; }
53538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53539$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53540    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53542$as_echo_n "checking for freetype libraries... " >&6; }
53543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53544$as_echo "$FREETYPE_LIB_PATH" >&6; }
53545  fi
53546
53547            else
53548
53549  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53550  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53551  METHOD="well-known location"
53552
53553  # Let's start with an optimistic view of the world :-)
53554  FOUND_FREETYPE=yes
53555
53556  # First look for the canonical freetype main include file ft2build.h.
53557  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53558    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53559    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53560    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53561      # Fail.
53562      FOUND_FREETYPE=no
53563    fi
53564  fi
53565
53566  if test "x$FOUND_FREETYPE" = xyes; then
53567    # Include file found, let's continue the sanity check.
53568    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53569$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53570
53571    # Reset to default value
53572    FREETYPE_BASE_NAME=freetype
53573    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53574    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53575      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53576          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53577        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53578        # for the .6 version explicitly.
53579        FREETYPE_BASE_NAME=freetype.6
53580        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53581        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53582$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53583      else
53584        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53585$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53586        FOUND_FREETYPE=no
53587      fi
53588    else
53589      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53590        # On Windows, we will need both .lib and .dll file.
53591        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53592          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53593$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53594          FOUND_FREETYPE=no
53595        fi
53596      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53597          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53598        # Found lib in isa dir, use that instead.
53599        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53600        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53601$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53602      fi
53603    fi
53604  fi
53605
53606  if test "x$FOUND_FREETYPE" = xyes; then
53607
53608  # Only process if variable expands to non-empty
53609
53610  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53612
53613  # Input might be given as Windows format, start by converting to
53614  # unix format.
53615  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53616  new_path=`$CYGPATH -u "$path"`
53617
53618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53621  # "foo.exe" is OK but "foo" is an error.
53622  #
53623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53624  # It is also a way to make sure we got the proper file name for the real test later on.
53625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53626  if test "x$test_shortpath" = x; then
53627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53628$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53629    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53630  fi
53631
53632  # Call helper function which possibly converts this using DOS-style short mode.
53633  # If so, the updated path is stored in $new_path.
53634
53635  input_path="$new_path"
53636  # Check if we need to convert this using DOS-style short mode. If the path
53637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53638  # take no chances and rewrite it.
53639  # Note: m4 eats our [], so we need to use [ and ] instead.
53640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53641  if test "x$has_forbidden_chars" != x; then
53642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53646      # Going to short mode and back again did indeed matter. Since short mode is
53647      # case insensitive, let's make it lowercase to improve readability.
53648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53649      # Now convert it back to Unix-style (cygpath)
53650      input_path=`$CYGPATH -u "$shortmode_path"`
53651      new_path="$input_path"
53652    fi
53653  fi
53654
53655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53656  if test "x$test_cygdrive_prefix" = x; then
53657    # As a simple fix, exclude /usr/bin since it's not a real path.
53658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53660      # a path prefixed by /cygdrive for fixpath to work.
53661      new_path="$CYGWIN_ROOT_PATH$input_path"
53662    fi
53663  fi
53664
53665
53666  if test "x$path" != "x$new_path"; then
53667    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53669$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53670  fi
53671
53672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53673
53674  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53675  has_colon=`$ECHO $path | $GREP ^.:`
53676  new_path="$path"
53677  if test "x$has_colon" = x; then
53678    # Not in mixed or Windows style, start by that.
53679    new_path=`cmd //c echo $path`
53680  fi
53681
53682
53683  input_path="$new_path"
53684  # Check if we need to convert this using DOS-style short mode. If the path
53685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53686  # take no chances and rewrite it.
53687  # Note: m4 eats our [], so we need to use [ and ] instead.
53688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53689  if test "x$has_forbidden_chars" != x; then
53690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53692  fi
53693
53694
53695  windows_path="$new_path"
53696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53697    unix_path=`$CYGPATH -u "$windows_path"`
53698    new_path="$unix_path"
53699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53701    new_path="$unix_path"
53702  fi
53703
53704  if test "x$path" != "x$new_path"; then
53705    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53708  fi
53709
53710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53712
53713    else
53714      # We're on a unix platform. Hooray! :)
53715      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53716      has_space=`$ECHO "$path" | $GREP " "`
53717      if test "x$has_space" != x; then
53718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53720        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53721      fi
53722
53723      # Use eval to expand a potential ~
53724      eval path="$path"
53725      if test ! -f "$path" && test ! -d "$path"; then
53726        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53727      fi
53728
53729      if test -d "$path"; then
53730        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53731      else
53732        dir="`$DIRNAME "$path"`"
53733        base="`$BASENAME "$path"`"
53734        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53735      fi
53736    fi
53737  fi
53738
53739
53740  # Only process if variable expands to non-empty
53741
53742  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53744
53745  # Input might be given as Windows format, start by converting to
53746  # unix format.
53747  path="$POTENTIAL_FREETYPE_LIB_PATH"
53748  new_path=`$CYGPATH -u "$path"`
53749
53750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53753  # "foo.exe" is OK but "foo" is an error.
53754  #
53755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53756  # It is also a way to make sure we got the proper file name for the real test later on.
53757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53758  if test "x$test_shortpath" = x; then
53759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53761    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53762  fi
53763
53764  # Call helper function which possibly converts this using DOS-style short mode.
53765  # If so, the updated path is stored in $new_path.
53766
53767  input_path="$new_path"
53768  # Check if we need to convert this using DOS-style short mode. If the path
53769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53770  # take no chances and rewrite it.
53771  # Note: m4 eats our [], so we need to use [ and ] instead.
53772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53773  if test "x$has_forbidden_chars" != x; then
53774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53778      # Going to short mode and back again did indeed matter. Since short mode is
53779      # case insensitive, let's make it lowercase to improve readability.
53780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53781      # Now convert it back to Unix-style (cygpath)
53782      input_path=`$CYGPATH -u "$shortmode_path"`
53783      new_path="$input_path"
53784    fi
53785  fi
53786
53787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53788  if test "x$test_cygdrive_prefix" = x; then
53789    # As a simple fix, exclude /usr/bin since it's not a real path.
53790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53792      # a path prefixed by /cygdrive for fixpath to work.
53793      new_path="$CYGWIN_ROOT_PATH$input_path"
53794    fi
53795  fi
53796
53797
53798  if test "x$path" != "x$new_path"; then
53799    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53802  fi
53803
53804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53805
53806  path="$POTENTIAL_FREETYPE_LIB_PATH"
53807  has_colon=`$ECHO $path | $GREP ^.:`
53808  new_path="$path"
53809  if test "x$has_colon" = x; then
53810    # Not in mixed or Windows style, start by that.
53811    new_path=`cmd //c echo $path`
53812  fi
53813
53814
53815  input_path="$new_path"
53816  # Check if we need to convert this using DOS-style short mode. If the path
53817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53818  # take no chances and rewrite it.
53819  # Note: m4 eats our [], so we need to use [ and ] instead.
53820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53821  if test "x$has_forbidden_chars" != x; then
53822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53824  fi
53825
53826
53827  windows_path="$new_path"
53828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53829    unix_path=`$CYGPATH -u "$windows_path"`
53830    new_path="$unix_path"
53831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53833    new_path="$unix_path"
53834  fi
53835
53836  if test "x$path" != "x$new_path"; then
53837    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53840  fi
53841
53842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53844
53845    else
53846      # We're on a unix platform. Hooray! :)
53847      path="$POTENTIAL_FREETYPE_LIB_PATH"
53848      has_space=`$ECHO "$path" | $GREP " "`
53849      if test "x$has_space" != x; then
53850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53853      fi
53854
53855      # Use eval to expand a potential ~
53856      eval path="$path"
53857      if test ! -f "$path" && test ! -d "$path"; then
53858        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53859      fi
53860
53861      if test -d "$path"; then
53862        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53863      else
53864        dir="`$DIRNAME "$path"`"
53865        base="`$BASENAME "$path"`"
53866        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53867      fi
53868    fi
53869  fi
53870
53871
53872    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53874$as_echo_n "checking for freetype includes... " >&6; }
53875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53876$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53877    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53879$as_echo_n "checking for freetype libraries... " >&6; }
53880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53881$as_echo "$FREETYPE_LIB_PATH" >&6; }
53882  fi
53883
53884            fi
53885            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
53886                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
53887              # Source is available, as a last resort try to build freetype in default location
53888
53889  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
53890  BUILD_FREETYPE=yes
53891
53892  # Check if the freetype sources are acessible..
53893  if ! test -d $FREETYPE_SRC_PATH; then
53894    { $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
53895$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
53896    BUILD_FREETYPE=no
53897  fi
53898  # ..and contain a vc2010 project file
53899  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
53900  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
53901    { $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
53902$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
53903    BUILD_FREETYPE=no
53904  fi
53905  # Now check if configure found a version of 'msbuild.exe'
53906  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
53907    { $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
53908$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;}
53909    BUILD_FREETYPE=no
53910  fi
53911
53912  # Ready to go..
53913  if test "x$BUILD_FREETYPE" = xyes; then
53914    # msbuild requires trailing slashes for output directories
53915    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
53916    freetype_lib_path_unix="$freetype_lib_path"
53917    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
53918
53919  unix_path="$vcxproj_path"
53920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53921    windows_path=`$CYGPATH -m "$unix_path"`
53922    vcxproj_path="$windows_path"
53923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53924    windows_path=`cmd //c echo $unix_path`
53925    vcxproj_path="$windows_path"
53926  fi
53927
53928
53929  unix_path="$freetype_lib_path"
53930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53931    windows_path=`$CYGPATH -m "$unix_path"`
53932    freetype_lib_path="$windows_path"
53933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53934    windows_path=`cmd //c echo $unix_path`
53935    freetype_lib_path="$windows_path"
53936  fi
53937
53938
53939  unix_path="$freetype_obj_path"
53940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53941    windows_path=`$CYGPATH -m "$unix_path"`
53942    freetype_obj_path="$windows_path"
53943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53944    windows_path=`cmd //c echo $unix_path`
53945    freetype_obj_path="$windows_path"
53946  fi
53947
53948    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53949      freetype_platform=x64
53950    else
53951      freetype_platform=win32
53952    fi
53953
53954    # The original freetype project file is for VS 2010 (i.e. 'v100'),
53955    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
53956    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
53957    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
53958    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
53959$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
53960
53961    # First we try to build the freetype.dll
53962    $ECHO -e "@echo off\n"\
53963        "$MSBUILD $vcxproj_path "\
53964        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53965        "/p:Configuration=\"Release Multithreaded\" "\
53966        "/p:Platform=$freetype_platform "\
53967        "/p:ConfigurationType=DynamicLibrary "\
53968        "/p:TargetName=freetype "\
53969        "/p:OutDir=\"$freetype_lib_path\" "\
53970        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
53971    cmd /c freetype.bat
53972
53973    if test -s "$freetype_lib_path_unix/freetype.dll"; then
53974      # If that succeeds we also build freetype.lib
53975      $ECHO -e "@echo off\n"\
53976          "$MSBUILD $vcxproj_path "\
53977          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53978          "/p:Configuration=\"Release Multithreaded\" "\
53979          "/p:Platform=$freetype_platform "\
53980          "/p:ConfigurationType=StaticLibrary "\
53981          "/p:TargetName=freetype "\
53982          "/p:OutDir=\"$freetype_lib_path\" "\
53983          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
53984      cmd /c freetype.bat
53985
53986      if test -s "$freetype_lib_path_unix/freetype.lib"; then
53987        # Once we build both, lib and dll, set freetype lib and include path appropriately
53988        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
53989        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
53990        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
53991$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
53992      else
53993        BUILD_FREETYPE=no
53994      fi
53995    else
53996      BUILD_FREETYPE=no
53997    fi
53998  fi
53999
54000              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54001
54002  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54003  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54004  METHOD="well-known location"
54005
54006  # Let's start with an optimistic view of the world :-)
54007  FOUND_FREETYPE=yes
54008
54009  # First look for the canonical freetype main include file ft2build.h.
54010  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54011    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54012    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54013    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54014      # Fail.
54015      FOUND_FREETYPE=no
54016    fi
54017  fi
54018
54019  if test "x$FOUND_FREETYPE" = xyes; then
54020    # Include file found, let's continue the sanity check.
54021    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54022$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54023
54024    # Reset to default value
54025    FREETYPE_BASE_NAME=freetype
54026    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54027    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54028      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54030        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54031        # for the .6 version explicitly.
54032        FREETYPE_BASE_NAME=freetype.6
54033        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54034        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54035$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54036      else
54037        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54038$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54039        FOUND_FREETYPE=no
54040      fi
54041    else
54042      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54043        # On Windows, we will need both .lib and .dll file.
54044        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54045          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54047          FOUND_FREETYPE=no
54048        fi
54049      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54050          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54051        # Found lib in isa dir, use that instead.
54052        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54053        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54054$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54055      fi
54056    fi
54057  fi
54058
54059  if test "x$FOUND_FREETYPE" = xyes; then
54060
54061  # Only process if variable expands to non-empty
54062
54063  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54065
54066  # Input might be given as Windows format, start by converting to
54067  # unix format.
54068  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54069  new_path=`$CYGPATH -u "$path"`
54070
54071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54074  # "foo.exe" is OK but "foo" is an error.
54075  #
54076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54077  # It is also a way to make sure we got the proper file name for the real test later on.
54078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54079  if test "x$test_shortpath" = x; then
54080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54082    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54083  fi
54084
54085  # Call helper function which possibly converts this using DOS-style short mode.
54086  # If so, the updated path is stored in $new_path.
54087
54088  input_path="$new_path"
54089  # Check if we need to convert this using DOS-style short mode. If the path
54090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54091  # take no chances and rewrite it.
54092  # Note: m4 eats our [], so we need to use [ and ] instead.
54093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54094  if test "x$has_forbidden_chars" != x; then
54095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54099      # Going to short mode and back again did indeed matter. Since short mode is
54100      # case insensitive, let's make it lowercase to improve readability.
54101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54102      # Now convert it back to Unix-style (cygpath)
54103      input_path=`$CYGPATH -u "$shortmode_path"`
54104      new_path="$input_path"
54105    fi
54106  fi
54107
54108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54109  if test "x$test_cygdrive_prefix" = x; then
54110    # As a simple fix, exclude /usr/bin since it's not a real path.
54111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54113      # a path prefixed by /cygdrive for fixpath to work.
54114      new_path="$CYGWIN_ROOT_PATH$input_path"
54115    fi
54116  fi
54117
54118
54119  if test "x$path" != "x$new_path"; then
54120    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54123  fi
54124
54125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54126
54127  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54128  has_colon=`$ECHO $path | $GREP ^.:`
54129  new_path="$path"
54130  if test "x$has_colon" = x; then
54131    # Not in mixed or Windows style, start by that.
54132    new_path=`cmd //c echo $path`
54133  fi
54134
54135
54136  input_path="$new_path"
54137  # Check if we need to convert this using DOS-style short mode. If the path
54138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54139  # take no chances and rewrite it.
54140  # Note: m4 eats our [], so we need to use [ and ] instead.
54141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54142  if test "x$has_forbidden_chars" != x; then
54143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54145  fi
54146
54147
54148  windows_path="$new_path"
54149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54150    unix_path=`$CYGPATH -u "$windows_path"`
54151    new_path="$unix_path"
54152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54154    new_path="$unix_path"
54155  fi
54156
54157  if test "x$path" != "x$new_path"; then
54158    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54161  fi
54162
54163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54165
54166    else
54167      # We're on a unix platform. Hooray! :)
54168      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54169      has_space=`$ECHO "$path" | $GREP " "`
54170      if test "x$has_space" != x; then
54171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54174      fi
54175
54176      # Use eval to expand a potential ~
54177      eval path="$path"
54178      if test ! -f "$path" && test ! -d "$path"; then
54179        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54180      fi
54181
54182      if test -d "$path"; then
54183        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54184      else
54185        dir="`$DIRNAME "$path"`"
54186        base="`$BASENAME "$path"`"
54187        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54188      fi
54189    fi
54190  fi
54191
54192
54193  # Only process if variable expands to non-empty
54194
54195  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54197
54198  # Input might be given as Windows format, start by converting to
54199  # unix format.
54200  path="$POTENTIAL_FREETYPE_LIB_PATH"
54201  new_path=`$CYGPATH -u "$path"`
54202
54203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54206  # "foo.exe" is OK but "foo" is an error.
54207  #
54208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54209  # It is also a way to make sure we got the proper file name for the real test later on.
54210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54211  if test "x$test_shortpath" = x; then
54212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54215  fi
54216
54217  # Call helper function which possibly converts this using DOS-style short mode.
54218  # If so, the updated path is stored in $new_path.
54219
54220  input_path="$new_path"
54221  # Check if we need to convert this using DOS-style short mode. If the path
54222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54223  # take no chances and rewrite it.
54224  # Note: m4 eats our [], so we need to use [ and ] instead.
54225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54226  if test "x$has_forbidden_chars" != x; then
54227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54231      # Going to short mode and back again did indeed matter. Since short mode is
54232      # case insensitive, let's make it lowercase to improve readability.
54233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54234      # Now convert it back to Unix-style (cygpath)
54235      input_path=`$CYGPATH -u "$shortmode_path"`
54236      new_path="$input_path"
54237    fi
54238  fi
54239
54240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54241  if test "x$test_cygdrive_prefix" = x; then
54242    # As a simple fix, exclude /usr/bin since it's not a real path.
54243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54245      # a path prefixed by /cygdrive for fixpath to work.
54246      new_path="$CYGWIN_ROOT_PATH$input_path"
54247    fi
54248  fi
54249
54250
54251  if test "x$path" != "x$new_path"; then
54252    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54255  fi
54256
54257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54258
54259  path="$POTENTIAL_FREETYPE_LIB_PATH"
54260  has_colon=`$ECHO $path | $GREP ^.:`
54261  new_path="$path"
54262  if test "x$has_colon" = x; then
54263    # Not in mixed or Windows style, start by that.
54264    new_path=`cmd //c echo $path`
54265  fi
54266
54267
54268  input_path="$new_path"
54269  # Check if we need to convert this using DOS-style short mode. If the path
54270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54271  # take no chances and rewrite it.
54272  # Note: m4 eats our [], so we need to use [ and ] instead.
54273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54274  if test "x$has_forbidden_chars" != x; then
54275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54277  fi
54278
54279
54280  windows_path="$new_path"
54281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54282    unix_path=`$CYGPATH -u "$windows_path"`
54283    new_path="$unix_path"
54284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54286    new_path="$unix_path"
54287  fi
54288
54289  if test "x$path" != "x$new_path"; then
54290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54293  fi
54294
54295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54297
54298    else
54299      # We're on a unix platform. Hooray! :)
54300      path="$POTENTIAL_FREETYPE_LIB_PATH"
54301      has_space=`$ECHO "$path" | $GREP " "`
54302      if test "x$has_space" != x; then
54303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54306      fi
54307
54308      # Use eval to expand a potential ~
54309      eval path="$path"
54310      if test ! -f "$path" && test ! -d "$path"; then
54311        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54312      fi
54313
54314      if test -d "$path"; then
54315        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54316      else
54317        dir="`$DIRNAME "$path"`"
54318        base="`$BASENAME "$path"`"
54319        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54320      fi
54321    fi
54322  fi
54323
54324
54325    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54327$as_echo_n "checking for freetype includes... " >&6; }
54328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54329$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54330    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54332$as_echo_n "checking for freetype libraries... " >&6; }
54333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54334$as_echo "$FREETYPE_LIB_PATH" >&6; }
54335  fi
54336
54337              else
54338
54339  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54340  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54341  METHOD="well-known location"
54342
54343  # Let's start with an optimistic view of the world :-)
54344  FOUND_FREETYPE=yes
54345
54346  # First look for the canonical freetype main include file ft2build.h.
54347  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54348    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54349    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54350    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54351      # Fail.
54352      FOUND_FREETYPE=no
54353    fi
54354  fi
54355
54356  if test "x$FOUND_FREETYPE" = xyes; then
54357    # Include file found, let's continue the sanity check.
54358    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54359$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54360
54361    # Reset to default value
54362    FREETYPE_BASE_NAME=freetype
54363    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54364    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54365      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54366          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54367        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54368        # for the .6 version explicitly.
54369        FREETYPE_BASE_NAME=freetype.6
54370        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54371        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54372$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54373      else
54374        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54375$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54376        FOUND_FREETYPE=no
54377      fi
54378    else
54379      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54380        # On Windows, we will need both .lib and .dll file.
54381        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54382          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54383$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54384          FOUND_FREETYPE=no
54385        fi
54386      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54387          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54388        # Found lib in isa dir, use that instead.
54389        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54390        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54391$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54392      fi
54393    fi
54394  fi
54395
54396  if test "x$FOUND_FREETYPE" = xyes; then
54397
54398  # Only process if variable expands to non-empty
54399
54400  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54402
54403  # Input might be given as Windows format, start by converting to
54404  # unix format.
54405  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54406  new_path=`$CYGPATH -u "$path"`
54407
54408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54411  # "foo.exe" is OK but "foo" is an error.
54412  #
54413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54414  # It is also a way to make sure we got the proper file name for the real test later on.
54415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54416  if test "x$test_shortpath" = x; then
54417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54419    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54420  fi
54421
54422  # Call helper function which possibly converts this using DOS-style short mode.
54423  # If so, the updated path is stored in $new_path.
54424
54425  input_path="$new_path"
54426  # Check if we need to convert this using DOS-style short mode. If the path
54427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54428  # take no chances and rewrite it.
54429  # Note: m4 eats our [], so we need to use [ and ] instead.
54430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54431  if test "x$has_forbidden_chars" != x; then
54432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54436      # Going to short mode and back again did indeed matter. Since short mode is
54437      # case insensitive, let's make it lowercase to improve readability.
54438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54439      # Now convert it back to Unix-style (cygpath)
54440      input_path=`$CYGPATH -u "$shortmode_path"`
54441      new_path="$input_path"
54442    fi
54443  fi
54444
54445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54446  if test "x$test_cygdrive_prefix" = x; then
54447    # As a simple fix, exclude /usr/bin since it's not a real path.
54448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54450      # a path prefixed by /cygdrive for fixpath to work.
54451      new_path="$CYGWIN_ROOT_PATH$input_path"
54452    fi
54453  fi
54454
54455
54456  if test "x$path" != "x$new_path"; then
54457    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54460  fi
54461
54462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54463
54464  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54465  has_colon=`$ECHO $path | $GREP ^.:`
54466  new_path="$path"
54467  if test "x$has_colon" = x; then
54468    # Not in mixed or Windows style, start by that.
54469    new_path=`cmd //c echo $path`
54470  fi
54471
54472
54473  input_path="$new_path"
54474  # Check if we need to convert this using DOS-style short mode. If the path
54475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54476  # take no chances and rewrite it.
54477  # Note: m4 eats our [], so we need to use [ and ] instead.
54478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54479  if test "x$has_forbidden_chars" != x; then
54480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54482  fi
54483
54484
54485  windows_path="$new_path"
54486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54487    unix_path=`$CYGPATH -u "$windows_path"`
54488    new_path="$unix_path"
54489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54491    new_path="$unix_path"
54492  fi
54493
54494  if test "x$path" != "x$new_path"; then
54495    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54498  fi
54499
54500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54502
54503    else
54504      # We're on a unix platform. Hooray! :)
54505      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54506      has_space=`$ECHO "$path" | $GREP " "`
54507      if test "x$has_space" != x; then
54508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54511      fi
54512
54513      # Use eval to expand a potential ~
54514      eval path="$path"
54515      if test ! -f "$path" && test ! -d "$path"; then
54516        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54517      fi
54518
54519      if test -d "$path"; then
54520        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54521      else
54522        dir="`$DIRNAME "$path"`"
54523        base="`$BASENAME "$path"`"
54524        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54525      fi
54526    fi
54527  fi
54528
54529
54530  # Only process if variable expands to non-empty
54531
54532  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54534
54535  # Input might be given as Windows format, start by converting to
54536  # unix format.
54537  path="$POTENTIAL_FREETYPE_LIB_PATH"
54538  new_path=`$CYGPATH -u "$path"`
54539
54540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54543  # "foo.exe" is OK but "foo" is an error.
54544  #
54545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54546  # It is also a way to make sure we got the proper file name for the real test later on.
54547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54548  if test "x$test_shortpath" = x; then
54549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54551    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54552  fi
54553
54554  # Call helper function which possibly converts this using DOS-style short mode.
54555  # If so, the updated path is stored in $new_path.
54556
54557  input_path="$new_path"
54558  # Check if we need to convert this using DOS-style short mode. If the path
54559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54560  # take no chances and rewrite it.
54561  # Note: m4 eats our [], so we need to use [ and ] instead.
54562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54563  if test "x$has_forbidden_chars" != x; then
54564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54568      # Going to short mode and back again did indeed matter. Since short mode is
54569      # case insensitive, let's make it lowercase to improve readability.
54570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54571      # Now convert it back to Unix-style (cygpath)
54572      input_path=`$CYGPATH -u "$shortmode_path"`
54573      new_path="$input_path"
54574    fi
54575  fi
54576
54577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54578  if test "x$test_cygdrive_prefix" = x; then
54579    # As a simple fix, exclude /usr/bin since it's not a real path.
54580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54582      # a path prefixed by /cygdrive for fixpath to work.
54583      new_path="$CYGWIN_ROOT_PATH$input_path"
54584    fi
54585  fi
54586
54587
54588  if test "x$path" != "x$new_path"; then
54589    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54592  fi
54593
54594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54595
54596  path="$POTENTIAL_FREETYPE_LIB_PATH"
54597  has_colon=`$ECHO $path | $GREP ^.:`
54598  new_path="$path"
54599  if test "x$has_colon" = x; then
54600    # Not in mixed or Windows style, start by that.
54601    new_path=`cmd //c echo $path`
54602  fi
54603
54604
54605  input_path="$new_path"
54606  # Check if we need to convert this using DOS-style short mode. If the path
54607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54608  # take no chances and rewrite it.
54609  # Note: m4 eats our [], so we need to use [ and ] instead.
54610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54611  if test "x$has_forbidden_chars" != x; then
54612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54614  fi
54615
54616
54617  windows_path="$new_path"
54618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54619    unix_path=`$CYGPATH -u "$windows_path"`
54620    new_path="$unix_path"
54621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54623    new_path="$unix_path"
54624  fi
54625
54626  if test "x$path" != "x$new_path"; then
54627    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54629$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54630  fi
54631
54632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54634
54635    else
54636      # We're on a unix platform. Hooray! :)
54637      path="$POTENTIAL_FREETYPE_LIB_PATH"
54638      has_space=`$ECHO "$path" | $GREP " "`
54639      if test "x$has_space" != x; then
54640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54643      fi
54644
54645      # Use eval to expand a potential ~
54646      eval path="$path"
54647      if test ! -f "$path" && test ! -d "$path"; then
54648        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54649      fi
54650
54651      if test -d "$path"; then
54652        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54653      else
54654        dir="`$DIRNAME "$path"`"
54655        base="`$BASENAME "$path"`"
54656        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54657      fi
54658    fi
54659  fi
54660
54661
54662    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54664$as_echo_n "checking for freetype includes... " >&6; }
54665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54666$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54667    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54669$as_echo_n "checking for freetype libraries... " >&6; }
54670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54671$as_echo "$FREETYPE_LIB_PATH" >&6; }
54672  fi
54673
54674              fi
54675            fi
54676          fi
54677        else
54678          FREETYPE_BASE_DIR="$SYSROOT/usr"
54679
54680  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54681  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54682  METHOD="well-known location"
54683
54684  # Let's start with an optimistic view of the world :-)
54685  FOUND_FREETYPE=yes
54686
54687  # First look for the canonical freetype main include file ft2build.h.
54688  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54689    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54690    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54691    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54692      # Fail.
54693      FOUND_FREETYPE=no
54694    fi
54695  fi
54696
54697  if test "x$FOUND_FREETYPE" = xyes; then
54698    # Include file found, let's continue the sanity check.
54699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54700$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54701
54702    # Reset to default value
54703    FREETYPE_BASE_NAME=freetype
54704    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54705    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54706      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54707          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54708        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54709        # for the .6 version explicitly.
54710        FREETYPE_BASE_NAME=freetype.6
54711        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54712        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54713$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54714      else
54715        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54716$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54717        FOUND_FREETYPE=no
54718      fi
54719    else
54720      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54721        # On Windows, we will need both .lib and .dll file.
54722        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54723          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54725          FOUND_FREETYPE=no
54726        fi
54727      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54728          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54729        # Found lib in isa dir, use that instead.
54730        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54731        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54732$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54733      fi
54734    fi
54735  fi
54736
54737  if test "x$FOUND_FREETYPE" = xyes; then
54738
54739  # Only process if variable expands to non-empty
54740
54741  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54743
54744  # Input might be given as Windows format, start by converting to
54745  # unix format.
54746  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54747  new_path=`$CYGPATH -u "$path"`
54748
54749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54752  # "foo.exe" is OK but "foo" is an error.
54753  #
54754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54755  # It is also a way to make sure we got the proper file name for the real test later on.
54756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54757  if test "x$test_shortpath" = x; then
54758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54760    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54761  fi
54762
54763  # Call helper function which possibly converts this using DOS-style short mode.
54764  # If so, the updated path is stored in $new_path.
54765
54766  input_path="$new_path"
54767  # Check if we need to convert this using DOS-style short mode. If the path
54768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54769  # take no chances and rewrite it.
54770  # Note: m4 eats our [], so we need to use [ and ] instead.
54771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54772  if test "x$has_forbidden_chars" != x; then
54773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54777      # Going to short mode and back again did indeed matter. Since short mode is
54778      # case insensitive, let's make it lowercase to improve readability.
54779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54780      # Now convert it back to Unix-style (cygpath)
54781      input_path=`$CYGPATH -u "$shortmode_path"`
54782      new_path="$input_path"
54783    fi
54784  fi
54785
54786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54787  if test "x$test_cygdrive_prefix" = x; then
54788    # As a simple fix, exclude /usr/bin since it's not a real path.
54789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54791      # a path prefixed by /cygdrive for fixpath to work.
54792      new_path="$CYGWIN_ROOT_PATH$input_path"
54793    fi
54794  fi
54795
54796
54797  if test "x$path" != "x$new_path"; then
54798    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54801  fi
54802
54803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54804
54805  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54806  has_colon=`$ECHO $path | $GREP ^.:`
54807  new_path="$path"
54808  if test "x$has_colon" = x; then
54809    # Not in mixed or Windows style, start by that.
54810    new_path=`cmd //c echo $path`
54811  fi
54812
54813
54814  input_path="$new_path"
54815  # Check if we need to convert this using DOS-style short mode. If the path
54816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54817  # take no chances and rewrite it.
54818  # Note: m4 eats our [], so we need to use [ and ] instead.
54819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54820  if test "x$has_forbidden_chars" != x; then
54821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54823  fi
54824
54825
54826  windows_path="$new_path"
54827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54828    unix_path=`$CYGPATH -u "$windows_path"`
54829    new_path="$unix_path"
54830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54832    new_path="$unix_path"
54833  fi
54834
54835  if test "x$path" != "x$new_path"; then
54836    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54839  fi
54840
54841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54843
54844    else
54845      # We're on a unix platform. Hooray! :)
54846      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54847      has_space=`$ECHO "$path" | $GREP " "`
54848      if test "x$has_space" != x; then
54849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54852      fi
54853
54854      # Use eval to expand a potential ~
54855      eval path="$path"
54856      if test ! -f "$path" && test ! -d "$path"; then
54857        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54858      fi
54859
54860      if test -d "$path"; then
54861        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54862      else
54863        dir="`$DIRNAME "$path"`"
54864        base="`$BASENAME "$path"`"
54865        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54866      fi
54867    fi
54868  fi
54869
54870
54871  # Only process if variable expands to non-empty
54872
54873  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54875
54876  # Input might be given as Windows format, start by converting to
54877  # unix format.
54878  path="$POTENTIAL_FREETYPE_LIB_PATH"
54879  new_path=`$CYGPATH -u "$path"`
54880
54881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54884  # "foo.exe" is OK but "foo" is an error.
54885  #
54886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54887  # It is also a way to make sure we got the proper file name for the real test later on.
54888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54889  if test "x$test_shortpath" = x; then
54890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54892    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54893  fi
54894
54895  # Call helper function which possibly converts this using DOS-style short mode.
54896  # If so, the updated path is stored in $new_path.
54897
54898  input_path="$new_path"
54899  # Check if we need to convert this using DOS-style short mode. If the path
54900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54901  # take no chances and rewrite it.
54902  # Note: m4 eats our [], so we need to use [ and ] instead.
54903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54904  if test "x$has_forbidden_chars" != x; then
54905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54909      # Going to short mode and back again did indeed matter. Since short mode is
54910      # case insensitive, let's make it lowercase to improve readability.
54911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54912      # Now convert it back to Unix-style (cygpath)
54913      input_path=`$CYGPATH -u "$shortmode_path"`
54914      new_path="$input_path"
54915    fi
54916  fi
54917
54918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54919  if test "x$test_cygdrive_prefix" = x; then
54920    # As a simple fix, exclude /usr/bin since it's not a real path.
54921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54923      # a path prefixed by /cygdrive for fixpath to work.
54924      new_path="$CYGWIN_ROOT_PATH$input_path"
54925    fi
54926  fi
54927
54928
54929  if test "x$path" != "x$new_path"; then
54930    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54933  fi
54934
54935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54936
54937  path="$POTENTIAL_FREETYPE_LIB_PATH"
54938  has_colon=`$ECHO $path | $GREP ^.:`
54939  new_path="$path"
54940  if test "x$has_colon" = x; then
54941    # Not in mixed or Windows style, start by that.
54942    new_path=`cmd //c echo $path`
54943  fi
54944
54945
54946  input_path="$new_path"
54947  # Check if we need to convert this using DOS-style short mode. If the path
54948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54949  # take no chances and rewrite it.
54950  # Note: m4 eats our [], so we need to use [ and ] instead.
54951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54952  if test "x$has_forbidden_chars" != x; then
54953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54955  fi
54956
54957
54958  windows_path="$new_path"
54959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54960    unix_path=`$CYGPATH -u "$windows_path"`
54961    new_path="$unix_path"
54962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54964    new_path="$unix_path"
54965  fi
54966
54967  if test "x$path" != "x$new_path"; then
54968    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54971  fi
54972
54973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54975
54976    else
54977      # We're on a unix platform. Hooray! :)
54978      path="$POTENTIAL_FREETYPE_LIB_PATH"
54979      has_space=`$ECHO "$path" | $GREP " "`
54980      if test "x$has_space" != x; then
54981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54984      fi
54985
54986      # Use eval to expand a potential ~
54987      eval path="$path"
54988      if test ! -f "$path" && test ! -d "$path"; then
54989        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54990      fi
54991
54992      if test -d "$path"; then
54993        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54994      else
54995        dir="`$DIRNAME "$path"`"
54996        base="`$BASENAME "$path"`"
54997        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54998      fi
54999    fi
55000  fi
55001
55002
55003    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55005$as_echo_n "checking for freetype includes... " >&6; }
55006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55007$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55008    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55010$as_echo_n "checking for freetype libraries... " >&6; }
55011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55012$as_echo "$FREETYPE_LIB_PATH" >&6; }
55013  fi
55014
55015
55016          if test "x$FOUND_FREETYPE" != xyes; then
55017            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55018
55019  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55020  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55021  METHOD="well-known location"
55022
55023  # Let's start with an optimistic view of the world :-)
55024  FOUND_FREETYPE=yes
55025
55026  # First look for the canonical freetype main include file ft2build.h.
55027  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55028    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55029    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55030    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55031      # Fail.
55032      FOUND_FREETYPE=no
55033    fi
55034  fi
55035
55036  if test "x$FOUND_FREETYPE" = xyes; then
55037    # Include file found, let's continue the sanity check.
55038    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55039$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55040
55041    # Reset to default value
55042    FREETYPE_BASE_NAME=freetype
55043    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55044    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55045      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55046          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55047        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55048        # for the .6 version explicitly.
55049        FREETYPE_BASE_NAME=freetype.6
55050        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55051        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55052$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55053      else
55054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55055$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55056        FOUND_FREETYPE=no
55057      fi
55058    else
55059      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55060        # On Windows, we will need both .lib and .dll file.
55061        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55062          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55063$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55064          FOUND_FREETYPE=no
55065        fi
55066      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55067          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55068        # Found lib in isa dir, use that instead.
55069        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55070        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55071$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55072      fi
55073    fi
55074  fi
55075
55076  if test "x$FOUND_FREETYPE" = xyes; then
55077
55078  # Only process if variable expands to non-empty
55079
55080  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55082
55083  # Input might be given as Windows format, start by converting to
55084  # unix format.
55085  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55086  new_path=`$CYGPATH -u "$path"`
55087
55088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55091  # "foo.exe" is OK but "foo" is an error.
55092  #
55093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55094  # It is also a way to make sure we got the proper file name for the real test later on.
55095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55096  if test "x$test_shortpath" = x; then
55097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55099    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55100  fi
55101
55102  # Call helper function which possibly converts this using DOS-style short mode.
55103  # If so, the updated path is stored in $new_path.
55104
55105  input_path="$new_path"
55106  # Check if we need to convert this using DOS-style short mode. If the path
55107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55108  # take no chances and rewrite it.
55109  # Note: m4 eats our [], so we need to use [ and ] instead.
55110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55111  if test "x$has_forbidden_chars" != x; then
55112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55116      # Going to short mode and back again did indeed matter. Since short mode is
55117      # case insensitive, let's make it lowercase to improve readability.
55118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55119      # Now convert it back to Unix-style (cygpath)
55120      input_path=`$CYGPATH -u "$shortmode_path"`
55121      new_path="$input_path"
55122    fi
55123  fi
55124
55125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55126  if test "x$test_cygdrive_prefix" = x; then
55127    # As a simple fix, exclude /usr/bin since it's not a real path.
55128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55130      # a path prefixed by /cygdrive for fixpath to work.
55131      new_path="$CYGWIN_ROOT_PATH$input_path"
55132    fi
55133  fi
55134
55135
55136  if test "x$path" != "x$new_path"; then
55137    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55140  fi
55141
55142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55143
55144  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55145  has_colon=`$ECHO $path | $GREP ^.:`
55146  new_path="$path"
55147  if test "x$has_colon" = x; then
55148    # Not in mixed or Windows style, start by that.
55149    new_path=`cmd //c echo $path`
55150  fi
55151
55152
55153  input_path="$new_path"
55154  # Check if we need to convert this using DOS-style short mode. If the path
55155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55156  # take no chances and rewrite it.
55157  # Note: m4 eats our [], so we need to use [ and ] instead.
55158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55159  if test "x$has_forbidden_chars" != x; then
55160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55162  fi
55163
55164
55165  windows_path="$new_path"
55166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55167    unix_path=`$CYGPATH -u "$windows_path"`
55168    new_path="$unix_path"
55169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55171    new_path="$unix_path"
55172  fi
55173
55174  if test "x$path" != "x$new_path"; then
55175    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55177$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55178  fi
55179
55180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55182
55183    else
55184      # We're on a unix platform. Hooray! :)
55185      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55186      has_space=`$ECHO "$path" | $GREP " "`
55187      if test "x$has_space" != x; then
55188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55191      fi
55192
55193      # Use eval to expand a potential ~
55194      eval path="$path"
55195      if test ! -f "$path" && test ! -d "$path"; then
55196        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55197      fi
55198
55199      if test -d "$path"; then
55200        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55201      else
55202        dir="`$DIRNAME "$path"`"
55203        base="`$BASENAME "$path"`"
55204        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55205      fi
55206    fi
55207  fi
55208
55209
55210  # Only process if variable expands to non-empty
55211
55212  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55214
55215  # Input might be given as Windows format, start by converting to
55216  # unix format.
55217  path="$POTENTIAL_FREETYPE_LIB_PATH"
55218  new_path=`$CYGPATH -u "$path"`
55219
55220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55223  # "foo.exe" is OK but "foo" is an error.
55224  #
55225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55226  # It is also a way to make sure we got the proper file name for the real test later on.
55227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55228  if test "x$test_shortpath" = x; then
55229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55231    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55232  fi
55233
55234  # Call helper function which possibly converts this using DOS-style short mode.
55235  # If so, the updated path is stored in $new_path.
55236
55237  input_path="$new_path"
55238  # Check if we need to convert this using DOS-style short mode. If the path
55239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55240  # take no chances and rewrite it.
55241  # Note: m4 eats our [], so we need to use [ and ] instead.
55242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55243  if test "x$has_forbidden_chars" != x; then
55244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55248      # Going to short mode and back again did indeed matter. Since short mode is
55249      # case insensitive, let's make it lowercase to improve readability.
55250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55251      # Now convert it back to Unix-style (cygpath)
55252      input_path=`$CYGPATH -u "$shortmode_path"`
55253      new_path="$input_path"
55254    fi
55255  fi
55256
55257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55258  if test "x$test_cygdrive_prefix" = x; then
55259    # As a simple fix, exclude /usr/bin since it's not a real path.
55260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55262      # a path prefixed by /cygdrive for fixpath to work.
55263      new_path="$CYGWIN_ROOT_PATH$input_path"
55264    fi
55265  fi
55266
55267
55268  if test "x$path" != "x$new_path"; then
55269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55272  fi
55273
55274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55275
55276  path="$POTENTIAL_FREETYPE_LIB_PATH"
55277  has_colon=`$ECHO $path | $GREP ^.:`
55278  new_path="$path"
55279  if test "x$has_colon" = x; then
55280    # Not in mixed or Windows style, start by that.
55281    new_path=`cmd //c echo $path`
55282  fi
55283
55284
55285  input_path="$new_path"
55286  # Check if we need to convert this using DOS-style short mode. If the path
55287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55288  # take no chances and rewrite it.
55289  # Note: m4 eats our [], so we need to use [ and ] instead.
55290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55291  if test "x$has_forbidden_chars" != x; then
55292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55294  fi
55295
55296
55297  windows_path="$new_path"
55298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55299    unix_path=`$CYGPATH -u "$windows_path"`
55300    new_path="$unix_path"
55301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55303    new_path="$unix_path"
55304  fi
55305
55306  if test "x$path" != "x$new_path"; then
55307    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55309$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55310  fi
55311
55312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55314
55315    else
55316      # We're on a unix platform. Hooray! :)
55317      path="$POTENTIAL_FREETYPE_LIB_PATH"
55318      has_space=`$ECHO "$path" | $GREP " "`
55319      if test "x$has_space" != x; then
55320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55321$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55323      fi
55324
55325      # Use eval to expand a potential ~
55326      eval path="$path"
55327      if test ! -f "$path" && test ! -d "$path"; then
55328        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55329      fi
55330
55331      if test -d "$path"; then
55332        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55333      else
55334        dir="`$DIRNAME "$path"`"
55335        base="`$BASENAME "$path"`"
55336        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55337      fi
55338    fi
55339  fi
55340
55341
55342    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55344$as_echo_n "checking for freetype includes... " >&6; }
55345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55346$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55347    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55349$as_echo_n "checking for freetype libraries... " >&6; }
55350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55351$as_echo "$FREETYPE_LIB_PATH" >&6; }
55352  fi
55353
55354          fi
55355
55356          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55357            if test "x$FOUND_FREETYPE" != xyes; then
55358              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
55359              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
55360
55361  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55362  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55363  METHOD="well-known location"
55364
55365  # Let's start with an optimistic view of the world :-)
55366  FOUND_FREETYPE=yes
55367
55368  # First look for the canonical freetype main include file ft2build.h.
55369  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55370    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55371    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55372    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55373      # Fail.
55374      FOUND_FREETYPE=no
55375    fi
55376  fi
55377
55378  if test "x$FOUND_FREETYPE" = xyes; then
55379    # Include file found, let's continue the sanity check.
55380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55381$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55382
55383    # Reset to default value
55384    FREETYPE_BASE_NAME=freetype
55385    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55386    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55387      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55388          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55389        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55390        # for the .6 version explicitly.
55391        FREETYPE_BASE_NAME=freetype.6
55392        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55393        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55394$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55395      else
55396        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55397$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55398        FOUND_FREETYPE=no
55399      fi
55400    else
55401      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55402        # On Windows, we will need both .lib and .dll file.
55403        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55404          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55405$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55406          FOUND_FREETYPE=no
55407        fi
55408      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55409          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55410        # Found lib in isa dir, use that instead.
55411        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55412        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55413$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55414      fi
55415    fi
55416  fi
55417
55418  if test "x$FOUND_FREETYPE" = xyes; then
55419
55420  # Only process if variable expands to non-empty
55421
55422  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55424
55425  # Input might be given as Windows format, start by converting to
55426  # unix format.
55427  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55428  new_path=`$CYGPATH -u "$path"`
55429
55430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55433  # "foo.exe" is OK but "foo" is an error.
55434  #
55435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55436  # It is also a way to make sure we got the proper file name for the real test later on.
55437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55438  if test "x$test_shortpath" = x; then
55439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55440$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55441    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55442  fi
55443
55444  # Call helper function which possibly converts this using DOS-style short mode.
55445  # If so, the updated path is stored in $new_path.
55446
55447  input_path="$new_path"
55448  # Check if we need to convert this using DOS-style short mode. If the path
55449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55450  # take no chances and rewrite it.
55451  # Note: m4 eats our [], so we need to use [ and ] instead.
55452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55453  if test "x$has_forbidden_chars" != x; then
55454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55458      # Going to short mode and back again did indeed matter. Since short mode is
55459      # case insensitive, let's make it lowercase to improve readability.
55460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55461      # Now convert it back to Unix-style (cygpath)
55462      input_path=`$CYGPATH -u "$shortmode_path"`
55463      new_path="$input_path"
55464    fi
55465  fi
55466
55467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55468  if test "x$test_cygdrive_prefix" = x; then
55469    # As a simple fix, exclude /usr/bin since it's not a real path.
55470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55472      # a path prefixed by /cygdrive for fixpath to work.
55473      new_path="$CYGWIN_ROOT_PATH$input_path"
55474    fi
55475  fi
55476
55477
55478  if test "x$path" != "x$new_path"; then
55479    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55481$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55482  fi
55483
55484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55485
55486  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55487  has_colon=`$ECHO $path | $GREP ^.:`
55488  new_path="$path"
55489  if test "x$has_colon" = x; then
55490    # Not in mixed or Windows style, start by that.
55491    new_path=`cmd //c echo $path`
55492  fi
55493
55494
55495  input_path="$new_path"
55496  # Check if we need to convert this using DOS-style short mode. If the path
55497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55498  # take no chances and rewrite it.
55499  # Note: m4 eats our [], so we need to use [ and ] instead.
55500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55501  if test "x$has_forbidden_chars" != x; then
55502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55504  fi
55505
55506
55507  windows_path="$new_path"
55508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55509    unix_path=`$CYGPATH -u "$windows_path"`
55510    new_path="$unix_path"
55511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55513    new_path="$unix_path"
55514  fi
55515
55516  if test "x$path" != "x$new_path"; then
55517    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55519$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55520  fi
55521
55522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55524
55525    else
55526      # We're on a unix platform. Hooray! :)
55527      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55528      has_space=`$ECHO "$path" | $GREP " "`
55529      if test "x$has_space" != x; then
55530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55533      fi
55534
55535      # Use eval to expand a potential ~
55536      eval path="$path"
55537      if test ! -f "$path" && test ! -d "$path"; then
55538        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55539      fi
55540
55541      if test -d "$path"; then
55542        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55543      else
55544        dir="`$DIRNAME "$path"`"
55545        base="`$BASENAME "$path"`"
55546        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55547      fi
55548    fi
55549  fi
55550
55551
55552  # Only process if variable expands to non-empty
55553
55554  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55556
55557  # Input might be given as Windows format, start by converting to
55558  # unix format.
55559  path="$POTENTIAL_FREETYPE_LIB_PATH"
55560  new_path=`$CYGPATH -u "$path"`
55561
55562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55565  # "foo.exe" is OK but "foo" is an error.
55566  #
55567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55568  # It is also a way to make sure we got the proper file name for the real test later on.
55569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55570  if test "x$test_shortpath" = x; then
55571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55572$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55573    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55574  fi
55575
55576  # Call helper function which possibly converts this using DOS-style short mode.
55577  # If so, the updated path is stored in $new_path.
55578
55579  input_path="$new_path"
55580  # Check if we need to convert this using DOS-style short mode. If the path
55581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55582  # take no chances and rewrite it.
55583  # Note: m4 eats our [], so we need to use [ and ] instead.
55584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55585  if test "x$has_forbidden_chars" != x; then
55586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55590      # Going to short mode and back again did indeed matter. Since short mode is
55591      # case insensitive, let's make it lowercase to improve readability.
55592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55593      # Now convert it back to Unix-style (cygpath)
55594      input_path=`$CYGPATH -u "$shortmode_path"`
55595      new_path="$input_path"
55596    fi
55597  fi
55598
55599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55600  if test "x$test_cygdrive_prefix" = x; then
55601    # As a simple fix, exclude /usr/bin since it's not a real path.
55602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55604      # a path prefixed by /cygdrive for fixpath to work.
55605      new_path="$CYGWIN_ROOT_PATH$input_path"
55606    fi
55607  fi
55608
55609
55610  if test "x$path" != "x$new_path"; then
55611    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55614  fi
55615
55616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55617
55618  path="$POTENTIAL_FREETYPE_LIB_PATH"
55619  has_colon=`$ECHO $path | $GREP ^.:`
55620  new_path="$path"
55621  if test "x$has_colon" = x; then
55622    # Not in mixed or Windows style, start by that.
55623    new_path=`cmd //c echo $path`
55624  fi
55625
55626
55627  input_path="$new_path"
55628  # Check if we need to convert this using DOS-style short mode. If the path
55629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55630  # take no chances and rewrite it.
55631  # Note: m4 eats our [], so we need to use [ and ] instead.
55632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55633  if test "x$has_forbidden_chars" != x; then
55634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55636  fi
55637
55638
55639  windows_path="$new_path"
55640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55641    unix_path=`$CYGPATH -u "$windows_path"`
55642    new_path="$unix_path"
55643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55645    new_path="$unix_path"
55646  fi
55647
55648  if test "x$path" != "x$new_path"; then
55649    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55651$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55652  fi
55653
55654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55656
55657    else
55658      # We're on a unix platform. Hooray! :)
55659      path="$POTENTIAL_FREETYPE_LIB_PATH"
55660      has_space=`$ECHO "$path" | $GREP " "`
55661      if test "x$has_space" != x; then
55662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55663$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55665      fi
55666
55667      # Use eval to expand a potential ~
55668      eval path="$path"
55669      if test ! -f "$path" && test ! -d "$path"; then
55670        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55671      fi
55672
55673      if test -d "$path"; then
55674        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55675      else
55676        dir="`$DIRNAME "$path"`"
55677        base="`$BASENAME "$path"`"
55678        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55679      fi
55680    fi
55681  fi
55682
55683
55684    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55686$as_echo_n "checking for freetype includes... " >&6; }
55687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55688$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55689    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55691$as_echo_n "checking for freetype libraries... " >&6; }
55692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55693$as_echo "$FREETYPE_LIB_PATH" >&6; }
55694  fi
55695
55696            fi
55697          fi
55698
55699          if test "x$FOUND_FREETYPE" != xyes; then
55700            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55701
55702  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55703  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55704  METHOD="well-known location"
55705
55706  # Let's start with an optimistic view of the world :-)
55707  FOUND_FREETYPE=yes
55708
55709  # First look for the canonical freetype main include file ft2build.h.
55710  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55711    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55712    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55713    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55714      # Fail.
55715      FOUND_FREETYPE=no
55716    fi
55717  fi
55718
55719  if test "x$FOUND_FREETYPE" = xyes; then
55720    # Include file found, let's continue the sanity check.
55721    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55722$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55723
55724    # Reset to default value
55725    FREETYPE_BASE_NAME=freetype
55726    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55727    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55728      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55729          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55730        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55731        # for the .6 version explicitly.
55732        FREETYPE_BASE_NAME=freetype.6
55733        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55734        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55735$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55736      else
55737        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55738$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55739        FOUND_FREETYPE=no
55740      fi
55741    else
55742      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55743        # On Windows, we will need both .lib and .dll file.
55744        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55745          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55746$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55747          FOUND_FREETYPE=no
55748        fi
55749      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55750          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55751        # Found lib in isa dir, use that instead.
55752        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55753        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55754$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55755      fi
55756    fi
55757  fi
55758
55759  if test "x$FOUND_FREETYPE" = xyes; then
55760
55761  # Only process if variable expands to non-empty
55762
55763  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55765
55766  # Input might be given as Windows format, start by converting to
55767  # unix format.
55768  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55769  new_path=`$CYGPATH -u "$path"`
55770
55771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55774  # "foo.exe" is OK but "foo" is an error.
55775  #
55776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55777  # It is also a way to make sure we got the proper file name for the real test later on.
55778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55779  if test "x$test_shortpath" = x; then
55780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55782    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55783  fi
55784
55785  # Call helper function which possibly converts this using DOS-style short mode.
55786  # If so, the updated path is stored in $new_path.
55787
55788  input_path="$new_path"
55789  # Check if we need to convert this using DOS-style short mode. If the path
55790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55791  # take no chances and rewrite it.
55792  # Note: m4 eats our [], so we need to use [ and ] instead.
55793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55794  if test "x$has_forbidden_chars" != x; then
55795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55799      # Going to short mode and back again did indeed matter. Since short mode is
55800      # case insensitive, let's make it lowercase to improve readability.
55801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55802      # Now convert it back to Unix-style (cygpath)
55803      input_path=`$CYGPATH -u "$shortmode_path"`
55804      new_path="$input_path"
55805    fi
55806  fi
55807
55808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55809  if test "x$test_cygdrive_prefix" = x; then
55810    # As a simple fix, exclude /usr/bin since it's not a real path.
55811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55813      # a path prefixed by /cygdrive for fixpath to work.
55814      new_path="$CYGWIN_ROOT_PATH$input_path"
55815    fi
55816  fi
55817
55818
55819  if test "x$path" != "x$new_path"; then
55820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55823  fi
55824
55825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55826
55827  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55828  has_colon=`$ECHO $path | $GREP ^.:`
55829  new_path="$path"
55830  if test "x$has_colon" = x; then
55831    # Not in mixed or Windows style, start by that.
55832    new_path=`cmd //c echo $path`
55833  fi
55834
55835
55836  input_path="$new_path"
55837  # Check if we need to convert this using DOS-style short mode. If the path
55838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55839  # take no chances and rewrite it.
55840  # Note: m4 eats our [], so we need to use [ and ] instead.
55841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55842  if test "x$has_forbidden_chars" != x; then
55843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55845  fi
55846
55847
55848  windows_path="$new_path"
55849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55850    unix_path=`$CYGPATH -u "$windows_path"`
55851    new_path="$unix_path"
55852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55854    new_path="$unix_path"
55855  fi
55856
55857  if test "x$path" != "x$new_path"; then
55858    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55860$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55861  fi
55862
55863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55865
55866    else
55867      # We're on a unix platform. Hooray! :)
55868      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55869      has_space=`$ECHO "$path" | $GREP " "`
55870      if test "x$has_space" != x; then
55871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55874      fi
55875
55876      # Use eval to expand a potential ~
55877      eval path="$path"
55878      if test ! -f "$path" && test ! -d "$path"; then
55879        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55880      fi
55881
55882      if test -d "$path"; then
55883        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55884      else
55885        dir="`$DIRNAME "$path"`"
55886        base="`$BASENAME "$path"`"
55887        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55888      fi
55889    fi
55890  fi
55891
55892
55893  # Only process if variable expands to non-empty
55894
55895  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55897
55898  # Input might be given as Windows format, start by converting to
55899  # unix format.
55900  path="$POTENTIAL_FREETYPE_LIB_PATH"
55901  new_path=`$CYGPATH -u "$path"`
55902
55903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55906  # "foo.exe" is OK but "foo" is an error.
55907  #
55908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55909  # It is also a way to make sure we got the proper file name for the real test later on.
55910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55911  if test "x$test_shortpath" = x; then
55912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55915  fi
55916
55917  # Call helper function which possibly converts this using DOS-style short mode.
55918  # If so, the updated path is stored in $new_path.
55919
55920  input_path="$new_path"
55921  # Check if we need to convert this using DOS-style short mode. If the path
55922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55923  # take no chances and rewrite it.
55924  # Note: m4 eats our [], so we need to use [ and ] instead.
55925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55926  if test "x$has_forbidden_chars" != x; then
55927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55931      # Going to short mode and back again did indeed matter. Since short mode is
55932      # case insensitive, let's make it lowercase to improve readability.
55933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55934      # Now convert it back to Unix-style (cygpath)
55935      input_path=`$CYGPATH -u "$shortmode_path"`
55936      new_path="$input_path"
55937    fi
55938  fi
55939
55940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55941  if test "x$test_cygdrive_prefix" = x; then
55942    # As a simple fix, exclude /usr/bin since it's not a real path.
55943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55945      # a path prefixed by /cygdrive for fixpath to work.
55946      new_path="$CYGWIN_ROOT_PATH$input_path"
55947    fi
55948  fi
55949
55950
55951  if test "x$path" != "x$new_path"; then
55952    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55955  fi
55956
55957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55958
55959  path="$POTENTIAL_FREETYPE_LIB_PATH"
55960  has_colon=`$ECHO $path | $GREP ^.:`
55961  new_path="$path"
55962  if test "x$has_colon" = x; then
55963    # Not in mixed or Windows style, start by that.
55964    new_path=`cmd //c echo $path`
55965  fi
55966
55967
55968  input_path="$new_path"
55969  # Check if we need to convert this using DOS-style short mode. If the path
55970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55971  # take no chances and rewrite it.
55972  # Note: m4 eats our [], so we need to use [ and ] instead.
55973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55974  if test "x$has_forbidden_chars" != x; then
55975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55977  fi
55978
55979
55980  windows_path="$new_path"
55981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55982    unix_path=`$CYGPATH -u "$windows_path"`
55983    new_path="$unix_path"
55984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55986    new_path="$unix_path"
55987  fi
55988
55989  if test "x$path" != "x$new_path"; then
55990    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55993  fi
55994
55995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55997
55998    else
55999      # We're on a unix platform. Hooray! :)
56000      path="$POTENTIAL_FREETYPE_LIB_PATH"
56001      has_space=`$ECHO "$path" | $GREP " "`
56002      if test "x$has_space" != x; then
56003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56006      fi
56007
56008      # Use eval to expand a potential ~
56009      eval path="$path"
56010      if test ! -f "$path" && test ! -d "$path"; then
56011        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56012      fi
56013
56014      if test -d "$path"; then
56015        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56016      else
56017        dir="`$DIRNAME "$path"`"
56018        base="`$BASENAME "$path"`"
56019        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56020      fi
56021    fi
56022  fi
56023
56024
56025    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56027$as_echo_n "checking for freetype includes... " >&6; }
56028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56029$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56030    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56032$as_echo_n "checking for freetype libraries... " >&6; }
56033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56034$as_echo "$FREETYPE_LIB_PATH" >&6; }
56035  fi
56036
56037          fi
56038
56039          if test "x$FOUND_FREETYPE" != xyes; then
56040            FREETYPE_BASE_DIR="$SYSROOT/usr"
56041            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56042
56043  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56044  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56045  METHOD="well-known location"
56046
56047  # Let's start with an optimistic view of the world :-)
56048  FOUND_FREETYPE=yes
56049
56050  # First look for the canonical freetype main include file ft2build.h.
56051  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56052    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56053    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56054    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56055      # Fail.
56056      FOUND_FREETYPE=no
56057    fi
56058  fi
56059
56060  if test "x$FOUND_FREETYPE" = xyes; then
56061    # Include file found, let's continue the sanity check.
56062    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56063$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56064
56065    # Reset to default value
56066    FREETYPE_BASE_NAME=freetype
56067    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56068    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56069      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56070          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56071        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56072        # for the .6 version explicitly.
56073        FREETYPE_BASE_NAME=freetype.6
56074        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56075        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56076$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56077      else
56078        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56080        FOUND_FREETYPE=no
56081      fi
56082    else
56083      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56084        # On Windows, we will need both .lib and .dll file.
56085        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56086          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56087$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56088          FOUND_FREETYPE=no
56089        fi
56090      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56091          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56092        # Found lib in isa dir, use that instead.
56093        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56094        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56095$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56096      fi
56097    fi
56098  fi
56099
56100  if test "x$FOUND_FREETYPE" = xyes; then
56101
56102  # Only process if variable expands to non-empty
56103
56104  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56106
56107  # Input might be given as Windows format, start by converting to
56108  # unix format.
56109  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56110  new_path=`$CYGPATH -u "$path"`
56111
56112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56115  # "foo.exe" is OK but "foo" is an error.
56116  #
56117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56118  # It is also a way to make sure we got the proper file name for the real test later on.
56119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56120  if test "x$test_shortpath" = x; then
56121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56123    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56124  fi
56125
56126  # Call helper function which possibly converts this using DOS-style short mode.
56127  # If so, the updated path is stored in $new_path.
56128
56129  input_path="$new_path"
56130  # Check if we need to convert this using DOS-style short mode. If the path
56131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56132  # take no chances and rewrite it.
56133  # Note: m4 eats our [], so we need to use [ and ] instead.
56134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56135  if test "x$has_forbidden_chars" != x; then
56136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56140      # Going to short mode and back again did indeed matter. Since short mode is
56141      # case insensitive, let's make it lowercase to improve readability.
56142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56143      # Now convert it back to Unix-style (cygpath)
56144      input_path=`$CYGPATH -u "$shortmode_path"`
56145      new_path="$input_path"
56146    fi
56147  fi
56148
56149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56150  if test "x$test_cygdrive_prefix" = x; then
56151    # As a simple fix, exclude /usr/bin since it's not a real path.
56152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56154      # a path prefixed by /cygdrive for fixpath to work.
56155      new_path="$CYGWIN_ROOT_PATH$input_path"
56156    fi
56157  fi
56158
56159
56160  if test "x$path" != "x$new_path"; then
56161    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56164  fi
56165
56166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56167
56168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56169  has_colon=`$ECHO $path | $GREP ^.:`
56170  new_path="$path"
56171  if test "x$has_colon" = x; then
56172    # Not in mixed or Windows style, start by that.
56173    new_path=`cmd //c echo $path`
56174  fi
56175
56176
56177  input_path="$new_path"
56178  # Check if we need to convert this using DOS-style short mode. If the path
56179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56180  # take no chances and rewrite it.
56181  # Note: m4 eats our [], so we need to use [ and ] instead.
56182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56183  if test "x$has_forbidden_chars" != x; then
56184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56186  fi
56187
56188
56189  windows_path="$new_path"
56190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56191    unix_path=`$CYGPATH -u "$windows_path"`
56192    new_path="$unix_path"
56193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56195    new_path="$unix_path"
56196  fi
56197
56198  if test "x$path" != "x$new_path"; then
56199    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56202  fi
56203
56204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56206
56207    else
56208      # We're on a unix platform. Hooray! :)
56209      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56210      has_space=`$ECHO "$path" | $GREP " "`
56211      if test "x$has_space" != x; then
56212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56215      fi
56216
56217      # Use eval to expand a potential ~
56218      eval path="$path"
56219      if test ! -f "$path" && test ! -d "$path"; then
56220        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56221      fi
56222
56223      if test -d "$path"; then
56224        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56225      else
56226        dir="`$DIRNAME "$path"`"
56227        base="`$BASENAME "$path"`"
56228        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56229      fi
56230    fi
56231  fi
56232
56233
56234  # Only process if variable expands to non-empty
56235
56236  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56238
56239  # Input might be given as Windows format, start by converting to
56240  # unix format.
56241  path="$POTENTIAL_FREETYPE_LIB_PATH"
56242  new_path=`$CYGPATH -u "$path"`
56243
56244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56247  # "foo.exe" is OK but "foo" is an error.
56248  #
56249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56250  # It is also a way to make sure we got the proper file name for the real test later on.
56251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56252  if test "x$test_shortpath" = x; then
56253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56256  fi
56257
56258  # Call helper function which possibly converts this using DOS-style short mode.
56259  # If so, the updated path is stored in $new_path.
56260
56261  input_path="$new_path"
56262  # Check if we need to convert this using DOS-style short mode. If the path
56263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56264  # take no chances and rewrite it.
56265  # Note: m4 eats our [], so we need to use [ and ] instead.
56266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56267  if test "x$has_forbidden_chars" != x; then
56268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56272      # Going to short mode and back again did indeed matter. Since short mode is
56273      # case insensitive, let's make it lowercase to improve readability.
56274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56275      # Now convert it back to Unix-style (cygpath)
56276      input_path=`$CYGPATH -u "$shortmode_path"`
56277      new_path="$input_path"
56278    fi
56279  fi
56280
56281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56282  if test "x$test_cygdrive_prefix" = x; then
56283    # As a simple fix, exclude /usr/bin since it's not a real path.
56284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56286      # a path prefixed by /cygdrive for fixpath to work.
56287      new_path="$CYGWIN_ROOT_PATH$input_path"
56288    fi
56289  fi
56290
56291
56292  if test "x$path" != "x$new_path"; then
56293    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56296  fi
56297
56298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56299
56300  path="$POTENTIAL_FREETYPE_LIB_PATH"
56301  has_colon=`$ECHO $path | $GREP ^.:`
56302  new_path="$path"
56303  if test "x$has_colon" = x; then
56304    # Not in mixed or Windows style, start by that.
56305    new_path=`cmd //c echo $path`
56306  fi
56307
56308
56309  input_path="$new_path"
56310  # Check if we need to convert this using DOS-style short mode. If the path
56311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56312  # take no chances and rewrite it.
56313  # Note: m4 eats our [], so we need to use [ and ] instead.
56314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56315  if test "x$has_forbidden_chars" != x; then
56316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56318  fi
56319
56320
56321  windows_path="$new_path"
56322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56323    unix_path=`$CYGPATH -u "$windows_path"`
56324    new_path="$unix_path"
56325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56327    new_path="$unix_path"
56328  fi
56329
56330  if test "x$path" != "x$new_path"; then
56331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56334  fi
56335
56336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56338
56339    else
56340      # We're on a unix platform. Hooray! :)
56341      path="$POTENTIAL_FREETYPE_LIB_PATH"
56342      has_space=`$ECHO "$path" | $GREP " "`
56343      if test "x$has_space" != x; then
56344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56347      fi
56348
56349      # Use eval to expand a potential ~
56350      eval path="$path"
56351      if test ! -f "$path" && test ! -d "$path"; then
56352        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56353      fi
56354
56355      if test -d "$path"; then
56356        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56357      else
56358        dir="`$DIRNAME "$path"`"
56359        base="`$BASENAME "$path"`"
56360        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56361      fi
56362    fi
56363  fi
56364
56365
56366    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56368$as_echo_n "checking for freetype includes... " >&6; }
56369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56370$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56371    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56373$as_echo_n "checking for freetype libraries... " >&6; }
56374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56375$as_echo "$FREETYPE_LIB_PATH" >&6; }
56376  fi
56377
56378            else
56379
56380  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56381  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56382  METHOD="well-known location"
56383
56384  # Let's start with an optimistic view of the world :-)
56385  FOUND_FREETYPE=yes
56386
56387  # First look for the canonical freetype main include file ft2build.h.
56388  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56389    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56390    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56391    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56392      # Fail.
56393      FOUND_FREETYPE=no
56394    fi
56395  fi
56396
56397  if test "x$FOUND_FREETYPE" = xyes; then
56398    # Include file found, let's continue the sanity check.
56399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56400$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56401
56402    # Reset to default value
56403    FREETYPE_BASE_NAME=freetype
56404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56406      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56408        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56409        # for the .6 version explicitly.
56410        FREETYPE_BASE_NAME=freetype.6
56411        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56412        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56413$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56414      else
56415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56417        FOUND_FREETYPE=no
56418      fi
56419    else
56420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56421        # On Windows, we will need both .lib and .dll file.
56422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56425          FOUND_FREETYPE=no
56426        fi
56427      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56428          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56429        # Found lib in isa dir, use that instead.
56430        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56431        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56432$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56433      fi
56434    fi
56435  fi
56436
56437  if test "x$FOUND_FREETYPE" = xyes; then
56438
56439  # Only process if variable expands to non-empty
56440
56441  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56443
56444  # Input might be given as Windows format, start by converting to
56445  # unix format.
56446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56447  new_path=`$CYGPATH -u "$path"`
56448
56449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56452  # "foo.exe" is OK but "foo" is an error.
56453  #
56454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56455  # It is also a way to make sure we got the proper file name for the real test later on.
56456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56457  if test "x$test_shortpath" = x; then
56458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56460    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56461  fi
56462
56463  # Call helper function which possibly converts this using DOS-style short mode.
56464  # If so, the updated path is stored in $new_path.
56465
56466  input_path="$new_path"
56467  # Check if we need to convert this using DOS-style short mode. If the path
56468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56469  # take no chances and rewrite it.
56470  # Note: m4 eats our [], so we need to use [ and ] instead.
56471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56472  if test "x$has_forbidden_chars" != x; then
56473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56477      # Going to short mode and back again did indeed matter. Since short mode is
56478      # case insensitive, let's make it lowercase to improve readability.
56479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56480      # Now convert it back to Unix-style (cygpath)
56481      input_path=`$CYGPATH -u "$shortmode_path"`
56482      new_path="$input_path"
56483    fi
56484  fi
56485
56486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56487  if test "x$test_cygdrive_prefix" = x; then
56488    # As a simple fix, exclude /usr/bin since it's not a real path.
56489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56491      # a path prefixed by /cygdrive for fixpath to work.
56492      new_path="$CYGWIN_ROOT_PATH$input_path"
56493    fi
56494  fi
56495
56496
56497  if test "x$path" != "x$new_path"; then
56498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56501  fi
56502
56503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56504
56505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56506  has_colon=`$ECHO $path | $GREP ^.:`
56507  new_path="$path"
56508  if test "x$has_colon" = x; then
56509    # Not in mixed or Windows style, start by that.
56510    new_path=`cmd //c echo $path`
56511  fi
56512
56513
56514  input_path="$new_path"
56515  # Check if we need to convert this using DOS-style short mode. If the path
56516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56517  # take no chances and rewrite it.
56518  # Note: m4 eats our [], so we need to use [ and ] instead.
56519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56520  if test "x$has_forbidden_chars" != x; then
56521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56523  fi
56524
56525
56526  windows_path="$new_path"
56527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56528    unix_path=`$CYGPATH -u "$windows_path"`
56529    new_path="$unix_path"
56530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56532    new_path="$unix_path"
56533  fi
56534
56535  if test "x$path" != "x$new_path"; then
56536    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56538$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56539  fi
56540
56541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56543
56544    else
56545      # We're on a unix platform. Hooray! :)
56546      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56547      has_space=`$ECHO "$path" | $GREP " "`
56548      if test "x$has_space" != x; then
56549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56552      fi
56553
56554      # Use eval to expand a potential ~
56555      eval path="$path"
56556      if test ! -f "$path" && test ! -d "$path"; then
56557        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56558      fi
56559
56560      if test -d "$path"; then
56561        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56562      else
56563        dir="`$DIRNAME "$path"`"
56564        base="`$BASENAME "$path"`"
56565        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56566      fi
56567    fi
56568  fi
56569
56570
56571  # Only process if variable expands to non-empty
56572
56573  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56575
56576  # Input might be given as Windows format, start by converting to
56577  # unix format.
56578  path="$POTENTIAL_FREETYPE_LIB_PATH"
56579  new_path=`$CYGPATH -u "$path"`
56580
56581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56584  # "foo.exe" is OK but "foo" is an error.
56585  #
56586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56587  # It is also a way to make sure we got the proper file name for the real test later on.
56588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56589  if test "x$test_shortpath" = x; then
56590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56592    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56593  fi
56594
56595  # Call helper function which possibly converts this using DOS-style short mode.
56596  # If so, the updated path is stored in $new_path.
56597
56598  input_path="$new_path"
56599  # Check if we need to convert this using DOS-style short mode. If the path
56600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56601  # take no chances and rewrite it.
56602  # Note: m4 eats our [], so we need to use [ and ] instead.
56603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56604  if test "x$has_forbidden_chars" != x; then
56605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56609      # Going to short mode and back again did indeed matter. Since short mode is
56610      # case insensitive, let's make it lowercase to improve readability.
56611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56612      # Now convert it back to Unix-style (cygpath)
56613      input_path=`$CYGPATH -u "$shortmode_path"`
56614      new_path="$input_path"
56615    fi
56616  fi
56617
56618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56619  if test "x$test_cygdrive_prefix" = x; then
56620    # As a simple fix, exclude /usr/bin since it's not a real path.
56621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56623      # a path prefixed by /cygdrive for fixpath to work.
56624      new_path="$CYGWIN_ROOT_PATH$input_path"
56625    fi
56626  fi
56627
56628
56629  if test "x$path" != "x$new_path"; then
56630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56633  fi
56634
56635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56636
56637  path="$POTENTIAL_FREETYPE_LIB_PATH"
56638  has_colon=`$ECHO $path | $GREP ^.:`
56639  new_path="$path"
56640  if test "x$has_colon" = x; then
56641    # Not in mixed or Windows style, start by that.
56642    new_path=`cmd //c echo $path`
56643  fi
56644
56645
56646  input_path="$new_path"
56647  # Check if we need to convert this using DOS-style short mode. If the path
56648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56649  # take no chances and rewrite it.
56650  # Note: m4 eats our [], so we need to use [ and ] instead.
56651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56652  if test "x$has_forbidden_chars" != x; then
56653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56655  fi
56656
56657
56658  windows_path="$new_path"
56659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56660    unix_path=`$CYGPATH -u "$windows_path"`
56661    new_path="$unix_path"
56662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56664    new_path="$unix_path"
56665  fi
56666
56667  if test "x$path" != "x$new_path"; then
56668    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56671  fi
56672
56673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56675
56676    else
56677      # We're on a unix platform. Hooray! :)
56678      path="$POTENTIAL_FREETYPE_LIB_PATH"
56679      has_space=`$ECHO "$path" | $GREP " "`
56680      if test "x$has_space" != x; then
56681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56684      fi
56685
56686      # Use eval to expand a potential ~
56687      eval path="$path"
56688      if test ! -f "$path" && test ! -d "$path"; then
56689        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56690      fi
56691
56692      if test -d "$path"; then
56693        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56694      else
56695        dir="`$DIRNAME "$path"`"
56696        base="`$BASENAME "$path"`"
56697        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56698      fi
56699    fi
56700  fi
56701
56702
56703    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56705$as_echo_n "checking for freetype includes... " >&6; }
56706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56707$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56708    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56710$as_echo_n "checking for freetype libraries... " >&6; }
56711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56712$as_echo "$FREETYPE_LIB_PATH" >&6; }
56713  fi
56714
56715              if test "x$FOUND_FREETYPE" != xyes; then
56716
56717  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56718  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56719  METHOD="well-known location"
56720
56721  # Let's start with an optimistic view of the world :-)
56722  FOUND_FREETYPE=yes
56723
56724  # First look for the canonical freetype main include file ft2build.h.
56725  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56726    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56727    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56728    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56729      # Fail.
56730      FOUND_FREETYPE=no
56731    fi
56732  fi
56733
56734  if test "x$FOUND_FREETYPE" = xyes; then
56735    # Include file found, let's continue the sanity check.
56736    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56737$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56738
56739    # Reset to default value
56740    FREETYPE_BASE_NAME=freetype
56741    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56742    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56743      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56744          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56745        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56746        # for the .6 version explicitly.
56747        FREETYPE_BASE_NAME=freetype.6
56748        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56749        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56750$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56751      else
56752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56754        FOUND_FREETYPE=no
56755      fi
56756    else
56757      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56758        # On Windows, we will need both .lib and .dll file.
56759        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56760          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56761$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56762          FOUND_FREETYPE=no
56763        fi
56764      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56765          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56766        # Found lib in isa dir, use that instead.
56767        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56768        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56769$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56770      fi
56771    fi
56772  fi
56773
56774  if test "x$FOUND_FREETYPE" = xyes; then
56775
56776  # Only process if variable expands to non-empty
56777
56778  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56780
56781  # Input might be given as Windows format, start by converting to
56782  # unix format.
56783  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56784  new_path=`$CYGPATH -u "$path"`
56785
56786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56789  # "foo.exe" is OK but "foo" is an error.
56790  #
56791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56792  # It is also a way to make sure we got the proper file name for the real test later on.
56793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56794  if test "x$test_shortpath" = x; then
56795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56797    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56798  fi
56799
56800  # Call helper function which possibly converts this using DOS-style short mode.
56801  # If so, the updated path is stored in $new_path.
56802
56803  input_path="$new_path"
56804  # Check if we need to convert this using DOS-style short mode. If the path
56805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56806  # take no chances and rewrite it.
56807  # Note: m4 eats our [], so we need to use [ and ] instead.
56808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56809  if test "x$has_forbidden_chars" != x; then
56810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56814      # Going to short mode and back again did indeed matter. Since short mode is
56815      # case insensitive, let's make it lowercase to improve readability.
56816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56817      # Now convert it back to Unix-style (cygpath)
56818      input_path=`$CYGPATH -u "$shortmode_path"`
56819      new_path="$input_path"
56820    fi
56821  fi
56822
56823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56824  if test "x$test_cygdrive_prefix" = x; then
56825    # As a simple fix, exclude /usr/bin since it's not a real path.
56826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56828      # a path prefixed by /cygdrive for fixpath to work.
56829      new_path="$CYGWIN_ROOT_PATH$input_path"
56830    fi
56831  fi
56832
56833
56834  if test "x$path" != "x$new_path"; then
56835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56838  fi
56839
56840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56841
56842  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56843  has_colon=`$ECHO $path | $GREP ^.:`
56844  new_path="$path"
56845  if test "x$has_colon" = x; then
56846    # Not in mixed or Windows style, start by that.
56847    new_path=`cmd //c echo $path`
56848  fi
56849
56850
56851  input_path="$new_path"
56852  # Check if we need to convert this using DOS-style short mode. If the path
56853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56854  # take no chances and rewrite it.
56855  # Note: m4 eats our [], so we need to use [ and ] instead.
56856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56857  if test "x$has_forbidden_chars" != x; then
56858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56860  fi
56861
56862
56863  windows_path="$new_path"
56864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56865    unix_path=`$CYGPATH -u "$windows_path"`
56866    new_path="$unix_path"
56867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56869    new_path="$unix_path"
56870  fi
56871
56872  if test "x$path" != "x$new_path"; then
56873    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56876  fi
56877
56878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56880
56881    else
56882      # We're on a unix platform. Hooray! :)
56883      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56884      has_space=`$ECHO "$path" | $GREP " "`
56885      if test "x$has_space" != x; then
56886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56889      fi
56890
56891      # Use eval to expand a potential ~
56892      eval path="$path"
56893      if test ! -f "$path" && test ! -d "$path"; then
56894        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56895      fi
56896
56897      if test -d "$path"; then
56898        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56899      else
56900        dir="`$DIRNAME "$path"`"
56901        base="`$BASENAME "$path"`"
56902        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56903      fi
56904    fi
56905  fi
56906
56907
56908  # Only process if variable expands to non-empty
56909
56910  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56912
56913  # Input might be given as Windows format, start by converting to
56914  # unix format.
56915  path="$POTENTIAL_FREETYPE_LIB_PATH"
56916  new_path=`$CYGPATH -u "$path"`
56917
56918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56921  # "foo.exe" is OK but "foo" is an error.
56922  #
56923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56924  # It is also a way to make sure we got the proper file name for the real test later on.
56925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56926  if test "x$test_shortpath" = x; then
56927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56928$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56929    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56930  fi
56931
56932  # Call helper function which possibly converts this using DOS-style short mode.
56933  # If so, the updated path is stored in $new_path.
56934
56935  input_path="$new_path"
56936  # Check if we need to convert this using DOS-style short mode. If the path
56937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56938  # take no chances and rewrite it.
56939  # Note: m4 eats our [], so we need to use [ and ] instead.
56940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56941  if test "x$has_forbidden_chars" != x; then
56942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56946      # Going to short mode and back again did indeed matter. Since short mode is
56947      # case insensitive, let's make it lowercase to improve readability.
56948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56949      # Now convert it back to Unix-style (cygpath)
56950      input_path=`$CYGPATH -u "$shortmode_path"`
56951      new_path="$input_path"
56952    fi
56953  fi
56954
56955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56956  if test "x$test_cygdrive_prefix" = x; then
56957    # As a simple fix, exclude /usr/bin since it's not a real path.
56958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56960      # a path prefixed by /cygdrive for fixpath to work.
56961      new_path="$CYGWIN_ROOT_PATH$input_path"
56962    fi
56963  fi
56964
56965
56966  if test "x$path" != "x$new_path"; then
56967    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56970  fi
56971
56972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56973
56974  path="$POTENTIAL_FREETYPE_LIB_PATH"
56975  has_colon=`$ECHO $path | $GREP ^.:`
56976  new_path="$path"
56977  if test "x$has_colon" = x; then
56978    # Not in mixed or Windows style, start by that.
56979    new_path=`cmd //c echo $path`
56980  fi
56981
56982
56983  input_path="$new_path"
56984  # Check if we need to convert this using DOS-style short mode. If the path
56985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56986  # take no chances and rewrite it.
56987  # Note: m4 eats our [], so we need to use [ and ] instead.
56988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56989  if test "x$has_forbidden_chars" != x; then
56990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56992  fi
56993
56994
56995  windows_path="$new_path"
56996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56997    unix_path=`$CYGPATH -u "$windows_path"`
56998    new_path="$unix_path"
56999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57001    new_path="$unix_path"
57002  fi
57003
57004  if test "x$path" != "x$new_path"; then
57005    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57008  fi
57009
57010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57012
57013    else
57014      # We're on a unix platform. Hooray! :)
57015      path="$POTENTIAL_FREETYPE_LIB_PATH"
57016      has_space=`$ECHO "$path" | $GREP " "`
57017      if test "x$has_space" != x; then
57018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57021      fi
57022
57023      # Use eval to expand a potential ~
57024      eval path="$path"
57025      if test ! -f "$path" && test ! -d "$path"; then
57026        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57027      fi
57028
57029      if test -d "$path"; then
57030        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57031      else
57032        dir="`$DIRNAME "$path"`"
57033        base="`$BASENAME "$path"`"
57034        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57035      fi
57036    fi
57037  fi
57038
57039
57040    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57042$as_echo_n "checking for freetype includes... " >&6; }
57043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57044$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57045    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57047$as_echo_n "checking for freetype libraries... " >&6; }
57048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57049$as_echo "$FREETYPE_LIB_PATH" >&6; }
57050  fi
57051
57052              fi
57053            fi
57054          fi
57055        fi
57056      fi # end check in well-known locations
57057
57058      if test "x$FOUND_FREETYPE" != xyes; then
57059
57060  # Print a helpful message on how to acquire the necessary build dependency.
57061  # freetype is the help tag: freetype, cups, alsa etc
57062  MISSING_DEPENDENCY=freetype
57063
57064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57065    cygwin_help $MISSING_DEPENDENCY
57066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57067    msys_help $MISSING_DEPENDENCY
57068  else
57069    PKGHANDLER_COMMAND=
57070
57071    case $PKGHANDLER in
57072      apt-get)
57073        apt_help     $MISSING_DEPENDENCY ;;
57074      yum)
57075        yum_help     $MISSING_DEPENDENCY ;;
57076      port)
57077        port_help    $MISSING_DEPENDENCY ;;
57078      pkgutil)
57079        pkgutil_help $MISSING_DEPENDENCY ;;
57080      pkgadd)
57081        pkgadd_help  $MISSING_DEPENDENCY ;;
57082    esac
57083
57084    if test "x$PKGHANDLER_COMMAND" != x; then
57085      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57086    fi
57087  fi
57088
57089        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57090      fi
57091    fi # end user specified settings
57092
57093    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57094    if test "x$FREETYPE_CFLAGS" = x; then
57095
57096  # Only process if variable expands to non-empty
57097
57098  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57100
57101  # Input might be given as Windows format, start by converting to
57102  # unix format.
57103  path="$FREETYPE_INCLUDE_PATH"
57104  new_path=`$CYGPATH -u "$path"`
57105
57106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57109  # "foo.exe" is OK but "foo" is an error.
57110  #
57111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57112  # It is also a way to make sure we got the proper file name for the real test later on.
57113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57114  if test "x$test_shortpath" = x; then
57115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57116$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57117    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57118  fi
57119
57120  # Call helper function which possibly converts this using DOS-style short mode.
57121  # If so, the updated path is stored in $new_path.
57122
57123  input_path="$new_path"
57124  # Check if we need to convert this using DOS-style short mode. If the path
57125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57126  # take no chances and rewrite it.
57127  # Note: m4 eats our [], so we need to use [ and ] instead.
57128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57129  if test "x$has_forbidden_chars" != x; then
57130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57134      # Going to short mode and back again did indeed matter. Since short mode is
57135      # case insensitive, let's make it lowercase to improve readability.
57136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57137      # Now convert it back to Unix-style (cygpath)
57138      input_path=`$CYGPATH -u "$shortmode_path"`
57139      new_path="$input_path"
57140    fi
57141  fi
57142
57143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57144  if test "x$test_cygdrive_prefix" = x; then
57145    # As a simple fix, exclude /usr/bin since it's not a real path.
57146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57148      # a path prefixed by /cygdrive for fixpath to work.
57149      new_path="$CYGWIN_ROOT_PATH$input_path"
57150    fi
57151  fi
57152
57153
57154  if test "x$path" != "x$new_path"; then
57155    FREETYPE_INCLUDE_PATH="$new_path"
57156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57157$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57158  fi
57159
57160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57161
57162  path="$FREETYPE_INCLUDE_PATH"
57163  has_colon=`$ECHO $path | $GREP ^.:`
57164  new_path="$path"
57165  if test "x$has_colon" = x; then
57166    # Not in mixed or Windows style, start by that.
57167    new_path=`cmd //c echo $path`
57168  fi
57169
57170
57171  input_path="$new_path"
57172  # Check if we need to convert this using DOS-style short mode. If the path
57173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57174  # take no chances and rewrite it.
57175  # Note: m4 eats our [], so we need to use [ and ] instead.
57176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57177  if test "x$has_forbidden_chars" != x; then
57178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57180  fi
57181
57182
57183  windows_path="$new_path"
57184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57185    unix_path=`$CYGPATH -u "$windows_path"`
57186    new_path="$unix_path"
57187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57189    new_path="$unix_path"
57190  fi
57191
57192  if test "x$path" != "x$new_path"; then
57193    FREETYPE_INCLUDE_PATH="$new_path"
57194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57195$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57196  fi
57197
57198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57200
57201    else
57202      # We're on a unix platform. Hooray! :)
57203      path="$FREETYPE_INCLUDE_PATH"
57204      has_space=`$ECHO "$path" | $GREP " "`
57205      if test "x$has_space" != x; then
57206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57207$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57209      fi
57210
57211      # Use eval to expand a potential ~
57212      eval path="$path"
57213      if test ! -f "$path" && test ! -d "$path"; then
57214        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57215      fi
57216
57217      if test -d "$path"; then
57218        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57219      else
57220        dir="`$DIRNAME "$path"`"
57221        base="`$BASENAME "$path"`"
57222        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57223      fi
57224    fi
57225  fi
57226
57227      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57228        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57229      else
57230        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57231      fi
57232    fi
57233
57234    if test "x$FREETYPE_LIBS" = x; then
57235
57236  # Only process if variable expands to non-empty
57237
57238  if test "x$FREETYPE_LIB_PATH" != x; then
57239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57240
57241  # Input might be given as Windows format, start by converting to
57242  # unix format.
57243  path="$FREETYPE_LIB_PATH"
57244  new_path=`$CYGPATH -u "$path"`
57245
57246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57249  # "foo.exe" is OK but "foo" is an error.
57250  #
57251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57252  # It is also a way to make sure we got the proper file name for the real test later on.
57253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57254  if test "x$test_shortpath" = x; then
57255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57256$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57257    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57258  fi
57259
57260  # Call helper function which possibly converts this using DOS-style short mode.
57261  # If so, the updated path is stored in $new_path.
57262
57263  input_path="$new_path"
57264  # Check if we need to convert this using DOS-style short mode. If the path
57265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57266  # take no chances and rewrite it.
57267  # Note: m4 eats our [], so we need to use [ and ] instead.
57268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57269  if test "x$has_forbidden_chars" != x; then
57270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57274      # Going to short mode and back again did indeed matter. Since short mode is
57275      # case insensitive, let's make it lowercase to improve readability.
57276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57277      # Now convert it back to Unix-style (cygpath)
57278      input_path=`$CYGPATH -u "$shortmode_path"`
57279      new_path="$input_path"
57280    fi
57281  fi
57282
57283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57284  if test "x$test_cygdrive_prefix" = x; then
57285    # As a simple fix, exclude /usr/bin since it's not a real path.
57286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57288      # a path prefixed by /cygdrive for fixpath to work.
57289      new_path="$CYGWIN_ROOT_PATH$input_path"
57290    fi
57291  fi
57292
57293
57294  if test "x$path" != "x$new_path"; then
57295    FREETYPE_LIB_PATH="$new_path"
57296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57297$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57298  fi
57299
57300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57301
57302  path="$FREETYPE_LIB_PATH"
57303  has_colon=`$ECHO $path | $GREP ^.:`
57304  new_path="$path"
57305  if test "x$has_colon" = x; then
57306    # Not in mixed or Windows style, start by that.
57307    new_path=`cmd //c echo $path`
57308  fi
57309
57310
57311  input_path="$new_path"
57312  # Check if we need to convert this using DOS-style short mode. If the path
57313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57314  # take no chances and rewrite it.
57315  # Note: m4 eats our [], so we need to use [ and ] instead.
57316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57317  if test "x$has_forbidden_chars" != x; then
57318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57320  fi
57321
57322
57323  windows_path="$new_path"
57324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57325    unix_path=`$CYGPATH -u "$windows_path"`
57326    new_path="$unix_path"
57327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57329    new_path="$unix_path"
57330  fi
57331
57332  if test "x$path" != "x$new_path"; then
57333    FREETYPE_LIB_PATH="$new_path"
57334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57335$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57336  fi
57337
57338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57340
57341    else
57342      # We're on a unix platform. Hooray! :)
57343      path="$FREETYPE_LIB_PATH"
57344      has_space=`$ECHO "$path" | $GREP " "`
57345      if test "x$has_space" != x; then
57346        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57347$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57348        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57349      fi
57350
57351      # Use eval to expand a potential ~
57352      eval path="$path"
57353      if test ! -f "$path" && test ! -d "$path"; then
57354        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57355      fi
57356
57357      if test -d "$path"; then
57358        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57359      else
57360        dir="`$DIRNAME "$path"`"
57361        base="`$BASENAME "$path"`"
57362        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57363      fi
57364    fi
57365  fi
57366
57367      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57368        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57369      else
57370        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57371      fi
57372    fi
57373
57374    # Try to compile it
57375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57376$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57377    ac_ext=cpp
57378ac_cpp='$CXXCPP $CPPFLAGS'
57379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57382
57383    PREV_CXXCFLAGS="$CXXFLAGS"
57384    PREV_LIBS="$LIBS"
57385    PREV_CXX="$CXX"
57386    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57387    LIBS="$LIBS $FREETYPE_LIBS"
57388    CXX="$FIXPATH $CXX"
57389    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57390/* end confdefs.h.  */
57391
57392          #include<ft2build.h>
57393          #include FT_FREETYPE_H
57394          int main () {
57395            FT_Init_FreeType(NULL);
57396            return 0;
57397          }
57398
57399_ACEOF
57400if ac_fn_cxx_try_link "$LINENO"; then :
57401
57402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57403$as_echo "yes" >&6; }
57404
57405else
57406
57407          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57408$as_echo "no" >&6; }
57409          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57410$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57411          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57412$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57413
57414
57415  # Print a helpful message on how to acquire the necessary build dependency.
57416  # freetype is the help tag: freetype, cups, alsa etc
57417  MISSING_DEPENDENCY=freetype
57418
57419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57420    cygwin_help $MISSING_DEPENDENCY
57421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57422    msys_help $MISSING_DEPENDENCY
57423  else
57424    PKGHANDLER_COMMAND=
57425
57426    case $PKGHANDLER in
57427      apt-get)
57428        apt_help     $MISSING_DEPENDENCY ;;
57429      yum)
57430        yum_help     $MISSING_DEPENDENCY ;;
57431      port)
57432        port_help    $MISSING_DEPENDENCY ;;
57433      pkgutil)
57434        pkgutil_help $MISSING_DEPENDENCY ;;
57435      pkgadd)
57436        pkgadd_help  $MISSING_DEPENDENCY ;;
57437    esac
57438
57439    if test "x$PKGHANDLER_COMMAND" != x; then
57440      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57441    fi
57442  fi
57443
57444
57445          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57446
57447
57448fi
57449rm -f core conftest.err conftest.$ac_objext \
57450    conftest$ac_exeext conftest.$ac_ext
57451    CXXCFLAGS="$PREV_CXXFLAGS"
57452    LIBS="$PREV_LIBS"
57453    CXX="$PREV_CXX"
57454    ac_ext=cpp
57455ac_cpp='$CXXCPP $CPPFLAGS'
57456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57459
57460
57461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57462$as_echo_n "checking if we should bundle freetype... " >&6; }
57463    if test "x$BUNDLE_FREETYPE" = xyes; then
57464      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57465    fi
57466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57467$as_echo "$BUNDLE_FREETYPE" >&6; }
57468
57469  fi # end freetype needed
57470
57471
57472
57473
57474
57475
57476
57477# Check whether --with-alsa was given.
57478if test "${with_alsa+set}" = set; then :
57479  withval=$with_alsa;
57480fi
57481
57482
57483# Check whether --with-alsa-include was given.
57484if test "${with_alsa_include+set}" = set; then :
57485  withval=$with_alsa_include;
57486fi
57487
57488
57489# Check whether --with-alsa-lib was given.
57490if test "${with_alsa_lib+set}" = set; then :
57491  withval=$with_alsa_lib;
57492fi
57493
57494
57495  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57496    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57497        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57498        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57499      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57500$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57501    fi
57502    ALSA_CFLAGS=
57503    ALSA_LIBS=
57504  else
57505    ALSA_FOUND=no
57506
57507    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57508      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57509    fi
57510
57511    if test "x${with_alsa}" != x; then
57512      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57513      ALSA_CFLAGS="-I${with_alsa}/include"
57514      ALSA_FOUND=yes
57515    fi
57516    if test "x${with_alsa_include}" != x; then
57517      ALSA_CFLAGS="-I${with_alsa_include}"
57518      ALSA_FOUND=yes
57519    fi
57520    if test "x${with_alsa_lib}" != x; then
57521      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57522      ALSA_FOUND=yes
57523    fi
57524    # Do not try pkg-config if we have a sysroot set.
57525    if test "x$SYSROOT" = x; then
57526      if test "x$ALSA_FOUND" = xno; then
57527
57528pkg_failed=no
57529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57530$as_echo_n "checking for ALSA... " >&6; }
57531
57532if test -n "$ALSA_CFLAGS"; then
57533    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57534 elif test -n "$PKG_CONFIG"; then
57535    if test -n "$PKG_CONFIG" && \
57536    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57537  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57538  ac_status=$?
57539  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57540  test $ac_status = 0; }; then
57541  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57542else
57543  pkg_failed=yes
57544fi
57545 else
57546    pkg_failed=untried
57547fi
57548if test -n "$ALSA_LIBS"; then
57549    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57550 elif test -n "$PKG_CONFIG"; then
57551    if test -n "$PKG_CONFIG" && \
57552    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57553  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57554  ac_status=$?
57555  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57556  test $ac_status = 0; }; then
57557  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57558else
57559  pkg_failed=yes
57560fi
57561 else
57562    pkg_failed=untried
57563fi
57564
57565
57566
57567if test $pkg_failed = yes; then
57568
57569if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57570        _pkg_short_errors_supported=yes
57571else
57572        _pkg_short_errors_supported=no
57573fi
57574        if test $_pkg_short_errors_supported = yes; then
57575	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57576        else
57577	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57578        fi
57579	# Put the nasty error message in config.log where it belongs
57580	echo "$ALSA_PKG_ERRORS" >&5
57581
57582	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57583$as_echo "no" >&6; }
57584                ALSA_FOUND=no
57585elif test $pkg_failed = untried; then
57586	ALSA_FOUND=no
57587else
57588	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57589	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57591$as_echo "yes" >&6; }
57592	ALSA_FOUND=yes
57593fi
57594      fi
57595    fi
57596    if test "x$ALSA_FOUND" = xno; then
57597      for ac_header in alsa/asoundlib.h
57598do :
57599  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57600if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57601  cat >>confdefs.h <<_ACEOF
57602#define HAVE_ALSA_ASOUNDLIB_H 1
57603_ACEOF
57604
57605            ALSA_FOUND=yes
57606            ALSA_CFLAGS=-Iignoreme
57607            ALSA_LIBS=-lasound
57608            DEFAULT_ALSA=yes
57609
57610else
57611  ALSA_FOUND=no
57612
57613fi
57614
57615done
57616
57617    fi
57618    if test "x$ALSA_FOUND" = xno; then
57619
57620  # Print a helpful message on how to acquire the necessary build dependency.
57621  # alsa is the help tag: freetype, cups, alsa etc
57622  MISSING_DEPENDENCY=alsa
57623
57624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57625    cygwin_help $MISSING_DEPENDENCY
57626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57627    msys_help $MISSING_DEPENDENCY
57628  else
57629    PKGHANDLER_COMMAND=
57630
57631    case $PKGHANDLER in
57632      apt-get)
57633        apt_help     $MISSING_DEPENDENCY ;;
57634      yum)
57635        yum_help     $MISSING_DEPENDENCY ;;
57636      port)
57637        port_help    $MISSING_DEPENDENCY ;;
57638      pkgutil)
57639        pkgutil_help $MISSING_DEPENDENCY ;;
57640      pkgadd)
57641        pkgadd_help  $MISSING_DEPENDENCY ;;
57642    esac
57643
57644    if test "x$PKGHANDLER_COMMAND" != x; then
57645      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57646    fi
57647  fi
57648
57649      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57650    fi
57651  fi
57652
57653
57654
57655
57656
57657
57658# Check whether --with-libffi was given.
57659if test "${with_libffi+set}" = set; then :
57660  withval=$with_libffi;
57661fi
57662
57663
57664# Check whether --with-libffi-include was given.
57665if test "${with_libffi_include+set}" = set; then :
57666  withval=$with_libffi_include;
57667fi
57668
57669
57670# Check whether --with-libffi-lib was given.
57671if test "${with_libffi_lib+set}" = set; then :
57672  withval=$with_libffi_lib;
57673fi
57674
57675
57676  if test "x$NEEDS_LIB_FFI" = xfalse; then
57677    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57678        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57679        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57680      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57681$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57682    fi
57683    LIBFFI_CFLAGS=
57684    LIBFFI_LIBS=
57685  else
57686    LIBFFI_FOUND=no
57687
57688    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57689      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57690    fi
57691
57692    if test "x${with_libffi}" != x; then
57693      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57694      LIBFFI_CFLAGS="-I${with_libffi}/include"
57695      LIBFFI_FOUND=yes
57696    fi
57697    if test "x${with_libffi_include}" != x; then
57698      LIBFFI_CFLAGS="-I${with_libffi_include}"
57699      LIBFFI_FOUND=yes
57700    fi
57701    if test "x${with_libffi_lib}" != x; then
57702      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57703      LIBFFI_FOUND=yes
57704    fi
57705    # Do not try pkg-config if we have a sysroot set.
57706    if test "x$SYSROOT" = x; then
57707      if test "x$LIBFFI_FOUND" = xno; then
57708        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57709
57710pkg_failed=no
57711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57712$as_echo_n "checking for LIBFFI... " >&6; }
57713
57714if test -n "$LIBFFI_CFLAGS"; then
57715    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57716 elif test -n "$PKG_CONFIG"; then
57717    if test -n "$PKG_CONFIG" && \
57718    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57719  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57720  ac_status=$?
57721  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57722  test $ac_status = 0; }; then
57723  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57724else
57725  pkg_failed=yes
57726fi
57727 else
57728    pkg_failed=untried
57729fi
57730if test -n "$LIBFFI_LIBS"; then
57731    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57732 elif test -n "$PKG_CONFIG"; then
57733    if test -n "$PKG_CONFIG" && \
57734    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57735  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57736  ac_status=$?
57737  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57738  test $ac_status = 0; }; then
57739  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57740else
57741  pkg_failed=yes
57742fi
57743 else
57744    pkg_failed=untried
57745fi
57746
57747
57748
57749if test $pkg_failed = yes; then
57750
57751if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57752        _pkg_short_errors_supported=yes
57753else
57754        _pkg_short_errors_supported=no
57755fi
57756        if test $_pkg_short_errors_supported = yes; then
57757	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57758        else
57759	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57760        fi
57761	# Put the nasty error message in config.log where it belongs
57762	echo "$LIBFFI_PKG_ERRORS" >&5
57763
57764	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57765$as_echo "no" >&6; }
57766                LIBFFI_FOUND=no
57767elif test $pkg_failed = untried; then
57768	LIBFFI_FOUND=no
57769else
57770	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57771	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57773$as_echo "yes" >&6; }
57774	LIBFFI_FOUND=yes
57775fi
57776      fi
57777    fi
57778    if test "x$LIBFFI_FOUND" = xno; then
57779      for ac_header in ffi.h
57780do :
57781  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57782if test "x$ac_cv_header_ffi_h" = xyes; then :
57783  cat >>confdefs.h <<_ACEOF
57784#define HAVE_FFI_H 1
57785_ACEOF
57786
57787            LIBFFI_FOUND=yes
57788            LIBFFI_CFLAGS=
57789            LIBFFI_LIBS=-lffi
57790
57791else
57792  LIBFFI_FOUND=no
57793
57794fi
57795
57796done
57797
57798    fi
57799    if test "x$LIBFFI_FOUND" = xno; then
57800
57801  # Print a helpful message on how to acquire the necessary build dependency.
57802  # ffi is the help tag: freetype, cups, alsa etc
57803  MISSING_DEPENDENCY=ffi
57804
57805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57806    cygwin_help $MISSING_DEPENDENCY
57807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57808    msys_help $MISSING_DEPENDENCY
57809  else
57810    PKGHANDLER_COMMAND=
57811
57812    case $PKGHANDLER in
57813      apt-get)
57814        apt_help     $MISSING_DEPENDENCY ;;
57815      yum)
57816        yum_help     $MISSING_DEPENDENCY ;;
57817      port)
57818        port_help    $MISSING_DEPENDENCY ;;
57819      pkgutil)
57820        pkgutil_help $MISSING_DEPENDENCY ;;
57821      pkgadd)
57822        pkgadd_help  $MISSING_DEPENDENCY ;;
57823    esac
57824
57825    if test "x$PKGHANDLER_COMMAND" != x; then
57826      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57827    fi
57828  fi
57829
57830      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
57831    fi
57832
57833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
57834$as_echo_n "checking if libffi works... " >&6; }
57835    ac_ext=c
57836ac_cpp='$CPP $CPPFLAGS'
57837ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57838ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57839ac_compiler_gnu=$ac_cv_c_compiler_gnu
57840
57841    OLD_CFLAGS="$CFLAGS"
57842    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
57843    OLD_LIBS="$LIBS"
57844    LIBS="$LIBS $LIBFFI_LIBS"
57845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57846/* end confdefs.h.  */
57847#include <ffi.h>
57848int
57849main ()
57850{
57851
57852          ffi_call(NULL, NULL, NULL, NULL);
57853          return 0;
57854
57855  ;
57856  return 0;
57857}
57858_ACEOF
57859if ac_fn_c_try_link "$LINENO"; then :
57860  LIBFFI_WORKS=yes
57861else
57862  LIBFFI_WORKS=no
57863
57864fi
57865rm -f core conftest.err conftest.$ac_objext \
57866    conftest$ac_exeext conftest.$ac_ext
57867    CFLAGS="$OLD_CFLAGS"
57868    LIBS="$OLD_LIBS"
57869    ac_ext=cpp
57870ac_cpp='$CXXCPP $CPPFLAGS'
57871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57874
57875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
57876$as_echo "$LIBFFI_WORKS" >&6; }
57877
57878    if test "x$LIBFFI_WORKS" = xno; then
57879
57880  # Print a helpful message on how to acquire the necessary build dependency.
57881  # ffi is the help tag: freetype, cups, alsa etc
57882  MISSING_DEPENDENCY=ffi
57883
57884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57885    cygwin_help $MISSING_DEPENDENCY
57886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57887    msys_help $MISSING_DEPENDENCY
57888  else
57889    PKGHANDLER_COMMAND=
57890
57891    case $PKGHANDLER in
57892      apt-get)
57893        apt_help     $MISSING_DEPENDENCY ;;
57894      yum)
57895        yum_help     $MISSING_DEPENDENCY ;;
57896      port)
57897        port_help    $MISSING_DEPENDENCY ;;
57898      pkgutil)
57899        pkgutil_help $MISSING_DEPENDENCY ;;
57900      pkgadd)
57901        pkgadd_help  $MISSING_DEPENDENCY ;;
57902    esac
57903
57904    if test "x$PKGHANDLER_COMMAND" != x; then
57905      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57906    fi
57907  fi
57908
57909      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
57910    fi
57911  fi
57912
57913
57914
57915
57916
57917  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
57918    # Extract the first word of "llvm-config", so it can be a program name with args.
57919set dummy llvm-config; ac_word=$2
57920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57921$as_echo_n "checking for $ac_word... " >&6; }
57922if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
57923  $as_echo_n "(cached) " >&6
57924else
57925  if test -n "$LLVM_CONFIG"; then
57926  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
57927else
57928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57929for as_dir in $PATH
57930do
57931  IFS=$as_save_IFS
57932  test -z "$as_dir" && as_dir=.
57933    for ac_exec_ext in '' $ac_executable_extensions; do
57934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57935    ac_cv_prog_LLVM_CONFIG="llvm-config"
57936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57937    break 2
57938  fi
57939done
57940  done
57941IFS=$as_save_IFS
57942
57943fi
57944fi
57945LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
57946if test -n "$LLVM_CONFIG"; then
57947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
57948$as_echo "$LLVM_CONFIG" >&6; }
57949else
57950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57951$as_echo "no" >&6; }
57952fi
57953
57954
57955
57956    if test "x$LLVM_CONFIG" != xllvm-config; then
57957      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
57958    fi
57959
57960    llvm_components="jit mcjit engine nativecodegen native"
57961    unset LLVM_CFLAGS
57962    for flag in $("$LLVM_CONFIG" --cxxflags); do
57963      if echo "${flag}" | grep -q '^-[ID]'; then
57964        if test "${flag}" != "-D_DEBUG" ; then
57965          if test "${LLVM_CFLAGS}" != "" ; then
57966            LLVM_CFLAGS="${LLVM_CFLAGS} "
57967          fi
57968          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
57969        fi
57970      fi
57971    done
57972    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
57973    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
57974
57975    unset LLVM_LDFLAGS
57976    for flag in $("${LLVM_CONFIG}" --ldflags); do
57977      if echo "${flag}" | grep -q '^-L'; then
57978        if test "${LLVM_LDFLAGS}" != ""; then
57979          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
57980        fi
57981        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
57982      fi
57983    done
57984
57985    unset LLVM_LIBS
57986    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
57987      if echo "${flag}" | grep -q '^-l'; then
57988        if test "${LLVM_LIBS}" != ""; then
57989          LLVM_LIBS="${LLVM_LIBS} "
57990        fi
57991        LLVM_LIBS="${LLVM_LIBS}${flag}"
57992      fi
57993    done
57994
57995    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
57996    # always properly detect -ltinfo
57997    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
57998
57999
58000
58001
58002  fi
58003
58004
58005
58006# Check whether --with-libjpeg was given.
58007if test "${with_libjpeg+set}" = set; then :
58008  withval=$with_libjpeg;
58009fi
58010
58011
58012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58013$as_echo_n "checking for which libjpeg to use... " >&6; }
58014  # default is bundled
58015  DEFAULT_LIBJPEG=bundled
58016  # if user didn't specify, use DEFAULT_LIBJPEG
58017  if test "x${with_libjpeg}" = "x"; then
58018    with_libjpeg=${DEFAULT_LIBJPEG}
58019  fi
58020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58021$as_echo "${with_libjpeg}" >&6; }
58022
58023  if test "x${with_libjpeg}" = "xbundled"; then
58024    USE_EXTERNAL_LIBJPEG=false
58025  elif test "x${with_libjpeg}" = "xsystem"; then
58026    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58027if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58028
58029else
58030   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58031fi
58032
58033
58034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58035$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58036if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58037  $as_echo_n "(cached) " >&6
58038else
58039  ac_check_lib_save_LIBS=$LIBS
58040LIBS="-ljpeg  $LIBS"
58041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58042/* end confdefs.h.  */
58043
58044/* Override any GCC internal prototype to avoid an error.
58045   Use char because int might match the return type of a GCC
58046   builtin and then its argument prototype would still apply.  */
58047#ifdef __cplusplus
58048extern "C"
58049#endif
58050char jpeg_CreateDecompress ();
58051int
58052main ()
58053{
58054return jpeg_CreateDecompress ();
58055  ;
58056  return 0;
58057}
58058_ACEOF
58059if ac_fn_cxx_try_link "$LINENO"; then :
58060  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58061else
58062  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58063fi
58064rm -f core conftest.err conftest.$ac_objext \
58065    conftest$ac_exeext conftest.$ac_ext
58066LIBS=$ac_check_lib_save_LIBS
58067fi
58068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58069$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58070if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58071  cat >>confdefs.h <<_ACEOF
58072#define HAVE_LIBJPEG 1
58073_ACEOF
58074
58075  LIBS="-ljpeg $LIBS"
58076
58077else
58078   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58079fi
58080
58081
58082    USE_EXTERNAL_LIBJPEG=true
58083  else
58084    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58085  fi
58086
58087
58088
58089
58090
58091# Check whether --with-giflib was given.
58092if test "${with_giflib+set}" = set; then :
58093  withval=$with_giflib;
58094fi
58095
58096
58097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58098$as_echo_n "checking for which giflib to use... " >&6; }
58099  # default is bundled
58100  DEFAULT_GIFLIB=bundled
58101  # if user didn't specify, use DEFAULT_GIFLIB
58102  if test "x${with_giflib}" = "x"; then
58103    with_giflib=${DEFAULT_GIFLIB}
58104  fi
58105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58106$as_echo "${with_giflib}" >&6; }
58107
58108  if test "x${with_giflib}" = "xbundled"; then
58109    USE_EXTERNAL_LIBGIF=false
58110  elif test "x${with_giflib}" = "xsystem"; then
58111    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58112if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58113
58114else
58115   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58116fi
58117
58118
58119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58120$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58121if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58122  $as_echo_n "(cached) " >&6
58123else
58124  ac_check_lib_save_LIBS=$LIBS
58125LIBS="-lgif  $LIBS"
58126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58127/* end confdefs.h.  */
58128
58129/* Override any GCC internal prototype to avoid an error.
58130   Use char because int might match the return type of a GCC
58131   builtin and then its argument prototype would still apply.  */
58132#ifdef __cplusplus
58133extern "C"
58134#endif
58135char DGifGetCode ();
58136int
58137main ()
58138{
58139return DGifGetCode ();
58140  ;
58141  return 0;
58142}
58143_ACEOF
58144if ac_fn_cxx_try_link "$LINENO"; then :
58145  ac_cv_lib_gif_DGifGetCode=yes
58146else
58147  ac_cv_lib_gif_DGifGetCode=no
58148fi
58149rm -f core conftest.err conftest.$ac_objext \
58150    conftest$ac_exeext conftest.$ac_ext
58151LIBS=$ac_check_lib_save_LIBS
58152fi
58153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58154$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58155if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58156  cat >>confdefs.h <<_ACEOF
58157#define HAVE_LIBGIF 1
58158_ACEOF
58159
58160  LIBS="-lgif $LIBS"
58161
58162else
58163   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58164fi
58165
58166
58167    USE_EXTERNAL_LIBGIF=true
58168  else
58169    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58170  fi
58171
58172
58173
58174
58175
58176# Check whether --with-libpng was given.
58177if test "${with_libpng+set}" = set; then :
58178  withval=$with_libpng;
58179fi
58180
58181
58182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58183$as_echo_n "checking for which libpng to use... " >&6; }
58184
58185  # default is bundled
58186  DEFAULT_LIBPNG=bundled
58187  # if user didn't specify, use DEFAULT_LIBPNG
58188  if test "x${with_libpng}" = "x"; then
58189      with_libpng=${DEFAULT_LIBPNG}
58190  fi
58191
58192  if test "x${with_libpng}" = "xbundled"; then
58193      USE_EXTERNAL_LIBPNG=false
58194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58195$as_echo "bundled" >&6; }
58196  elif test "x${with_libpng}" = "xsystem"; then
58197
58198pkg_failed=no
58199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58200$as_echo_n "checking for PNG... " >&6; }
58201
58202if test -n "$PNG_CFLAGS"; then
58203    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58204 elif test -n "$PKG_CONFIG"; then
58205    if test -n "$PKG_CONFIG" && \
58206    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58207  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58208  ac_status=$?
58209  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58210  test $ac_status = 0; }; then
58211  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58212else
58213  pkg_failed=yes
58214fi
58215 else
58216    pkg_failed=untried
58217fi
58218if test -n "$PNG_LIBS"; then
58219    pkg_cv_PNG_LIBS="$PNG_LIBS"
58220 elif test -n "$PKG_CONFIG"; then
58221    if test -n "$PKG_CONFIG" && \
58222    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58223  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58224  ac_status=$?
58225  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58226  test $ac_status = 0; }; then
58227  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58228else
58229  pkg_failed=yes
58230fi
58231 else
58232    pkg_failed=untried
58233fi
58234
58235
58236
58237if test $pkg_failed = yes; then
58238
58239if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58240        _pkg_short_errors_supported=yes
58241else
58242        _pkg_short_errors_supported=no
58243fi
58244        if test $_pkg_short_errors_supported = yes; then
58245	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58246        else
58247	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58248        fi
58249	# Put the nasty error message in config.log where it belongs
58250	echo "$PNG_PKG_ERRORS" >&5
58251
58252	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58253$as_echo "no" >&6; }
58254                 LIBPNG_FOUND=no
58255elif test $pkg_failed = untried; then
58256	 LIBPNG_FOUND=no
58257else
58258	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58259	PNG_LIBS=$pkg_cv_PNG_LIBS
58260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58261$as_echo "yes" >&6; }
58262	 LIBPNG_FOUND=yes
58263fi
58264      if test "x${LIBPNG_FOUND}" = "xyes"; then
58265          USE_EXTERNAL_LIBPNG=true
58266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58267$as_echo "system" >&6; }
58268      else
58269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58270$as_echo "system not found" >&6; }
58271          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58272      fi
58273  else
58274      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58275  fi
58276
58277
58278
58279
58280
58281# Check whether --with-zlib was given.
58282if test "${with_zlib+set}" = set; then :
58283  withval=$with_zlib;
58284fi
58285
58286
58287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58288$as_echo_n "checking for compress in -lz... " >&6; }
58289if ${ac_cv_lib_z_compress+:} false; then :
58290  $as_echo_n "(cached) " >&6
58291else
58292  ac_check_lib_save_LIBS=$LIBS
58293LIBS="-lz  $LIBS"
58294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58295/* end confdefs.h.  */
58296
58297/* Override any GCC internal prototype to avoid an error.
58298   Use char because int might match the return type of a GCC
58299   builtin and then its argument prototype would still apply.  */
58300#ifdef __cplusplus
58301extern "C"
58302#endif
58303char compress ();
58304int
58305main ()
58306{
58307return compress ();
58308  ;
58309  return 0;
58310}
58311_ACEOF
58312if ac_fn_cxx_try_link "$LINENO"; then :
58313  ac_cv_lib_z_compress=yes
58314else
58315  ac_cv_lib_z_compress=no
58316fi
58317rm -f core conftest.err conftest.$ac_objext \
58318    conftest$ac_exeext conftest.$ac_ext
58319LIBS=$ac_check_lib_save_LIBS
58320fi
58321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58322$as_echo "$ac_cv_lib_z_compress" >&6; }
58323if test "x$ac_cv_lib_z_compress" = xyes; then :
58324   ZLIB_FOUND=yes
58325else
58326   ZLIB_FOUND=no
58327fi
58328
58329
58330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58331$as_echo_n "checking for which zlib to use... " >&6; }
58332
58333  DEFAULT_ZLIB=bundled
58334  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58335    # On macosx default is system...on others default is bundled
58336    DEFAULT_ZLIB=system
58337  fi
58338
58339  if test "x${ZLIB_FOUND}" != "xyes"; then
58340    # If we don't find any system...set default to bundled
58341    DEFAULT_ZLIB=bundled
58342  fi
58343
58344  # If user didn't specify, use DEFAULT_ZLIB
58345  if test "x${with_zlib}" = "x"; then
58346    with_zlib=${DEFAULT_ZLIB}
58347  fi
58348
58349  if test "x${with_zlib}" = "xbundled"; then
58350    USE_EXTERNAL_LIBZ=false
58351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58352$as_echo "bundled" >&6; }
58353  elif test "x${with_zlib}" = "xsystem"; then
58354    if test "x${ZLIB_FOUND}" = "xyes"; then
58355      USE_EXTERNAL_LIBZ=true
58356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58357$as_echo "system" >&6; }
58358    else
58359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58360$as_echo "system not found" >&6; }
58361      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58362    fi
58363  else
58364    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58365  fi
58366
58367
58368
58369
58370
58371# Check whether --with-lcms was given.
58372if test "${with_lcms+set}" = set; then :
58373  withval=$with_lcms;
58374fi
58375
58376
58377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58378$as_echo_n "checking for which lcms to use... " >&6; }
58379
58380  DEFAULT_LCMS=bundled
58381  # If user didn't specify, use DEFAULT_LCMS
58382  if test "x${with_lcms}" = "x"; then
58383      with_lcms=${DEFAULT_LCMS}
58384  fi
58385
58386  if test "x${with_lcms}" = "xbundled"; then
58387    USE_EXTERNAL_LCMS=false
58388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58389$as_echo "bundled" >&6; }
58390  elif test "x${with_lcms}" = "xsystem"; then
58391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58392$as_echo "system" >&6; }
58393
58394pkg_failed=no
58395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58396$as_echo_n "checking for LCMS... " >&6; }
58397
58398if test -n "$LCMS_CFLAGS"; then
58399    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58400 elif test -n "$PKG_CONFIG"; then
58401    if test -n "$PKG_CONFIG" && \
58402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58403  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58404  ac_status=$?
58405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58406  test $ac_status = 0; }; then
58407  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58408else
58409  pkg_failed=yes
58410fi
58411 else
58412    pkg_failed=untried
58413fi
58414if test -n "$LCMS_LIBS"; then
58415    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58416 elif test -n "$PKG_CONFIG"; then
58417    if test -n "$PKG_CONFIG" && \
58418    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58419  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58420  ac_status=$?
58421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58422  test $ac_status = 0; }; then
58423  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58424else
58425  pkg_failed=yes
58426fi
58427 else
58428    pkg_failed=untried
58429fi
58430
58431
58432
58433if test $pkg_failed = yes; then
58434
58435if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58436        _pkg_short_errors_supported=yes
58437else
58438        _pkg_short_errors_supported=no
58439fi
58440        if test $_pkg_short_errors_supported = yes; then
58441	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58442        else
58443	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58444        fi
58445	# Put the nasty error message in config.log where it belongs
58446	echo "$LCMS_PKG_ERRORS" >&5
58447
58448	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58449$as_echo "no" >&6; }
58450                LCMS_FOUND=no
58451elif test $pkg_failed = untried; then
58452	LCMS_FOUND=no
58453else
58454	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58455	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58457$as_echo "yes" >&6; }
58458	LCMS_FOUND=yes
58459fi
58460    if test "x${LCMS_FOUND}" = "xyes"; then
58461      USE_EXTERNAL_LCMS=true
58462    else
58463      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58464    fi
58465  else
58466    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58467  fi
58468
58469
58470
58471
58472
58473
58474
58475
58476
58477
58478
58479  # Setup libm (the maths library)
58480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58481$as_echo_n "checking for cos in -lm... " >&6; }
58482if ${ac_cv_lib_m_cos+:} false; then :
58483  $as_echo_n "(cached) " >&6
58484else
58485  ac_check_lib_save_LIBS=$LIBS
58486LIBS="-lm  $LIBS"
58487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58488/* end confdefs.h.  */
58489
58490/* Override any GCC internal prototype to avoid an error.
58491   Use char because int might match the return type of a GCC
58492   builtin and then its argument prototype would still apply.  */
58493#ifdef __cplusplus
58494extern "C"
58495#endif
58496char cos ();
58497int
58498main ()
58499{
58500return cos ();
58501  ;
58502  return 0;
58503}
58504_ACEOF
58505if ac_fn_cxx_try_link "$LINENO"; then :
58506  ac_cv_lib_m_cos=yes
58507else
58508  ac_cv_lib_m_cos=no
58509fi
58510rm -f core conftest.err conftest.$ac_objext \
58511    conftest$ac_exeext conftest.$ac_ext
58512LIBS=$ac_check_lib_save_LIBS
58513fi
58514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58515$as_echo "$ac_cv_lib_m_cos" >&6; }
58516if test "x$ac_cv_lib_m_cos" = xyes; then :
58517  cat >>confdefs.h <<_ACEOF
58518#define HAVE_LIBM 1
58519_ACEOF
58520
58521  LIBS="-lm $LIBS"
58522
58523else
58524
58525      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58526$as_echo "$as_me: Maths library was not found" >&6;}
58527
58528fi
58529
58530  LIBM=-lm
58531
58532
58533  # Setup libdl (for dynamic library loading)
58534  save_LIBS="$LIBS"
58535  LIBS=""
58536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58537$as_echo_n "checking for dlopen in -ldl... " >&6; }
58538if ${ac_cv_lib_dl_dlopen+:} false; then :
58539  $as_echo_n "(cached) " >&6
58540else
58541  ac_check_lib_save_LIBS=$LIBS
58542LIBS="-ldl  $LIBS"
58543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58544/* end confdefs.h.  */
58545
58546/* Override any GCC internal prototype to avoid an error.
58547   Use char because int might match the return type of a GCC
58548   builtin and then its argument prototype would still apply.  */
58549#ifdef __cplusplus
58550extern "C"
58551#endif
58552char dlopen ();
58553int
58554main ()
58555{
58556return dlopen ();
58557  ;
58558  return 0;
58559}
58560_ACEOF
58561if ac_fn_cxx_try_link "$LINENO"; then :
58562  ac_cv_lib_dl_dlopen=yes
58563else
58564  ac_cv_lib_dl_dlopen=no
58565fi
58566rm -f core conftest.err conftest.$ac_objext \
58567    conftest$ac_exeext conftest.$ac_ext
58568LIBS=$ac_check_lib_save_LIBS
58569fi
58570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58571$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58572if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58573  cat >>confdefs.h <<_ACEOF
58574#define HAVE_LIBDL 1
58575_ACEOF
58576
58577  LIBS="-ldl $LIBS"
58578
58579fi
58580
58581  LIBDL="$LIBS"
58582
58583  LIBS="$save_LIBS"
58584
58585  # Deprecated libraries, keep the flags for backwards compatibility
58586  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58587
58588
58589# Check whether --with-dxsdk was given.
58590if test "${with_dxsdk+set}" = set; then :
58591  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58592$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58593fi
58594
58595
58596
58597
58598# Check whether --with-dxsdk-lib was given.
58599if test "${with_dxsdk_lib+set}" = set; then :
58600  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58601$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58602fi
58603
58604
58605
58606
58607# Check whether --with-dxsdk-include was given.
58608if test "${with_dxsdk_include+set}" = set; then :
58609  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58610$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58611fi
58612
58613
58614  fi
58615
58616  # Control if libzip can use mmap. Available for purposes of overriding.
58617  LIBZIP_CAN_USE_MMAP=true
58618
58619
58620
58621
58622
58623
58624
58625
58626
58627
58628
58629
58630
58631
58632###############################################################################
58633#
58634# We need to do some final tweaking, when everything else is done.
58635#
58636###############################################################################
58637
58638
58639  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58640
58641
58642
58643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58644$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58645
58646  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58647    ENABLE_INTREE_EC=yes
58648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58649$as_echo "yes" >&6; }
58650  else
58651    ENABLE_INTREE_EC=no
58652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58653$as_echo "no" >&6; }
58654  fi
58655
58656
58657
58658
58659###############################################################################
58660#
58661# Configure parts of the build that only affect the build performance,
58662# not the result.
58663#
58664###############################################################################
58665
58666
58667  # How many cores do we have on this build system?
58668
58669# Check whether --with-num-cores was given.
58670if test "${with_num_cores+set}" = set; then :
58671  withval=$with_num_cores;
58672fi
58673
58674  if test "x$with_num_cores" = x; then
58675    # The number of cores were not specified, try to probe them.
58676
58677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58678$as_echo_n "checking for number of cores... " >&6; }
58679  NUM_CORES=1
58680  FOUND_CORES=no
58681
58682  if test -f /proc/cpuinfo; then
58683    # Looks like a Linux (or cygwin) system
58684    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58685    FOUND_CORES=yes
58686  elif test -x /usr/sbin/psrinfo; then
58687    # Looks like a Solaris system
58688    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58689    FOUND_CORES=yes
58690  elif test -x /usr/sbin/sysctl; then
58691    # Looks like a MacOSX system
58692    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
58693    FOUND_CORES=yes
58694  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58695    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58696    FOUND_CORES=yes
58697  elif test -n "$NUMBER_OF_PROCESSORS"; then
58698    # On windows, look in the env
58699    NUM_CORES=$NUMBER_OF_PROCESSORS
58700    FOUND_CORES=yes
58701  fi
58702
58703  if test "x$FOUND_CORES" = xyes; then
58704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58705$as_echo "$NUM_CORES" >&6; }
58706  else
58707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58708$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58709    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58710$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58711  fi
58712
58713  else
58714    NUM_CORES=$with_num_cores
58715  fi
58716
58717
58718
58719  # How much memory do we have on this build system?
58720
58721# Check whether --with-memory-size was given.
58722if test "${with_memory_size+set}" = set; then :
58723  withval=$with_memory_size;
58724fi
58725
58726  if test "x$with_memory_size" = x; then
58727    # The memory size was not specified, try to probe it.
58728
58729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58730$as_echo_n "checking for memory size... " >&6; }
58731  # Default to 1024 MB
58732  MEMORY_SIZE=1024
58733  FOUND_MEM=no
58734
58735  if test -f /proc/meminfo; then
58736    # Looks like a Linux (or cygwin) system
58737    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58738    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58739    FOUND_MEM=yes
58740  elif test -x /usr/sbin/prtconf; then
58741    # Looks like a Solaris or AIX system
58742    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58743    FOUND_MEM=yes
58744  elif test -x /usr/sbin/sysctl; then
58745    # Looks like a MacOSX system
58746    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
58747    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58748    FOUND_MEM=yes
58749  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58750    # Windows, but without cygwin
58751    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58752    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58753    FOUND_MEM=yes
58754  fi
58755
58756  if test "x$FOUND_MEM" = xyes; then
58757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58758$as_echo "$MEMORY_SIZE MB" >&6; }
58759  else
58760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58761$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58762    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58763$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58764  fi
58765
58766  else
58767    MEMORY_SIZE=$with_memory_size
58768  fi
58769
58770
58771
58772  # Provide a decent default number of parallel jobs for make depending on
58773  # number of cores, amount of memory and machine architecture.
58774
58775# Check whether --with-jobs was given.
58776if test "${with_jobs+set}" = set; then :
58777  withval=$with_jobs;
58778fi
58779
58780  if test "x$with_jobs" = x; then
58781    # Number of jobs was not specified, calculate.
58782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58783$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58784    # Approximate memory in GB.
58785    memory_gb=`expr $MEMORY_SIZE / 1024`
58786    # Pick the lowest of memory in gb and number of cores.
58787    if test "$memory_gb" -lt "$NUM_CORES"; then
58788      JOBS="$memory_gb"
58789    else
58790      JOBS="$NUM_CORES"
58791    fi
58792    if test "$JOBS" -eq "0"; then
58793      JOBS=1
58794    fi
58795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58796$as_echo "$JOBS" >&6; }
58797  else
58798    JOBS=$with_jobs
58799  fi
58800
58801
58802
58803  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58804
58805# Check whether --with-test-jobs was given.
58806if test "${with_test_jobs+set}" = set; then :
58807  withval=$with_test_jobs;
58808fi
58809
58810  if test "x$with_test_jobs" = x; then
58811      TEST_JOBS=0
58812  else
58813      TEST_JOBS=$with_test_jobs
58814  fi
58815
58816
58817
58818# Setup arguments for the boot jdk (after cores and memory have been setup)
58819
58820  ##############################################################################
58821  #
58822  # Specify jvm options for anything that is run with the Boot JDK.
58823  # Not all JVM:s accept the same arguments on the command line.
58824  #
58825
58826# Check whether --with-boot-jdk-jvmargs was given.
58827if test "${with_boot_jdk_jvmargs+set}" = set; then :
58828  withval=$with_boot_jdk_jvmargs;
58829fi
58830
58831
58832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
58833$as_echo_n "checking flags for boot jdk java command ... " >&6; }
58834
58835  # Disable special log output when a debug build is used as Boot JDK...
58836
58837  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
58838  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
58839  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
58840  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58841  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58842  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58843    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
58844    JVM_ARG_OK=true
58845  else
58846    $ECHO "Arg failed:" >&5
58847    $ECHO "$OUTPUT" >&5
58848    JVM_ARG_OK=false
58849  fi
58850
58851
58852  # Apply user provided options.
58853
58854  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
58855  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
58856  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
58857  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58858  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58859  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58860    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
58861    JVM_ARG_OK=true
58862  else
58863    $ECHO "Arg failed:" >&5
58864    $ECHO "$OUTPUT" >&5
58865    JVM_ARG_OK=false
58866  fi
58867
58868
58869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
58870$as_echo "$boot_jdk_jvmargs" >&6; }
58871
58872  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
58873  JAVA_FLAGS=$boot_jdk_jvmargs
58874
58875
58876
58877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
58878$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
58879
58880  # Starting amount of heap memory.
58881
58882  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
58883  $ECHO "Command: $JAVA -Xms64M -version" >&5
58884  OUTPUT=`$JAVA -Xms64M -version 2>&1`
58885  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58886  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58887  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58888    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
58889    JVM_ARG_OK=true
58890  else
58891    $ECHO "Arg failed:" >&5
58892    $ECHO "$OUTPUT" >&5
58893    JVM_ARG_OK=false
58894  fi
58895
58896
58897  # Maximum amount of heap memory.
58898  # Maximum stack size.
58899  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
58900  if test "x$BOOT_JDK_BITS" = "x32"; then
58901    if test "$JVM_MAX_HEAP" -gt "1100"; then
58902      JVM_MAX_HEAP=1100
58903    elif test "$JVM_MAX_HEAP" -lt "512"; then
58904      JVM_MAX_HEAP=512
58905    fi
58906    STACK_SIZE=768
58907  else
58908    # Running a 64 bit JVM allows for and requires a bigger heap
58909    if test "$JVM_MAX_HEAP" -gt "1600"; then
58910      JVM_MAX_HEAP=1600
58911    elif test "$JVM_MAX_HEAP" -lt "512"; then
58912      JVM_MAX_HEAP=512
58913    fi
58914    STACK_SIZE=1536
58915  fi
58916
58917  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
58918  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
58919  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
58920  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58921  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58922  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58923    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
58924    JVM_ARG_OK=true
58925  else
58926    $ECHO "Arg failed:" >&5
58927    $ECHO "$OUTPUT" >&5
58928    JVM_ARG_OK=false
58929  fi
58930
58931
58932  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
58933  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
58934  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
58935  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58936  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58937  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58938    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
58939    JVM_ARG_OK=true
58940  else
58941    $ECHO "Arg failed:" >&5
58942    $ECHO "$OUTPUT" >&5
58943    JVM_ARG_OK=false
58944  fi
58945
58946
58947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
58948$as_echo "$boot_jdk_jvmargs_big" >&6; }
58949
58950  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
58951
58952
58953  # By default, the main javac compilations use big
58954  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
58955
58956
58957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
58958$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
58959
58960  # Use serial gc for small short lived tools if possible
58961
58962  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
58963  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
58964  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
58965  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58966  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58967  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58968    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
58969    JVM_ARG_OK=true
58970  else
58971    $ECHO "Arg failed:" >&5
58972    $ECHO "$OUTPUT" >&5
58973    JVM_ARG_OK=false
58974  fi
58975
58976
58977  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
58978  $ECHO "Command: $JAVA -Xms32M -version" >&5
58979  OUTPUT=`$JAVA -Xms32M -version 2>&1`
58980  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58981  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58982  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58983    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
58984    JVM_ARG_OK=true
58985  else
58986    $ECHO "Arg failed:" >&5
58987    $ECHO "$OUTPUT" >&5
58988    JVM_ARG_OK=false
58989  fi
58990
58991
58992  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
58993  $ECHO "Command: $JAVA -Xmx512M -version" >&5
58994  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
58995  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58996  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58997  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58998    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
58999    JVM_ARG_OK=true
59000  else
59001    $ECHO "Arg failed:" >&5
59002    $ECHO "$OUTPUT" >&5
59003    JVM_ARG_OK=false
59004  fi
59005
59006
59007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59008$as_echo "$boot_jdk_jvmargs_small" >&6; }
59009
59010  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59011
59012
59013  JAVA_TOOL_FLAGS_SMALL=""
59014  for f in $JAVA_FLAGS_SMALL; do
59015    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59016  done
59017
59018
59019
59020# Setup smart javac (after cores and memory have been setup)
59021
59022
59023# Check whether --with-sjavac-server-java was given.
59024if test "${with_sjavac_server_java+set}" = set; then :
59025  withval=$with_sjavac_server_java;
59026fi
59027
59028
59029  if test "x$with_sjavac_server_java" != x; then
59030    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59031    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59032    if test "x$FOUND_VERSION" = x; then
59033      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59034    fi
59035  else
59036    SJAVAC_SERVER_JAVA="$JAVA"
59037  fi
59038
59039
59040  if test "$MEMORY_SIZE" -gt "3000"; then
59041
59042  $ECHO "Check if jvm arg is ok: -d64" >&5
59043  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59044  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59045  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59046  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59047  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59048    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59049    JVM_ARG_OK=true
59050  else
59051    $ECHO "Arg failed:" >&5
59052    $ECHO "$OUTPUT" >&5
59053    JVM_ARG_OK=false
59054  fi
59055
59056    if test "$JVM_ARG_OK" = true; then
59057      JVM_64BIT=true
59058      JVM_ARG_OK=false
59059    fi
59060  fi
59061
59062  MX_VALUE=`expr $MEMORY_SIZE / 2`
59063  if test "$JVM_64BIT" = true; then
59064    # Set ms lower than mx since more than one instance of the server might
59065    # get launched at the same time before they figure out which instance won.
59066    MS_VALUE=512
59067    if test "$MX_VALUE" -gt "2048"; then
59068      MX_VALUE=2048
59069    fi
59070  else
59071    MS_VALUE=256
59072    if test "$MX_VALUE" -gt "1500"; then
59073      MX_VALUE=1500
59074    fi
59075  fi
59076  if test "$MX_VALUE" -lt "512"; then
59077    MX_VALUE=512
59078  fi
59079
59080  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59081  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59082  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59083  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59084  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59085  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59086    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59087    JVM_ARG_OK=true
59088  else
59089    $ECHO "Arg failed:" >&5
59090    $ECHO "$OUTPUT" >&5
59091    JVM_ARG_OK=false
59092  fi
59093
59094
59095
59096  # Check whether --enable-sjavac was given.
59097if test "${enable_sjavac+set}" = set; then :
59098  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59099else
59100  ENABLE_SJAVAC="no"
59101fi
59102
59103  if test "x$JVM_ARG_OK" = "xfalse"; then
59104    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59105$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59106    ENABLE_SJAVAC="no"
59107  fi
59108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59109$as_echo_n "checking whether to use sjavac... " >&6; }
59110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59111$as_echo "$ENABLE_SJAVAC" >&6; }
59112
59113
59114  # Check whether --enable-javac-server was given.
59115if test "${enable_javac_server+set}" = set; then :
59116  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59117else
59118  ENABLE_JAVAC_SERVER="yes"
59119fi
59120
59121  if test "x$JVM_ARG_OK" = "xfalse"; then
59122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59123$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59124    ENABLE_JAVAC_SERVER="no"
59125  fi
59126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59127$as_echo_n "checking whether to use javac server... " >&6; }
59128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59129$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59130
59131
59132  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59133    # When using a server javac, the small client instances do not need much
59134    # resources.
59135    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59136  fi
59137
59138
59139# Setup use of icecc if requested
59140
59141  # Check whether --enable-icecc was given.
59142if test "${enable_icecc+set}" = set; then :
59143  enableval=$enable_icecc;
59144fi
59145
59146
59147  if test "x${enable_icecc}" = "xyes"; then
59148
59149
59150
59151  # Publish this variable in the help.
59152
59153
59154  if [ -z "${ICECC_CMD+x}" ]; then
59155    # The variable is not set by user, try to locate tool using the code snippet
59156    for ac_prog in icecc
59157do
59158  # Extract the first word of "$ac_prog", so it can be a program name with args.
59159set dummy $ac_prog; ac_word=$2
59160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59161$as_echo_n "checking for $ac_word... " >&6; }
59162if ${ac_cv_path_ICECC_CMD+:} false; then :
59163  $as_echo_n "(cached) " >&6
59164else
59165  case $ICECC_CMD in
59166  [\\/]* | ?:[\\/]*)
59167  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59168  ;;
59169  *)
59170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59171for as_dir in $PATH
59172do
59173  IFS=$as_save_IFS
59174  test -z "$as_dir" && as_dir=.
59175    for ac_exec_ext in '' $ac_executable_extensions; do
59176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59177    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59179    break 2
59180  fi
59181done
59182  done
59183IFS=$as_save_IFS
59184
59185  ;;
59186esac
59187fi
59188ICECC_CMD=$ac_cv_path_ICECC_CMD
59189if test -n "$ICECC_CMD"; then
59190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59191$as_echo "$ICECC_CMD" >&6; }
59192else
59193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59194$as_echo "no" >&6; }
59195fi
59196
59197
59198  test -n "$ICECC_CMD" && break
59199done
59200
59201  else
59202    # The variable is set, but is it from the command line or the environment?
59203
59204    # Try to remove the string !ICECC_CMD! from our list.
59205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59207      # If it failed, the variable was not from the command line. Ignore it,
59208      # but warn the user (except for BASH, which is always set by the calling BASH).
59209      if test "xICECC_CMD" != xBASH; then
59210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59211$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59212      fi
59213      # Try to locate tool using the code snippet
59214      for ac_prog in icecc
59215do
59216  # Extract the first word of "$ac_prog", so it can be a program name with args.
59217set dummy $ac_prog; ac_word=$2
59218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59219$as_echo_n "checking for $ac_word... " >&6; }
59220if ${ac_cv_path_ICECC_CMD+:} false; then :
59221  $as_echo_n "(cached) " >&6
59222else
59223  case $ICECC_CMD in
59224  [\\/]* | ?:[\\/]*)
59225  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59226  ;;
59227  *)
59228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59229for as_dir in $PATH
59230do
59231  IFS=$as_save_IFS
59232  test -z "$as_dir" && as_dir=.
59233    for ac_exec_ext in '' $ac_executable_extensions; do
59234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59235    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59237    break 2
59238  fi
59239done
59240  done
59241IFS=$as_save_IFS
59242
59243  ;;
59244esac
59245fi
59246ICECC_CMD=$ac_cv_path_ICECC_CMD
59247if test -n "$ICECC_CMD"; then
59248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59249$as_echo "$ICECC_CMD" >&6; }
59250else
59251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59252$as_echo "no" >&6; }
59253fi
59254
59255
59256  test -n "$ICECC_CMD" && break
59257done
59258
59259    else
59260      # If it succeeded, then it was overridden by the user. We will use it
59261      # for the tool.
59262
59263      # First remove it from the list of overridden variables, so we can test
59264      # for unknown variables in the end.
59265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59266
59267      # Check if we try to supply an empty value
59268      if test "x$ICECC_CMD" = x; then
59269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59270$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59272$as_echo_n "checking for ICECC_CMD... " >&6; }
59273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59274$as_echo "disabled" >&6; }
59275      else
59276        # Check if the provided tool contains a complete path.
59277        tool_specified="$ICECC_CMD"
59278        tool_basename="${tool_specified##*/}"
59279        if test "x$tool_basename" = "x$tool_specified"; then
59280          # A command without a complete path is provided, search $PATH.
59281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59282$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59283          # Extract the first word of "$tool_basename", so it can be a program name with args.
59284set dummy $tool_basename; ac_word=$2
59285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59286$as_echo_n "checking for $ac_word... " >&6; }
59287if ${ac_cv_path_ICECC_CMD+:} false; then :
59288  $as_echo_n "(cached) " >&6
59289else
59290  case $ICECC_CMD in
59291  [\\/]* | ?:[\\/]*)
59292  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59293  ;;
59294  *)
59295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59296for as_dir in $PATH
59297do
59298  IFS=$as_save_IFS
59299  test -z "$as_dir" && as_dir=.
59300    for ac_exec_ext in '' $ac_executable_extensions; do
59301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59302    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59304    break 2
59305  fi
59306done
59307  done
59308IFS=$as_save_IFS
59309
59310  ;;
59311esac
59312fi
59313ICECC_CMD=$ac_cv_path_ICECC_CMD
59314if test -n "$ICECC_CMD"; then
59315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59316$as_echo "$ICECC_CMD" >&6; }
59317else
59318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59319$as_echo "no" >&6; }
59320fi
59321
59322
59323          if test "x$ICECC_CMD" = x; then
59324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59325          fi
59326        else
59327          # Otherwise we believe it is a complete path. Use it as it is.
59328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59329$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59331$as_echo_n "checking for ICECC_CMD... " >&6; }
59332          if test ! -x "$tool_specified"; then
59333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59334$as_echo "not found" >&6; }
59335            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59336          fi
59337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59338$as_echo "$tool_specified" >&6; }
59339        fi
59340      fi
59341    fi
59342
59343  fi
59344
59345
59346
59347  if test "x$ICECC_CMD" = x; then
59348    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59349  fi
59350
59351
59352    old_path="$PATH"
59353
59354    # Look for icecc-create-env in some known places
59355    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59356
59357
59358
59359  # Publish this variable in the help.
59360
59361
59362  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59363    # The variable is not set by user, try to locate tool using the code snippet
59364    for ac_prog in icecc-create-env
59365do
59366  # Extract the first word of "$ac_prog", so it can be a program name with args.
59367set dummy $ac_prog; ac_word=$2
59368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59369$as_echo_n "checking for $ac_word... " >&6; }
59370if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59371  $as_echo_n "(cached) " >&6
59372else
59373  case $ICECC_CREATE_ENV in
59374  [\\/]* | ?:[\\/]*)
59375  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59376  ;;
59377  *)
59378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59379for as_dir in $PATH
59380do
59381  IFS=$as_save_IFS
59382  test -z "$as_dir" && as_dir=.
59383    for ac_exec_ext in '' $ac_executable_extensions; do
59384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59385    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59387    break 2
59388  fi
59389done
59390  done
59391IFS=$as_save_IFS
59392
59393  ;;
59394esac
59395fi
59396ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59397if test -n "$ICECC_CREATE_ENV"; then
59398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59399$as_echo "$ICECC_CREATE_ENV" >&6; }
59400else
59401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59402$as_echo "no" >&6; }
59403fi
59404
59405
59406  test -n "$ICECC_CREATE_ENV" && break
59407done
59408
59409  else
59410    # The variable is set, but is it from the command line or the environment?
59411
59412    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59415      # If it failed, the variable was not from the command line. Ignore it,
59416      # but warn the user (except for BASH, which is always set by the calling BASH).
59417      if test "xICECC_CREATE_ENV" != xBASH; then
59418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59419$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59420      fi
59421      # Try to locate tool using the code snippet
59422      for ac_prog in icecc-create-env
59423do
59424  # Extract the first word of "$ac_prog", so it can be a program name with args.
59425set dummy $ac_prog; ac_word=$2
59426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59427$as_echo_n "checking for $ac_word... " >&6; }
59428if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59429  $as_echo_n "(cached) " >&6
59430else
59431  case $ICECC_CREATE_ENV in
59432  [\\/]* | ?:[\\/]*)
59433  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59434  ;;
59435  *)
59436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59437for as_dir in $PATH
59438do
59439  IFS=$as_save_IFS
59440  test -z "$as_dir" && as_dir=.
59441    for ac_exec_ext in '' $ac_executable_extensions; do
59442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59443    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59445    break 2
59446  fi
59447done
59448  done
59449IFS=$as_save_IFS
59450
59451  ;;
59452esac
59453fi
59454ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59455if test -n "$ICECC_CREATE_ENV"; then
59456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59457$as_echo "$ICECC_CREATE_ENV" >&6; }
59458else
59459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59460$as_echo "no" >&6; }
59461fi
59462
59463
59464  test -n "$ICECC_CREATE_ENV" && break
59465done
59466
59467    else
59468      # If it succeeded, then it was overridden by the user. We will use it
59469      # for the tool.
59470
59471      # First remove it from the list of overridden variables, so we can test
59472      # for unknown variables in the end.
59473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59474
59475      # Check if we try to supply an empty value
59476      if test "x$ICECC_CREATE_ENV" = x; then
59477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59478$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59480$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59482$as_echo "disabled" >&6; }
59483      else
59484        # Check if the provided tool contains a complete path.
59485        tool_specified="$ICECC_CREATE_ENV"
59486        tool_basename="${tool_specified##*/}"
59487        if test "x$tool_basename" = "x$tool_specified"; then
59488          # A command without a complete path is provided, search $PATH.
59489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59490$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59491          # Extract the first word of "$tool_basename", so it can be a program name with args.
59492set dummy $tool_basename; ac_word=$2
59493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59494$as_echo_n "checking for $ac_word... " >&6; }
59495if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59496  $as_echo_n "(cached) " >&6
59497else
59498  case $ICECC_CREATE_ENV in
59499  [\\/]* | ?:[\\/]*)
59500  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59501  ;;
59502  *)
59503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59504for as_dir in $PATH
59505do
59506  IFS=$as_save_IFS
59507  test -z "$as_dir" && as_dir=.
59508    for ac_exec_ext in '' $ac_executable_extensions; do
59509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59510    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59512    break 2
59513  fi
59514done
59515  done
59516IFS=$as_save_IFS
59517
59518  ;;
59519esac
59520fi
59521ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59522if test -n "$ICECC_CREATE_ENV"; then
59523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59524$as_echo "$ICECC_CREATE_ENV" >&6; }
59525else
59526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59527$as_echo "no" >&6; }
59528fi
59529
59530
59531          if test "x$ICECC_CREATE_ENV" = x; then
59532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59533          fi
59534        else
59535          # Otherwise we believe it is a complete path. Use it as it is.
59536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59537$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59539$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59540          if test ! -x "$tool_specified"; then
59541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59542$as_echo "not found" >&6; }
59543            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59544          fi
59545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59546$as_echo "$tool_specified" >&6; }
59547        fi
59548      fi
59549    fi
59550
59551  fi
59552
59553
59554
59555  if test "x$ICECC_CREATE_ENV" = x; then
59556    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59557  fi
59558
59559
59560    # Use icecc-create-env to create a minimal compilation environment that can
59561    # be sent to the other hosts in the icecream cluster.
59562    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59563    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59564    # Older versions of icecc does not have the --gcc parameter
59565    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
59566      icecc_gcc_arg="--gcc"
59567    fi
59568    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59569
59570  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59571      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
59572          ${icecc_create_env_log} 2>&1
59573  if test "$?" != "0"; then
59574    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59575$as_echo "$as_me: icecc-create-env output:" >&6;}
59576    cat \
59577          ${icecc_create_env_log}
59578    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59579  fi
59580
59581    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59582      # For clang, the icecc compilerwrapper is needed. It usually resides next
59583      # to icecc-create-env.
59584
59585
59586
59587  # Publish this variable in the help.
59588
59589
59590  if [ -z "${ICECC_WRAPPER+x}" ]; then
59591    # The variable is not set by user, try to locate tool using the code snippet
59592    for ac_prog in compilerwrapper
59593do
59594  # Extract the first word of "$ac_prog", so it can be a program name with args.
59595set dummy $ac_prog; ac_word=$2
59596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59597$as_echo_n "checking for $ac_word... " >&6; }
59598if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59599  $as_echo_n "(cached) " >&6
59600else
59601  case $ICECC_WRAPPER in
59602  [\\/]* | ?:[\\/]*)
59603  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59604  ;;
59605  *)
59606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59607for as_dir in $PATH
59608do
59609  IFS=$as_save_IFS
59610  test -z "$as_dir" && as_dir=.
59611    for ac_exec_ext in '' $ac_executable_extensions; do
59612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59613    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59615    break 2
59616  fi
59617done
59618  done
59619IFS=$as_save_IFS
59620
59621  ;;
59622esac
59623fi
59624ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59625if test -n "$ICECC_WRAPPER"; then
59626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59627$as_echo "$ICECC_WRAPPER" >&6; }
59628else
59629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59630$as_echo "no" >&6; }
59631fi
59632
59633
59634  test -n "$ICECC_WRAPPER" && break
59635done
59636
59637  else
59638    # The variable is set, but is it from the command line or the environment?
59639
59640    # Try to remove the string !ICECC_WRAPPER! from our list.
59641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59643      # If it failed, the variable was not from the command line. Ignore it,
59644      # but warn the user (except for BASH, which is always set by the calling BASH).
59645      if test "xICECC_WRAPPER" != xBASH; then
59646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59647$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59648      fi
59649      # Try to locate tool using the code snippet
59650      for ac_prog in compilerwrapper
59651do
59652  # Extract the first word of "$ac_prog", so it can be a program name with args.
59653set dummy $ac_prog; ac_word=$2
59654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59655$as_echo_n "checking for $ac_word... " >&6; }
59656if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59657  $as_echo_n "(cached) " >&6
59658else
59659  case $ICECC_WRAPPER in
59660  [\\/]* | ?:[\\/]*)
59661  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59662  ;;
59663  *)
59664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59665for as_dir in $PATH
59666do
59667  IFS=$as_save_IFS
59668  test -z "$as_dir" && as_dir=.
59669    for ac_exec_ext in '' $ac_executable_extensions; do
59670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59671    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59673    break 2
59674  fi
59675done
59676  done
59677IFS=$as_save_IFS
59678
59679  ;;
59680esac
59681fi
59682ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59683if test -n "$ICECC_WRAPPER"; then
59684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59685$as_echo "$ICECC_WRAPPER" >&6; }
59686else
59687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59688$as_echo "no" >&6; }
59689fi
59690
59691
59692  test -n "$ICECC_WRAPPER" && break
59693done
59694
59695    else
59696      # If it succeeded, then it was overridden by the user. We will use it
59697      # for the tool.
59698
59699      # First remove it from the list of overridden variables, so we can test
59700      # for unknown variables in the end.
59701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59702
59703      # Check if we try to supply an empty value
59704      if test "x$ICECC_WRAPPER" = x; then
59705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59706$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59708$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59710$as_echo "disabled" >&6; }
59711      else
59712        # Check if the provided tool contains a complete path.
59713        tool_specified="$ICECC_WRAPPER"
59714        tool_basename="${tool_specified##*/}"
59715        if test "x$tool_basename" = "x$tool_specified"; then
59716          # A command without a complete path is provided, search $PATH.
59717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59718$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59719          # Extract the first word of "$tool_basename", so it can be a program name with args.
59720set dummy $tool_basename; ac_word=$2
59721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59722$as_echo_n "checking for $ac_word... " >&6; }
59723if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59724  $as_echo_n "(cached) " >&6
59725else
59726  case $ICECC_WRAPPER in
59727  [\\/]* | ?:[\\/]*)
59728  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59729  ;;
59730  *)
59731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59732for as_dir in $PATH
59733do
59734  IFS=$as_save_IFS
59735  test -z "$as_dir" && as_dir=.
59736    for ac_exec_ext in '' $ac_executable_extensions; do
59737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59738    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59740    break 2
59741  fi
59742done
59743  done
59744IFS=$as_save_IFS
59745
59746  ;;
59747esac
59748fi
59749ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59750if test -n "$ICECC_WRAPPER"; then
59751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59752$as_echo "$ICECC_WRAPPER" >&6; }
59753else
59754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59755$as_echo "no" >&6; }
59756fi
59757
59758
59759          if test "x$ICECC_WRAPPER" = x; then
59760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59761          fi
59762        else
59763          # Otherwise we believe it is a complete path. Use it as it is.
59764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59765$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59767$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59768          if test ! -x "$tool_specified"; then
59769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59770$as_echo "not found" >&6; }
59771            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59772          fi
59773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59774$as_echo "$tool_specified" >&6; }
59775        fi
59776      fi
59777    fi
59778
59779  fi
59780
59781
59782
59783  if test "x$ICECC_WRAPPER" = x; then
59784    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59785  fi
59786
59787
59788
59789  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59790      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1
59791  if test "$?" != "0"; then
59792    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59793$as_echo "$as_me: icecc-create-env output:" >&6;}
59794    cat ${icecc_create_env_log}
59795    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59796  fi
59797
59798    else
59799      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59800    fi
59801    PATH="$old_path"
59802    # The bundle with the compiler gets a name based on checksums. Parse log file
59803    # to find it.
59804    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59805    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59806    if test ! -f ${ICECC_ENV_BUNDLE}; then
59807      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59808    fi
59809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59810$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59812$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59813    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59814
59815    if test "x${COMPILE_TYPE}" = "xcross"; then
59816      # If cross compiling, create a separate env package for the build compiler
59817      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
59818      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
59819      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
59820
59821  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59822      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
59823            ${icecc_create_env_log_build} 2>&1
59824  if test "$?" != "0"; then
59825    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59826$as_echo "$as_me: icecc-create-env output:" >&6;}
59827    cat \
59828            ${icecc_create_env_log_build}
59829    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59830  fi
59831
59832      elif test "x${BUILD_CC##*/}" = "xclang"; then
59833
59834  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59835      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1
59836  if test "$?" != "0"; then
59837    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59838$as_echo "$as_me: icecc-create-env output:" >&6;}
59839    cat ${icecc_create_env_log_build}
59840    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59841  fi
59842
59843      else
59844        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
59845      fi
59846      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
59847      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59848      if test ! -f ${ICECC_ENV_BUNDLE}; then
59849        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59850      fi
59851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
59852$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
59853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59854$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59855      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
59856          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
59857    else
59858      BUILD_ICECC="${ICECC}"
59859    fi
59860
59861
59862  fi
59863
59864
59865# Can the C/C++ compiler use precompiled headers?
59866
59867
59868  ###############################################################################
59869  #
59870  # Can the C/C++ compiler use precompiled headers?
59871  #
59872  # Check whether --enable-precompiled-headers was given.
59873if test "${enable_precompiled_headers+set}" = set; then :
59874  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
59875else
59876  ENABLE_PRECOMPH=yes
59877fi
59878
59879
59880  USE_PRECOMPILED_HEADER=1
59881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
59882$as_echo_n "checking If precompiled header is enabled... " >&6; }
59883  if test "x$ENABLE_PRECOMPH" = xno; then
59884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
59885$as_echo "no, forced" >&6; }
59886    USE_PRECOMPILED_HEADER=0
59887  elif test "x$ICECC" != "x"; then
59888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
59889$as_echo "no, does not work effectively with icecc" >&6; }
59890    USE_PRECOMPILED_HEADER=0
59891  else
59892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59893$as_echo "yes" >&6; }
59894  fi
59895
59896  if test "x$ENABLE_PRECOMPH" = xyes; then
59897    # Check that the compiler actually supports precomp headers.
59898    if test "x$TOOLCHAIN_TYPE" = xgcc; then
59899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
59900$as_echo_n "checking that precompiled headers work... " >&6; }
59901      echo "int alfa();" > conftest.h
59902      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
59903      if test ! -f conftest.hpp.gch; then
59904        USE_PRECOMPILED_HEADER=0
59905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59906$as_echo "no" >&6; }
59907      else
59908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59909$as_echo "yes" >&6; }
59910      fi
59911      rm -f conftest.h conftest.hpp.gch
59912    fi
59913  fi
59914
59915
59916
59917
59918# Setup use of ccache, if available
59919
59920  # Check whether --enable-ccache was given.
59921if test "${enable_ccache+set}" = set; then :
59922  enableval=$enable_ccache;
59923fi
59924
59925
59926  CCACHE=
59927  CCACHE_STATUS=
59928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
59929$as_echo_n "checking is ccache enabled... " >&6; }
59930  if test "x$enable_ccache" = xyes; then
59931    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
59932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59933$as_echo "yes" >&6; }
59934      OLD_PATH="$PATH"
59935      if test "x$TOOLCHAIN_PATH" != x; then
59936        PATH=$TOOLCHAIN_PATH:$PATH
59937      fi
59938
59939
59940
59941  # Publish this variable in the help.
59942
59943
59944  if [ -z "${CCACHE+x}" ]; then
59945    # The variable is not set by user, try to locate tool using the code snippet
59946    for ac_prog in ccache
59947do
59948  # Extract the first word of "$ac_prog", so it can be a program name with args.
59949set dummy $ac_prog; ac_word=$2
59950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59951$as_echo_n "checking for $ac_word... " >&6; }
59952if ${ac_cv_path_CCACHE+:} false; then :
59953  $as_echo_n "(cached) " >&6
59954else
59955  case $CCACHE in
59956  [\\/]* | ?:[\\/]*)
59957  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59958  ;;
59959  *)
59960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59961for as_dir in $PATH
59962do
59963  IFS=$as_save_IFS
59964  test -z "$as_dir" && as_dir=.
59965    for ac_exec_ext in '' $ac_executable_extensions; do
59966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59967    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59969    break 2
59970  fi
59971done
59972  done
59973IFS=$as_save_IFS
59974
59975  ;;
59976esac
59977fi
59978CCACHE=$ac_cv_path_CCACHE
59979if test -n "$CCACHE"; then
59980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59981$as_echo "$CCACHE" >&6; }
59982else
59983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59984$as_echo "no" >&6; }
59985fi
59986
59987
59988  test -n "$CCACHE" && break
59989done
59990
59991  else
59992    # The variable is set, but is it from the command line or the environment?
59993
59994    # Try to remove the string !CCACHE! from our list.
59995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
59996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59997      # If it failed, the variable was not from the command line. Ignore it,
59998      # but warn the user (except for BASH, which is always set by the calling BASH).
59999      if test "xCCACHE" != xBASH; then
60000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
60001$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
60002      fi
60003      # Try to locate tool using the code snippet
60004      for ac_prog in ccache
60005do
60006  # Extract the first word of "$ac_prog", so it can be a program name with args.
60007set dummy $ac_prog; ac_word=$2
60008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60009$as_echo_n "checking for $ac_word... " >&6; }
60010if ${ac_cv_path_CCACHE+:} false; then :
60011  $as_echo_n "(cached) " >&6
60012else
60013  case $CCACHE in
60014  [\\/]* | ?:[\\/]*)
60015  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60016  ;;
60017  *)
60018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60019for as_dir in $PATH
60020do
60021  IFS=$as_save_IFS
60022  test -z "$as_dir" && as_dir=.
60023    for ac_exec_ext in '' $ac_executable_extensions; do
60024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60025    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60027    break 2
60028  fi
60029done
60030  done
60031IFS=$as_save_IFS
60032
60033  ;;
60034esac
60035fi
60036CCACHE=$ac_cv_path_CCACHE
60037if test -n "$CCACHE"; then
60038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60039$as_echo "$CCACHE" >&6; }
60040else
60041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60042$as_echo "no" >&6; }
60043fi
60044
60045
60046  test -n "$CCACHE" && break
60047done
60048
60049    else
60050      # If it succeeded, then it was overridden by the user. We will use it
60051      # for the tool.
60052
60053      # First remove it from the list of overridden variables, so we can test
60054      # for unknown variables in the end.
60055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60056
60057      # Check if we try to supply an empty value
60058      if test "x$CCACHE" = x; then
60059        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60060$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60061        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60062$as_echo_n "checking for CCACHE... " >&6; }
60063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60064$as_echo "disabled" >&6; }
60065      else
60066        # Check if the provided tool contains a complete path.
60067        tool_specified="$CCACHE"
60068        tool_basename="${tool_specified##*/}"
60069        if test "x$tool_basename" = "x$tool_specified"; then
60070          # A command without a complete path is provided, search $PATH.
60071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60072$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60073          # Extract the first word of "$tool_basename", so it can be a program name with args.
60074set dummy $tool_basename; ac_word=$2
60075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60076$as_echo_n "checking for $ac_word... " >&6; }
60077if ${ac_cv_path_CCACHE+:} false; then :
60078  $as_echo_n "(cached) " >&6
60079else
60080  case $CCACHE in
60081  [\\/]* | ?:[\\/]*)
60082  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60083  ;;
60084  *)
60085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60086for as_dir in $PATH
60087do
60088  IFS=$as_save_IFS
60089  test -z "$as_dir" && as_dir=.
60090    for ac_exec_ext in '' $ac_executable_extensions; do
60091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60092    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60094    break 2
60095  fi
60096done
60097  done
60098IFS=$as_save_IFS
60099
60100  ;;
60101esac
60102fi
60103CCACHE=$ac_cv_path_CCACHE
60104if test -n "$CCACHE"; then
60105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60106$as_echo "$CCACHE" >&6; }
60107else
60108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60109$as_echo "no" >&6; }
60110fi
60111
60112
60113          if test "x$CCACHE" = x; then
60114            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60115          fi
60116        else
60117          # Otherwise we believe it is a complete path. Use it as it is.
60118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60119$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60120          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60121$as_echo_n "checking for CCACHE... " >&6; }
60122          if test ! -x "$tool_specified"; then
60123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60124$as_echo "not found" >&6; }
60125            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60126          fi
60127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60128$as_echo "$tool_specified" >&6; }
60129        fi
60130      fi
60131    fi
60132
60133  fi
60134
60135
60136
60137  if test "x$CCACHE" = x; then
60138    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60139  fi
60140
60141
60142      PATH="$OLD_PATH"
60143      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60144      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60145    else
60146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60147$as_echo "no" >&6; }
60148      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60149$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60150    fi
60151  elif test "x$enable_ccache" = xno; then
60152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60153$as_echo "no, explicitly disabled" >&6; }
60154    CCACHE_STATUS="Disabled"
60155  elif test "x$enable_ccache" = x; then
60156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60157$as_echo "no" >&6; }
60158  else
60159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60160$as_echo "unknown" >&6; }
60161    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60162  fi
60163
60164
60165
60166# Check whether --with-ccache-dir was given.
60167if test "${with_ccache_dir+set}" = set; then :
60168  withval=$with_ccache_dir;
60169fi
60170
60171
60172  if test "x$with_ccache_dir" != x; then
60173    # When using a non home ccache directory, assume the use is to share ccache files
60174    # with other users. Thus change the umask.
60175    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60176    if test "x$CCACHE" = x; then
60177      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60178$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60179    fi
60180  fi
60181
60182  if test "x$CCACHE" != x; then
60183
60184  if test "x$CCACHE" != x; then
60185    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60186      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60187          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60188      if test "x$HAS_BAD_CCACHE" != "x"; then
60189        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60190      fi
60191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60192$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60193      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60194      PUSHED_FLAGS="$CXXFLAGS"
60195      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60196      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60197/* end confdefs.h.  */
60198
60199int
60200main ()
60201{
60202
60203  ;
60204  return 0;
60205}
60206_ACEOF
60207if ac_fn_cxx_try_compile "$LINENO"; then :
60208  CC_KNOWS_CCACHE_TRICK=yes
60209else
60210  CC_KNOWS_CCACHE_TRICK=no
60211fi
60212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60213      CXXFLAGS="$PUSHED_FLAGS"
60214      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60216$as_echo "yes" >&6; }
60217        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60218
60219        CCACHE_SLOPPINESS=pch_defines,time_macros
60220      else
60221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60222$as_echo "no" >&6; }
60223        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60224      fi
60225    fi
60226
60227    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60228        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60229
60230    if test "x$SET_CCACHE_DIR" != x; then
60231      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60232      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60233    fi
60234  fi
60235
60236  fi
60237
60238
60239###############################################################################
60240#
60241# And now the finish...
60242#
60243###############################################################################
60244
60245# Check for some common pitfalls
60246
60247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60248    file_to_test="$SRC_ROOT/LICENSE"
60249    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60250      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
60251    fi
60252  fi
60253
60254
60255  # Did user specify any unknown variables?
60256
60257  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60258    # Replace the separating ! with spaces before presenting for end user.
60259    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60260    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60261$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60262  fi
60263
60264
60265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60266$as_echo_n "checking if build directory is on local disk... " >&6; }
60267
60268  # df -l lists only local disks; if the given directory is not found then
60269  # a non-zero exit code is given
60270  if test "x$DF" = x; then
60271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60272      # msys does not have df; use Windows "net use" instead.
60273      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60274      if test "x$IS_NETWORK_DISK" = x; then
60275        OUTPUT_DIR_IS_LOCAL="yes"
60276      else
60277        OUTPUT_DIR_IS_LOCAL="no"
60278      fi
60279    else
60280      # No df here, say it's local
60281      OUTPUT_DIR_IS_LOCAL="yes"
60282    fi
60283  else
60284    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60285      OUTPUT_DIR_IS_LOCAL="yes"
60286    else
60287      OUTPUT_DIR_IS_LOCAL="no"
60288    fi
60289  fi
60290
60291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60292$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60293
60294
60295
60296  # Check if the user has any old-style ALT_ variables set.
60297  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60298
60299  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60300  # Since we can't properly handle the dependencies for this, warn the user about the situation
60301  if test -e $OUTPUT_ROOT/spec.gmk; then
60302    IS_RECONFIGURE=yes
60303  else
60304    IS_RECONFIGURE=no
60305  fi
60306
60307
60308# At the end, call the custom hook. (Dummy macro if no custom sources available)
60309
60310
60311# We're messing a bit with internal autoconf variables to put the config.status
60312# in the output directory instead of the current directory.
60313CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60314
60315# Create the actual output files. Now the main work of configure is done.
60316cat >confcache <<\_ACEOF
60317# This file is a shell script that caches the results of configure
60318# tests run on this system so they can be shared between configure
60319# scripts and configure runs, see configure's option --config-cache.
60320# It is not useful on other systems.  If it contains results you don't
60321# want to keep, you may remove or edit it.
60322#
60323# config.status only pays attention to the cache file if you give it
60324# the --recheck option to rerun configure.
60325#
60326# `ac_cv_env_foo' variables (set or unset) will be overridden when
60327# loading this file, other *unset* `ac_cv_foo' will be assigned the
60328# following values.
60329
60330_ACEOF
60331
60332# The following way of writing the cache mishandles newlines in values,
60333# but we know of no workaround that is simple, portable, and efficient.
60334# So, we kill variables containing newlines.
60335# Ultrix sh set writes to stderr and can't be redirected directly,
60336# and sets the high bit in the cache file unless we assign to the vars.
60337(
60338  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60339    eval ac_val=\$$ac_var
60340    case $ac_val in #(
60341    *${as_nl}*)
60342      case $ac_var in #(
60343      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60344$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60345      esac
60346      case $ac_var in #(
60347      _ | IFS | as_nl) ;; #(
60348      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60349      *) { eval $ac_var=; unset $ac_var;} ;;
60350      esac ;;
60351    esac
60352  done
60353
60354  (set) 2>&1 |
60355    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60356    *${as_nl}ac_space=\ *)
60357      # `set' does not quote correctly, so add quotes: double-quote
60358      # substitution turns \\\\ into \\, and sed turns \\ into \.
60359      sed -n \
60360	"s/'/'\\\\''/g;
60361	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60362      ;; #(
60363    *)
60364      # `set' quotes correctly as required by POSIX, so do not add quotes.
60365      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60366      ;;
60367    esac |
60368    sort
60369) |
60370  sed '
60371     /^ac_cv_env_/b end
60372     t clear
60373     :clear
60374     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60375     t end
60376     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60377     :end' >>confcache
60378if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60379  if test -w "$cache_file"; then
60380    if test "x$cache_file" != "x/dev/null"; then
60381      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60382$as_echo "$as_me: updating cache $cache_file" >&6;}
60383      if test ! -f "$cache_file" || test -h "$cache_file"; then
60384	cat confcache >"$cache_file"
60385      else
60386        case $cache_file in #(
60387        */* | ?:*)
60388	  mv -f confcache "$cache_file"$$ &&
60389	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60390        *)
60391	  mv -f confcache "$cache_file" ;;
60392	esac
60393      fi
60394    fi
60395  else
60396    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60397$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60398  fi
60399fi
60400rm -f confcache
60401
60402test "x$prefix" = xNONE && prefix=$ac_default_prefix
60403# Let make expand exec_prefix.
60404test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60405
60406# Transform confdefs.h into DEFS.
60407# Protect against shell expansion while executing Makefile rules.
60408# Protect against Makefile macro expansion.
60409#
60410# If the first sed substitution is executed (which looks for macros that
60411# take arguments), then branch to the quote section.  Otherwise,
60412# look for a macro that doesn't take arguments.
60413ac_script='
60414:mline
60415/\\$/{
60416 N
60417 s,\\\n,,
60418 b mline
60419}
60420t clear
60421:clear
60422s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60423t quote
60424s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60425t quote
60426b any
60427:quote
60428s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60429s/\[/\\&/g
60430s/\]/\\&/g
60431s/\$/$$/g
60432H
60433:any
60434${
60435	g
60436	s/^\n//
60437	s/\n/ /g
60438	p
60439}
60440'
60441DEFS=`sed -n "$ac_script" confdefs.h`
60442
60443
60444ac_libobjs=
60445ac_ltlibobjs=
60446U=
60447for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60448  # 1. Remove the extension, and $U if already installed.
60449  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60450  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60451  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60452  #    will be set to the directory where LIBOBJS objects are built.
60453  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60454  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60455done
60456LIBOBJS=$ac_libobjs
60457
60458LTLIBOBJS=$ac_ltlibobjs
60459
60460
60461
60462: "${CONFIG_STATUS=./config.status}"
60463ac_write_fail=0
60464ac_clean_files_save=$ac_clean_files
60465ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60466{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60467$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60468as_write_fail=0
60469cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60470#! $SHELL
60471# Generated by $as_me.
60472# Run this file to recreate the current configuration.
60473# Compiler output produced by configure, useful for debugging
60474# configure, is in config.log if it exists.
60475
60476debug=false
60477ac_cs_recheck=false
60478ac_cs_silent=false
60479
60480SHELL=\${CONFIG_SHELL-$SHELL}
60481export SHELL
60482_ASEOF
60483cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60484## -------------------- ##
60485## M4sh Initialization. ##
60486## -------------------- ##
60487
60488# Be more Bourne compatible
60489DUALCASE=1; export DUALCASE # for MKS sh
60490if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60491  emulate sh
60492  NULLCMD=:
60493  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60494  # is contrary to our usage.  Disable this feature.
60495  alias -g '${1+"$@"}'='"$@"'
60496  setopt NO_GLOB_SUBST
60497else
60498  case `(set -o) 2>/dev/null` in #(
60499  *posix*) :
60500    set -o posix ;; #(
60501  *) :
60502     ;;
60503esac
60504fi
60505
60506
60507as_nl='
60508'
60509export as_nl
60510# Printing a long string crashes Solaris 7 /usr/bin/printf.
60511as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60512as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60513as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60514# Prefer a ksh shell builtin over an external printf program on Solaris,
60515# but without wasting forks for bash or zsh.
60516if test -z "$BASH_VERSION$ZSH_VERSION" \
60517    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60518  as_echo='print -r --'
60519  as_echo_n='print -rn --'
60520elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60521  as_echo='printf %s\n'
60522  as_echo_n='printf %s'
60523else
60524  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60525    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60526    as_echo_n='/usr/ucb/echo -n'
60527  else
60528    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60529    as_echo_n_body='eval
60530      arg=$1;
60531      case $arg in #(
60532      *"$as_nl"*)
60533	expr "X$arg" : "X\\(.*\\)$as_nl";
60534	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60535      esac;
60536      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60537    '
60538    export as_echo_n_body
60539    as_echo_n='sh -c $as_echo_n_body as_echo'
60540  fi
60541  export as_echo_body
60542  as_echo='sh -c $as_echo_body as_echo'
60543fi
60544
60545# The user is always right.
60546if test "${PATH_SEPARATOR+set}" != set; then
60547  PATH_SEPARATOR=:
60548  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60549    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60550      PATH_SEPARATOR=';'
60551  }
60552fi
60553
60554
60555# IFS
60556# We need space, tab and new line, in precisely that order.  Quoting is
60557# there to prevent editors from complaining about space-tab.
60558# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60559# splitting by setting IFS to empty value.)
60560IFS=" ""	$as_nl"
60561
60562# Find who we are.  Look in the path if we contain no directory separator.
60563as_myself=
60564case $0 in #((
60565  *[\\/]* ) as_myself=$0 ;;
60566  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60567for as_dir in $PATH
60568do
60569  IFS=$as_save_IFS
60570  test -z "$as_dir" && as_dir=.
60571    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60572  done
60573IFS=$as_save_IFS
60574
60575     ;;
60576esac
60577# We did not find ourselves, most probably we were run as `sh COMMAND'
60578# in which case we are not to be found in the path.
60579if test "x$as_myself" = x; then
60580  as_myself=$0
60581fi
60582if test ! -f "$as_myself"; then
60583  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60584  exit 1
60585fi
60586
60587# Unset variables that we do not need and which cause bugs (e.g. in
60588# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60589# suppresses any "Segmentation fault" message there.  '((' could
60590# trigger a bug in pdksh 5.2.14.
60591for as_var in BASH_ENV ENV MAIL MAILPATH
60592do eval test x\${$as_var+set} = xset \
60593  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60594done
60595PS1='$ '
60596PS2='> '
60597PS4='+ '
60598
60599# NLS nuisances.
60600LC_ALL=C
60601export LC_ALL
60602LANGUAGE=C
60603export LANGUAGE
60604
60605# CDPATH.
60606(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60607
60608
60609# as_fn_error STATUS ERROR [LINENO LOG_FD]
60610# ----------------------------------------
60611# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60612# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60613# script with STATUS, using 1 if that was 0.
60614as_fn_error ()
60615{
60616  as_status=$1; test $as_status -eq 0 && as_status=1
60617  if test "$4"; then
60618    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60619    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60620  fi
60621  $as_echo "$as_me: error: $2" >&2
60622  as_fn_exit $as_status
60623} # as_fn_error
60624
60625
60626# as_fn_set_status STATUS
60627# -----------------------
60628# Set $? to STATUS, without forking.
60629as_fn_set_status ()
60630{
60631  return $1
60632} # as_fn_set_status
60633
60634# as_fn_exit STATUS
60635# -----------------
60636# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60637as_fn_exit ()
60638{
60639  set +e
60640  as_fn_set_status $1
60641  exit $1
60642} # as_fn_exit
60643
60644# as_fn_unset VAR
60645# ---------------
60646# Portably unset VAR.
60647as_fn_unset ()
60648{
60649  { eval $1=; unset $1;}
60650}
60651as_unset=as_fn_unset
60652# as_fn_append VAR VALUE
60653# ----------------------
60654# Append the text in VALUE to the end of the definition contained in VAR. Take
60655# advantage of any shell optimizations that allow amortized linear growth over
60656# repeated appends, instead of the typical quadratic growth present in naive
60657# implementations.
60658if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60659  eval 'as_fn_append ()
60660  {
60661    eval $1+=\$2
60662  }'
60663else
60664  as_fn_append ()
60665  {
60666    eval $1=\$$1\$2
60667  }
60668fi # as_fn_append
60669
60670# as_fn_arith ARG...
60671# ------------------
60672# Perform arithmetic evaluation on the ARGs, and store the result in the
60673# global $as_val. Take advantage of shells that can avoid forks. The arguments
60674# must be portable across $(()) and expr.
60675if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60676  eval 'as_fn_arith ()
60677  {
60678    as_val=$(( $* ))
60679  }'
60680else
60681  as_fn_arith ()
60682  {
60683    as_val=`expr "$@" || test $? -eq 1`
60684  }
60685fi # as_fn_arith
60686
60687
60688if expr a : '\(a\)' >/dev/null 2>&1 &&
60689   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60690  as_expr=expr
60691else
60692  as_expr=false
60693fi
60694
60695if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60696  as_basename=basename
60697else
60698  as_basename=false
60699fi
60700
60701if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60702  as_dirname=dirname
60703else
60704  as_dirname=false
60705fi
60706
60707as_me=`$as_basename -- "$0" ||
60708$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60709	 X"$0" : 'X\(//\)$' \| \
60710	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60711$as_echo X/"$0" |
60712    sed '/^.*\/\([^/][^/]*\)\/*$/{
60713	    s//\1/
60714	    q
60715	  }
60716	  /^X\/\(\/\/\)$/{
60717	    s//\1/
60718	    q
60719	  }
60720	  /^X\/\(\/\).*/{
60721	    s//\1/
60722	    q
60723	  }
60724	  s/.*/./; q'`
60725
60726# Avoid depending upon Character Ranges.
60727as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60728as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60729as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60730as_cr_digits='0123456789'
60731as_cr_alnum=$as_cr_Letters$as_cr_digits
60732
60733ECHO_C= ECHO_N= ECHO_T=
60734case `echo -n x` in #(((((
60735-n*)
60736  case `echo 'xy\c'` in
60737  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60738  xy)  ECHO_C='\c';;
60739  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60740       ECHO_T='	';;
60741  esac;;
60742*)
60743  ECHO_N='-n';;
60744esac
60745
60746rm -f conf$$ conf$$.exe conf$$.file
60747if test -d conf$$.dir; then
60748  rm -f conf$$.dir/conf$$.file
60749else
60750  rm -f conf$$.dir
60751  mkdir conf$$.dir 2>/dev/null
60752fi
60753if (echo >conf$$.file) 2>/dev/null; then
60754  if ln -s conf$$.file conf$$ 2>/dev/null; then
60755    as_ln_s='ln -s'
60756    # ... but there are two gotchas:
60757    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60758    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60759    # In both cases, we have to default to `cp -pR'.
60760    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60761      as_ln_s='cp -pR'
60762  elif ln conf$$.file conf$$ 2>/dev/null; then
60763    as_ln_s=ln
60764  else
60765    as_ln_s='cp -pR'
60766  fi
60767else
60768  as_ln_s='cp -pR'
60769fi
60770rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60771rmdir conf$$.dir 2>/dev/null
60772
60773
60774# as_fn_mkdir_p
60775# -------------
60776# Create "$as_dir" as a directory, including parents if necessary.
60777as_fn_mkdir_p ()
60778{
60779
60780  case $as_dir in #(
60781  -*) as_dir=./$as_dir;;
60782  esac
60783  test -d "$as_dir" || eval $as_mkdir_p || {
60784    as_dirs=
60785    while :; do
60786      case $as_dir in #(
60787      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60788      *) as_qdir=$as_dir;;
60789      esac
60790      as_dirs="'$as_qdir' $as_dirs"
60791      as_dir=`$as_dirname -- "$as_dir" ||
60792$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60793	 X"$as_dir" : 'X\(//\)[^/]' \| \
60794	 X"$as_dir" : 'X\(//\)$' \| \
60795	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60796$as_echo X"$as_dir" |
60797    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60798	    s//\1/
60799	    q
60800	  }
60801	  /^X\(\/\/\)[^/].*/{
60802	    s//\1/
60803	    q
60804	  }
60805	  /^X\(\/\/\)$/{
60806	    s//\1/
60807	    q
60808	  }
60809	  /^X\(\/\).*/{
60810	    s//\1/
60811	    q
60812	  }
60813	  s/.*/./; q'`
60814      test -d "$as_dir" && break
60815    done
60816    test -z "$as_dirs" || eval "mkdir $as_dirs"
60817  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60818
60819
60820} # as_fn_mkdir_p
60821if mkdir -p . 2>/dev/null; then
60822  as_mkdir_p='mkdir -p "$as_dir"'
60823else
60824  test -d ./-p && rmdir ./-p
60825  as_mkdir_p=false
60826fi
60827
60828
60829# as_fn_executable_p FILE
60830# -----------------------
60831# Test if FILE is an executable regular file.
60832as_fn_executable_p ()
60833{
60834  test -f "$1" && test -x "$1"
60835} # as_fn_executable_p
60836as_test_x='test -x'
60837as_executable_p=as_fn_executable_p
60838
60839# Sed expression to map a string onto a valid CPP name.
60840as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60841
60842# Sed expression to map a string onto a valid variable name.
60843as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60844
60845
60846exec 6>&1
60847## ----------------------------------- ##
60848## Main body of $CONFIG_STATUS script. ##
60849## ----------------------------------- ##
60850_ASEOF
60851test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
60852
60853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60854# Save the log message, to keep $0 and so on meaningful, and to
60855# report actual input values of CONFIG_FILES etc. instead of their
60856# values after options handling.
60857ac_log="
60858This file was extended by OpenJDK $as_me jdk9, which was
60859generated by GNU Autoconf 2.69.  Invocation command line was
60860
60861  CONFIG_FILES    = $CONFIG_FILES
60862  CONFIG_HEADERS  = $CONFIG_HEADERS
60863  CONFIG_LINKS    = $CONFIG_LINKS
60864  CONFIG_COMMANDS = $CONFIG_COMMANDS
60865  $ $0 $@
60866
60867on `(hostname || uname -n) 2>/dev/null | sed 1q`
60868"
60869
60870_ACEOF
60871
60872case $ac_config_files in *"
60873"*) set x $ac_config_files; shift; ac_config_files=$*;;
60874esac
60875
60876
60877
60878cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60879# Files that config.status was made for.
60880config_files="$ac_config_files"
60881
60882_ACEOF
60883
60884cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60885ac_cs_usage="\
60886\`$as_me' instantiates files and other configuration actions
60887from templates according to the current configuration.  Unless the files
60888and actions are specified as TAGs, all are instantiated by default.
60889
60890Usage: $0 [OPTION]... [TAG]...
60891
60892  -h, --help       print this help, then exit
60893  -V, --version    print version number and configuration settings, then exit
60894      --config     print configuration, then exit
60895  -q, --quiet, --silent
60896                   do not print progress messages
60897  -d, --debug      don't remove temporary files
60898      --recheck    update $as_me by reconfiguring in the same conditions
60899      --file=FILE[:TEMPLATE]
60900                   instantiate the configuration file FILE
60901
60902Configuration files:
60903$config_files
60904
60905Report bugs to <build-dev@openjdk.java.net>.
60906OpenJDK home page: <http://openjdk.java.net>."
60907
60908_ACEOF
60909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60910ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
60911ac_cs_version="\\
60912OpenJDK config.status jdk9
60913configured by $0, generated by GNU Autoconf 2.69,
60914  with options \\"\$ac_cs_config\\"
60915
60916Copyright (C) 2012 Free Software Foundation, Inc.
60917This config.status script is free software; the Free Software Foundation
60918gives unlimited permission to copy, distribute and modify it."
60919
60920ac_pwd='$ac_pwd'
60921srcdir='$srcdir'
60922AWK='$AWK'
60923test -n "\$AWK" || AWK=awk
60924_ACEOF
60925
60926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60927# The default lists apply if the user does not specify any file.
60928ac_need_defaults=:
60929while test $# != 0
60930do
60931  case $1 in
60932  --*=?*)
60933    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60934    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
60935    ac_shift=:
60936    ;;
60937  --*=)
60938    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60939    ac_optarg=
60940    ac_shift=:
60941    ;;
60942  *)
60943    ac_option=$1
60944    ac_optarg=$2
60945    ac_shift=shift
60946    ;;
60947  esac
60948
60949  case $ac_option in
60950  # Handling of the options.
60951  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
60952    ac_cs_recheck=: ;;
60953  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
60954    $as_echo "$ac_cs_version"; exit ;;
60955  --config | --confi | --conf | --con | --co | --c )
60956    $as_echo "$ac_cs_config"; exit ;;
60957  --debug | --debu | --deb | --de | --d | -d )
60958    debug=: ;;
60959  --file | --fil | --fi | --f )
60960    $ac_shift
60961    case $ac_optarg in
60962    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60963    '') as_fn_error $? "missing file argument" ;;
60964    esac
60965    as_fn_append CONFIG_FILES " '$ac_optarg'"
60966    ac_need_defaults=false;;
60967  --he | --h |  --help | --hel | -h )
60968    $as_echo "$ac_cs_usage"; exit ;;
60969  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
60970  | -silent | --silent | --silen | --sile | --sil | --si | --s)
60971    ac_cs_silent=: ;;
60972
60973  # This is an error.
60974  -*) as_fn_error $? "unrecognized option: \`$1'
60975Try \`$0 --help' for more information." ;;
60976
60977  *) as_fn_append ac_config_targets " $1"
60978     ac_need_defaults=false ;;
60979
60980  esac
60981  shift
60982done
60983
60984ac_configure_extra_args=
60985
60986if $ac_cs_silent; then
60987  exec 6>/dev/null
60988  ac_configure_extra_args="$ac_configure_extra_args --silent"
60989fi
60990
60991_ACEOF
60992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60993if \$ac_cs_recheck; then
60994  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60995  shift
60996  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
60997  CONFIG_SHELL='$SHELL'
60998  export CONFIG_SHELL
60999  exec "\$@"
61000fi
61001
61002_ACEOF
61003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61004exec 5>>config.log
61005{
61006  echo
61007  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
61008## Running $as_me. ##
61009_ASBOX
61010  $as_echo "$ac_log"
61011} >&5
61012
61013_ACEOF
61014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61015_ACEOF
61016
61017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61018
61019# Handling of arguments.
61020for ac_config_target in $ac_config_targets
61021do
61022  case $ac_config_target in
61023    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
61024    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
61025    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
61026    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
61027    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
61028
61029  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61030  esac
61031done
61032
61033
61034# If the user did not use the arguments to specify the items to instantiate,
61035# then the envvar interface is used.  Set only those that are not.
61036# We use the long form for the default assignment because of an extremely
61037# bizarre bug on SunOS 4.1.3.
61038if $ac_need_defaults; then
61039  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
61040fi
61041
61042# Have a temporary directory for convenience.  Make it in the build tree
61043# simply because there is no reason against having it here, and in addition,
61044# creating and moving files from /tmp can sometimes cause problems.
61045# Hook for its removal unless debugging.
61046# Note that there is a small window in which the directory will not be cleaned:
61047# after its creation but before its name has been assigned to `$tmp'.
61048$debug ||
61049{
61050  tmp= ac_tmp=
61051  trap 'exit_status=$?
61052  : "${ac_tmp:=$tmp}"
61053  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61054' 0
61055  trap 'as_fn_exit 1' 1 2 13 15
61056}
61057# Create a (secure) tmp directory for tmp files.
61058
61059{
61060  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61061  test -d "$tmp"
61062}  ||
61063{
61064  tmp=./conf$$-$RANDOM
61065  (umask 077 && mkdir "$tmp")
61066} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61067ac_tmp=$tmp
61068
61069# Set up the scripts for CONFIG_FILES section.
61070# No need to generate them if there are no CONFIG_FILES.
61071# This happens for instance with `./config.status config.h'.
61072if test -n "$CONFIG_FILES"; then
61073
61074
61075ac_cr=`echo X | tr X '\015'`
61076# On cygwin, bash can eat \r inside `` if the user requested igncr.
61077# But we know of no other shell where ac_cr would be empty at this
61078# point, so we can use a bashism as a fallback.
61079if test "x$ac_cr" = x; then
61080  eval ac_cr=\$\'\\r\'
61081fi
61082ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61083if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61084  ac_cs_awk_cr='\\r'
61085else
61086  ac_cs_awk_cr=$ac_cr
61087fi
61088
61089echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61090_ACEOF
61091
61092
61093{
61094  echo "cat >conf$$subs.awk <<_ACEOF" &&
61095  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61096  echo "_ACEOF"
61097} >conf$$subs.sh ||
61098  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61099ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61100ac_delim='%!_!# '
61101for ac_last_try in false false false false false :; do
61102  . ./conf$$subs.sh ||
61103    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61104
61105  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61106  if test $ac_delim_n = $ac_delim_num; then
61107    break
61108  elif $ac_last_try; then
61109    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61110  else
61111    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61112  fi
61113done
61114rm -f conf$$subs.sh
61115
61116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61117cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61118_ACEOF
61119sed -n '
61120h
61121s/^/S["/; s/!.*/"]=/
61122p
61123g
61124s/^[^!]*!//
61125:repl
61126t repl
61127s/'"$ac_delim"'$//
61128t delim
61129:nl
61130h
61131s/\(.\{148\}\)..*/\1/
61132t more1
61133s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61134p
61135n
61136b repl
61137:more1
61138s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61139p
61140g
61141s/.\{148\}//
61142t nl
61143:delim
61144h
61145s/\(.\{148\}\)..*/\1/
61146t more2
61147s/["\\]/\\&/g; s/^/"/; s/$/"/
61148p
61149b
61150:more2
61151s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61152p
61153g
61154s/.\{148\}//
61155t delim
61156' <conf$$subs.awk | sed '
61157/^[^""]/{
61158  N
61159  s/\n//
61160}
61161' >>$CONFIG_STATUS || ac_write_fail=1
61162rm -f conf$$subs.awk
61163cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61164_ACAWK
61165cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61166  for (key in S) S_is_set[key] = 1
61167  FS = ""
61168
61169}
61170{
61171  line = $ 0
61172  nfields = split(line, field, "@")
61173  substed = 0
61174  len = length(field[1])
61175  for (i = 2; i < nfields; i++) {
61176    key = field[i]
61177    keylen = length(key)
61178    if (S_is_set[key]) {
61179      value = S[key]
61180      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61181      len += length(value) + length(field[++i])
61182      substed = 1
61183    } else
61184      len += 1 + keylen
61185  }
61186
61187  print line
61188}
61189
61190_ACAWK
61191_ACEOF
61192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61193if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61194  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61195else
61196  cat
61197fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61198  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61199_ACEOF
61200
61201# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61202# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61203# trailing colons and then remove the whole line if VPATH becomes empty
61204# (actually we leave an empty line to preserve line numbers).
61205if test "x$srcdir" = x.; then
61206  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61207h
61208s///
61209s/^/:/
61210s/[	 ]*$/:/
61211s/:\$(srcdir):/:/g
61212s/:\${srcdir}:/:/g
61213s/:@srcdir@:/:/g
61214s/^:*//
61215s/:*$//
61216x
61217s/\(=[	 ]*\).*/\1/
61218G
61219s/\n//
61220s/^[^=]*=[	 ]*$//
61221}'
61222fi
61223
61224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61225fi # test -n "$CONFIG_FILES"
61226
61227
61228eval set X "  :F $CONFIG_FILES      "
61229shift
61230for ac_tag
61231do
61232  case $ac_tag in
61233  :[FHLC]) ac_mode=$ac_tag; continue;;
61234  esac
61235  case $ac_mode$ac_tag in
61236  :[FHL]*:*);;
61237  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61238  :[FH]-) ac_tag=-:-;;
61239  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61240  esac
61241  ac_save_IFS=$IFS
61242  IFS=:
61243  set x $ac_tag
61244  IFS=$ac_save_IFS
61245  shift
61246  ac_file=$1
61247  shift
61248
61249  case $ac_mode in
61250  :L) ac_source=$1;;
61251  :[FH])
61252    ac_file_inputs=
61253    for ac_f
61254    do
61255      case $ac_f in
61256      -) ac_f="$ac_tmp/stdin";;
61257      *) # Look for the file first in the build tree, then in the source tree
61258	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61259	 # because $ac_f cannot contain `:'.
61260	 test -f "$ac_f" ||
61261	   case $ac_f in
61262	   [\\/$]*) false;;
61263	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61264	   esac ||
61265	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61266      esac
61267      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61268      as_fn_append ac_file_inputs " '$ac_f'"
61269    done
61270
61271    # Let's still pretend it is `configure' which instantiates (i.e., don't
61272    # use $as_me), people would be surprised to read:
61273    #    /* config.h.  Generated by config.status.  */
61274    configure_input='Generated from '`
61275	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61276	`' by configure.'
61277    if test x"$ac_file" != x-; then
61278      configure_input="$ac_file.  $configure_input"
61279      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61280$as_echo "$as_me: creating $ac_file" >&6;}
61281    fi
61282    # Neutralize special characters interpreted by sed in replacement strings.
61283    case $configure_input in #(
61284    *\&* | *\|* | *\\* )
61285       ac_sed_conf_input=`$as_echo "$configure_input" |
61286       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61287    *) ac_sed_conf_input=$configure_input;;
61288    esac
61289
61290    case $ac_tag in
61291    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61292      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61293    esac
61294    ;;
61295  esac
61296
61297  ac_dir=`$as_dirname -- "$ac_file" ||
61298$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61299	 X"$ac_file" : 'X\(//\)[^/]' \| \
61300	 X"$ac_file" : 'X\(//\)$' \| \
61301	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61302$as_echo X"$ac_file" |
61303    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61304	    s//\1/
61305	    q
61306	  }
61307	  /^X\(\/\/\)[^/].*/{
61308	    s//\1/
61309	    q
61310	  }
61311	  /^X\(\/\/\)$/{
61312	    s//\1/
61313	    q
61314	  }
61315	  /^X\(\/\).*/{
61316	    s//\1/
61317	    q
61318	  }
61319	  s/.*/./; q'`
61320  as_dir="$ac_dir"; as_fn_mkdir_p
61321  ac_builddir=.
61322
61323case "$ac_dir" in
61324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61325*)
61326  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61327  # A ".." for each directory in $ac_dir_suffix.
61328  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61329  case $ac_top_builddir_sub in
61330  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61331  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61332  esac ;;
61333esac
61334ac_abs_top_builddir=$ac_pwd
61335ac_abs_builddir=$ac_pwd$ac_dir_suffix
61336# for backward compatibility:
61337ac_top_builddir=$ac_top_build_prefix
61338
61339case $srcdir in
61340  .)  # We are building in place.
61341    ac_srcdir=.
61342    ac_top_srcdir=$ac_top_builddir_sub
61343    ac_abs_top_srcdir=$ac_pwd ;;
61344  [\\/]* | ?:[\\/]* )  # Absolute name.
61345    ac_srcdir=$srcdir$ac_dir_suffix;
61346    ac_top_srcdir=$srcdir
61347    ac_abs_top_srcdir=$srcdir ;;
61348  *) # Relative name.
61349    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61350    ac_top_srcdir=$ac_top_build_prefix$srcdir
61351    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61352esac
61353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61354
61355
61356  case $ac_mode in
61357  :F)
61358  #
61359  # CONFIG_FILE
61360  #
61361
61362_ACEOF
61363
61364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61365# If the template does not know about datarootdir, expand it.
61366# FIXME: This hack should be removed a few years after 2.60.
61367ac_datarootdir_hack=; ac_datarootdir_seen=
61368ac_sed_dataroot='
61369/datarootdir/ {
61370  p
61371  q
61372}
61373/@datadir@/p
61374/@docdir@/p
61375/@infodir@/p
61376/@localedir@/p
61377/@mandir@/p'
61378case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61379*datarootdir*) ac_datarootdir_seen=yes;;
61380*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61381  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61382$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61383_ACEOF
61384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61385  ac_datarootdir_hack='
61386  s&@datadir@&$datadir&g
61387  s&@docdir@&$docdir&g
61388  s&@infodir@&$infodir&g
61389  s&@localedir@&$localedir&g
61390  s&@mandir@&$mandir&g
61391  s&\\\${datarootdir}&$datarootdir&g' ;;
61392esac
61393_ACEOF
61394
61395# Neutralize VPATH when `$srcdir' = `.'.
61396# Shell code in configure.ac might set extrasub.
61397# FIXME: do we really want to maintain this feature?
61398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61399ac_sed_extra="$ac_vpsub
61400$extrasub
61401_ACEOF
61402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61403:t
61404/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61405s|@configure_input@|$ac_sed_conf_input|;t t
61406s&@top_builddir@&$ac_top_builddir_sub&;t t
61407s&@top_build_prefix@&$ac_top_build_prefix&;t t
61408s&@srcdir@&$ac_srcdir&;t t
61409s&@abs_srcdir@&$ac_abs_srcdir&;t t
61410s&@top_srcdir@&$ac_top_srcdir&;t t
61411s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61412s&@builddir@&$ac_builddir&;t t
61413s&@abs_builddir@&$ac_abs_builddir&;t t
61414s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61415$ac_datarootdir_hack
61416"
61417eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61418  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61419
61420test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61421  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61422  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61423      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61424  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61425which seems to be undefined.  Please make sure it is defined" >&5
61426$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61427which seems to be undefined.  Please make sure it is defined" >&2;}
61428
61429  rm -f "$ac_tmp/stdin"
61430  case $ac_file in
61431  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61432  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61433  esac \
61434  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61435 ;;
61436
61437
61438
61439  esac
61440
61441done # for ac_tag
61442
61443
61444as_fn_exit 0
61445_ACEOF
61446ac_clean_files=$ac_clean_files_save
61447
61448test $ac_write_fail = 0 ||
61449  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61450
61451
61452# configure is writing to config.log, and then calls config.status.
61453# config.status does its own redirection, appending to config.log.
61454# Unfortunately, on DOS this fails, as config.log is still kept open
61455# by configure, so config.status won't be able to write to it; its
61456# output is simply discarded.  So we exec the FD to /dev/null,
61457# effectively closing config.log, so it can be properly (re)opened and
61458# appended to by config.status.  When coming back to configure, we
61459# need to make the FD available again.
61460if test "$no_create" != yes; then
61461  ac_cs_success=:
61462  ac_config_status_args=
61463  test "$silent" = yes &&
61464    ac_config_status_args="$ac_config_status_args --quiet"
61465  exec 5>/dev/null
61466  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61467  exec 5>>config.log
61468  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61469  # would make configure fail if this is the last instruction.
61470  $ac_cs_success || as_fn_exit 1
61471fi
61472if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61473  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61474$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61475fi
61476
61477
61478# After AC_OUTPUT, we need to do final work
61479
61480
61481  # Try to move config.log (generated by autoconf) to the configure-support directory.
61482  if test -e ./config.log; then
61483    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61484  fi
61485
61486  # Rotate our log file (configure.log)
61487  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61488    $RM -f "$OUTPUT_ROOT/configure.log.old"
61489  fi
61490  if test -e "$OUTPUT_ROOT/configure.log"; then
61491    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61492  fi
61493
61494  # Move configure.log from current directory to the build output root
61495  if test -e ./configure.log; then
61496    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61497  fi
61498
61499  # Make the compare script executable
61500  $CHMOD +x $OUTPUT_ROOT/compare.sh
61501
61502
61503# Finally output some useful information to the user
61504
61505  # Finally output some useful information to the user
61506
61507  printf "\n"
61508  printf "====================================================\n"
61509  if test "x$no_create" != "xyes"; then
61510    if test "x$IS_RECONFIGURE" != "xyes"; then
61511      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61512    else
61513      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61514    fi
61515  else
61516    if test "x$IS_RECONFIGURE" != "xyes"; then
61517      printf "A configuration has been successfully checked but not created\n"
61518    else
61519      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61520    fi
61521  fi
61522  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61523    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61524  else
61525    printf "using default settings.\n"
61526  fi
61527
61528  printf "\n"
61529  printf "Configuration summary:\n"
61530  printf "* Debug level:    $DEBUG_LEVEL\n"
61531  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61532  printf "* JDK variant:    $JDK_VARIANT\n"
61533  printf "* JVM variants:   $with_jvm_variants\n"
61534  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61535  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61536
61537  printf "\n"
61538  printf "Tools summary:\n"
61539  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61540    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61541  fi
61542  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61543  if test "x$TOOLCHAIN_VERSION" != "x"; then
61544    print_version=" $TOOLCHAIN_VERSION"
61545  fi
61546  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61547  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61548  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61549
61550  printf "\n"
61551  printf "Build performance summary:\n"
61552  printf "* Cores to use:   $JOBS\n"
61553  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61554  if test "x$CCACHE_STATUS" != "x"; then
61555    printf "* ccache status:  $CCACHE_STATUS\n"
61556  fi
61557  printf "\n"
61558
61559  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61560    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61561    printf "will result in longer build times.\n"
61562    printf "\n"
61563  fi
61564
61565  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61566    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61567    printf "These are not respected, and will be ignored. It is recommended\n"
61568    printf "that you clean your environment. The following variables are set:\n"
61569    printf "$FOUND_ALT_VARIABLES\n"
61570    printf "\n"
61571  fi
61572
61573  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61574    printf "WARNING: Your build output directory is not on a local disk.\n"
61575    printf "This will severely degrade build performance!\n"
61576    printf "It is recommended that you create an output directory on a local disk,\n"
61577    printf "and run the configure script again from that directory.\n"
61578    printf "\n"
61579  fi
61580
61581  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61582    printf "WARNING: The result of this configuration has overridden an older\n"
61583    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61584    printf "proper build. Failure to do so might result in strange build problems.\n"
61585    printf "\n"
61586  fi
61587
61588  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61589    printf "WARNING: The result of this configuration was not saved.\n"
61590    printf "You should run without '--no-create | -n' to create the configuration.\n"
61591    printf "\n"
61592  fi
61593
61594
61595
61596  # Locate config.log.
61597  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61598    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61599  elif test -e "./config.log"; then
61600    CONFIG_LOG_PATH="."
61601  fi
61602
61603  if test -e "$CONFIG_LOG_PATH/config.log"; then
61604    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61605    if test $? -eq 0; then
61606      printf "The following warnings were produced. Repeated here for convenience:\n"
61607      # We must quote sed expression (using []) to stop m4 from eating the [].
61608      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61609      printf "\n"
61610    fi
61611  fi
61612
61613